diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-01-29 00:14:09 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2021-01-29 15:49:54 +0100 |
commit | bfdf03207bc2fc10b92bb79ba67d57c441742bcd (patch) | |
tree | 0df96984ceda53c45639cc64b30947816115d7cb /libavcodec/libvorbisenc.c | |
parent | b91b04473abef3058e28cb4a05288426549e784b (diff) | |
download | ffmpeg-bfdf03207bc2fc10b92bb79ba67d57c441742bcd.tar.gz |
avcodec/vorbis_data: Move encoder-related table to its only user
Said table was unused in case libvorbis was disabled.
Reviewed-by: Lynne <dev@lynne.ee>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/libvorbisenc.c')
-rw-r--r-- | libavcodec/libvorbisenc.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/libvorbisenc.c b/libavcodec/libvorbisenc.c index f78f872fe2..bf94764954 100644 --- a/libavcodec/libvorbisenc.c +++ b/libavcodec/libvorbisenc.c @@ -70,6 +70,17 @@ static const AVClass vorbis_class = { .version = LIBAVUTIL_VERSION_INT, }; +static const uint8_t vorbis_encoding_channel_layout_offsets[8][8] = { + { 0 }, + { 0, 1 }, + { 0, 2, 1 }, + { 0, 1, 2, 3 }, + { 0, 2, 1, 3, 4 }, + { 0, 2, 1, 4, 5, 3 }, + { 0, 2, 1, 5, 6, 4, 3 }, + { 0, 2, 1, 6, 7, 4, 5, 3 }, +}; + static int vorbis_error_to_averror(int ov_err) { switch (ov_err) { @@ -287,7 +298,7 @@ static int libvorbis_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, buffer = vorbis_analysis_buffer(&s->vd, samples); for (c = 0; c < channels; c++) { int co = (channels > 8) ? c : - ff_vorbis_encoding_channel_layout_offsets[channels - 1][c]; + vorbis_encoding_channel_layout_offsets[channels - 1][c]; memcpy(buffer[c], frame->extended_data[co], samples * sizeof(*buffer[c])); } |