89 for (m = 0; m < order; m++) {
91 for (i = 0; i < m; i++)
92 next[i] = cur[i] + refl[m] * cur[m - i - 1];
96 memcpy(lpc, cur,
sizeof(*lpc) * order);
106 int *got_frame_ptr,
AVPacket *avpkt)
110 int buf_size = avpkt->
size;
117 int dbov = -avpkt->
data[0];
127 for (i = 0; i < p->
order; i++)
136 for (i = 0; i < p->
order; i++)
139 scaling = sqrt(e * p->
energy / 1081109975);
165 .
name =
"comfortnoise",
void ff_celp_lp_synthesis_filterf(float *out, const float *filter_coeffs, const float *in, int buffer_length, int filter_length)
LP synthesis filter.
This structure describes decoded (raw) audio or video data.
AVFrame * coded_frame
the picture in the bitstream
static int cng_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
AVCodec ff_comfortnoise_decoder
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
#define FFSWAP(type, a, b)
enum AVSampleFormat sample_fmt
audio sample format
static int init(AVCodecParserContext *s)
void av_free(void *ptr)
Free a memory block which has been allocated with av_malloc(z)() or av_realloc(). ...
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
struct CNGContext CNGContext
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame)
Get a buffer for a frame.
int frame_size
Number of samples per channel in an audio frame.
static void cng_decode_flush(AVCodecContext *avctx)
int sample_rate
samples per second
main external API structure.
static void close(AVCodecParserContext *s)
static unsigned int av_lfg_get(AVLFG *c)
Get the next random unsigned 32-bit number using an ALFG.
void avcodec_get_frame_defaults(AVFrame *frame)
Set the fields of the given AVFrame to default values.
av_cold void av_lfg_init(AVLFG *c, unsigned int seed)
static void make_lpc_coefs(float *lpc, const float *refl, int order)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
common internal api header.
common internal and external API header
static av_cold void flush(AVCodecContext *avctx)
Flush (reset) the frame ID after seeking.
AVSampleFormat
Audio Sample Formats.
static av_cold int cng_decode_close(AVCodecContext *avctx)
int channels
number of audio channels
This structure stores compressed data.
int nb_samples
number of audio samples (per channel) described by this frame
void * av_mallocz(size_t size)
Allocate a block of size bytes with alignment suitable for all memory accesses (including vectors if ...
static av_cold int cng_decode_init(AVCodecContext *avctx)