[FFmpeg-devel] [PATCH 01/10] diracdsp: add SIMD for the 10 bit version of put_signed_rect_clamped

James Almer jamrial at gmail.com
Mon Jun 27 21:44:00 CEST 2016


On 6/27/2016 7:27 AM, Rostislav Pehlivanov wrote:
> diff --git a/libavcodec/x86/diracdsp_init.c b/libavcodec/x86/diracdsp_init.c
> index 5fae798..7fa554e 100644
> --- a/libavcodec/x86/diracdsp_init.c
> +++ b/libavcodec/x86/diracdsp_init.c
> @@ -46,6 +46,10 @@ void ff_put_rect_clamped_sse2(uint8_t *dst, int dst_stride, const int16_t *src,
>  void ff_put_signed_rect_clamped_mmx(uint8_t *dst, int dst_stride, const int16_t *src, int src_stride, int width, int height);
>  void ff_put_signed_rect_clamped_sse2(uint8_t *dst, int dst_stride, const int16_t *src, int src_stride, int width, int height);
>  
> +#if ARCH_X86_64
> +void ff_put_signed_rect_clamped_10_sse4(uint8_t *dst, int dst_stride, const uint8_t *src, int src_stride, int width, int height);
> +#endif

Nit: No need to wrap the prototype with a preprocessor check.

> +
>  #if HAVE_YASM
>  
>  #define HPEL_FILTER(MMSIZE, EXT)                                                             \
> @@ -184,4 +188,10 @@ void ff_diracdsp_init_x86(DiracDSPContext* c)
>          c->put_dirac_pixels_tab[2][0] = ff_put_dirac_pixels32_sse2;
>          c->avg_dirac_pixels_tab[2][0] = ff_avg_dirac_pixels32_sse2;
>      }
> +
> +#if ARCH_X86_64
> +    if (EXTERNAL_SSE4(mm_flags)) {
> +        c->put_signed_rect_clamped[1] = ff_put_signed_rect_clamped_10_sse4;
> +    }
> +#endif
>  }
> -- 2.8.1.369.geae769a

FATE seems to pass now. Feel free to push with or without the above nit
since it's something that will be gone once the function is changed to
work on x86_32 anyway.


More information about the ffmpeg-devel mailing list