Home | History | Annotate | Download | only in celt

Lines Matching refs:LM

420                           celt_sig * OPUS_RESTRICT out, int C, int CC, int LM, int upsample)
434 N = mode->shortMdctSize<<LM;
435 shift = mode->maxLM-LM;
535 static opus_val32 l1_metric(const celt_norm *tmp, int N, int LM, opus_val16 bias)
543 L1 = MAC16_32_Q15(L1, LM*bias, L1);
549 int *tf_res, int lambda, celt_norm *X, int N0, int LM,
570 ALLOC(tmp, (m->eBands[len]-m->eBands[len-1])<<LM, celt_norm);
571 ALLOC(tmp_1, (m->eBands[len]-m->eBands[len-1])<<LM, celt_norm);
582 N = (m->eBands[i+1]-m->eBands[i])<<LM;
583 /* band is too narrow to be split down to LM=-1 */
586 tmp[j] = X[tf_chan*N0 + j+(m->eBands[i]<<LM)];
590 tmp[j] = ADD16(SHR16(tmp[j], 1),SHR16(X[N0+j+(m->eBands[i]<<LM)], 1));*/
591 L1 = l1_metric(tmp, N, isTransient ? LM : 0, bias);
598 haar1(tmp_1, N>>LM, 1<<LM);
599 L1 = l1_metric(tmp_1, N, LM+1, bias);
607 for (k=0;k<LM+!(isTransient||narrow);k++)
612 B = (LM-k-1);
626 /*printf ("%d ", isTransient ? LM-best_level : best_level);*/
632 *tf_sum += (isTransient ? LM : 0) - metric[i]/2;
635 if (narrow && (metric[i]==0 || metric[i]==-2*LM))
651 cost0 = curr0 + abs(metric[i]-2*tf_select_table[LM][4*isTransient+2*sel+0]);
652 cost1 = curr1 + abs(metric[i]-2*tf_select_table[LM][4*isTransient+2*sel+1]);
690 cost0 = curr0 + abs(metric[i]-2*tf_select_table[LM][4*isTransient+2*tf_select+0]);
691 cost1 = curr1 + abs(metric[i]-2*tf_select_table[LM][4*isTransient+2*tf_select+1]);
713 static void tf_encode(int start, int end, int isTransient, int *tf_res, int LM, int tf_select, ec_enc *enc)
725 tf_select_rsv = LM>0 && tell+logp+1 <= budget;
743 tf_select_table[LM][4*isTransient+0+tf_changed]!=
744 tf_select_table[LM][4*isTransient+2+tf_changed])
749 tf_res[i] = tf_select_table[LM][4*isTransient+2*tf_select+tf_res[i]];
750 /*for(i=0;i<end;i++)printf("%d ", isTransient ? tf_res[i] : LM+tf_res[i]);printf("\n");*/
755 const opus_val16 *bandLogE, int end, int LM, int C, int N0,
774 for (j=m->eBands[i]<<LM;j<m->eBands[i+1]<<LM;j++)
785 for (j=m->eBands[i]<<LM;j<m->eBands[i+1]<<LM;j++)
858 int LM, int N0)
868 for (j=m->eBands[i]<<LM;j<m->eBands[i+1]<<LM;j++)
882 /* We don't need thetas for lower bands with LM<=1 */
883 if (LM<=1)
885 return MULT16_32_Q15((m->eBands[13]<<(LM+1))+thetas, sumMS)
886 > MULT16_32_Q15(m->eBands[13]<<(LM+1), sumLR);
891 int isTransient, int vbr, int constrained_vbr, const opus_int16 *eBands, int LM,
920 if (effectiveBytes > 50 && LM>=1 && !lfe)
975 width = C*(eBands[i+1]-eBands[i])<<LM;
1133 int LM, opus_int32 bitrate, int lastCodedBands, int C, int intensity,
1151 coded_bins = eBands[coded_bands]<<LM;
1153 coded_bins += eBands[IMIN(intensity, coded_bands)]<<LM;
1169 coded_stereo_dof = (eBands[coded_stereo_bands]<<LM)-coded_stereo_bands;
1178 target += tot_boost-(16<<LM);
1211 bins = eBands[nbEBands-2]<<LM;
1273 int LM, M;
1327 for (LM=0;LM<=mode->maxLM;LM++)
1328 if (mode->shortMdctSize<<LM==frame_size)
1330 if (LM>mode->maxLM)
1335 M=1<<LM;
1358 compressed[0] |= LM<<3;
1403 equiv_rate = st->bitrate - (40*C+20)*((400>>LM) - 50);
1488 && st->complexity >= 5 && !(st->consec_transient && LM!=3 && st->variable_duration==OPUS_FRAMESIZE_VARIABLE);
1521 if (LM>0 && ec_tell(enc)+3<=total_bits)
1538 compute_mdcts(mode, 0, in, freq, C, CC, LM, st->upsample);
1542 bandLogE2[i] += HALF16(SHL16(LM, DB_SHIFT));
1545 compute_mdcts(mode, shortBlocks, in, freq, C, CC, LM, st->upsample);
1642 opus_val16 offset = shortBlocks?HALF16(SHL16(LM, DB_SHIFT)):0;
1667 if (LM>0 && ec_tell(enc)+3<=total_bits && !isTransient && st->complexity>=5 && !st->lfe)
1673 compute_mdcts(mode, shortBlocks, in, freq, C, CC, LM, st->upsample);
1678 bandLogE2[i] += HALF16(SHL16(LM, DB_SHIFT));
1683 if (LM>0 && ec_tell(enc)+3<=total_bits)
1705 tf_select = tf_analysis(mode, effEnd, isTransient, tf_res, lambda, X, N, LM, &tf_sum, tf_estimate, tf_chan);
1718 C, LM, nbAvailableBytes, st->force_intra,
1721 tf_encode(st->start, st->end, isTransient, tf_res, LM, tf_select, enc);
1765 eBands, LM, effectiveBytes, &tot_boost, st->lfe, surround_dynalloc);
1770 init_caps(mode,cap,LM,C);
1782 width = C*(eBands[i+1]-eBands[i])<<LM;
1816 if (LM!=0)
1817 dual_stereo = stereo_analysis(mode, X, LM, N);
1831 st->end, LM, C, N, &st->analysis, &st->stereo_saving, tf_estimate, st->intensity, surround_trim);
1844 int lm_diff = mode->maxLM - LM;
1848 nbCompressedBytes = IMIN(nbCompressedBytes,1275>>(3-LM));
1854 target = compute_vbr(mode, &st->analysis, base_target, LM, equiv_rate,
1931 anti_collapse_rsv = isTransient&&LM>=2&&bits>=((LM+2)<<BITRES) ? (1<<BITRES) : 0;
1955 fine_quant, fine_priority, C, LM, enc, 1, st->lastCodedBands, signalBandwidth);
1967 nbCompressedBytes*(8<<BITRES)-anti_collapse_rsv, balance, enc, LM, codedBands, &st->rng);
1992 anti_collapse(mode, X, collapse_masks, LM, C, N,
2019 compute_inv_mdcts(mode, shortBlocks, freq, out_mem, CC, LM);
2027 if (LM!=0)
2045 if (LM!=0)