[Ffmpeg-cvslog] r7347 - trunk/libavcodec/mpegvideo.c

Aurelien Jacobs aurel
Thu Dec 21 18:04:26 CET 2006


On Thu, 21 Dec 2006 16:46:32 +0100 (CET)
michael <subversion at mplayerhq.hu> wrote:

> Author: michael
> Date: Thu Dec 21 16:46:32 2006
> New Revision: 7347
> 
> Modified:
>    trunk/libavcodec/mpegvideo.c
> 
> Log:
> simplify
> 
> 
> Modified: trunk/libavcodec/mpegvideo.c
> ==============================================================================
> --- trunk/libavcodec/mpegvideo.c	(original)
> +++ trunk/libavcodec/mpegvideo.c	Thu Dec 21 16:46:32 2006
> @@ -4350,7 +4350,7 @@
>                      if(!s->mb_intra){
>                          if(s->pict_type == B_TYPE){
>                              if(s->dquant&1)
> -                                s->dquant= (s->dquant/2)*2;
> +                                s->dquant= 0;
>                              if(s->mv_dir&MV_DIRECT)
>                                  s->dquant= 0;

Is it right ? Shouldn't it be:

              s->dquant &= ~1;

If it's right, maybe simplify even more by merging the 2 if() ?

          if(s->dquant&1 || s->mv_dir&MV_DIRECT)
              s->dquant= 0;

Aurel




More information about the ffmpeg-cvslog mailing list