[FFmpeg-devel] [PATCH] Simplify uses{H, V}Filter settings in sws_getContext()

Stefano Sabatini stefano.sabatini-lala
Wed Feb 3 22:38:36 CET 2010


On date Sunday 2010-01-24 19:04:01 +0100, Stefano Sabatini encoded:
> Hi, IMO much more readable.
> 
> Regards.
> -- 
> FFmpeg = Freak and Fundamentalist Murdering Programmable Enlightening Gadget

> Index: libswscale/utils.c
> ===================================================================
> --- libswscale/utils.c	(revision 30425)
> +++ libswscale/utils.c	(working copy)
> @@ -858,15 +858,14 @@
>      c->srcFormatBpp = av_get_bits_per_pixel(&av_pix_fmt_descriptors[srcFormat]);
>      c->vRounder= 4* 0x0001000100010001ULL;
>  
> -    usesHFilter= usesVFilter= 0;
> -    if (dstFilter->lumV && dstFilter->lumV->length>1) usesVFilter=1;
> -    if (dstFilter->lumH && dstFilter->lumH->length>1) usesHFilter=1;
> -    if (dstFilter->chrV && dstFilter->chrV->length>1) usesVFilter=1;
> -    if (dstFilter->chrH && dstFilter->chrH->length>1) usesHFilter=1;
> -    if (srcFilter->lumV && srcFilter->lumV->length>1) usesVFilter=1;
> -    if (srcFilter->lumH && srcFilter->lumH->length>1) usesHFilter=1;
> -    if (srcFilter->chrV && srcFilter->chrV->length>1) usesVFilter=1;
> -    if (srcFilter->chrH && srcFilter->chrH->length>1) usesHFilter=1;
> +    usesVFilter = (dstFilter->lumV && dstFilter->lumV->length>1) ||
> +                  (dstFilter->chrV && dstFilter->chrV->length>1) ||
> +                  (srcFilter->lumV && srcFilter->lumV->length>1) ||
> +                  (srcFilter->chrV && srcFilter->chrV->length>1);
> +    usesHFilter = (dstFilter->lumH && dstFilter->lumH->length>1) ||
> +                  (dstFilter->chrH && dstFilter->chrH->length>1) ||
> +                  (srcFilter->lumH && srcFilter->lumH->length>1) ||
> +                  (srcFilter->chrH && srcFilter->chrH->length>1);

Ping?
-- 
FFmpeg = Fundamental and Fiendish Meaningful Peaceful Eccentric God



More information about the ffmpeg-devel mailing list