ALIGNED_8( int8_t intra4x4_pred_mode[X264_SCAN8_LUMA_SIZE] );
/* i_non_zero_count if available else 0x80 */
- ALIGNED_4( uint8_t non_zero_count[X264_SCAN8_SIZE] );
+ ALIGNED_16( uint8_t non_zero_count[X264_SCAN8_SIZE] );
/* -1 if unused, -2 if unavailable */
ALIGNED_4( int8_t ref[2][X264_SCAN8_LUMA_SIZE] );
static void x264_macroblock_encode_skip( x264_t *h )
{
- h->mb.i_cbp_luma = 0x00;
- h->mb.i_cbp_chroma = 0x00;
- memset( h->mb.cache.non_zero_count, 0, sizeof( h->mb.cache.non_zero_count ) );
- /* store cbp */
+ for( int i = 0; i < sizeof( h->mb.cache.non_zero_count ); i += 16 )
+ M128( &h->mb.cache.non_zero_count[i] ) = M128_ZERO;
+ h->mb.i_cbp_luma = 0;
+ h->mb.i_cbp_chroma = 0;
h->mb.cbp[h->mb.i_mb_xy] = 0;
}
if( i < b_ac )
{
- /* We only need to memset an empty 4x4 block. 8x8 can be
+ /* We only need to zero an empty 4x4 block. 8x8 can be
implicitly emptied via zero nnz, as can dc. */
if( i_coefs == 16 && !dc )
- memset( dct, 0, 16 * sizeof(int16_t) );
+ {
+ M128( &dct[0] ) = M128_ZERO;
+ M128( &dct[8] ) = M128_ZERO;
+ }
return 0;
}
if( bnode == &nodes_cur[0] )
{
if( i_coefs == 16 && !dc )
- memset( dct, 0, 16 * sizeof(int16_t) );
+ {
+ M128( &dct[0] ) = M128_ZERO;
+ M128( &dct[8] ) = M128_ZERO;
+ }
return 0;
}