Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2011-09-12 06:00:46 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2011-09-12 06:00:46 +0400
commit92675068a425677855c0a379efc4f10e51ee9595 (patch)
tree1e5c0c574fb3dcdfae9547a6d5ed10934c37a4e0
parentaf50ce9200235158e54399c7f9cb8c2c5dab8008 (diff)
Changing some TODOs that were really future optimization hints
-rw-r--r--libcelt/bands.c2
-rw-r--r--libcelt/celt.c3
-rw-r--r--libcelt/vq.c4
-rw-r--r--src/opus_encoder.c4
4 files changed, 7 insertions, 6 deletions
diff --git a/libcelt/bands.c b/libcelt/bands.c
index da9c3675..f89a94e4 100644
--- a/libcelt/bands.c
+++ b/libcelt/bands.c
@@ -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)
diff --git a/libcelt/celt.c b/libcelt/celt.c
index 2e6478d4..50cc434f 100644
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -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;
diff --git a/libcelt/vq.c b/libcelt/vq.c
index ce807b36..bf85f8d2 100644
--- a/libcelt/vq.c
+++ b/libcelt/vq.c
@@ -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;
diff --git a/src/opus_encoder.c b/src/opus_encoder.c
index d5b4a67b..72eedf6b 100644
--- a/src/opus_encoder.c
+++ b/src/opus_encoder.c
@@ -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);