You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-10 06:10:52 +02:00
avcodec/opus: Move remaining celt declarations to opus_celt.h
Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -73,8 +73,6 @@ enum OpusBandwidth {
|
|||||||
|
|
||||||
typedef struct SilkContext SilkContext;
|
typedef struct SilkContext SilkContext;
|
||||||
|
|
||||||
typedef struct CeltFrame CeltFrame;
|
|
||||||
|
|
||||||
int ff_silk_init(AVCodecContext *avctx, SilkContext **ps, int output_channels);
|
int ff_silk_init(AVCodecContext *avctx, SilkContext **ps, int output_channels);
|
||||||
void ff_silk_free(SilkContext **ps);
|
void ff_silk_free(SilkContext **ps);
|
||||||
void ff_silk_flush(SilkContext *s);
|
void ff_silk_flush(SilkContext *s);
|
||||||
@@ -88,10 +86,4 @@ int ff_silk_decode_superframe(SilkContext *s, OpusRangeCoder *rc,
|
|||||||
enum OpusBandwidth bandwidth, int coded_channels,
|
enum OpusBandwidth bandwidth, int coded_channels,
|
||||||
int duration_ms);
|
int duration_ms);
|
||||||
|
|
||||||
/* Encode or decode CELT bands */
|
|
||||||
void ff_celt_quant_bands(CeltFrame *f, OpusRangeCoder *rc);
|
|
||||||
|
|
||||||
/* Encode or decode CELT bitallocation */
|
|
||||||
void ff_celt_bitalloc(CeltFrame *f, OpusRangeCoder *rc, int encode);
|
|
||||||
|
|
||||||
#endif /* AVCODEC_OPUS_H */
|
#endif /* AVCODEC_OPUS_H */
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Opus decoder/demuxer common functions
|
* Opus decoder/encoder CELT functions
|
||||||
* Copyright (c) 2012 Andrew D'Addesio
|
* Copyright (c) 2012 Andrew D'Addesio
|
||||||
* Copyright (c) 2013-2014 Mozilla Corporation
|
* Copyright (c) 2013-2014 Mozilla Corporation
|
||||||
* Copyright (c) 2016 Rostislav Pehlivanov <atomnuker@gmail.com>
|
* Copyright (c) 2016 Rostislav Pehlivanov <atomnuker@gmail.com>
|
||||||
@@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
#include "opus.h"
|
#include "opus.h"
|
||||||
#include "opusdsp.h"
|
#include "opusdsp.h"
|
||||||
|
#include "opus_rc.h"
|
||||||
|
|
||||||
#include "libavutil/float_dsp.h"
|
#include "libavutil/float_dsp.h"
|
||||||
#include "libavutil/libm.h"
|
#include "libavutil/libm.h"
|
||||||
@@ -87,7 +88,7 @@ typedef struct CeltBlock {
|
|||||||
float emph_coeff;
|
float emph_coeff;
|
||||||
} CeltBlock;
|
} CeltBlock;
|
||||||
|
|
||||||
struct CeltFrame {
|
typedef struct CeltFrame {
|
||||||
// constant values that do not change during context lifetime
|
// constant values that do not change during context lifetime
|
||||||
AVCodecContext *avctx;
|
AVCodecContext *avctx;
|
||||||
AVTXContext *tx[4];
|
AVTXContext *tx[4];
|
||||||
@@ -136,7 +137,7 @@ struct CeltFrame {
|
|||||||
int fine_priority[CELT_MAX_BANDS];
|
int fine_priority[CELT_MAX_BANDS];
|
||||||
int pulses [CELT_MAX_BANDS];
|
int pulses [CELT_MAX_BANDS];
|
||||||
int tf_change [CELT_MAX_BANDS];
|
int tf_change [CELT_MAX_BANDS];
|
||||||
};
|
} CeltFrame;
|
||||||
|
|
||||||
/* LCG for noise generation */
|
/* LCG for noise generation */
|
||||||
static av_always_inline uint32_t celt_rng(CeltFrame *f)
|
static av_always_inline uint32_t celt_rng(CeltFrame *f)
|
||||||
@@ -167,4 +168,10 @@ void ff_celt_flush(CeltFrame *f);
|
|||||||
int ff_celt_decode_frame(CeltFrame *f, OpusRangeCoder *rc, float **output,
|
int ff_celt_decode_frame(CeltFrame *f, OpusRangeCoder *rc, float **output,
|
||||||
int coded_channels, int frame_size, int startband, int endband);
|
int coded_channels, int frame_size, int startband, int endband);
|
||||||
|
|
||||||
|
/* Encode or decode CELT bands */
|
||||||
|
void ff_celt_quant_bands(CeltFrame *f, OpusRangeCoder *rc);
|
||||||
|
|
||||||
|
/* Encode or decode CELT bitallocation */
|
||||||
|
void ff_celt_bitalloc(CeltFrame *f, OpusRangeCoder *rc, int encode);
|
||||||
|
|
||||||
#endif /* AVCODEC_OPUS_CELT_H */
|
#endif /* AVCODEC_OPUS_CELT_H */
|
||||||
|
Reference in New Issue
Block a user