On 20/01/16 11:18, Diego Biurrun wrote:
> That code is only ever initialized with that flag set.
> ---
> 
> This is a simplification that I plan to squash into the parent patch.
> 
>  libavcodec/x86/hpeldsp.h          |  2 +-
>  libavcodec/x86/hpeldsp_init.c     |  2 +-
>  libavcodec/x86/hpeldsp_vp3_init.c | 14 +++++---------
>  3 files changed, 7 insertions(+), 11 deletions(-)
> 
> diff --git a/libavcodec/x86/hpeldsp.h b/libavcodec/x86/hpeldsp.h
> index d624ed9..566e518 100644
> --- a/libavcodec/x86/hpeldsp.h
> +++ b/libavcodec/x86/hpeldsp.h
> @@ -37,6 +37,6 @@ void ff_put_pixels8_xy2_mmx(uint8_t *block, const uint8_t 
> *pixels,
>  void ff_put_pixels16_xy2_mmx(uint8_t *block, const uint8_t *pixels,
>                               ptrdiff_t line_size, int h);
>  
> -void ff_hpeldsp_vp3_init_x86(HpelDSPContext *c, int cpu_flags, int flags);
> +void ff_hpeldsp_vp3_init_x86(HpelDSPContext *c, int cpu_flags);
>  
>  #endif /* AVCODEC_X86_HPELDSP_H */
> diff --git a/libavcodec/x86/hpeldsp_init.c b/libavcodec/x86/hpeldsp_init.c
> index fdfe542..afac23c 100644
> --- a/libavcodec/x86/hpeldsp_init.c
> +++ b/libavcodec/x86/hpeldsp_init.c
> @@ -256,5 +256,5 @@ av_cold void ff_hpeldsp_init_x86(HpelDSPContext *c, int 
> flags)
>          hpeldsp_init_sse2_fast(c, flags);
>  
>      if (CONFIG_VP3_DECODER)
> -        ff_hpeldsp_vp3_init_x86(c, cpu_flags, flags);
> +        ff_hpeldsp_vp3_init_x86(c, cpu_flags);
>  }
> diff --git a/libavcodec/x86/hpeldsp_vp3_init.c 
> b/libavcodec/x86/hpeldsp_vp3_init.c
> index 06a9d67..8c90371 100644
> --- a/libavcodec/x86/hpeldsp_vp3_init.c
> +++ b/libavcodec/x86/hpeldsp_vp3_init.c
> @@ -36,19 +36,15 @@ void ff_put_no_rnd_pixels8_y2_exact_3dnow(uint8_t *block,
>                                            const uint8_t *pixels,
>                                            ptrdiff_t line_size, int h);
>  
> -av_cold void ff_hpeldsp_vp3_init_x86(HpelDSPContext *c, int cpu_flags, int 
> flags)
> +av_cold void ff_hpeldsp_vp3_init_x86(HpelDSPContext *c, int cpu_flags)
>  {
>      if (EXTERNAL_AMD3DNOW(cpu_flags)) {
> -        if (flags & AV_CODEC_FLAG_BITEXACT) {
> -            c->put_no_rnd_pixels_tab[1][1] = 
> ff_put_no_rnd_pixels8_x2_exact_3dnow;
> -            c->put_no_rnd_pixels_tab[1][2] = 
> ff_put_no_rnd_pixels8_y2_exact_3dnow;
> -        }
> +        c->put_no_rnd_pixels_tab[1][1] = 
> ff_put_no_rnd_pixels8_x2_exact_3dnow;
> +        c->put_no_rnd_pixels_tab[1][2] = 
> ff_put_no_rnd_pixels8_y2_exact_3dnow;
>      }
>  
>      if (EXTERNAL_MMXEXT(cpu_flags)) {
> -        if (flags & AV_CODEC_FLAG_BITEXACT) {
> -            c->put_no_rnd_pixels_tab[1][1] = 
> ff_put_no_rnd_pixels8_x2_exact_mmxext;
> -            c->put_no_rnd_pixels_tab[1][2] = 
> ff_put_no_rnd_pixels8_y2_exact_mmxext;
> -        }
> +        c->put_no_rnd_pixels_tab[1][1] = 
> ff_put_no_rnd_pixels8_x2_exact_mmxext;
> +        c->put_no_rnd_pixels_tab[1][2] = 
> ff_put_no_rnd_pixels8_y2_exact_mmxext;
>      }
>  }
> 

Shouldn't hurt.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to