Commit 8be6600d authored by Henrik Gramner's avatar Henrik Gramner Committed by Fiona Glaser

Avoid some unneccesary memory loads in macroblock_encode

parent 807aeaaa
......@@ -157,10 +157,7 @@ static void x264_mb_encode_i16x16( x264_t *h, int p, int i_qp )
return;
}
M32( &h->mb.cache.non_zero_count[x264_scan8[ 0+p*16]] ) = 0;
M32( &h->mb.cache.non_zero_count[x264_scan8[ 2+p*16]] ) = 0;
M32( &h->mb.cache.non_zero_count[x264_scan8[ 8+p*16]] ) = 0;
M32( &h->mb.cache.non_zero_count[x264_scan8[10+p*16]] ) = 0;
CLEAR_16x16_NNZ( p );
h->dctf.sub16x16_dct( dct4x4, p_src, p_dst );
......
......@@ -98,10 +98,10 @@ do\
#define CLEAR_16x16_NNZ( p ) \
do\
{\
M32( &h->mb.cache.non_zero_count[x264_scan8[16*p+ 0]] ) = 0;\
M32( &h->mb.cache.non_zero_count[x264_scan8[16*p+ 2]] ) = 0;\
M32( &h->mb.cache.non_zero_count[x264_scan8[16*p+ 8]] ) = 0;\
M32( &h->mb.cache.non_zero_count[x264_scan8[16*p+10]] ) = 0;\
M32( &h->mb.cache.non_zero_count[x264_scan8[16*p] + 0*8] ) = 0;\
M32( &h->mb.cache.non_zero_count[x264_scan8[16*p] + 1*8] ) = 0;\
M32( &h->mb.cache.non_zero_count[x264_scan8[16*p] + 2*8] ) = 0;\
M32( &h->mb.cache.non_zero_count[x264_scan8[16*p] + 3*8] ) = 0;\
} while(0)
/* A special for loop that iterates branchlessly over each set
......
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