Lines Matching refs:tctx

179 static void decode_ppc(TwinVQContext *tctx, int period_coef, int g_coef,
182 const TwinVQModeTab *mtab = tctx->mtab;
183 int isampf = tctx->avctx->sample_rate / 1000;
184 int ibps = tctx->avctx->bit_rate / (1000 * tctx->avctx->ch_layout.nb_channels);
211 static void dec_bark_env(TwinVQContext *tctx, const uint8_t *in, int use_hist,
215 const TwinVQModeTab *mtab = tctx->mtab;
217 float *hist = tctx->bark_hist[ftype][ch];
239 static void read_cb_data(TwinVQContext *tctx, GetBitContext *gb,
244 for (i = 0; i < tctx->n_div[ftype]; i++) {
245 int bs_second_part = (i >= tctx->bits_main_spec_change[ftype]);
247 *dst++ = get_bits(gb, tctx->bits_main_spec[0][ftype][bs_second_part]);
248 *dst++ = get_bits(gb, tctx->bits_main_spec[1][ftype][bs_second_part]);
252 static int twinvq_read_bitstream(AVCodecContext *avctx, TwinVQContext *tctx,
255 TwinVQFrameData *bits = &tctx->bits[0];
256 const TwinVQModeTab *mtab = tctx->mtab;
257 int channels = tctx->avctx->ch_layout.nb_channels;
273 bits->ftype = ff_twinvq_wtype_to_ftype_table[tctx->bits[0].window_type];
277 read_cb_data(tctx, &gb, bits->main_coeffs, bits->ftype);
310 read_cb_data(tctx, &gb, bits->ppc_coeffs, 3);
323 TwinVQContext *tctx = avctx->priv_data;
368 tctx->mtab = &mode_08_08;
371 tctx->mtab = &mode_11_08;
374 tctx->mtab = &mode_11_10;
377 tctx->mtab = &mode_16_16;
380 tctx->mtab = &mode_22_20;
383 tctx->mtab = &mode_22_24;
386 tctx->mtab = &mode_22_32;
389 tctx->mtab = &mode_44_40;
392 tctx->mtab = &mode_44_48;
401 tctx->codec = TWINVQ_CODEC_VQF;
402 tctx->read_bitstream = twinvq_read_bitstream;
403 tctx->dec_bark_env = dec_bark_env;
404 tctx->decode_ppc = decode_ppc;
405 tctx->frame_size = avctx->bit_rate * tctx->mtab->size
407 tctx->is_6kbps = 0;
408 if (avctx->block_align && avctx->block_align * 8LL / tctx->frame_size > 1) {