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>
pull/388/head
Andreas Rheinhardt 2 years ago
parent 5f02a261a2
commit dfe7c7ffce
  1. 2
      libavcodec/libopusdec.c
  2. 2
      libavcodec/libopusenc.c
  3. 1
      libavcodec/libvorbisenc.c
  4. 2
      libavcodec/opus.c
  5. 1
      libavcodec/vorbis.c
  6. 10
      libavcodec/vorbis.h
  7. 2
      libavcodec/vorbis_data.c
  8. 34
      libavcodec/vorbis_data.h
  9. 1
      libavcodec/vorbisdec.c
  10. 1
      libavcodec/vorbisenc.c

@ -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;

@ -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;

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

@ -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,

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

@ -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;

@ -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 },

@ -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 */

@ -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

@ -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"

Loading…
Cancel
Save