28 #define BITSTREAM_READER_LE
39 #define CNG_RANDOM_SEED 12345
77 typedef struct g723_1_context {
140 int temp, info_bits, i;
147 if (info_bits == 3) {
157 if (info_bits == 2) {
253 int16_t exp = 0x4000;
256 for (i = 0; i < 14; i ++) {
257 int res_exp = res + exp;
258 if (val >= res_exp * res_exp << 1)
273 return width -
av_log2(num) - 1;
279 static int scale_vector(int16_t *dst,
const int16_t *vector,
int length)
285 for (i = 0; i < length; i++)
286 max |=
FFABS(vector[i]);
288 max =
FFMIN(max, 0x7FFF);
291 for (i = 0; i < length; i++)
292 dst[i] = vector[i] << bits >> 3;
306 uint8_t *lsp_index,
int bad_frame)
309 int i, j, temp, stable;
318 lsp_index[0] = lsp_index[1] = lsp_index[2] = 0;
335 temp = ((prev_lsp[i] -
dc_lsp[i]) * pred + (1 << 14)) >> 15;
336 cur_lsp[i] +=
dc_lsp[i] + temp;
340 cur_lsp[0] =
FFMAX(cur_lsp[0], 0x180);
341 cur_lsp[LPC_ORDER - 1] =
FFMIN(cur_lsp[LPC_ORDER - 1], 0x7e00);
345 temp = min_dist + cur_lsp[j - 1] - cur_lsp[j];
348 cur_lsp[j - 1] -= temp;
354 temp = cur_lsp[j - 1] + min_dist - cur_lsp[j] - 4;
364 memcpy(cur_lsp, prev_lsp, LPC_ORDER *
sizeof(*cur_lsp));
373 #define MULL2(a, b) \
374 ((((a) >> 16) * (b) << 1) + (((a) & 0xffff) * (b) >> 15))
389 int index = lpc[j] >> 7;
390 int offset = lpc[j] & 0x7f;
393 ((offset << 8) + 0x80) << 1;
395 lpc[j] = -(av_sat_dadd32(1 << 15, temp1 + temp2) >> 16);
404 f1[1] = (lpc[0] << 14) + (lpc[2] << 14);
405 f1[2] = lpc[0] * lpc[2] + (2 << 28);
408 f2[1] = (lpc[1] << 14) + (lpc[3] << 14);
409 f2[2] = lpc[1] * lpc[3] + (2 << 28);
415 for (i = 2; i < LPC_ORDER / 2; i++) {
416 f1[i + 1] = f1[i - 1] +
MULL2(f1[i], lpc[2 * i]);
417 f2[i + 1] = f2[i - 1] +
MULL2(f2[i], lpc[2 * i + 1]);
419 for (j = i; j >= 2; j--) {
420 f1[j] =
MULL2(f1[j - 1], lpc[2 * i]) +
421 (f1[j] >> 1) + (f1[j - 2] >> 1);
422 f2[j] =
MULL2(f2[j - 1], lpc[2 * i + 1]) +
423 (f2[j] >> 1) + (f2[j - 2] >> 1);
428 f1[1] = ((lpc[2 * i] << 16 >> i) + f1[1]) >> 1;
429 f2[1] = ((lpc[2 * i + 1] << 16 >> i) + f2[1]) >> 1;
433 for (i = 0; i < LPC_ORDER / 2; i++) {
434 int64_t ff1 = f1[i + 1] + f1[i];
435 int64_t ff2 = f2[i + 1] - f2[i];
437 lpc[i] = av_clipl_int32(((ff1 + ff2) << 3) + (1 << 15)) >> 16;
438 lpc[LPC_ORDER - i - 1] = av_clipl_int32(((ff1 - ff2) << 3) +
454 int16_t *lpc_ptr = lpc;
481 for (j = 0; j < SUBFRAME_LEN - i; j++)
482 buf[i + j] += vector[j];
496 enum Rate cur_rate,
int pitch_lag,
int index)
531 int offset, beta, lag;
533 for (i = 0; i < 8; i += 2) {
534 offset = ((cb_pos & 7) << 3) + cb_shift + i;
535 vector[offset] = (cb_sign & 1) ? cb_gain : -cb_gain;
547 vector[i] += beta * vector[i - lag] >> 15;
555 static void get_residual(int16_t *residual, int16_t *prev_excitation,
int lag)
560 residual[0] = prev_excitation[offset];
561 residual[1] = prev_excitation[offset + 1];
565 residual[i] = prev_excitation[offset + (i - 2) % lag];
572 for (i = 0; i < length; i++) {
573 int prod = a[i] * b[i];
574 sum = av_sat_dadd32(sum, prod);
587 const int16_t *cb_ptr;
588 int lag = pitch_lag + subfrm->
ad_cb_lag - 1;
605 vector[i] = av_sat_dadd32(1 << 15, sum) >> 16;
620 int pitch_lag,
int length,
int dir)
622 int limit, ccr, lag = 0;
629 limit = pitch_lag + 3;
631 for (i = pitch_lag - 3; i <= limit; i++) {
634 if (ccr > *ccr_max) {
653 int tgt_eng,
int ccr,
int res_eng)
660 temp1 = tgt_eng * res_eng >> 1;
661 temp2 = ccr * ccr << 1;
664 if (ccr >= res_eng) {
667 ppf->
opt_gain = (ccr << 15) / res_eng *
671 temp1 = (tgt_eng << 15) + (ccr * ppf->
opt_gain << 1);
673 pf_residual = av_sat_add32(temp1, temp2 + (1 << 15)) >> 16;
675 if (tgt_eng >= pf_residual << 1) {
678 temp1 = (tgt_eng << 14) / pf_residual;
715 int energy[5] = {0, 0, 0, 0, 0};
717 int fwd_lag =
autocorr_max(buf, offset, &energy[1], pitch_lag,
719 int back_lag =
autocorr_max(buf, offset, &energy[3], pitch_lag,
727 if (!back_lag && !fwd_lag)
743 for (i = 0; i < 5; i++)
744 temp1 =
FFMAX(energy[i], temp1);
747 for (i = 0; i < 5; i++)
748 energy[i] = (energy[i] << scale) >> 16;
750 if (fwd_lag && !back_lag) {
753 }
else if (!fwd_lag) {
762 temp1 = energy[4] * ((energy[1] * energy[1] + (1 << 14)) >> 15);
763 temp2 = energy[2] * ((energy[3] * energy[3] + (1 << 14)) >> 15);
764 if (temp1 >= temp2) {
785 int *exc_eng,
int *
scale)
790 int index, ccr, tgt_eng, best_eng, temp;
797 index =
autocorr_max(buf, offset, &ccr, pitch_lag, SUBFRAME_LEN * 2, -1);
798 ccr = av_sat_add32(ccr, 1 << 15) >> 16;
802 *exc_eng = av_sat_add32(tgt_eng, 1 << 15) >> 16;
808 best_eng =
dot_product(buf - index, buf - index, SUBFRAME_LEN * 2);
809 best_eng = av_sat_add32(best_eng, 1 << 15) >> 16;
811 temp = best_eng * *exc_eng >> 3;
813 if (temp < ccr * ccr)
829 int gain,
int *rseed)
835 for (i = 0; i < lag; i++)
836 out[i] = vector_ptr[i - lag] * 3 >> 2;
841 *rseed = *rseed * 521 + 259;
842 out[i] = gain * *rseed >> 15;
844 memset(buf, 0, (FRAME_LEN +
PITCH_MAX) *
sizeof(*buf));
856 static inline void iir_filter(int16_t *fir_coef, int16_t *iir_coef,
857 int16_t *src,
int *dest)
864 filter -= fir_coef[n - 1] * src[m - n] -
865 iir_coef[n - 1] * (dest[m - n] >> 16);
868 dest[m] = av_clipl_int32((src[m] << 16) + (filter << 3) + (1 << 15));
887 int temp = buf[i] >> 2;
889 denom = av_sat_dadd32(denom, temp);
895 num = num << bits1 >> 1;
898 bits2 = 5 + bits1 -
bits2;
899 bits2 =
FFMAX(0, bits2);
901 gain = (num >> 1) / (denom >> 16);
909 buf[i] = av_clip_int16((buf[i] * (p->
pf_gain + (p->
pf_gain >> 4)) +
923 int16_t *buf, int16_t *dst)
939 iir_filter(filter_coef[0], filter_coef[1], buf + i,
963 temp = auto_corr[1] >> 16;
965 temp = (auto_corr[0] >> 2) / temp;
972 dst[j] = av_sat_dadd32(signal_ptr[j],
973 (signal_ptr[j - 1] >> 16) * temp) >> 16;
977 temp = 2 * scale + 4;
979 energy = av_clipl_int32((int64_t)auto_corr[1] << -temp);
981 energy = auto_corr[1] >> temp;
995 else if (gain < 0x20)
996 return gain - 8 << 7;
998 return gain - 20 << 8;
1003 *state = (*state * 521 + 259) & 0xFFFF;
1004 return (*state & 0x7FFF) * base >> 15;
1009 int i, shift, seg, seg2,
t, val, val_add, x, y;
1028 seg2 =
FFMIN(seg, 3);
1032 for (i = 0; i < shift; i++) {
1033 t = seg * 32 + (val << seg2);
1042 t = seg * 32 + (val << seg2);
1045 t = seg * 32 + (val + 1 << seg2);
1047 val = (seg2 - 1 << 4) + val;
1051 t = seg * 32 + (val - 1 << seg2);
1053 val = (seg2 - 1 << 4) + val;
1067 int16_t *vector_ptr;
1069 int b0, c,
delta, x, shift;
1079 for (i = 0; i < SUBFRAMES / 2; i++) {
1084 for (j = 0; j < 11; j++) {
1085 signs[i * 11 + j] = (t & 1) * 2 - 1 << 14;
1095 for (j = 0; j <
pulses[i]; j++, idx++) {
1098 pos[idx] = tmp[idx2] * 2 + off[i];
1099 tmp[idx2] = tmp[--
t];
1117 t |=
FFABS(vector_ptr[j]);
1118 t =
FFMIN(t, 0x7FFF);
1128 for (j = 0; j < SUBFRAME_LEN * 2; j++) {
1129 t = vector_ptr[j] << -shift;
1134 for (j = 0; j < SUBFRAME_LEN * 2; j++) {
1135 t = vector_ptr[j] >> shift;
1142 for (j = 0; j < 11; j++)
1143 b0 += tmp[pos[(i / 2) * 11 + j]] * signs[(i / 2) * 11 + j];
1144 b0 = b0 * 2 * 2979LL + (1 << 29) >> 30;
1147 if (shift * 2 + 3 >= 0)
1148 c >>= shift * 2 + 3;
1150 c <<= -(shift * 2 + 3);
1151 c = (av_clipl_int32(sum << 1) - c) * 2979LL >> 15;
1153 delta = b0 * b0 * 2 - c;
1168 x = av_clip(x, -10000, 10000);
1170 for (j = 0; j < 11; j++) {
1171 idx = (i / 2) * 11 + j;
1172 vector_ptr[pos[idx]] = av_clip_int16(vector_ptr[pos[idx]] +
1173 (x * signs[idx] >> 15));
1177 memcpy(vector_ptr +
PITCH_MAX, vector_ptr,
1178 sizeof(*vector_ptr) * SUBFRAME_LEN * 2);
1179 vector_ptr += SUBFRAME_LEN * 2;
1187 int *got_frame_ptr,
AVPacket *avpkt)
1192 int buf_size = avpkt->
size;
1193 int dec_mode = buf[0] & 3;
1200 int bad_frame = 0, i, j, ret;
1201 int16_t *audio = p->
audio;
1206 "Expected %d bytes, got %d - skipping packet\n",
1226 out = (int16_t *)frame->
data[0];
1257 int v = av_clip_int16(vector_ptr[j] << 1);
1258 vector_ptr[j] = av_clip_int16(v + acb_vector[j]);
1278 vector_ptr + i + ppf[j].
index,
1297 memset(frame->
data[0], 0,
1343 out[i] = av_clip_int16(p->
audio[LPC_ORDER + i] << 1);
1351 #define OFFSET(x) offsetof(G723_1_Context, x)
1352 #define AD AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM
1356 { .i64 = 1 }, 0, 1,
AD },
1377 .priv_class = &g723_1dec_class,
int16_t audio[FRAME_LEN+LPC_ORDER+PITCH_MAX+4]
static void lsp2lpc(int16_t *lpc)
Convert LSP frequencies to LPC coefficients.
This structure describes decoded (raw) audio or video data.
static const int16_t lsp_band0[LSP_CB_SIZE][3]
static const int cng_bseg[3]
FrameType
G723.1 frame types.
static unsigned int get_bits(GetBitContext *s, int n)
Read 1-25 bits.
#define AV_LOG_WARNING
Something somehow does not look correct.
static const int16_t lsp_band2[LSP_CB_SIZE][4]
memory handling functions
G723.1 unpacked data subframe.
int ff_celp_lp_synthesis_filter(int16_t *out, const int16_t *filter_coeffs, const int16_t *in, int buffer_length, int filter_length, int stop_on_overflow, int shift, int rounder)
LP synthesis filter.
static int scale_vector(int16_t *dst, const int16_t *vector, int length)
Scale vector contents based on the largest of their absolutes.
int16_t fir_mem[LPC_ORDER]
static const int cng_filt[4]
int16_t excitation[PITCH_MAX+FRAME_LEN+4]
static int normalize_bits(int num, int width)
Calculate the number of left-shifts required for normalizing the input.
static int autocorr_max(const int16_t *buf, int offset, int *ccr_max, int pitch_lag, int length, int dir)
Estimate maximum auto-correlation around pitch lag.
static void iir_filter(int16_t *fir_coef, int16_t *iir_coef, int16_t *src, int *dest)
Perform IIR filtering.
static int comp_interp_index(G723_1_Context *p, int pitch_lag, int *exc_eng, int *scale)
Classify frames as voiced/unvoiced.
static const AVOption options[]
static void gen_dirac_train(int16_t *buf, int pitch_lag)
Generate a train of dirac functions with period as pitch lag.
static const AVClass g723_1dec_class
static void comp_ppf_coeff(G723_1_Context *p, int offset, int pitch_lag, PPFParam *ppf, enum Rate cur_rate)
Calculate pitch postfilter parameters.
static void postfilter(AMRContext *p, float *lpc, float *buf_out)
Perform adaptive post-filtering to enhance the quality of the speech.
enum FrameType past_frame_type
const char * class_name
The name of the class; usually it is the same name as the context structure type to which the AVClass...
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
static int g723_1_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
enum AVSampleFormat sample_fmt
audio sample format
static const int16_t lsp_band1[LSP_CB_SIZE][3]
static void residual_interp(int16_t *buf, int16_t *out, int lag, int gain, int *rseed)
Peform residual interpolation based on frame classification.
uint8_t pi<< 24) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0f/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_U8, uint8_t,(*(constuint8_t *) pi-0x80)*(1.0/(1<< 7))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S16, int16_t,(*(constint16_t *) pi >>8)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0f/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S16, int16_t,*(constint16_t *) pi *(1.0/(1<< 15))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_S32, int32_t,(*(constint32_t *) pi >>24)+0x80) CONV_FUNC_GROUP(AV_SAMPLE_FMT_FLT, float, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0f/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_DBL, double, AV_SAMPLE_FMT_S32, int32_t,*(constint32_t *) pi *(1.0/(1U<< 31))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_FLT, float, av_clip_uint8(lrintf(*(constfloat *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_FLT, float, av_clip_int16(lrintf(*(constfloat *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_FLT, float, av_clipl_int32(llrintf(*(constfloat *) pi *(1U<< 31)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_U8, uint8_t, AV_SAMPLE_FMT_DBL, double, av_clip_uint8(lrint(*(constdouble *) pi *(1<< 7))+0x80)) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S16, int16_t, AV_SAMPLE_FMT_DBL, double, av_clip_int16(lrint(*(constdouble *) pi *(1<< 15)))) CONV_FUNC_GROUP(AV_SAMPLE_FMT_S32, int32_t, AV_SAMPLE_FMT_DBL, double, av_clipl_int32(llrint(*(constdouble *) pi *(1U<< 31))))#defineSET_CONV_FUNC_GROUP(ofmt, ifmt) staticvoidset_generic_function(AudioConvert *ac){}voidff_audio_convert_free(AudioConvert **ac){if(!*ac) return;ff_dither_free(&(*ac) ->dc);av_freep(ac);}AudioConvert *ff_audio_convert_alloc(AVAudioResampleContext *avr, enumAVSampleFormatout_fmt, enumAVSampleFormatin_fmt, intchannels, intsample_rate, intapply_map){AudioConvert *ac;intin_planar, out_planar;ac=av_mallocz(sizeof(*ac));if(!ac) returnNULL;ac->avr=avr;ac->out_fmt=out_fmt;ac->in_fmt=in_fmt;ac->channels=channels;ac->apply_map=apply_map;if(avr->dither_method!=AV_RESAMPLE_DITHER_NONE &&av_get_packed_sample_fmt(out_fmt)==AV_SAMPLE_FMT_S16 &&av_get_bytes_per_sample(in_fmt)>2){ac->dc=ff_dither_alloc(avr, out_fmt, in_fmt, channels, sample_rate, apply_map);if(!ac->dc){av_free(ac);returnNULL;}returnac;}in_planar=av_sample_fmt_is_planar(in_fmt);out_planar=av_sample_fmt_is_planar(out_fmt);if(in_planar==out_planar){ac->func_type=CONV_FUNC_TYPE_FLAT;ac->planes=in_planar?ac->channels:1;}elseif(in_planar) ac->func_type=CONV_FUNC_TYPE_INTERLEAVE;elseac->func_type=CONV_FUNC_TYPE_DEINTERLEAVE;set_generic_function(ac);if(ARCH_ARM) ff_audio_convert_init_arm(ac);if(ARCH_X86) ff_audio_convert_init_x86(ac);returnac;}intff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in){intuse_generic=1;intlen=in->nb_samples;intp;if(ac->dc){av_dlog(ac->avr,"%dsamples-audio_convert:%sto%s(dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt));returnff_convert_dither(ac-> out
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
static void formant_postfilter(G723_1_Context *p, int16_t *lpc, int16_t *buf, int16_t *dst)
Perform formant filtering.
static const uint8_t bits2[81]
bitstream reader API header.
static void get_residual(int16_t *residual, int16_t *prev_excitation, int lag)
Get delayed contribution from the previous excitation vector.
int16_t sid_lsp[LPC_ORDER]
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static const int16_t postfilter_tbl[2][LPC_ORDER]
void av_log(void *avcl, int level, const char *fmt,...)
const char * name
Name of the codec implementation.
static void lsp_interpolate(int16_t *lpc, int16_t *cur_lsp, int16_t *prev_lsp)
Quantize LSP frequencies by interpolation and convert them to the corresponding LPC coefficients...
G.723.1 compatible decoder data tables.
int16_t prev_excitation[PITCH_MAX]
static av_cold int g723_1_decode_init(AVCodecContext *avctx)
static void comp_ppf_gains(int lag, PPFParam *ppf, enum Rate cur_rate, int tgt_eng, int ccr, int res_eng)
Calculate pitch postfilter optimal and scaling gains.
uint64_t channel_layout
Audio channel layout.
static int estimate_sid_gain(G723_1_Context *p)
G723_1_Subframe subframe[4]
static void filter(MpegAudioContext *s, int ch, const short *samples, int incr)
static const int16_t fixed_cb_gain[GAIN_LEVELS]
void ff_acelp_weighted_vector_sum(int16_t *out, const int16_t *in_a, const int16_t *in_b, int16_t weight_coeff_a, int16_t weight_coeff_b, int16_t rounder, int shift, int length)
weighted sum of two vectors with rounding.
audio channel layout utility functions
int16_t synth_mem[LPC_ORDER]
static const int16_t ppf_gain_weight[2]
int index
postfilter backward/forward lag
static const int16_t adaptive_cb_gain85[85 *20]
static int16_t square_root(int val)
Bitexact implementation of sqrt(val/2).
if(ac->has_optimized_func)
static const float pred[4]
static const int16_t adaptive_cb_gain170[170 *20]
int16_t opt_gain
optimal gain
Libavcodec external API header.
static const int16_t cos_tab[COS_TBL_SIZE]
int sample_rate
samples per second
main external API structure.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
static void gen_acb_excitation(int16_t *vector, int16_t *prev_excitation, int pitch_lag, G723_1_Subframe *subfrm, enum Rate cur_rate)
Generate adaptive codebook excitation.
#define MULL2(a, b)
Bitexact implementation of 2ab scaled by 1/2^16.
Describe the class of an AVClass context structure.
int16_t sc_gain
scaling gain
static void skip_bits(GetBitContext *s, int n)
static const int16_t pitch_contrib[340]
static int init_get_bits(GetBitContext *s, const uint8_t *buffer, int bit_size)
Initialize GetBitContext.
static void gen_fcb_excitation(int16_t *vector, G723_1_Subframe *subfrm, enum Rate cur_rate, int pitch_lag, int index)
Generate fixed codebook excitation vector.
static int dot_product(const int16_t *a, const int16_t *b, int length)
static int sid_gain_to_lsp_index(int gain)
enum FrameType cur_frame_type
static const int cng_adaptive_cb_lag[4]
static const uint16_t scale[4]
int16_t prev_lsp[LPC_ORDER]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
#define CODEC_CAP_SUBFRAMES
Codec can output multiple frames per AVPacket Normally demuxers return one frame at a time...
AVCodec ff_g723_1_decoder
common internal api header.
Pitch postfilter parameters.
static int unpack_bitstream(G723_1_Context *p, const uint8_t *buf, int buf_size)
Unpack the frame into parameters.
static const int32_t max_pos[4]
static av_cold int init(AVCodecParserContext *s)
static const int16_t dc_lsp[LPC_ORDER]
static void gain_scale(G723_1_Context *p, int16_t *buf, int energy)
Adjust gain of postfiltered signal.
static void inverse_quant(int16_t *cur_lsp, int16_t *prev_lsp, uint8_t *lsp_index, int bad_frame)
Perform inverse quantization of LSP frequencies.
static int cng_rand(int *state, int base)
int channels
number of audio channels
uint8_t lsp_index[LSP_BANDS]
static void generate_noise(G723_1_Context *p)
static const int8_t pulses[4]
void av_memcpy_backptr(uint8_t *dst, int back, int cnt)
deliberately overlapping memcpy implementation
Silence Insertion Descriptor frame.
#define AV_CH_LAYOUT_MONO
This structure stores compressed data.
int nb_samples
number of audio samples (per channel) described by this frame
static const uint8_t bits1[81]
int ad_cb_lag
adaptive codebook lag
static const int32_t combinatorial_table[PULSE_MAX][SUBFRAME_LEN/GRID_SIZE]