Commit bc8948fc authored by Joe Cortes's avatar Joe Cortes Committed by Fiona Glaser

MMX high bit depth coeff_last4

Patch from Google Code-In.
parent af617efc
......@@ -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;
......
......@@ -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]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment