Commit 2baa28c8 authored by Henrik Gramner's avatar Henrik Gramner Committed by Anton Mitrofanov
Browse files

Use a larger integer type for the slice_table array

Makes it possible to use slicing with resolutions larger than 2^24 pixels.
parent c9d2c1c8
......@@ -740,8 +740,7 @@ struct x264_t
int16_t (*mvr[2][X264_REF_MAX*2])[2];/* 16x16 mv for each possible ref */
int8_t *skipbp; /* block pattern for SKIP or DIRECT (sub)mbs. B-frames + cabac only */
int8_t *mb_transform_size; /* transform_size_8x8_flag of each mb */
uint16_t *slice_table; /* sh->first_mb of the slice that the indexed mb is part of
* NOTE: this will fail on resolutions above 2^16 MBs... */
uint32_t *slice_table; /* sh->first_mb of the slice that the indexed mb is part of */
uint8_t *field;
/* buffer for weighted versions of the reference frames */
......
......@@ -260,7 +260,7 @@ int x264_macroblock_cache_allocate( x264_t *h )
PREALLOC( h->mb.qp, i_mb_count * sizeof(int8_t) );
PREALLOC( h->mb.cbp, i_mb_count * sizeof(int16_t) );
PREALLOC( h->mb.mb_transform_size, i_mb_count * sizeof(int8_t) );
PREALLOC( h->mb.slice_table, i_mb_count * sizeof(uint16_t) );
PREALLOC( h->mb.slice_table, i_mb_count * sizeof(uint32_t) );
/* 0 -> 3 top(4), 4 -> 6 : left(3) */
PREALLOC( h->mb.intra4x4_pred_mode, i_mb_count * 8 * sizeof(int8_t) );
......@@ -326,7 +326,7 @@ int x264_macroblock_cache_allocate( x264_t *h )
PREALLOC_END( h->mb.base );
memset( h->mb.slice_table, -1, i_mb_count * sizeof(uint16_t) );
memset( h->mb.slice_table, -1, i_mb_count * sizeof(uint32_t) );
for( int i = 0; i < 2; i++ )
{
......
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