History

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

James Darnley committed 9 years ago

Commit cd893b91 parent 0e16b3e2 files · +19 −0Browse files

Unified · Split

2 files
  1. libavcodec/x86/h264_deblock.asm +18 −0
  2. libavcodec/x86/h264dsp_init.c +1 −0
libavcodec/x86/h264_deblock.asm+18−0
@@ -1232,6 +1232,24 @@ cglobal deblock_h_chroma_intra_8, 4, 6, 8, pix_, stride_, alpha_, beta_ · 1231 unmodified lines
12321232 STORE_8_ROWS PASS8ROWS(pix_q - 2, r4 - 2, stride_q, r5)
12331233 RET
12341234
1235+cglobal deblock_h_chroma422_intra_8, 4, 6, 8, pix_, stride_, alpha_, beta_
1236+ CHROMA_H_START_XMM r4, r5
1237+ LOAD_8_ROWS PASS8ROWS(pix_q - 2, r4 - 2, stride_q, r5)
1238+ TRANSPOSE_8x4B_XMM
1239+ CHROMA_INTRA_BODY_XMM
1240+ TRANSPOSE_4x8B_XMM
1241+ STORE_8_ROWS PASS8ROWS(pix_q - 2, r4 - 2, stride_q, r5)
1242+
1243+ lea pix_q, [pix_q + 8*stride_q]
1244+ lea r4, [r4 + 8*stride_q]
1245+
1246+ LOAD_8_ROWS PASS8ROWS(pix_q - 2, r4 - 2, stride_q, r5)
1247+ TRANSPOSE_8x4B_XMM
1248+ CHROMA_INTRA_BODY_XMM
1249+ TRANSPOSE_4x8B_XMM
1250+ STORE_8_ROWS PASS8ROWS(pix_q - 2, r4 - 2, stride_q, r5)
1251+RET
1252+
12351253 %endmacro ; DEBLOCK_CHROMA_XMM
12361254
12371255 DEBLOCK_CHROMA_XMM avx
libavcodec/x86/h264dsp_init.c+1−0
@@ -325,6 +325,7 @@ av_cold void ff_h264dsp_init_x86(H264DSPContext *c, const int bit_depth, · 324 unmodified lines
325325 c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma_intra_8_avx;
326326 } else {
327327 c->h264_h_loop_filter_chroma = ff_deblock_h_chroma422_8_avx;
328+ c->h264_h_loop_filter_chroma_intra = ff_deblock_h_chroma422_intra_8_avx;
328329 }
329330 }
330331 } else if (bit_depth == 10) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t