On 2012-09-18 01:35:05 +0200, Benjamin Larsson wrote:
> The calculation of abase depends on the variable needAlpha, but one can
> safely calculate and set the abase variable even though it isn't used.
> ---
>  libswscale/yuv2rgb.c |    3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
> index f1ce4aa..416e3c4 100644
> --- a/libswscale/yuv2rgb.c
> +++ b/libswscale/yuv2rgb.c
> @@ -862,8 +862,7 @@ av_cold int ff_yuv2rgb_c_init_tables(SwsContext *c, const 
> int inv_table[4],
>          gbase     = base + 8;
>          bbase     = base + (isRgb ? 0 : 16);
>          needAlpha = CONFIG_SWSCALE_ALPHA && isALPHA(c->srcFormat);
> -        if (!needAlpha)
> -            abase = (base + 24) & 31;
> +        abase = (base + 24) & 31;
>          c->yuvTable = av_malloc(1024 * 3 * 4);
>          y_table32   = c->yuvTable;
>          yb = -(384 << 16) - oy;

ok

Janne
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to