[FFmpeg-devel] [PATCH 5/6] avcodec/h264: add avx 8-bit 4:2:0 chroma h intra deblock/loop filter
James Darnley
jdarnley at obe.tv
Mon Feb 20 17:33:23 EET 2017
~1.10x faster (69 vs. 63 cycles) compared to mmxext function
---
libavcodec/x86/h264_deblock.asm | 9 +++++++++
libavcodec/x86/h264dsp_init.c | 1 +
2 files changed, 10 insertions(+)
diff --git a/libavcodec/x86/h264_deblock.asm b/libavcodec/x86/h264_deblock.asm
index 1e6d822..2197608 100644
--- a/libavcodec/x86/h264_deblock.asm
+++ b/libavcodec/x86/h264_deblock.asm
@@ -1223,6 +1223,15 @@ cglobal deblock_v_chroma_intra_8, 4, 5, 8, pix_, stride_, alpha_, beta_
movq [pix_q], m2
RET
+cglobal deblock_h_chroma_intra_8, 4, 6, 8, pix_, stride_, alpha_, beta_
+ CHROMA_H_START_XMM r4, r5
+ LOAD_8_ROWS PASS8ROWS(pix_q - 2, r4 - 2, stride_q, r5)
+ TRANSPOSE_8x4B_XMM
+ CHROMA_INTRA_BODY_XMM
+ TRANSPOSE_4x8B_XMM
+ STORE_8_ROWS PASS8ROWS(pix_q - 2, r4 - 2, stride_q, r5)
+RET
+
%endmacro ; DEBLOCK_CHROMA_XMM
DEBLOCK_CHROMA_XMM avx
diff --git a/libavcodec/x86/h264dsp_init.c b/libavcodec/x86/h264dsp_init.c
index cc86664..b1246d0 100644
--- a/libavcodec/x86/h264dsp_init.c
+++ b/libavcodec/x86/h264dsp_init.c
@@ -322,6 +322,7 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
c->h264_v_loop_filter_chroma_intra = ff_deblock_v_chroma_intra_8_avx;
if (chroma_format_idc <= 1) {
c->h264_h_loop_filter_chroma = ff_deblock_h_chroma_8_avx;
+ c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_avx;
} else {
c->h264_h_loop_filter_chroma = ff_deblock_h_chroma422_8_avx;
}
--
2.8.3
More information about the ffmpeg-devel
mailing list