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

ramiro subversion at mplayerhq.hu
Tue Aug 19 21:44:55 CEST 2008


Author: ramiro
Date: Tue Aug 19 21:44:54 2008
New Revision: 3471

Log:
Pass substr to determine_quant_step_size().

Modified:
   mlp/mlpenc.c

Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c	(original)
+++ mlp/mlpenc.c	Tue Aug 19 21:44:54 2008
@@ -637,11 +637,8 @@ static int number_trailing_zeroes(int32_
     return bits;
 }
 
-static void determine_quant_step_size(MLPEncodeContext *ctx)
+static void determine_quant_step_size(MLPEncodeContext *ctx, unsigned int substr)
 {
-    unsigned int substr;
-
-    for (substr = 0; substr < ctx->num_substreams; substr++) {
         DecodingParams *dp = &ctx->decoding_params[substr];
         RestartHeader  *rh = &ctx->restart_header [substr];
         int32_t *sample_buffer = ctx->sample_buffer;
@@ -660,7 +657,6 @@ static void determine_quant_step_size(ML
 
         for (channel = 0; channel <= rh->max_channel; channel++)
             dp->quant_step_size[channel] = number_trailing_zeroes(sample_mask[channel]);
-    }
 }
 
 /** Determines the best filter parameters for the given data and writes the
@@ -1384,7 +1380,9 @@ static int mlp_encode_frame(AVCodecConte
 
         ctx->major_frame_size = calculate_major_frame_size(ctx);
 
-        determine_quant_step_size(ctx);
+        for (substr = 0; substr < ctx->num_substreams; substr++) {
+        determine_quant_step_size(ctx, substr);
+        }
 
     determine_filters(ctx);
     } else {



More information about the FFmpeg-soc mailing list