summaryrefslogtreecommitdiff
path: root/libavcodec/aaccoder.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2009-09-21 03:41:08 +0000
committerAlex Converse <alex.converse@gmail.com>2009-09-21 03:41:08 +0000
commita71e9b62546e4467751c0219869a7f6d004a5986 (patch)
tree3302d0a48e73176bc44c0a76d6d5cc56d84e1c0e /libavcodec/aaccoder.c
parent1a918c08e453a106c6737bca96757e26aade2964 (diff)
aacenc: Don't make unnecessary compares to the escape value in tight loops.
Originally committed as revision 19943 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aaccoder.c')
-rw-r--r--libavcodec/aaccoder.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/aaccoder.c b/libavcodec/aaccoder.c
index ed1d241eb8..4f0e58d047 100644
--- a/libavcodec/aaccoder.c
+++ b/libavcodec/aaccoder.c
@@ -173,12 +173,12 @@ static float quantize_band_cost(struct AACEncContext *s, const float *in,
for (k = 0; k < dim; k++) {
float t = fabsf(in[i+k]);
float di;
+ if (vec[k] == 64.0f) { //FIXME: slow
//do not code with escape sequence small values
- if (vec[k] == 64.0f && t < 39.0f*IQ) {
+ if (t < 39.0f*IQ) {
rd = INFINITY;
break;
}
- if (vec[k] == 64.0f) { //FIXME: slow
if (t >= CLIPPED_ESCAPE) {
di = t - CLIPPED_ESCAPE;
curbits += 21;
@@ -288,12 +288,12 @@ static void quantize_and_encode_band(struct AACEncContext *s, PutBitContext *pb,
for (k = 0; k < dim; k++) {
float t = fabsf(in[i+k]);
float di;
+ if (vec[k] == 64.0f) { //FIXME: slow
//do not code with escape sequence small values
- if (vec[k] == 64.0f && t < 39.0f*IQ) {
+ if (t < 39.0f*IQ) {
rd = INFINITY;
break;
}
- if (vec[k] == 64.0f) { //FIXME: slow
if (t >= CLIPPED_ESCAPE) {
di = t - CLIPPED_ESCAPE;
curbits += 21;