• Home
  • Raw
  • Download

Lines Matching refs:tctx

64 static void decode_ppc(TwinVQContext *tctx, int period_coef, int g_coef,  in decode_ppc()  argument
67 const TwinVQModeTab *mtab = tctx->mtab; in decode_ppc()
68 int isampf = tctx->avctx->sample_rate / 1000; in decode_ppc()
69 int ibps = tctx->avctx->bit_rate / (1000 * tctx->avctx->channels); in decode_ppc()
78 if (tctx->avctx->channels == 1) { in decode_ppc()
88 if (tctx->avctx->channels == 1) in decode_ppc()
106 pgain_base = tctx->avctx->channels == 2 ? 25000.0 : 20000.0; in decode_ppc()
115 static void dec_bark_env(TwinVQContext *tctx, const uint8_t *in, int use_hist, in dec_bark_env() argument
119 const TwinVQModeTab *mtab = tctx->mtab; in dec_bark_env()
121 float *hist = tctx->bark_hist[ftype][ch]; in dec_bark_env()
127 if (tctx->avctx->channels == 1) in dec_bark_env()
135 if (tctx->avctx->channels == 1) in dec_bark_env()
152 static void read_cb_data(TwinVQContext *tctx, GetBitContext *gb, in read_cb_data() argument
157 for (i = 0; i < tctx->n_div[ftype]; i++) { in read_cb_data()
158 int bs_second_part = (i >= tctx->bits_main_spec_change[ftype]); in read_cb_data()
160 *dst++ = get_bits(gb, tctx->bits_main_spec[0][ftype][bs_second_part]); in read_cb_data()
161 *dst++ = get_bits(gb, tctx->bits_main_spec[1][ftype][bs_second_part]); in read_cb_data()
165 static int metasound_read_bitstream(AVCodecContext *avctx, TwinVQContext *tctx, in metasound_read_bitstream() argument
169 const TwinVQModeTab *mtab = tctx->mtab; in metasound_read_bitstream()
170 int channels = tctx->avctx->channels; in metasound_read_bitstream()
178 for (tctx->cur_frame = 0; tctx->cur_frame < tctx->frames_per_packet; in metasound_read_bitstream()
179 tctx->cur_frame++) { in metasound_read_bitstream()
180 bits = tctx->bits + tctx->cur_frame; in metasound_read_bitstream()
189 bits->ftype = ff_twinvq_wtype_to_ftype_table[tctx->bits[tctx->cur_frame].window_type]; in metasound_read_bitstream()
193 if (bits->ftype != TWINVQ_FT_SHORT && !tctx->is_6kbps) in metasound_read_bitstream()
196 read_cb_data(tctx, &gb, bits->main_coeffs, bits->ftype); in metasound_read_bitstream()
229 read_cb_data(tctx, &gb, bits->ppc_coeffs, 3); in metasound_read_bitstream()
276 TwinVQContext *tctx = avctx->priv_data; in metasound_decode_init() local
314 tctx->mtab = &ff_metasound_mode0806; in metasound_decode_init()
317 tctx->mtab = &ff_metasound_mode0806s; in metasound_decode_init()
320 tctx->mtab = &ff_metasound_mode0808; in metasound_decode_init()
323 tctx->mtab = &ff_metasound_mode0808s; in metasound_decode_init()
326 tctx->mtab = &ff_metasound_mode1110; in metasound_decode_init()
329 tctx->mtab = &ff_metasound_mode1110s; in metasound_decode_init()
332 tctx->mtab = &ff_metasound_mode1616; in metasound_decode_init()
335 tctx->mtab = &ff_metasound_mode1616s; in metasound_decode_init()
338 tctx->mtab = &ff_metasound_mode2224; in metasound_decode_init()
341 tctx->mtab = &ff_metasound_mode2224s; in metasound_decode_init()
345 tctx->mtab = &ff_metasound_mode4432; in metasound_decode_init()
349 tctx->mtab = &ff_metasound_mode4440; in metasound_decode_init()
353 tctx->mtab = &ff_metasound_mode4448; in metasound_decode_init()
362 tctx->codec = TWINVQ_CODEC_METASOUND; in metasound_decode_init()
363 tctx->read_bitstream = metasound_read_bitstream; in metasound_decode_init()
364 tctx->dec_bark_env = dec_bark_env; in metasound_decode_init()
365 tctx->decode_ppc = decode_ppc; in metasound_decode_init()
366 tctx->frame_size = avctx->bit_rate * tctx->mtab->size in metasound_decode_init()
368 tctx->is_6kbps = ibps == 6; in metasound_decode_init()