x86/hevc_deblock: add ff_hevc_[hv]_loop_filter_luma_{8, 10}_sse2
[ffmpeg.git] / libavcodec / x86 / hevcdsp_init.c
index cad236ddad0f49e9a4b9a01c19db10f2a3bcb477..2c7676648263bdd17bf18feb13c1af2990a80d19 100644 (file)
@@ -36,18 +36,20 @@ void ff_hevc_ ## DIR ## _loop_filter_chroma_ ## DEPTH ## _ ## OPT(uint8_t *_pix,
 void ff_hevc_ ## DIR ## _loop_filter_luma_ ## DEPTH ## _ ## OPT(uint8_t *_pix, ptrdiff_t stride, int *_beta, int *_tc, \
 uint8_t *_no_p, uint8_t *_no_q);
 
-#define LFC_FUNCS(type, depth) \
-LFC_FUNC(h, depth, sse2)  \
-LFC_FUNC(v, depth, sse2)
+#define LFC_FUNCS(type, depth, opt) \
+LFC_FUNC(h, depth, opt)  \
+LFC_FUNC(v, depth, opt)
 
-#define LFL_FUNCS(type, depth) \
-LFL_FUNC(h, depth, ssse3)  \
-LFL_FUNC(v, depth, ssse3)
+#define LFL_FUNCS(type, depth, opt) \
+LFL_FUNC(h, depth, opt)  \
+LFL_FUNC(v, depth, opt)
 
-LFC_FUNCS(uint8_t,   8)
-LFC_FUNCS(uint8_t,  10)
-LFL_FUNCS(uint8_t,   8)
-LFL_FUNCS(uint8_t,  10)
+LFC_FUNCS(uint8_t,   8, sse2)
+LFC_FUNCS(uint8_t,  10, sse2)
+LFL_FUNCS(uint8_t,   8, sse2)
+LFL_FUNCS(uint8_t,  10, sse2)
+LFL_FUNCS(uint8_t,   8, ssse3)
+LFL_FUNCS(uint8_t,  10, ssse3)
 
 #if HAVE_SSE2_EXTERNAL
 void ff_hevc_idct32_dc_add_8_sse2(uint8_t *dst, int16_t *coeffs, ptrdiff_t stride)
@@ -429,6 +431,10 @@ void ff_hevcdsp_init_x86(HEVCDSPContext *c, const int bit_depth)
         if (EXTERNAL_SSE2(mm_flags)) {
                     c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_8_sse2;
                     c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_8_sse2;
+                    if (ARCH_X86_64) {
+                        c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_sse2;
+                        c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_sse2;
+                    }
 
                     c->transform_dc_add[2]    =  ff_hevc_idct16_dc_add_8_sse2;
                     c->transform_dc_add[3]    =  ff_hevc_idct32_dc_add_8_sse2;
@@ -460,7 +466,10 @@ void ff_hevcdsp_init_x86(HEVCDSPContext *c, const int bit_depth)
         if (EXTERNAL_SSE2(mm_flags)) {
                     c->hevc_v_loop_filter_chroma = ff_hevc_v_loop_filter_chroma_10_sse2;
                     c->hevc_h_loop_filter_chroma = ff_hevc_h_loop_filter_chroma_10_sse2;
-
+                    if (ARCH_X86_64) {
+                        c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_10_sse2;
+                        c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_10_sse2;
+                    }
 
                     c->transform_dc_add[1]    =  ff_hevc_idct8_dc_add_10_sse2;
                     c->transform_dc_add[2]    =  ff_hevc_idct16_dc_add_10_sse2;