Lines Matching refs:tctx

64 static void decode_ppc(TwinVQContext *tctx, int period_coef, int g_coef,
67 const TwinVQModeTab *mtab = tctx->mtab;
68 int channels = tctx->avctx->ch_layout.nb_channels;
69 int isampf = tctx->avctx->sample_rate / 1000;
70 int ibps = tctx->avctx->bit_rate / (1000 * channels);
116 static void dec_bark_env(TwinVQContext *tctx, const uint8_t *in, int use_hist,
120 const TwinVQModeTab *mtab = tctx->mtab;
122 float *hist = tctx->bark_hist[ftype][ch];
127 int channels = tctx->avctx->ch_layout.nb_channels;
154 static void read_cb_data(TwinVQContext *tctx, GetBitContext *gb,
159 for (i = 0; i < tctx->n_div[ftype]; i++) {
160 int bs_second_part = (i >= tctx->bits_main_spec_change[ftype]);
162 *dst++ = get_bits(gb, tctx->bits_main_spec[0][ftype][bs_second_part]);
163 *dst++ = get_bits(gb, tctx->bits_main_spec[1][ftype][bs_second_part]);
167 static int metasound_read_bitstream(AVCodecContext *avctx, TwinVQContext *tctx,
171 const TwinVQModeTab *mtab = tctx->mtab;
172 int channels = tctx->avctx->ch_layout.nb_channels;
180 for (tctx->cur_frame = 0; tctx->cur_frame < tctx->frames_per_packet;
181 tctx->cur_frame++) {
182 bits = tctx->bits + tctx->cur_frame;
191 bits->ftype = ff_twinvq_wtype_to_ftype_table[tctx->bits[tctx->cur_frame].window_type];
195 if (bits->ftype != TWINVQ_FT_SHORT && !tctx->is_6kbps)
198 read_cb_data(tctx, &gb, bits->main_coeffs, bits->ftype);
231 read_cb_data(tctx, &gb, bits->ppc_coeffs, 3);
278 TwinVQContext *tctx = avctx->priv_data;
317 tctx->mtab = &ff_metasound_mode0806;
320 tctx->mtab = &ff_metasound_mode0806s;
323 tctx->mtab = &ff_metasound_mode0808;
326 tctx->mtab = &ff_metasound_mode0808s;
329 tctx->mtab = &ff_metasound_mode1110;
332 tctx->mtab = &ff_metasound_mode1110s;
335 tctx->mtab = &ff_metasound_mode1616;
338 tctx->mtab = &ff_metasound_mode1616s;
341 tctx->mtab = &ff_metasound_mode2224;
344 tctx->mtab = &ff_metasound_mode2224s;
348 tctx->mtab = &ff_metasound_mode4432;
352 tctx->mtab = &ff_metasound_mode4440;
356 tctx->mtab = &ff_metasound_mode4448;
365 tctx->codec = TWINVQ_CODEC_METASOUND;
366 tctx->read_bitstream = metasound_read_bitstream;
367 tctx->dec_bark_env = dec_bark_env;
368 tctx->decode_ppc = decode_ppc;
369 tctx->frame_size = avctx->bit_rate * tctx->mtab->size
371 tctx->is_6kbps = ibps == 6;