summaryrefslogtreecommitdiff
path: root/libavcodec/x86/hevcdsp_init.c
diff options
context:
space:
mode:
authorplepere <pierre-edouard.lepere@insa-rennes.fr>2014-05-15 16:31:11 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-05-16 21:11:03 +0200
commitde7b89fd43f850d77cf24ad6ae50185dfe391e91 (patch)
treeb09a832ce2711d357806cc3a2290c920f6254891 /libavcodec/x86/hevcdsp_init.c
parent7ebf90ff472d05c7179f202df8686d84adfcb3d2 (diff)
avcodec/x86/hevc: added DBF assembly functions
Reviewed-by: James Almer <jamrial@gmail.com> Reviewed-by: Ronald S. Bultje Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86/hevcdsp_init.c')
-rw-r--r--libavcodec/x86/hevcdsp_init.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/libavcodec/x86/hevcdsp_init.c b/libavcodec/x86/hevcdsp_init.c
index 61ac6a98dc..e5ef28759b 100644
--- a/libavcodec/x86/hevcdsp_init.c
+++ b/libavcodec/x86/hevcdsp_init.c
@@ -29,6 +29,27 @@
#include "libavcodec/x86/hevcdsp.h"
+#define LFC_FUNC(DIR, DEPTH, OPT) \
+void ff_hevc_ ## DIR ## _loop_filter_chroma_ ## DEPTH ## _ ## OPT(uint8_t *_pix, ptrdiff_t _stride, int *_tc, uint8_t *_no_p, uint8_t *_no_q);
+
+#define LFL_FUNC(DIR, DEPTH, OPT) \
+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 LFL_FUNCS(type, depth) \
+LFL_FUNC(h, depth, ssse3) \
+LFL_FUNC(v, depth, ssse3)
+
+LFC_FUNCS(uint8_t, 8)
+LFC_FUNCS(uint8_t, 10)
+LFL_FUNCS(uint8_t, 8)
+LFL_FUNCS(uint8_t, 10)
+
+
#define mc_rep_func(name, bitd, step, W, opt) \
void ff_hevc_put_hevc_##name##W##_##bitd##_##opt(int16_t *_dst, ptrdiff_t dststride, \
uint8_t *_src, ptrdiff_t _srcstride, int height, \
@@ -347,6 +368,14 @@ void ff_hevcdsp_init_x86(HEVCDSPContext *c, const int bit_depth)
int mm_flags = av_get_cpu_flags();
if (bit_depth == 8) {
+ 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 (EXTERNAL_SSSE3(mm_flags) && ARCH_X86_64) {
+ c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_8_ssse3;
+ c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_8_ssse3;
+ }
if (EXTERNAL_SSE4(mm_flags) && ARCH_X86_64) {
EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels, 8, sse4);
@@ -361,6 +390,14 @@ void ff_hevcdsp_init_x86(HEVCDSPContext *c, const int bit_depth)
}
} else if (bit_depth == 10) {
+ 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 (EXTERNAL_SSSE3(mm_flags) && ARCH_X86_64) {
+ c->hevc_v_loop_filter_luma = ff_hevc_v_loop_filter_luma_10_ssse3;
+ c->hevc_h_loop_filter_luma = ff_hevc_h_loop_filter_luma_10_ssse3;
+ }
if (EXTERNAL_SSE4(mm_flags) && ARCH_X86_64) {
EPEL_LINKS(c->put_hevc_epel, 0, 0, pel_pixels, 10, sse4);