On Sun, Mar 09, 2014 at 09:34:34AM +0100, Vittorio Giovara wrote:
> --- a/libavcodec/arm/vp8dsp_init_armv6.c
> +++ b/libavcodec/arm/vp8dsp_init_armv6.c
> @@ -40,28 +40,30 @@ VP8_BILIN(16, armv6);
>  
> -av_cold void ff_vp8dsp_init_armv6(VP8DSPContext *dsp)
> +av_cold void ff_vp8dsp_init_armv6(VP8DSPContext *dsp, int vp7)
>  {
> -    dsp->vp8_luma_dc_wht    = ff_vp8_luma_dc_wht_armv6;
> -    dsp->vp8_luma_dc_wht_dc = ff_vp8_luma_dc_wht_dc_armv6;
> -
> +    if (!vp7) {
> +        dsp->vp8_luma_dc_wht    = ff_vp8_luma_dc_wht_armv6;
> +        dsp->vp8_luma_dc_wht_dc = ff_vp8_luma_dc_wht_dc_armv6;

IMO it would be *much* cleaner to split all the dsp bits into two pieces:
One for vp8 only and one for vp7/vp8.  That would avoid those ugly ifs.
Then just call one or both init functions depending on what is being
decoded.

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

Reply via email to