[FFmpeg-soc] [soc]: r4466 - aacenc/aaccoder.c

alexc subversion at mplayerhq.hu
Tue Jun 16 20:11:48 CEST 2009


Author: alexc
Date: Tue Jun 16 20:11:47 2009
New Revision: 4466

Log:
Fix clipped escape value distortion calculation.

Modified:
   aacenc/aaccoder.c

Modified: aacenc/aaccoder.c
==============================================================================
--- aacenc/aaccoder.c	Tue Jun 16 19:46:45 2009	(r4465)
+++ aacenc/aaccoder.c	Tue Jun 16 20:11:47 2009	(r4466)
@@ -148,7 +148,7 @@ static float quantize_band_cost(const fl
                     }
                     if(vec[k] == 64.0f){//FIXME: slow
                         if(t >= 165140.0f*IQ){ // clipped value
-                            di = t - 165140.0f;
+                            di = t - 165140.0f*IQ;
                             curbits += 21;
                         }else{
                             int c = av_clip(quant(t, Q), 0, 8191);
@@ -251,7 +251,7 @@ static void quantize_and_encode_band(Put
                     }
                     if(vec[k] == 64.0f){//FIXME: slow
                         if(t >= 165140.0f*IQ){ // clipped value
-                            di = t - 165140.0f;
+                            di = t - 165140.0f*IQ;
                             curbits += 21;
                         }else{
                             int c = av_clip(quant(t, Q), 0, 8191);
@@ -338,7 +338,7 @@ static float quantize_band_cost(const fl
                     }
                     if(vec[k] == 64.0f){//FIXME: slow
                         if(t >= 165140.0f*Q){ // clipped value
-                            di = t - 165140.0f;
+                            di = t - 165140.0f*Q;
                             curbits += 21;
                         }else{
                             int c = av_clip(quant(t, IQ), 0, 8191);
@@ -411,7 +411,7 @@ static void quantize_and_encode_band(Put
                     }
                     if(vec[k] == 64.0f){//FIXME: slow
                         if(t >= 165140.0f*Q){ // clipped value
-                            di = t - 165140.0f;
+                            di = t - 165140.0f*Q;
                             curbits += 21;
                         }else{
                             int c = av_clip(quant(t, IQ), 0, 8191);


More information about the FFmpeg-soc mailing list