1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/wmavoice: Avoid code table

These codes are already ordered from left-to-right in the tree,
so one can just use ff_init_vlc_static_from_lengths().

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-09-04 19:38:38 +02:00
parent 51ca74b525
commit af847fe000

View File

@ -320,18 +320,10 @@ static av_cold void wmavoice_init_static_data(void)
10, 10, 10, 12, 12, 12,
14, 14, 14, 14
};
static const uint16_t codes[] = {
0x0000, 0x0001, 0x0002, // 00/01/10
0x000c, 0x000d, 0x000e, // 11+00/01/10
0x003c, 0x003d, 0x003e, // 1111+00/01/10
0x00fc, 0x00fd, 0x00fe, // 111111+00/01/10
0x03fc, 0x03fd, 0x03fe, // 11111111+00/01/10
0x0ffc, 0x0ffd, 0x0ffe, // 1111111111+00/01/10
0x3ffc, 0x3ffd, 0x3ffe, 0x3fff // 111111111111+xx
};
INIT_VLC_STATIC(&frame_type_vlc, VLC_NBITS, sizeof(bits),
bits, 1, 1, codes, 2, 2, 132);
INIT_VLC_STATIC_FROM_LENGTHS(&frame_type_vlc, VLC_NBITS,
FF_ARRAY_ELEMS(bits), bits,
1, NULL, 0, 0, 0, 0, 132);
}
static av_cold void wmavoice_flush(AVCodecContext *ctx)