[x264-devel] commit: MMX high bit depth coeff_last4 (Joe Cortes )
git at videolan.org
git at videolan.org
Mon Jan 10 22:01:02 CET 2011
x264 | branch: master | Joe Cortes <escozzia at gmail.com> | Fri Dec 24 21:33:57 2010 -0600| [bd5487219adef1e857257829bcd0403ae816fb9d] | committer: Jason Garrett-Glaser
MMX high bit depth coeff_last4
Patch from Google Code-In.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=bd5487219adef1e857257829bcd0403ae816fb9d
---
common/quant.c | 2 ++
common/x86/quant-a.asm | 16 ++++++++++++++++
2 files changed, 18 insertions(+), 0 deletions(-)
diff --git a/common/quant.c b/common/quant.c
index 5c05a04..c4b39e2 100644
--- a/common/quant.c
+++ b/common/quant.c
@@ -306,6 +306,7 @@ void x264_quant_init( x264_t *h, int cpu, x264_quant_function_t *pf )
pf->decimate_score16 = x264_decimate_score16_mmxext_slowctz;
}
pf->decimate_score64 = x264_decimate_score64_mmxext;
+ pf->coeff_last[DCT_CHROMA_DC] = x264_coeff_last4_mmxext;
pf->coeff_last[ DCT_LUMA_AC] = x264_coeff_last15_mmxext;
pf->coeff_last[ DCT_LUMA_4x4] = x264_coeff_last16_mmxext;
pf->coeff_last[ DCT_LUMA_8x8] = x264_coeff_last64_mmxext;
@@ -341,6 +342,7 @@ void x264_quant_init( x264_t *h, int cpu, x264_quant_function_t *pf )
pf->coeff_level_run[DCT_LUMA_4x4] = x264_coeff_level_run16_sse2;
if( cpu&X264_CPU_LZCNT )
{
+ pf->coeff_last[DCT_CHROMA_DC] = x264_coeff_last4_mmxext_lzcnt;
pf->coeff_last[ DCT_LUMA_AC] = x264_coeff_last15_sse2_lzcnt;
pf->coeff_last[DCT_LUMA_4x4] = x264_coeff_last16_sse2_lzcnt;
pf->coeff_last[DCT_LUMA_8x8] = x264_coeff_last64_sse2_lzcnt;
diff --git a/common/x86/quant-a.asm b/common/x86/quant-a.asm
index 49906f4..c4a652f 100644
--- a/common/x86/quant-a.asm
+++ b/common/x86/quant-a.asm
@@ -1151,6 +1151,22 @@ DECIMATE8x8 ssse3, 1
shl %3, 8
or %1, %3
%endmacro
+
+%macro COEFF_LAST4 1
+cglobal coeff_last4_%1, 1,3
+ pxor mm2, mm2
+ LAST_MASK4_MMX r1d, r0
+ xor r1d, 0xff
+ shr r1d, 4
+ LAST eax, r1d, 0x1f
+ RET
+%endmacro
+
+%define LAST LAST_X86
+COEFF_LAST4 mmxext
+%define LAST LAST_SSE4A
+COEFF_LAST4 mmxext_lzcnt
+
%else ; !HIGH_BIT_DEPTH
%macro LAST_MASK4_MMX 2-3
movq mm0, [%2]
More information about the x264-devel
mailing list