Stop uselessly calling haar1() when resynth=0
This was computing on uninitialized data (though the result was never used)
This commit is contained in:
parent
568326bfe2
commit
ad3d813f01
3 changed files with 7 additions and 7 deletions
|
@ -1003,9 +1003,9 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c
|
||||||
|
|
||||||
/* Finally do the actual quantization */
|
/* Finally do the actual quantization */
|
||||||
if (encode)
|
if (encode)
|
||||||
cm = alg_quant(X, N, K, spread, B, lowband, resynth, (ec_enc*)ec, gain);
|
cm = alg_quant(X, N, K, spread, B, resynth, (ec_enc*)ec, gain);
|
||||||
else
|
else
|
||||||
cm = alg_unquant(X, N, K, spread, B, lowband, (ec_dec*)ec, gain);
|
cm = alg_unquant(X, N, K, spread, B, (ec_dec*)ec, gain);
|
||||||
} else {
|
} else {
|
||||||
/* If there's no pulse, fill the band anyway */
|
/* If there's no pulse, fill the band anyway */
|
||||||
int j;
|
int j;
|
||||||
|
@ -1157,7 +1157,7 @@ void quant_all_bands(int encode, const CELTMode *m, int start, int end,
|
||||||
b = 0;
|
b = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (M*eBands[i]-N >= M*eBands[start] && (update_lowband || lowband_offset==0))
|
if (resynth && M*eBands[i]-N >= M*eBands[start] && (update_lowband || lowband_offset==0))
|
||||||
lowband_offset = i;
|
lowband_offset = i;
|
||||||
|
|
||||||
tf_change = tf_res[i];
|
tf_change = tf_res[i];
|
||||||
|
|
|
@ -175,7 +175,7 @@ static unsigned extract_collapse_mask(int *iy, int N, int B)
|
||||||
return collapse_mask;
|
return collapse_mask;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned alg_quant(celt_norm *X, int N, int K, int spread, int B, celt_norm *lowband,
|
unsigned alg_quant(celt_norm *X, int N, int K, int spread, int B,
|
||||||
int resynth, ec_enc *enc, celt_word16 gain)
|
int resynth, ec_enc *enc, celt_word16 gain)
|
||||||
{
|
{
|
||||||
VARDECL(celt_norm, y);
|
VARDECL(celt_norm, y);
|
||||||
|
@ -340,7 +340,7 @@ unsigned alg_quant(celt_norm *X, int N, int K, int spread, int B, celt_norm *low
|
||||||
/** Decode pulse vector and combine the result with the pitch vector to produce
|
/** Decode pulse vector and combine the result with the pitch vector to produce
|
||||||
the final normalised signal in the current band. */
|
the final normalised signal in the current band. */
|
||||||
unsigned alg_unquant(celt_norm *X, int N, int K, int spread, int B,
|
unsigned alg_unquant(celt_norm *X, int N, int K, int spread, int B,
|
||||||
celt_norm *lowband, ec_dec *dec, celt_word16 gain)
|
ec_dec *dec, celt_word16 gain)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
celt_word32 Ryy;
|
celt_word32 Ryy;
|
||||||
|
|
|
@ -52,7 +52,7 @@
|
||||||
* @param enc Entropy encoder state
|
* @param enc Entropy encoder state
|
||||||
* @ret A mask indicating which blocks in the band received pulses
|
* @ret A mask indicating which blocks in the band received pulses
|
||||||
*/
|
*/
|
||||||
unsigned alg_quant(celt_norm *X, int N, int K, int spread, int B, celt_norm *lowband,
|
unsigned alg_quant(celt_norm *X, int N, int K, int spread, int B,
|
||||||
int resynth, ec_enc *enc, celt_word16 gain);
|
int resynth, ec_enc *enc, celt_word16 gain);
|
||||||
|
|
||||||
/** Algebraic pulse decoder
|
/** Algebraic pulse decoder
|
||||||
|
@ -64,7 +64,7 @@ unsigned alg_quant(celt_norm *X, int N, int K, int spread, int B, celt_norm *low
|
||||||
* @ret A mask indicating which blocks in the band received pulses
|
* @ret A mask indicating which blocks in the band received pulses
|
||||||
*/
|
*/
|
||||||
unsigned alg_unquant(celt_norm *X, int N, int K, int spread, int B,
|
unsigned alg_unquant(celt_norm *X, int N, int K, int spread, int B,
|
||||||
celt_norm *lowband, ec_dec *dec, celt_word16 gain);
|
ec_dec *dec, celt_word16 gain);
|
||||||
|
|
||||||
void renormalise_vector(celt_norm *X, int N, celt_word16 gain);
|
void renormalise_vector(celt_norm *X, int N, celt_word16 gain);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue