[FFmpeg-cvslog] avcodec/h264: add avx 8-bit 4:2:2 chroma h intra deblock/loop filter
James Darnley
git at videolan.org
Mon Feb 27 14:22:41 EET 2017
ffmpeg | branch: master | James Darnley <jdarnley at obe.tv> | Wed Feb 15 15:05:42 2017 +0100| [cd893b9307b8c871fec067928dc613fa987e38c3] | committer: James Darnley
avcodec/h264: add avx 8-bit 4:2:2 chroma h intra deblock/loop filter
~1.37x faster (147 vs. 108 cycles) compared to mmxext function
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=cd893b9307b8c871fec067928dc613fa987e38c3
---
libavcodec/x86/h264_deblock.asm | 18 ++++++++++++++++++
libavcodec/x86/h264dsp_init.c | 1 +
2 files changed, 19 insertions(+)
diff --git a/libavcodec/x86/h264_deblock.asm b/libavcodec/x86/h264_deblock.asm
index 2197608..32aa3d3 100644
--- a/libavcodec/x86/h264_deblock.asm
+++ b/libavcodec/x86/h264_deblock.asm
@@ -1232,6 +1232,24 @@ cglobal deblock_h_chroma_intra_8, 4, 6, 8, pix_, stride_, alpha_, beta_
STORE_8_ROWS PASS8ROWS(pix_q - 2, r4 - 2, stride_q, r5)
RET
+cglobal deblock_h_chroma422_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)
+
+ lea pix_q, [pix_q + 8*stride_q]
+ lea r4, [r4 + 8*stride_q]
+
+ 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 b1246d0..51082e8 100644
--- a/libavcodec/x86/h264dsp_init.c
+++ b/libavcodec/x86/h264dsp_init.c
@@ -325,6 +325,7 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth,
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;
+ c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma422_intra_8_avx;
}
}
} else if (bit_depth == 10) {
More information about the ffmpeg-cvslog
mailing list