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

ramiro subversion at mplayerhq.hu
Mon Apr 20 04:29:26 CEST 2009


Author: ramiro
Date: Mon Apr 20 04:29:25 2009
New Revision: 4207

Log:
Calculate subblock_index only once.

Modified:
   mlp/mlpenc.c

Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c	Mon Apr 20 04:29:01 2009	(r4206)
+++ mlp/mlpenc.c	Mon Apr 20 04:29:25 2009	(r4207)
@@ -1061,11 +1061,14 @@ static uint8_t *write_substrs(MLPEncodeC
         init_put_bits(&pb, buf, buf_size);
 
         for (subblock = 0; subblock <= num_subblocks; subblock++) {
+            unsigned int subblock_index;
 
-            ctx->cur_decoding_params = &ctx->major_decoding_params[ctx->frame_index + 1 - num_subblocks + subblock][substr];
-            ctx->cur_channel_params = ctx->major_channel_params[ctx->frame_index + 1 - num_subblocks + subblock];
+            subblock_index = ctx->frame_index + 1 - num_subblocks + subblock;
 
-            params_changed = ctx->major_params_changed[ctx->frame_index + 1 - num_subblocks + subblock][substr];
+            ctx->cur_decoding_params = &ctx->major_decoding_params[subblock_index][substr];
+            ctx->cur_channel_params = ctx->major_channel_params[subblock_index];
+
+            params_changed = ctx->major_params_changed[subblock_index][substr];
 
             if (restart_frame || params_changed) {
                 put_bits(&pb, 1, 1);


More information about the FFmpeg-soc mailing list