# HG changeset patch # User michael # Date 1109008248 0 # Node ID fc23a5a86d97213d0470d625039c683ac5a6c685 # Parent ab32402c7e0949ae9ffcaffa64228940a88b5ff0 removing --disable-risky patch by (Josh Varner ) diff -r ab32402c7e09 -r fc23a5a86d97 Makefile --- a/Makefile Sun Feb 20 23:21:50 2005 +0000 +++ b/Makefile Mon Feb 21 17:50:48 2005 +0000 @@ -21,7 +21,8 @@ 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 @@ 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 diff -r ab32402c7e09 -r fc23a5a86d97 allcodecs.c --- a/allcodecs.c Sun Feb 20 23:21:50 2005 +0000 +++ b/allcodecs.c Mon Feb 21 17:50:48 2005 +0000 @@ -57,7 +57,6 @@ #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 @@ 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 @@ /* decoders */ #ifdef CONFIG_DECODERS -#ifdef CONFIG_RISKY register_avcodec(&h263_decoder); register_avcodec(&h261_decoder); register_avcodec(&mpeg4_decoder); @@ -128,7 +125,6 @@ register_avcodec(&aac_decoder); register_avcodec(&mpeg4aac_decoder); #endif -#endif register_avcodec(&mpeg1video_decoder); register_avcodec(&mpeg2video_decoder); register_avcodec(&mpegvideo_decoder); diff -r ab32402c7e09 -r fc23a5a86d97 mpeg12.c --- a/mpeg12.c Sun Feb 20 23:21:50 2005 +0000 +++ b/mpeg12.c Mon Feb 21 17:50:48 2005 +0000 @@ -3145,8 +3145,6 @@ .capabilities= CODEC_CAP_DELAY, }; -#ifdef CONFIG_RISKY - AVCodec mpeg2video_encoder = { "mpeg2video", CODEC_TYPE_VIDEO, @@ -3159,7 +3157,6 @@ .capabilities= CODEC_CAP_DELAY, }; #endif -#endif #ifdef HAVE_XVMC static int mpeg_mc_decode_init(AVCodecContext *avctx){ diff -r ab32402c7e09 -r fc23a5a86d97 mpegvideo.c --- a/mpegvideo.c Sun Feb 20 23:21:50 2005 +0000 +++ b/mpegvideo.c Mon Feb 21 17:50:48 2005 +0000 @@ -1113,7 +1113,6 @@ 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 @@ avctx->delay=0; s->low_delay=1; break; -#endif default: return -1; } @@ -1248,14 +1246,12 @@ 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 @@ /* 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 @@ 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 @@ 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 @@ 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 @@ } }//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 @@ 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 @@ 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 @@ s->last_mv_dir = 0; -#ifdef CONFIG_RISKY switch(s->codec_id){ case CODEC_ID_H263: case CODEC_ID_H263P: @@ -4635,7 +4622,6 @@ ff_mpeg4_init_partitions(s); break; } -#endif s->resync_mb_x=0; s->resync_mb_y=0; @@ -4679,7 +4665,6 @@ } /* write gob / video packet header */ -#ifdef CONFIG_RISKY if(s->rtp_mode){ int current_packet_size, is_gob_start; @@ -4759,7 +4744,6 @@ 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 @@ 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 @@ } 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 @@ 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 @@ // 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 @@ } } -#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 @@ 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 @@ 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 @@ ff_clean_h263_qscales(s); break; } -#endif s->lambda= s->lambda_table[0]; //FIXME broken @@ -5393,7 +5363,6 @@ 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 @@ 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 @@ }; #ifdef CONFIG_ENCODERS -#ifdef CONFIG_RISKY AVCodec h263_encoder = { "h263", CODEC_TYPE_VIDEO, @@ -6598,8 +6565,6 @@ .options = mpeg4_options, }; -#endif - AVCodec mjpeg_encoder = { "mjpeg", CODEC_TYPE_VIDEO,