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

ramiro subversion at mplayerhq.hu
Sun Aug 10 16:44:54 CEST 2008


Author: ramiro
Date: Sun Aug 10 16:44:54 2008
New Revision: 3148

Log:
Avoid intermediate step in clipping average and setting offset.

Modified:
   mlp/mlpenc.c

Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c	(original)
+++ mlp/mlpenc.c	Sun Aug 10 16:44:54 2008
@@ -794,14 +794,13 @@ static inline void codebook_bits(MLPEnco
     int previous_count = INT_MAX;
     int offset_min, offset_max;
     int is_greater = 0;
-    int offset;
+    int offset = av_clip(average, HUFF_OFFSET_MIN, HUFF_OFFSET_MAX);
     int next;
 
-    average = av_clip(average, HUFF_OFFSET_MIN, HUFF_OFFSET_MAX);
     offset_min = FFMAX(min, HUFF_OFFSET_MIN);
     offset_max = FFMIN(max, HUFF_OFFSET_MAX);
 
-    for (offset = average; ;) {
+    for (;;) {
         BestOffset temp_bo;
 
         codebook_bits_offset(ctx, substr, channel, codebook,



More information about the FFmpeg-soc mailing list