1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-04-08 16:54:03 +02:00

avcodec/vorbis: Split data declarations out into new header

vorbis.h currently contains stuff only used by the native
Vorbis codecs and some Vorbis tables, which are also used by
Opus and libvorbis. Therefore split the data out into a header
of its own.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2022-09-29 23:20:08 +02:00
parent 5f02a261a2
commit dfe7c7ffce
10 changed files with 43 additions and 13 deletions

View File

@ -31,9 +31,9 @@
#include "codec_internal.h"
#include "decode.h"
#include "internal.h"
#include "vorbis.h"
#include "mathops.h"
#include "libopus.h"
#include "vorbis_data.h"
struct libopus_context {
AVClass *class;

View File

@ -29,8 +29,8 @@
#include "codec_internal.h"
#include "encode.h"
#include "libopus.h"
#include "vorbis.h"
#include "audio_frame_queue.h"
#include "vorbis_data.h"
typedef struct LibopusEncOpts {
int vbr;

View File

@ -29,7 +29,6 @@
#include "codec_internal.h"
#include "encode.h"
#include "version.h"
#include "vorbis.h"
#include "vorbis_parser.h"

View File

@ -33,7 +33,7 @@
#include "opus_celt.h"
#include "opustab.h"
#include "internal.h"
#include "vorbis.h"
#include "vorbis_data.h"
static const uint16_t opus_frame_duration[32] = {
480, 960, 1920, 2880,

View File

@ -30,6 +30,7 @@
#include "avcodec.h"
#include "vorbis.h"
#include "vorbis_data.h"
/* Helper functions */

View File

@ -21,15 +21,9 @@
#ifndef AVCODEC_VORBIS_H
#define AVCODEC_VORBIS_H
#include "avcodec.h"
#include <stdint.h>
extern const float ff_vorbis_floor1_inverse_db_table[256];
extern const float * const ff_vorbis_vwin[8];
extern const uint8_t ff_vorbis_channel_layout_offsets[8][8];
#if FF_API_OLD_CHANNEL_LAYOUT
extern const uint64_t ff_vorbis_channel_layouts[9];
#endif
extern const AVChannelLayout ff_vorbis_ch_layouts[9];
#include "avcodec.h"
typedef struct vorbis_floor1_entry {
uint16_t x;

View File

@ -21,7 +21,7 @@
#include "libavutil/channel_layout.h"
#include "libavutil/mem_internal.h"
#include "vorbis.h"
#include "vorbis_data.h"
const uint8_t ff_vorbis_channel_layout_offsets[8][8] = {
{ 0 },

34
libavcodec/vorbis_data.h Normal file
View File

@ -0,0 +1,34 @@
/*
* This file is part of FFmpeg.
*
* FFmpeg is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* FFmpeg is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with FFmpeg; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_VORBIS_DATA_H
#define AVCODEC_VORBIS_DATA_H
#include <stdint.h>
#include "libavutil/channel_layout.h"
extern const float ff_vorbis_floor1_inverse_db_table[256];
extern const float * const ff_vorbis_vwin[8];
extern const uint8_t ff_vorbis_channel_layout_offsets[8][8];
#if FF_API_OLD_CHANNEL_LAYOUT
extern const uint64_t ff_vorbis_channel_layouts[9];
#endif
extern const AVChannelLayout ff_vorbis_ch_layouts[9];
#endif /* AVCODEC_VORBIS_DATA_H */

View File

@ -40,6 +40,7 @@
#include "get_bits.h"
#include "vorbis.h"
#include "vorbisdsp.h"
#include "vorbis_data.h"
#include "xiph.h"
#define V_NB_BITS 8

View File

@ -33,6 +33,7 @@
#include "fft.h"
#include "mathops.h"
#include "vorbis.h"
#include "vorbis_data.h"
#include "vorbis_enc_data.h"
#include "audio_frame_queue.h"