On 07/22/2011 11:24 AM, Måns Rullgård wrote: > Mans Rullgard <m...@mansr.com> writes: > >> This avoids an indirection in the table. Data size is slightly >> smaller on 64-bit systems, 8 bytes larger on 32-bit. >> >> Signed-off-by: Mans Rullgard <m...@mansr.com> >> --- >> libavcodec/vorbis_enc_data.h | 12 ++++++------ >> 1 files changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/libavcodec/vorbis_enc_data.h b/libavcodec/vorbis_enc_data.h >> index a1e743e..37a4e1e 100644 >> --- a/libavcodec/vorbis_enc_data.h >> +++ b/libavcodec/vorbis_enc_data.h >> @@ -492,13 +492,13 @@ static const struct { >> int dim; >> int subclass; >> int masterbook; >> - const int *nbooks; >> + const int nbooks[4]; >> } floor_classes[] = { >> - { 3, 0, 0, (const int[]){ 4 } }, >> - { 4, 1, 0, (const int[]){ 5, 6 } }, >> - { 3, 1, 1, (const int[]){ 7, 8 } }, >> - { 4, 2, 2, (const int[]){ -1, 9, 10, 11 } }, >> - { 3, 2, 3, (const int[]){ -1, 12, 13, 14 } }, >> + { 3, 0, 0, { 4 } }, >> + { 4, 1, 0, { 5, 6 } }, >> + { 3, 1, 1, { 7, 8 } }, >> + { 4, 2, 2, { -1, 9, 10, 11 } }, >> + { 3, 2, 3, { -1, 12, 13, 14 } }, >> }; > > Come to think of it, those arrays could be int8_t. In fact, everything > in that struct could.
The patch as is, looks fine, test with int8 if you feel so. _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel