ref: 92675068a425677855c0a379efc4f10e51ee9595
parent: af50ce9200235158e54399c7f9cb8c2c5dab8008
author: Jean-Marc Valin <[email protected]>
date: Sun Sep 11 18:00:46 EDT 2011
Changing some TODOs that were really future optimization hints
--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -865,7 +865,7 @@
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)
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -639,7 +639,8 @@
*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;
--- a/libcelt/vq.c
+++ b/libcelt/vq.c
@@ -97,7 +97,7 @@
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 @@
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;
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -790,7 +790,7 @@
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 @@
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);