[FFmpeg-cvslog] r19943 - trunk/libavcodec/aaccoder.c

alexc subversion
Mon Sep 21 05:41:08 CEST 2009


Author: alexc
Date: Mon Sep 21 05:41:08 2009
New Revision: 19943

Log:
aacenc: Don't make unnecessary compares to the escape value in tight loops.

Modified:
   trunk/libavcodec/aaccoder.c

Modified: trunk/libavcodec/aaccoder.c
==============================================================================
--- trunk/libavcodec/aaccoder.c	Mon Sep 21 05:01:57 2009	(r19942)
+++ trunk/libavcodec/aaccoder.c	Mon Sep 21 05:41:08 2009	(r19943)
@@ -173,12 +173,12 @@ static float quantize_band_cost(struct A
                 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(str
                 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;



More information about the ffmpeg-cvslog mailing list