[FFmpeg-cvslog] avcodec/mpegaudio_tablegen: fix build with hardcoded tables

Michael Niedermayer git at videolan.org
Thu Oct 24 01:50:23 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 24 01:18:37 2013 +0200| [2f31b73a11d676e3f7f66139ff5c745317e8f1a3] | committer: Michael Niedermayer

avcodec/mpegaudio_tablegen: fix build with hardcoded tables

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2f31b73a11d676e3f7f66139ff5c745317e8f1a3
---

 libavcodec/mpegaudio_tablegen.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mpegaudio_tablegen.h b/libavcodec/mpegaudio_tablegen.h
index 5592b4a..f9557c9 100644
--- a/libavcodec/mpegaudio_tablegen.h
+++ b/libavcodec/mpegaudio_tablegen.h
@@ -63,7 +63,7 @@ static void mpegaudio_tableinit(void)
             /* cbrtf() isn't available on all systems, so we use powf(). */
             double f = (double)value * pow(value, 1.0 / 3.0) * pow(2, (exponent - 400) * 0.25 + FRAC_BITS + 5) / IMDCT_SCALAR;
             /* llrint() isn't always available, so round and cast manually. */
-            expval_table_fixed[exponent][value] = (long long int) FFMIN(floor(f + 0.5), 0xFFFFFFFF);
+            expval_table_fixed[exponent][value] = (long long int) (f < 0xFFFFFFFF ? floor(f + 0.5) : 0xFFFFFFFF);
             expval_table_float[exponent][value] = f;
         }
         exp_table_fixed[exponent] = expval_table_fixed[exponent][1];



More information about the ffmpeg-cvslog mailing list