This is an automated email from the git hooks/post-receive script. Git pushed a commit to branch master in repository ffmpeg.
commit 14dfce5eaf18b7630922117a2541d8646db21289 Author: Zuxy Meng <[email protected]> AuthorDate: Thu May 28 19:23:54 2026 -0700 Commit: Zuxy Meng <[email protected]> CommitDate: Fri Jul 24 19:16:45 2026 -0700 avcodec/x86/h264_intrapred: SSE2 impl. of pred8x8_dc_rv40_8 Deprecate MMX. No change in performance. Also add test coverage in checkasm. pred8x8_dc_rv40_mmxext: 10.0 ( 1.24x) pred8x8_dc_rv40_sse2: 10.0 ( 1.24x) Signed-off-by: Zuxy Meng <[email protected]> --- libavcodec/x86/h264_intrapred.asm | 21 +++++++++++---------- libavcodec/x86/h264_intrapred_init.c | 4 ++-- tests/checkasm/h264pred.c | 1 + 3 files changed, 14 insertions(+), 12 deletions(-) diff --git a/libavcodec/x86/h264_intrapred.asm b/libavcodec/x86/h264_intrapred.asm index ecaafce649..88abb7f8f2 100644 --- a/libavcodec/x86/h264_intrapred.asm +++ b/libavcodec/x86/h264_intrapred.asm @@ -710,15 +710,16 @@ cglobal pred8x8_dc_8, 2,5,5 ; void ff_pred8x8_dc_rv40_8(uint8_t *src, ptrdiff_t stride) ;----------------------------------------------------------------------------- -INIT_MMX mmxext -cglobal pred8x8_dc_rv40_8, 2,7 +INIT_XMM sse2 +cglobal pred8x8_dc_rv40_8, 2,7,2 mov r4, r0 sub r0, r1 - pxor mm0, mm0 - psadbw mm0, [r0] + movq m1, [r0] + pxor m0, m0 + psadbw m0, m1 dec r0 movzx r5d, byte [r0+r1*1] - movd r6d, mm0 + movd r6d, m0 lea r0, [r0+r1*2] %rep 3 movzx r2d, byte [r0+r1*0] @@ -731,13 +732,13 @@ cglobal pred8x8_dc_rv40_8, 2,7 add r5d, r6d lea r2d, [r2+r5+8] shr r2d, 4 - movd mm0, r2d - punpcklbw mm0, mm0 - pshufw mm0, mm0, 0 + movd m0, r2d + punpcklbw m0, m0 + pshuflw m0, m0, 0 mov r3d, 4 .loop: - movq [r4+r1*0], mm0 - movq [r4+r1*1], mm0 + movq [r4+r1*0], m0 + movq [r4+r1*1], m0 lea r4, [r4+r1*2] dec r3d jg .loop diff --git a/libavcodec/x86/h264_intrapred_init.c b/libavcodec/x86/h264_intrapred_init.c index 8ee79b5260..027746a8f9 100644 --- a/libavcodec/x86/h264_intrapred_init.c +++ b/libavcodec/x86/h264_intrapred_init.c @@ -115,7 +115,7 @@ PRED16x16(tm_vp8, 8, sse2) PRED16x16(tm_vp8, 8, avx2) PRED8x8(top_dc, 8, sse2) -PRED8x8(dc_rv40, 8, mmxext) +PRED8x8(dc_rv40, 8, sse2) PRED8x8(dc, 8, sse2) PRED8x8(vertical, 8, sse2) PRED8x8(horizontal, 8, sse2) @@ -176,7 +176,6 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, h->pred4x4 [HOR_UP_PRED ] = ff_pred4x4_horizontal_up_8_mmxext; } if (codec_id == AV_CODEC_ID_VP7 || codec_id == AV_CODEC_ID_VP8) { - h->pred8x8 [DC_PRED8x8 ] = ff_pred8x8_dc_rv40_8_mmxext; h->pred4x4 [TM_VP8_PRED ] = ff_pred4x4_tm_vp8_8_mmxext; h->pred4x4 [VERT_PRED ] = ff_pred4x4_vertical_vp8_8_mmxext; } @@ -210,6 +209,7 @@ av_cold void ff_h264_pred_init_x86(H264PredContext *h, int codec_id, if (codec_id == AV_CODEC_ID_VP7 || codec_id == AV_CODEC_ID_VP8) { h->pred16x16[PLANE_PRED8x8 ] = ff_pred16x16_tm_vp8_8_sse2; h->pred8x8 [PLANE_PRED8x8 ] = ff_pred8x8_tm_vp8_8_sse2; + h->pred8x8 [DC_PRED8x8 ] = ff_pred8x8_dc_rv40_8_sse2; } else { if (chroma_format_idc <= 1) h->pred8x8 [PLANE_PRED8x8] = ff_pred8x8_plane_8_sse2; diff --git a/tests/checkasm/h264pred.c b/tests/checkasm/h264pred.c index 53e1cdb219..f4538a3562 100644 --- a/tests/checkasm/h264pred.c +++ b/tests/checkasm/h264pred.c @@ -80,6 +80,7 @@ static const char * const pred8x8_modes[4][11] = { [ALZHEIMER_DC_0L0_PRED8x8] = "mad_cow_dc_0l0", }, { /* VP8 */ + [DC_PRED8x8 ] = "dc_rv40", [PLANE_PRED8x8 ] = "tm_vp8", [DC_127_PRED8x8] = "dc_127_vp8", [DC_129_PRED8x8] = "dc_129_vp8", _______________________________________________ ffmpeg-cvslog mailing list -- [email protected] To unsubscribe send an email to [email protected]
