• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/ap/gpl/iserver/libav-0.8.8/libavcodec/

Lines Matching refs:ftype

311                                          enum FrameType ftype,
317 const float *cos_tab = tctx->cos_tabs[ftype];
344 static void eval_lpcenv_2parts(TwinContext *tctx, enum FrameType ftype,
348 eval_lpcenv_or_interp(tctx, ftype, lpc , buf, size/2, step, 0);
349 eval_lpcenv_or_interp(tctx, ftype, lpc + size/2, buf, size/2, 2*step, 1);
362 enum FrameType ftype,
368 for (i = 0; i < tctx->n_div[ftype]; i++) {
373 int length = tctx->length[ftype][i >= tctx->length_change[ftype]];
374 int bitstream_second_part = (i >= tctx->bits_main_spec_change[ftype]);
376 int bits = tctx->bits_main_spec[0][ftype][bitstream_second_part];
384 bits = tctx->bits_main_spec[1][ftype][bitstream_second_part];
398 out[tctx->permut[ftype][pos+j]] = sign0*tab0[j] + sign1*tab1[j];
501 static void dec_gain(TwinContext *tctx, GetBitContext *gb, enum FrameType ftype,
506 int sub = mtab->fmode[ftype].sub;
510 if (ftype == FT_LONG) {
590 enum FrameType ftype, float *lpc)
593 int size = tctx->mtab->size / tctx->mtab->fmode[ftype].sub;
598 switch (ftype) {
600 eval_lpcenv_2parts(tctx, ftype, lsp, lpc, size, 8);
603 eval_lpcenv_2parts(tctx, ftype, lsp, lpc, size, 2);
611 static void imdct_and_window(TwinContext *tctx, enum FrameType ftype, int wtype,
614 FFTContext *mdct = &tctx->mdct_ctx[ftype];
616 int bsize = mtab->size / mtab->fmode[ftype].sub;
637 for (j = 0; j < mtab->fmode[ftype].sub; j++) {
638 int sub_wtype = ftype == FT_MEDIUM ? 8 : wtype;
642 else if (j == mtab->fmode[ftype].sub-1 && wtype == 7)
658 out2 += ftype == FT_MEDIUM ? (bsize-wsize)/2 : bsize - wsize;
666 static void imdct_output(TwinContext *tctx, enum FrameType ftype, int wtype,
675 imdct_and_window(tctx, ftype, wtype,
707 int ch, float *out, float gain, enum FrameType ftype)
711 float *hist = tctx->bark_hist[ftype][ch];
712 float val = ((const float []) {0.4, 0.35, 0.28})[ftype];
713 int bark_n_coef = mtab->fmode[ftype].bark_n_coef;
714 int fw_cb_len = mtab->fmode[ftype].bark_env_size / bark_n_coef;
720 mtab->fmode[ftype].bark_cb[fw_cb_len*in[j] + i] * (1./4096);
727 memset_float(out, st * gain, mtab->fmode[ftype].bark_tab[idx]);
728 out += mtab->fmode[ftype].bark_tab[idx];
734 float *out, enum FrameType ftype)
738 int sub = mtab->fmode[ftype].sub;
751 dequant(tctx, gb, out, ftype,
752 mtab->fmode[ftype].cb0, mtab->fmode[ftype].cb1,
753 mtab->fmode[ftype].cb_len_read);
757 for (k = 0; k < mtab->fmode[ftype].bark_n_coef; k++)
759 get_bits(gb, mtab->fmode[ftype].bark_n_bit);
765 dec_gain(tctx, gb, ftype, gain);
775 if (ftype == FT_LONG) {
788 tctx->tmp_buf, gain[sub*i+j], ftype);
795 if (ftype == FT_LONG) {
809 dec_lpc_spectrum_inv(tctx, lsp, ftype, tctx->tmp_buf);
811 for (j = 0; j < mtab->fmode[ftype].sub; j++) {
827 enum FrameType ftype;
859 ftype = wtype_to_ftype_table[window_type];
861 read_and_decode_spectrum(tctx, &gb, tctx->spectrum, ftype);
863 imdct_output(tctx, ftype, window_type, out);
942 enum FrameType ftype)
951 (ftype == FT_LONG && num_vect % num_blocks) ||
952 (ftype != FT_LONG && num_vect & 1 ) ||
955 } else if (ftype == FT_LONG) {
999 static av_cold void construct_perm_table(TwinContext *tctx,enum FrameType ftype)
1003 int size = tctx->avctx->channels*mtab->fmode[ftype].sub;
1006 if (ftype == FT_PPC) {
1010 block_size = mtab->size / mtab->fmode[ftype].sub;
1012 permutate_in_line(tmp_perm, tctx->n_div[ftype], size,
1013 block_size, tctx->length[ftype],
1014 tctx->length_change[ftype], ftype);
1016 transpose_perm(tctx->permut[ftype], tmp_perm, tctx->n_div[ftype],
1017 tctx->length[ftype], tctx->length_change[ftype]);
1019 linear_perm(tctx->permut[ftype], tctx->permut[ftype], size,