FFmpeg
|
qcelpdec.c
Go to the documentation of this file.
void ff_celp_lp_synthesis_filterf(float *out, const float *filter_coeffs, const float *in, int buffer_length, int filter_length)
LP synthesis filter.
Definition: celp_filters.c:84
void ff_weighted_vector_sumf(float *out, const float *in_a, const float *in_b, float weight_coeff_a, float weight_coeff_b, int length)
float implementation of weighted sum of two vectors.
Definition: acelp_vectors.c:192
static void apply_pitch_filters(QCELPContext *q, float *cdn_vector)
Apply pitch synthesis filter and pitch prefilter to the scaled codebook vector.
Definition: qcelpdec.c:465
static void warn_insufficient_frame_quality(AVCodecContext *avctx, const char *message)
Definition: qcelpdec.c:644
static qcelp_packet_rate buf_size2bitrate(const int buf_size)
Definition: qcelpdec.c:585
static const int8_t qcelp_rate_half_codebook[128]
circular codebook for rate 1/2 frames in x*2 form
Definition: qcelpdata.h:484
static const float qcelp_hammsinc_table[4]
pre-calculated table for hammsinc function Only half of the table is needed because of symmetry...
Definition: qcelpdata.h:74
static int decode_lspf(QCELPContext *q, float *lspf)
Decode the 10 quantized LSP frequencies from the LSPV/LSP transmission codes of any bitrate and check...
Definition: qcelpdec.c:113
uint8_t warned_buf_mismatch_bitrate
Definition: qcelpdec.c:74
initialize output if(nPeaks >3)%at least 3 peaks in spectrum for trying to find f0 nf0peaks
float avpriv_scalarproduct_float_c(const float *v1, const float *v2, int len)
Return the scalar product of two vectors.
Definition: float_dsp.c:107
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature.
static int codebook_sanity_check_for_rate_quarter(const uint8_t *cbgain)
If the received packet is Rate 1/4 a further sanity check is made of the codebook gain...
Definition: qcelpdec.c:275
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: libavcodec/avcodec.h:743
Definition: qcelpdec.c:52
void ff_adaptive_gain_control(float *out, const float *in, float speech_energ, int size, float alpha, float *gain_mem)
Adaptive gain control (as used in AMR postfiltering)
Definition: acelp_vectors.c:202
bitstream reader API header.
Definition: qcelpdec.c:55
#define QCELP_LSP_OCTAVE_PREDICTOR
predictor coefficient for the conversion of LSP codes to LSP frequencies for 1/8 and I_F_Q ...
Definition: qcelpdata.h:541
uint8_t lspv[10]
line spectral pair frequencies (LSP) for RATE_OCTAVE, line spectral pair frequencies grouped into fiv...
Definition: qcelpdata.h:60
static qcelp_packet_rate determine_bitrate(AVCodecContext *avctx, const int buf_size, const uint8_t **buf)
Determine the bitrate from the frame size and/or the first byte of the frame.
Definition: qcelpdec.c:610
static void interpolate_lpc(QCELPContext *q, const float *curr_lspf, float *lpc, const int subframe_num)
Interpolate LSP frequencies and compute LPC coefficients for a given bitrate & pitch subframe...
Definition: qcelpdec.c:561
static void decode_gain_and_index(QCELPContext *q, float *gain)
Convert codebook transmission codes to GAIN and INDEX.
Definition: qcelpdec.c:197
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: libavutil/internal.h:123
Definition: avutil.h:144
static const int16_t qcelp_rate_full_codebook[128]
circular codebook for rate 1 frames in x*100 form
Definition: qcelpdata.h:459
void ff_scale_vector_to_given_sum_of_squares(float *out, const float *in, float sum_of_squares, const int n)
Set the sum of squares of a signal by scaling.
Definition: acelp_vectors.c:223
external API header
static void compute_svector(QCELPContext *q, const float *gain, float *cdn_vector)
Compute the scaled codebook vector Cdn From INDEX and GAIN for all rates.
Definition: qcelpdec.c:311
#define QCELP_SQRT1887
sqrt(1.887) is the maximum of the pseudorandom white sequence used to generate the scaled codebook ve...
Definition: qcelpdata.h:511
audio channel layout utility functions
static void postfilter(QCELPContext *q, float *samples, float *lpc)
Definition: qcelpdec.c:651
static int qcelp_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: qcelpdec.c:683
static av_cold int qcelp_decode_init(AVCodecContext *avctx)
Initialize the speech codec according to the specification.
Definition: qcelpdec.c:87
#define QCELP_LSP_SPREAD_FACTOR
This spread factor is used, for bitrate 1/8 and I_F_Q, to force the LSP frequencies to be at least 80...
Definition: qcelpdata.h:533
Definition: libavcodec/avcodec.h:405
#define QCELP_BANDWIDTH_EXPANSION_COEFF
initial coefficient to perform bandwidth expansion on LPC
Definition: qcelpdata.h:550
void ff_tilt_compensation(float *mem, float tilt, float *samples, int size)
Apply tilt compensation filter, 1 - tilt * z-1.
Definition: acelp_filters.c:136
Definition: qcelpdec.c:51
void ff_acelp_lspd2lpc(const double *lsp, float *lpc, int lp_half_order)
Reconstruct LPC coefficients from the line spectral pair frequencies.
Definition: lsp.c:209
Data tables for the QCELP decoder.
float pitch_synthesis_filter_mem[303]
Definition: qcelpdec.c:64
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
Definition: libavcodec/utils.c:823
static const uint16_t qcelp_unpacking_bitmaps_lengths[5]
Definition: qcelpdata.h:276
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
Definition: get_bits.h:379
void ff_celp_lp_zero_synthesis_filterf(float *out, const float *filter_coeffs, const float *in, int buffer_length, int filter_length)
LP zero synthesis filter.
Definition: celp_filters.c:199
static const QCELPBitmap *const qcelp_unpacking_bitmaps_per_rate[5]
position of the bitmapping data for each packet type in the QCELPContext
Definition: qcelpdata.h:268
uint8_t reserved
reserved bits only present in bitrate 1, 1/4 and 1/8 packets
Definition: qcelpdata.h:65
static void lspf2lpc(const float *lspf, float *lpc)
Reconstruct LPC coefficients from the line spectral pair frequencies and perform bandwidth expansion...
Definition: qcelpdec.c:533
Definition: qcelpdec.c:49
Definition: get_bits.h:54
common internal api header.
static void apply_gain_ctrl(float *v_out, const float *v_ref, const float *v_in)
Apply generic gain control.
Definition: qcelpdec.c:395
static const double qcelp_rnd_fir_coefs[11]
table for impulse response of BPF used to filter the white excitation for bitrate 1/4 synthesis ...
Definition: qcelpdata.h:521
Definition: qcelpdec.c:48
static const float * do_pitchfilter(float memory[303], const float v_in[160], const float gain[4], const uint8_t *lag, const uint8_t pfrac[4])
Apply filter in pitch-subframe steps.
Definition: qcelpdec.c:422
Filter the word “frame” indicates either a video frame or a group of audio samples
Definition: filter_design.txt:2
Definition: qcelpdec.c:50
static const float qcelp_g12ga[61]
table for computing Ga (decoded linear codebook gain magnitude)
Definition: qcelpdata.h:436
Definition: qcelpdata.h:76
Generated on Fri Dec 20 2024 06:56:05 for FFmpeg by 1.8.11