aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorJames Darnley <jdarnley@obe.tv>2017-02-22 01:17:06 +0100
committerJames Darnley <jdarnley@obe.tv>2017-02-27 13:22:06 +0100
commit33de0fee2c33c492aae96f643ed7bbaa393043dc (patch)
tree0cb9844c91b471e248fcfa8dd126b74108392d14 /libavcodec
parentcd893b9307b8c871fec067928dc613fa987e38c3 (diff)
downloadffmpeg-33de0fee2c33c492aae96f643ed7bbaa393043dc.tar.gz
avcodec/h264: enable sse2 chroma deblock/loop filter functions
Between 1.00 and 1.16 times faster on Intel Yorkfield Core 2 Quad. Between 1.11 and 1.39 times faster on Intel Kaby Lake Pentium.
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/x86/h264_deblock.asm1
-rw-r--r--libavcodec/x86/h264dsp_init.c10
2 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/x86/h264_deblock.asm b/libavcodec/x86/h264_deblock.asm
index 32aa3d376b..6702ae98d4 100644
--- a/libavcodec/x86/h264_deblock.asm
+++ b/libavcodec/x86/h264_deblock.asm
@@ -1252,6 +1252,7 @@ RET
%endmacro ; DEBLOCK_CHROMA_XMM
+DEBLOCK_CHROMA_XMM sse2
DEBLOCK_CHROMA_XMM avx
;-----------------------------------------------------------------------------
diff --git a/libavcodec/x86/h264dsp_init.c b/libavcodec/x86/h264dsp_init.c
index 51082e88e2..0643b37362 100644
--- a/libavcodec/x86/h264dsp_init.c
+++ b/libavcodec/x86/h264dsp_init.c
@@ -304,6 +304,16 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
#if ARCH_X86_64
c->h264_h_loop_filter_luma_mbaff = ff_deblock_h_luma_mbaff_8_sse2;
#endif
+
+ c->h264_v_loop_filter_chroma = ff_deblock_v_chroma_8_sse2;
+ c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_sse2;
+ if (chroma_format_idc <= 1) {
+ c->h264_h_loop_filter_chroma = ff_deblock_h_chroma_8_sse2;
+ c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_sse2;
+ } else {
+ c->h264_h_loop_filter_chroma = ff_deblock_h_chroma422_8_sse2;
+ c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma422_intra_8_sse2;
+ }
}
if (EXTERNAL_SSSE3(cpu_flags)) {
c->biweight_h264_pixels_tab[0] = ff_h264_biweight_16_ssse3;