summaryrefslogtreecommitdiff
path: root/libavcodec/wmavoice.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-04 19:38:38 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2022-09-07 00:07:45 +0200
commitaf847fe000f9eb78e3aa013ee64ab2274bfd5e68 (patch)
treea3d756d51f70324765e76afeccebccc002336da1 /libavcodec/wmavoice.c
parent51ca74b52593bcb1a74083875b688f889cf9b520 (diff)
downloadffmpeg-af847fe000f9eb78e3aa013ee64ab2274bfd5e68.tar.gz
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>
Diffstat (limited to 'libavcodec/wmavoice.c')
-rw-r--r--libavcodec/wmavoice.c14
1 files changed, 3 insertions, 11 deletions
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index 8fa9db63ee..4438089e51 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -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)