On 04/11/14 15:36, Vittorio Giovara wrote:
CC: [email protected]
Bug-Id: CID 1238835
---
  libavcodec/mpegaudio_tablegen.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/mpegaudio_tablegen.h b/libavcodec/mpegaudio_tablegen.h
index 8a3e51a..110d4f2 100644
--- a/libavcodec/mpegaudio_tablegen.h
+++ b/libavcodec/mpegaudio_tablegen.h
@@ -44,9 +44,9 @@ static void mpegaudio_tableinit(void)
  {
      int i, value, exponent;
      for (i = 1; i < TABLE_4_3_SIZE; i++) {
-        double value = i / 4;
          double f, fm;
          int e, m;
+        value = i / 4;
          /* cbrtf() isn't available on all systems, so we use powf(). */
          f  = value * powf(value, 1.0 / 3.0) * pow(2, (i & 3) * 0.25);
          fm = frexp(f, &e);
@@ -60,7 +60,7 @@ static void mpegaudio_tableinit(void)
      for (exponent = 0; exponent < 512; exponent++) {
          for (value = 0; value < 16; value++) {
              /* cbrtf() isn't available on all systems, so we use powf(). */
-            double f = (double)value * powf(value, 1.0 / 3.0) * pow(2, 
(exponent - 400) * 0.25 + FRAC_BITS + 5);
+            double f = value * powf(value, 1.0 / 3.0) * pow(2, (exponent - 
400) * 0.25 + FRAC_BITS + 5);
              /* llrint() isn't always available, so round and cast manually. */
              expval_table_fixed[exponent][value] = (long long int) (f >= 0 ? 
floor(f + 0.5) : ceil(f - 0.5));
              expval_table_float[exponent][value] = f;


Ok if the returned values are the same (should).

lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to