mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
removing --disable-risky patch by (Josh Varner <jlvarner gmail com>)
Originally committed as revision 3966 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
09f20d3786
commit
fe533bb3a7
10
configure
vendored
10
configure
vendored
@ -63,7 +63,6 @@ echo " --disable-mpegaudio-hp faster (but less accurate)"
|
||||
echo " mpegaudio decoding [default=no]"
|
||||
echo " --disable-ffserver disable ffserver build"
|
||||
echo " --disable-ffplay disable ffplay build"
|
||||
echo " --disable-risky disables patent encumbered codecs"
|
||||
echo " --enable-small optimize for size instead of speed"
|
||||
echo " --enable-memalign-hack emulate memalign, interferes with memory debuggers"
|
||||
echo " --disable-strip disable stripping of executables and shared libraries"
|
||||
@ -188,7 +187,6 @@ LIBSUF=".a"
|
||||
SLIBPREF="lib"
|
||||
SLIBSUF=".so"
|
||||
EXESUF=""
|
||||
risky="yes"
|
||||
amr_nb="no"
|
||||
amr_wb="no"
|
||||
amr_nb_fixed="no"
|
||||
@ -442,8 +440,6 @@ for opt do
|
||||
;;
|
||||
--disable-ffplay) ffplay="no"
|
||||
;;
|
||||
--disable-risky) risky="no"
|
||||
;;
|
||||
--enable-small) optimize="small"
|
||||
;;
|
||||
--enable-amr_nb) amr_nb="yes"
|
||||
@ -1062,7 +1058,6 @@ echo "SDL support $sdl"
|
||||
if test $sdl_too_old = "yes"; then
|
||||
echo "-> Your SDL version is too old - please upgrade to have FFplay/SDL support"
|
||||
fi
|
||||
echo "risky / patent encumbered codecs $risky"
|
||||
|
||||
if test "$vhook" = "yes" ; then
|
||||
echo "Imlib2 support $imlib2"
|
||||
@ -1435,11 +1430,6 @@ if test "$ffplay" = "yes" ; then
|
||||
echo "CONFIG_FFPLAY=yes" >> config.mak
|
||||
fi
|
||||
|
||||
if test "$risky" = "yes" ; then
|
||||
echo "#define CONFIG_RISKY 1" >> $TMPH
|
||||
echo "CONFIG_RISKY=yes" >> config.mak
|
||||
fi
|
||||
|
||||
if test "$gpl" = "yes" ; then
|
||||
echo "#define CONFIG_GPL 1" >> $TMPH
|
||||
echo "CONFIG_GPL=yes" >> config.mak
|
||||
|
@ -21,7 +21,8 @@ OBJS= bitstream.o utils.o mem.o allcodecs.o \
|
||||
msvideo1.o vqavideo.o idcinvideo.o adx.o rational.o faandct.o 8bps.o \
|
||||
smc.o parser.o flicvideo.o truemotion1.o vmdav.o lcl.o qtrle.o g726.o \
|
||||
flac.o vp3dsp.o integer.o snow.o tscc.o sonic.o ulti.o h264idct.o \
|
||||
qdrw.o xl.o rangecoder.o png.o pnm.o qpeg.o vc9.o
|
||||
qdrw.o xl.o rangecoder.o png.o pnm.o qpeg.o vc9.o h263.o h261.o \
|
||||
msmpeg4.o h263dec.o svq1.o rv10.o wmadec.o indeo3.o
|
||||
|
||||
AMROBJS=
|
||||
ifeq ($(AMR_NB),yes)
|
||||
@ -62,11 +63,6 @@ OBJS+= $(AMROBJS)
|
||||
CLEANAMRWB=cleanamrwbfloat
|
||||
ASM_OBJS=
|
||||
|
||||
# codecs which are patented in some non free countries like the us
|
||||
ifeq ($(CONFIG_RISKY),yes)
|
||||
OBJS+= h263.o h261.o msmpeg4.o h263dec.o svq1.o rv10.o wmadec.o indeo3.o
|
||||
endif
|
||||
|
||||
ifeq ($(HAVE_XVMC_ACCEL),yes)
|
||||
OBJS+= xvmcvideo.o
|
||||
endif
|
||||
|
@ -57,7 +57,6 @@ void avcodec_register_all(void)
|
||||
#endif
|
||||
register_avcodec(&mpeg1video_encoder);
|
||||
// register_avcodec(&h264_encoder);
|
||||
#ifdef CONFIG_RISKY
|
||||
register_avcodec(&mpeg2video_encoder);
|
||||
register_avcodec(&h261_encoder);
|
||||
register_avcodec(&h263_encoder);
|
||||
@ -72,7 +71,6 @@ void avcodec_register_all(void)
|
||||
register_avcodec(&wmv1_encoder);
|
||||
register_avcodec(&wmv2_encoder);
|
||||
register_avcodec(&svq1_encoder);
|
||||
#endif
|
||||
register_avcodec(&mjpeg_encoder);
|
||||
register_avcodec(&ljpeg_encoder);
|
||||
#ifdef CONFIG_ZLIB
|
||||
@ -99,7 +97,6 @@ void avcodec_register_all(void)
|
||||
|
||||
/* decoders */
|
||||
#ifdef CONFIG_DECODERS
|
||||
#ifdef CONFIG_RISKY
|
||||
register_avcodec(&h263_decoder);
|
||||
register_avcodec(&h261_decoder);
|
||||
register_avcodec(&mpeg4_decoder);
|
||||
@ -127,7 +124,6 @@ void avcodec_register_all(void)
|
||||
#ifdef CONFIG_FAAD
|
||||
register_avcodec(&aac_decoder);
|
||||
register_avcodec(&mpeg4aac_decoder);
|
||||
#endif
|
||||
#endif
|
||||
register_avcodec(&mpeg1video_decoder);
|
||||
register_avcodec(&mpeg2video_decoder);
|
||||
|
@ -3145,8 +3145,6 @@ AVCodec mpeg1video_encoder = {
|
||||
.capabilities= CODEC_CAP_DELAY,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_RISKY
|
||||
|
||||
AVCodec mpeg2video_encoder = {
|
||||
"mpeg2video",
|
||||
CODEC_TYPE_VIDEO,
|
||||
@ -3159,7 +3157,6 @@ AVCodec mpeg2video_encoder = {
|
||||
.capabilities= CODEC_CAP_DELAY,
|
||||
};
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_XVMC
|
||||
static int mpeg_mc_decode_init(AVCodecContext *avctx){
|
||||
|
@ -1113,7 +1113,6 @@ int MPV_encode_init(AVCodecContext *avctx)
|
||||
avctx->delay=0;
|
||||
s->low_delay=1;
|
||||
break;
|
||||
#ifdef CONFIG_RISKY
|
||||
case CODEC_ID_H261:
|
||||
s->out_format = FMT_H261;
|
||||
avctx->delay=0;
|
||||
@ -1225,7 +1224,6 @@ int MPV_encode_init(AVCodecContext *avctx)
|
||||
avctx->delay=0;
|
||||
s->low_delay=1;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
@ -1248,14 +1246,12 @@ int MPV_encode_init(AVCodecContext *avctx)
|
||||
ff_set_cmp(&s->dsp, s->dsp.frame_skip_cmp, s->avctx->frame_skip_cmp);
|
||||
|
||||
#ifdef CONFIG_ENCODERS
|
||||
#ifdef CONFIG_RISKY
|
||||
if (s->out_format == FMT_H261)
|
||||
ff_h261_encode_init(s);
|
||||
if (s->out_format == FMT_H263)
|
||||
h263_encode_init(s);
|
||||
if(s->msmpeg4_version)
|
||||
ff_msmpeg4_encode_init(s);
|
||||
#endif
|
||||
if (s->out_format == FMT_MPEG1)
|
||||
ff_mpeg1_encode_init(s);
|
||||
#endif
|
||||
@ -1263,7 +1259,6 @@ int MPV_encode_init(AVCodecContext *avctx)
|
||||
/* init q matrix */
|
||||
for(i=0;i<64;i++) {
|
||||
int j= s->dsp.idct_permutation[i];
|
||||
#ifdef CONFIG_RISKY
|
||||
if(s->codec_id==CODEC_ID_MPEG4 && s->mpeg_quant){
|
||||
s->intra_matrix[j] = ff_mpeg4_default_intra_matrix[i];
|
||||
s->inter_matrix[j] = ff_mpeg4_default_non_intra_matrix[i];
|
||||
@ -1271,7 +1266,6 @@ int MPV_encode_init(AVCodecContext *avctx)
|
||||
s->intra_matrix[j] =
|
||||
s->inter_matrix[j] = ff_mpeg1_default_non_intra_matrix[i];
|
||||
}else
|
||||
#endif
|
||||
{ /* mpeg1/2 */
|
||||
s->intra_matrix[j] = ff_mpeg1_default_intra_matrix[i];
|
||||
s->inter_matrix[j] = ff_mpeg1_default_non_intra_matrix[i];
|
||||
@ -3267,7 +3261,6 @@ static inline void MPV_motion(MpegEncContext *s,
|
||||
|
||||
switch(s->mv_type) {
|
||||
case MV_TYPE_16X16:
|
||||
#ifdef CONFIG_RISKY
|
||||
if(s->mcsel){
|
||||
if(s->real_sprite_warping_points==1){
|
||||
gmc1_motion(s, dest_y, dest_cb, dest_cr,
|
||||
@ -3286,7 +3279,6 @@ static inline void MPV_motion(MpegEncContext *s,
|
||||
ref_picture, pix_op,
|
||||
s->mv[dir][0][0], s->mv[dir][0][1], 16);
|
||||
}else
|
||||
#endif
|
||||
{
|
||||
mpeg_motion(s, dest_y, dest_cb, dest_cr,
|
||||
0, 0, 0,
|
||||
@ -3792,11 +3784,9 @@ static always_inline void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM bloc
|
||||
}
|
||||
}//fi gray
|
||||
}
|
||||
#ifdef CONFIG_RISKY
|
||||
else{
|
||||
ff_wmv2_add_mb(s, block, dest_y, dest_cb, dest_cr);
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
/* dct only in intra block */
|
||||
if(s->encoding || !(s->codec_id==CODEC_ID_MPEG1VIDEO || s->codec_id==CODEC_ID_MPEG2VIDEO)){
|
||||
@ -4265,7 +4255,6 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
|
||||
case CODEC_ID_MPEG1VIDEO:
|
||||
case CODEC_ID_MPEG2VIDEO:
|
||||
mpeg1_encode_mb(s, s->block, motion_x, motion_y); break;
|
||||
#ifdef CONFIG_RISKY
|
||||
case CODEC_ID_MPEG4:
|
||||
mpeg4_encode_mb(s, s->block, motion_x, motion_y); break;
|
||||
case CODEC_ID_MSMPEG4V2:
|
||||
@ -4282,7 +4271,6 @@ static void encode_mb(MpegEncContext *s, int motion_x, int motion_y)
|
||||
case CODEC_ID_RV10:
|
||||
case CODEC_ID_RV20:
|
||||
h263_encode_mb(s, s->block, motion_x, motion_y); break;
|
||||
#endif
|
||||
case CODEC_ID_MJPEG:
|
||||
mjpeg_encode_mb(s, s->block); break;
|
||||
default:
|
||||
@ -4623,7 +4611,6 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
|
||||
s->last_mv_dir = 0;
|
||||
|
||||
#ifdef CONFIG_RISKY
|
||||
switch(s->codec_id){
|
||||
case CODEC_ID_H263:
|
||||
case CODEC_ID_H263P:
|
||||
@ -4635,7 +4622,6 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
ff_mpeg4_init_partitions(s);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
s->resync_mb_x=0;
|
||||
s->resync_mb_y=0;
|
||||
@ -4679,7 +4665,6 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
}
|
||||
|
||||
/* write gob / video packet header */
|
||||
#ifdef CONFIG_RISKY
|
||||
if(s->rtp_mode){
|
||||
int current_packet_size, is_gob_start;
|
||||
|
||||
@ -4759,7 +4744,6 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
s->resync_mb_y=mb_y;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if( (s->resync_mb_x == s->mb_x)
|
||||
&& s->resync_mb_y+1 == s->mb_y){
|
||||
@ -4858,9 +4842,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
|
||||
s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT;
|
||||
s->mb_intra= 0;
|
||||
#ifdef CONFIG_RISKY
|
||||
ff_mpeg4_set_direct_mv(s, mx, my);
|
||||
#endif
|
||||
encode_mb_hq(s, &backup_s, &best_s, CANDIDATE_MB_TYPE_DIRECT, pb, pb2, tex_pb,
|
||||
&dmin, &next_block, mx, my);
|
||||
}
|
||||
@ -4991,10 +4973,8 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
}
|
||||
s->last_bits= put_bits_count(&s->pb);
|
||||
|
||||
#ifdef CONFIG_RISKY
|
||||
if (s->out_format == FMT_H263 && s->pict_type!=B_TYPE)
|
||||
ff_h263_update_motion_val(s);
|
||||
#endif
|
||||
|
||||
if(next_block==0){ //FIXME 16 vs linesize16
|
||||
s->dsp.put_pixels_tab[0][0](s->dest[0], s->rd_scratchpad , s->linesize ,16);
|
||||
@ -5048,9 +5028,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
s->mb_intra= 0;
|
||||
motion_x=s->b_direct_mv_table[xy][0];
|
||||
motion_y=s->b_direct_mv_table[xy][1];
|
||||
#ifdef CONFIG_RISKY
|
||||
ff_mpeg4_set_direct_mv(s, motion_x, motion_y);
|
||||
#endif
|
||||
break;
|
||||
case CANDIDATE_MB_TYPE_BIDIR:
|
||||
s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD;
|
||||
@ -5120,10 +5098,8 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
// RAL: Update last macrobloc type
|
||||
s->last_mv_dir = s->mv_dir;
|
||||
|
||||
#ifdef CONFIG_RISKY
|
||||
if (s->out_format == FMT_H263 && s->pict_type!=B_TYPE)
|
||||
ff_h263_update_motion_val(s);
|
||||
#endif
|
||||
|
||||
MPV_decode_mb(s, s->block);
|
||||
}
|
||||
@ -5159,11 +5135,9 @@ static int encode_thread(AVCodecContext *c, void *arg){
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_RISKY
|
||||
//not beautifull here but we must write it before flushing so it has to be here
|
||||
if (s->msmpeg4_version && s->msmpeg4_version<4 && s->pict_type == I_TYPE)
|
||||
msmpeg4_encode_ext_header(s);
|
||||
#endif
|
||||
|
||||
write_slice_end(s);
|
||||
|
||||
@ -5226,12 +5200,10 @@ static void encode_picture(MpegEncContext *s, int picture_number)
|
||||
s->me.mb_var_sum_temp =
|
||||
s->me.mc_mb_var_sum_temp = 0;
|
||||
|
||||
#ifdef CONFIG_RISKY
|
||||
/* we need to initialize some time vars before we can encode b-frames */
|
||||
// RAL: Condition added for MPEG1VIDEO
|
||||
if (s->codec_id == CODEC_ID_MPEG1VIDEO || s->codec_id == CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->h263_msmpeg4))
|
||||
ff_set_mpeg4_time(s, s->picture_number); //FIXME rename and use has_b_frames or similar
|
||||
#endif
|
||||
|
||||
s->me.scene_change_score=0;
|
||||
|
||||
@ -5343,7 +5315,6 @@ static void encode_picture(MpegEncContext *s, int picture_number)
|
||||
s->current_picture.quality = ff_rate_estimate_qscale(s); //FIXME pic_ptr
|
||||
|
||||
if(s->adaptive_quant){
|
||||
#ifdef CONFIG_RISKY
|
||||
switch(s->codec_id){
|
||||
case CODEC_ID_MPEG4:
|
||||
ff_clean_mpeg4_qscales(s);
|
||||
@ -5354,7 +5325,6 @@ static void encode_picture(MpegEncContext *s, int picture_number)
|
||||
ff_clean_h263_qscales(s);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
s->lambda= s->lambda_table[0];
|
||||
//FIXME broken
|
||||
@ -5393,7 +5363,6 @@ static void encode_picture(MpegEncContext *s, int picture_number)
|
||||
case FMT_MJPEG:
|
||||
mjpeg_picture_header(s);
|
||||
break;
|
||||
#ifdef CONFIG_RISKY
|
||||
case FMT_H261:
|
||||
ff_h261_encode_picture_header(s, picture_number);
|
||||
break;
|
||||
@ -5413,7 +5382,6 @@ static void encode_picture(MpegEncContext *s, int picture_number)
|
||||
else
|
||||
h263_encode_picture_header(s, picture_number);
|
||||
break;
|
||||
#endif
|
||||
case FMT_MPEG1:
|
||||
mpeg1_encode_picture_header(s, picture_number);
|
||||
break;
|
||||
@ -6491,7 +6459,6 @@ static const AVOption mpeg4_options[] =
|
||||
};
|
||||
|
||||
#ifdef CONFIG_ENCODERS
|
||||
#ifdef CONFIG_RISKY
|
||||
AVCodec h263_encoder = {
|
||||
"h263",
|
||||
CODEC_TYPE_VIDEO,
|
||||
@ -6598,8 +6565,6 @@ AVCodec wmv1_encoder = {
|
||||
.options = mpeg4_options,
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
AVCodec mjpeg_encoder = {
|
||||
"mjpeg",
|
||||
CODEC_TYPE_VIDEO,
|
||||
|
@ -16,12 +16,7 @@ OBJS+=mpeg.o mpegts.o mpegtsenc.o ffm.o crc.o img.o img2.o raw.o rm.o \
|
||||
avienc.o avidec.o wav.o swf.o au.o gif.o mov.o mpjpeg.o dv.o \
|
||||
yuv4mpeg.o 4xm.o flvenc.o flvdec.o movenc.o psxstr.o idroq.o ipmovie.o \
|
||||
nut.o wc3movie.o mp3.o westwood.o segafilm.o idcin.o flic.o \
|
||||
sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o
|
||||
|
||||
ifeq ($(CONFIG_RISKY),yes)
|
||||
OBJS+= asf.o
|
||||
OBJS+= asf-enc.o
|
||||
endif
|
||||
sierravmd.o matroska.o sol.o electronicarts.o nsvdec.o asf.o asf-enc.o
|
||||
|
||||
AMROBJS=
|
||||
ifeq ($(AMR_NB),yes)
|
||||
|
@ -45,9 +45,7 @@ void av_register_all(void)
|
||||
raw_init();
|
||||
mp3_init();
|
||||
rm_init();
|
||||
#ifdef CONFIG_RISKY
|
||||
asf_init();
|
||||
#endif
|
||||
#ifdef CONFIG_ENCODERS
|
||||
avienc_init();
|
||||
#endif //CONFIG_ENCODERS
|
||||
|
Loading…
Reference in New Issue
Block a user