Commit 18eed0b9 authored by Henrik Gramner's avatar Henrik Gramner Committed by Fiona Glaser

Cosmetics: use sizeof() where appropriate

parent 137e233f
......@@ -146,12 +146,12 @@ void x264_param_default( x264_param_t *param )
param->analyse.b_ssim = 0;
param->i_cqm_preset = X264_CQM_FLAT;
memset( param->cqm_4iy, 16, 16 );
memset( param->cqm_4ic, 16, 16 );
memset( param->cqm_4py, 16, 16 );
memset( param->cqm_4pc, 16, 16 );
memset( param->cqm_8iy, 16, 64 );
memset( param->cqm_8py, 16, 64 );
memset( param->cqm_4iy, 16, sizeof( param->cqm_4iy ) );
memset( param->cqm_4ic, 16, sizeof( param->cqm_4ic ) );
memset( param->cqm_4py, 16, sizeof( param->cqm_4py ) );
memset( param->cqm_4pc, 16, sizeof( param->cqm_4pc ) );
memset( param->cqm_8iy, 16, sizeof( param->cqm_8iy ) );
memset( param->cqm_8py, 16, sizeof( param->cqm_8py ) );
param->b_repeat_headers = 1;
param->b_annexb = 1;
......
......@@ -838,11 +838,10 @@ void x264_macroblock_slice_init( x264_t *h )
}
}
if( h->sh.i_type == SLICE_TYPE_P )
memset( h->mb.cache.skip, 0, X264_SCAN8_SIZE * sizeof( int8_t ) );
memset( h->mb.cache.skip, 0, sizeof( h->mb.cache.skip ) );
/* init with not available (for top right idx=7,15) */
memset( h->mb.cache.ref[0], -2, X264_SCAN8_SIZE * sizeof( int8_t ) );
memset( h->mb.cache.ref[1], -2, X264_SCAN8_SIZE * sizeof( int8_t ) );
memset( h->mb.cache.ref, -2, sizeof( h->mb.cache.ref ) );
setup_inverse_delta_pocs( h );
......@@ -1333,7 +1332,7 @@ void x264_macroblock_cache_save( x264_t *h )
h->mb.i_cbp_luma = 0xf;
h->mb.cbp[i_mb_xy] = 0x72f; /* all set */
h->mb.b_transform_8x8 = 0;
memset( non_zero_count, 16, 24 );
memset( non_zero_count, 16, sizeof( *h->mb.non_zero_count ) );
}
else
{
......
......@@ -464,7 +464,7 @@ 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, X264_SCAN8_SIZE );
memset( h->mb.cache.non_zero_count, 0, sizeof( h->mb.cache.non_zero_count ) );
/* store cbp */
h->mb.cbp[h->mb.i_mb_xy] = 0;
}
......
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