aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/wmavoice.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-09-26 22:53:37 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2023-10-31 21:44:48 +0100
commitf2687a3b691d98ffa9ce356279ed37e9e18af9a9 (patch)
tree1371aac7b6c034b7032357c6abc52f72e0f07746 /libavcodec/wmavoice.c
parent5615f9dab4e7f911ce8799c34c0ca425b0e2a090 (diff)
downloadffmpeg-f2687a3b691d98ffa9ce356279ed37e9e18af9a9.tar.gz
avcodec/wmavoice: Avoid unnecessary VLC structure
Everything besides VLC.table is basically write-only and even VLC.table can be removed by accessing the underlying table directly. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/wmavoice.c')
-rw-r--r--libavcodec/wmavoice.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index dd7cc64d63..4e93aadab2 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -60,7 +60,7 @@
/**
* Frame type VLC coding.
*/
-static VLC frame_type_vlc;
+static VLCElem frame_type_vlc[132];
/**
* Adaptive codebook types.
@@ -320,9 +320,9 @@ static av_cold void wmavoice_init_static_data(void)
14, 14, 14, 14
};
- VLC_INIT_STATIC_FROM_LENGTHS(&frame_type_vlc, VLC_NBITS,
- FF_ARRAY_ELEMS(bits), bits,
- 1, NULL, 0, 0, 0, 0, 132);
+ VLC_INIT_STATIC_TABLE_FROM_LENGTHS(frame_type_vlc, VLC_NBITS,
+ FF_ARRAY_ELEMS(bits), bits,
+ 1, NULL, 0, 0, 0, 0);
}
static av_cold void wmavoice_flush(AVCodecContext *ctx)
@@ -1503,7 +1503,7 @@ static int synth_frame(AVCodecContext *ctx, GetBitContext *gb, int frame_idx,
int pitch[MAX_BLOCKS], av_uninit(last_block_pitch);
/* Parse frame type ("frame header"), see frame_descs */
- int bd_idx = s->vbm_tree[get_vlc2(gb, frame_type_vlc.table, 6, 3)], block_nsamples;
+ int bd_idx = s->vbm_tree[get_vlc2(gb, frame_type_vlc, 6, 3)], block_nsamples;
if (bd_idx < 0) {
av_log(ctx, AV_LOG_ERROR,