Commit 92675068 authored by Jean-Marc Valin's avatar Jean-Marc Valin
Browse files

Changing some TODOs that were really future optimization hints

parent af50ce92
......@@ -865,7 +865,7 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c
else
stereo_split(X, Y, N);
}
/* TODO: Renormalising X and Y *may* help fixed-point a bit at very high rate.
/* NOTE: Renormalising X and Y *may* help fixed-point a bit at very high rate.
Let's do that at higher complexity */
} else if (stereo) {
if (encode)
......
......@@ -639,7 +639,8 @@ static int tf_analysis(const CELTMode *m, int len, int C, int isTransient,
*tf_sum += metric[i];
}
/*printf("\n");*/
/* TODO: Detect the extreme transients that require tf_select = 1 */
/* NOTE: Future optimized implementations could detect extreme transients and set
tf_select = 1 but so far we have not found a reliable way of making this useful */
tf_select = 0;
cost0 = 0;
......
......@@ -97,7 +97,7 @@ static void exp_rotation(celt_norm *X, int len, int dir, int stride, int K, int
while ((stride2*stride2+stride2)*stride + (stride>>2) < len)
stride2++;
}
/*TODO: We should be passing around log2(B), not B, for both this and for
/*NOTE: As a minor optimization, we could be passing around log2(B), not B, for both this and for
extract_collapse_mask().*/
len /= stride;
for (i=0;i<stride;i++)
......@@ -153,7 +153,7 @@ static unsigned extract_collapse_mask(int *iy, int N, int B)
int i;
if (B<=1)
return 1;
/*TODO: We should be passing around log2(B), not B, for both this and for
/*NOTE: As a minor optimization, we could be passing around log2(B), not B, for both this and for
exp_rotation().*/
N0 = N/B;
collapse_mask = 0;
......
......@@ -790,7 +790,7 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
celt_encoder_ctl(celt_enc, OPUS_RESET_STATE);
celt_encoder_ctl(celt_enc, CELT_SET_START_BAND(0));
celt_encoder_ctl(celt_enc, CELT_SET_PREDICTION(0));
/* TODO: This wastes CPU a bit compared to just prefilling the buffer */
/* NOTE: We could speed this up slightly (at the expense of code size) by just adding a function that prefills the buffer */
celt_encode_with_ec(celt_enc, &st->delay_buffer[(st->encoder_buffer-delay_compensation-st->Fs/400)*st->channels], st->Fs/400, dummy, 10, NULL);
} else {
celt_encoder_ctl(celt_enc, CELT_SET_PREDICTION(2));
......@@ -924,7 +924,7 @@ int opus_encode_float(OpusEncoder *st, const opus_val16 *pcm, int frame_size,
celt_encoder_ctl(celt_enc, CELT_SET_START_BAND(0));
celt_encoder_ctl(celt_enc, CELT_SET_PREDICTION(0));
/* TODO: We could speed up prefilling here */
/* NOTE: We could speed this up slightly (at the expense of code size) by just adding a function that prefills the buffer */
celt_encode_with_ec(celt_enc, pcm_buf+st->channels*(frame_size-N2-N4), N4, data+nb_compr_bytes, redundancy_bytes, NULL);
celt_encode_with_ec(celt_enc, pcm_buf+st->channels*(frame_size-N2), N2, data+nb_compr_bytes, redundancy_bytes, NULL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment