[FFmpeg-soc] [soc]: r3501 - mlp/mlpenc.c

ramiro subversion at mplayerhq.hu
Thu Aug 21 00:20:49 CEST 2008


Author: ramiro
Date: Thu Aug 21 00:20:49 2008
New Revision: 3501

Log:
Simplify X+X into 2*X.

Modified:
   mlp/mlpenc.c

Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c	(original)
+++ mlp/mlpenc.c	Thu Aug 21 00:20:49 2008
@@ -969,9 +969,9 @@ static void no_codebook_bits(MLPEncodeCo
     /* Set offset inside huffoffset's boundaries by adjusting extremes
      * so that more bits are used, thus shifting the offset. */
     if (min < HUFF_OFFSET_MIN)
-        max = FFMAX(max, HUFF_OFFSET_MIN + HUFF_OFFSET_MIN - min + 1);
+        max = FFMAX(max, 2 * HUFF_OFFSET_MIN - min + 1);
     if (max > HUFF_OFFSET_MAX)
-        min = FFMIN(min, HUFF_OFFSET_MAX + HUFF_OFFSET_MAX - max - 1);
+        min = FFMIN(min, 2 * HUFF_OFFSET_MAX - max - 1);
 
     /* Determine offset and minimum number of bits. */
     diff = max - min;



More information about the FFmpeg-soc mailing list