[FFmpeg-devel] [PATCH] remove commented-out code from rv10.c

Michael Niedermayer michaelni
Sun Aug 2 17:00:53 CEST 2009


On Sun, Aug 02, 2009 at 01:10:58PM +0200, Diego Biurrun wrote:
> I suspect most of it is cruft.  Michael, I will commit whatever you
> approve hunk by hunk.
> 
> Diego

>  rv10.c |   39 ---------------------------------------
>  1 file changed, 39 deletions(-)
> faecf489a05076684486222bb6d4d328081ad856  rv10_commented_out.diff
> Index: libavcodec/rv10.c
> ===================================================================
> --- libavcodec/rv10.c	(revision 19560)
> +++ libavcodec/rv10.c	(working copy)
> @@ -273,7 +273,6 @@
>  
>      assert(s->f_code == 1);
>      assert(s->unrestricted_mv == 1);
> -//    assert(s->h263_aic== (s->pict_type == FF_I_TYPE));
>      assert(s->alt_inter_vlc == 0);
>      assert(s->umvplus == 0);
>      assert(s->modified_quant==1);
> @@ -296,14 +295,12 @@
>  {
>      int mb_count, pb_frame, marker, unk, mb_xy;
>  
> -//printf("ff:%d\n", full_frame);
>      marker = get_bits1(&s->gb);
>  
>      if (get_bits1(&s->gb))
>          s->pict_type = FF_P_TYPE;
>      else
>          s->pict_type = FF_I_TYPE;
> -//printf("h:%X ver:%d\n",h,s->rv10_version);
>      if(!marker) av_log(s->avctx, AV_LOG_ERROR, "marker missing\n");
>      pb_frame = get_bits1(&s->gb);
>  
> @@ -344,7 +341,6 @@
>          mb_count = s->mb_width * s->mb_height;
>      }
>      unk= get_bits(&s->gb, 3);   /* ignored */
> -//printf("%d\n", unk);
>      s->f_code = 1;
>      s->unrestricted_mv = 1;
>  

ok


> @@ -355,23 +351,6 @@
>  {
>      int seq, mb_pos, i;
>  
> -#if 0
> -    GetBitContext gb= s->gb;
> -    for(i=0; i<64; i++){
> -        av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&gb));
> -        if(i%4==3) av_log(s->avctx, AV_LOG_DEBUG, " ");
> -    }
> -    av_log(s->avctx, AV_LOG_DEBUG, "\n");
> -#endif
> -#if 0
> -    av_log(s->avctx, AV_LOG_DEBUG, "%3dx%03d/%02Xx%02X ", s->width, s->height, s->width/4, s->height/4);
> -    for(i=0; i<s->avctx->extradata_size; i++){
> -        av_log(s->avctx, AV_LOG_DEBUG, "%02X ", ((uint8_t*)s->avctx->extradata)[i]);
> -        if(i%4==3) av_log(s->avctx, AV_LOG_DEBUG, " ");
> -    }
> -    av_log(s->avctx, AV_LOG_DEBUG, "\n");
> -#endif
> -
>      if(s->avctx->sub_id == 0x30202002 || s->avctx->sub_id == 0x30203002){
>          if (get_bits(&s->gb, 3)){
>              av_log(s->avctx, AV_LOG_ERROR, "unknown triplet set\n");

id like to keep these


> @@ -418,7 +397,6 @@
>  
>          if (get_bits1(&s->gb)){
>              av_log(s->avctx, AV_LOG_ERROR, "unknown bit3 set\n");
> -//            return -1;
>          }
>          seq= get_bits(&s->gb, 13)<<2;
>  

ok


> @@ -449,14 +427,7 @@
>          seq= get_bits(&s->gb, 8)*128;
>      }
>  
> -//     if(s->avctx->sub_id <= 0x20201002){ //0x20201002 definitely needs this
>      mb_pos= ff_h263_decode_mba(s);
> -/*    }else{
> -        mb_pos= get_bits(&s->gb, av_log2(s->mb_num-1)+1);
> -        s->mb_x= mb_pos % s->mb_width;
> -        s->mb_y= mb_pos / s->mb_width;
> -    }*/
> -//av_log(s->avctx, AV_LOG_DEBUG, "%d\n", seq);
>      seq |= s->time &~0x7FFF;
>      if(seq - s->time >  0x4000) seq -= 0x8000;
>      if(seq - s->time < -0x4000) seq += 0x8000;
> @@ -475,19 +446,11 @@
>              ff_mpeg4_init_direct_mv(s);
>          }
>      }
> -//    printf("%d %d %d %d %d\n", seq, (int)s->time, (int)s->last_non_b_time, s->pp_time, s->pb_time);
> -/*for(i=0; i<32; i++){
> -    av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb));
> -}
> -av_log(s->avctx, AV_LOG_DEBUG, "\n");*/
>      s->no_rounding= get_bits1(&s->gb);
>  
>      s->f_code = 1;
>      s->unrestricted_mv = 1;
>      s->h263_aic= s->pict_type == FF_I_TYPE;
> -//    s->alt_inter_vlc=1;
> -//    s->obmc=1;
> -//    s->umvplus=1;
>      s->modified_quant=1;
>      if(!s->avctx->lowres)
>          s->loop_filter=1;

id like to keep this, at least some of it and somehow ...


> @@ -611,7 +574,6 @@
>          av_log(s->avctx, AV_LOG_ERROR, "COUNT ERROR\n");
>          return -1;
>      }
> -//if(s->pict_type == FF_P_TYPE) return 0;
>  
>      if ((s->mb_x == 0 && s->mb_y == 0) || s->current_picture_ptr==NULL) {
>          if(s->current_picture_ptr){ //FIXME write parser so we always have complete frames?
> @@ -651,7 +613,6 @@
>      s->rv10_first_dc_coded[0] = 0;
>      s->rv10_first_dc_coded[1] = 0;
>      s->rv10_first_dc_coded[2] = 0;
> -//printf("%d %X %X\n", s->pict_type, s->current_picture.motion_val[0], s->current_picture.motion_val[1]);
>      s->block_wrap[0]=
>      s->block_wrap[1]=
>      s->block_wrap[2]=

ok


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Frequently ignored awnser#1 FFmpeg bugs should be sent to our bugtracker. User
questions about the command line tools should be sent to the ffmpeg-user ML.
And questions about how to use libav* should be sent to the libav-user ML.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090802/71cf9be6/attachment.pgp>



More information about the ffmpeg-devel mailing list