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

ramiro subversion at mplayerhq.hu
Sun Aug 24 02:07:18 CEST 2008


Author: ramiro
Date: Sun Aug 24 02:07:18 2008
New Revision: 3563

Log:
Previous commit was the wrong patch.
compare_matrix_params() should check for as many coeffs per matrix as there are
valid channels in the stream.

Modified:
   mlp/mlpenc.c

Modified: mlp/mlpenc.c
==============================================================================
--- mlp/mlpenc.c	(original)
+++ mlp/mlpenc.c	Sun Aug 24 02:07:18 2008
@@ -1376,8 +1376,9 @@ static int compare_filter_params(FilterP
 /** Compare two primitive matrices and returns 1 if anything has changed.
  *  Returns 0 if they are both equal.
  */
-static int compare_matrix_params(RestartHeader *rh, MatrixParams *prev, MatrixParams *mp)
+static int compare_matrix_params(MLPEncodeContext *ctx, MatrixParams *prev, MatrixParams *mp)
 {
+    RestartHeader *rh = ctx->cur_restart_header;
     unsigned int channel, mat;
 
     if (prev->count != mp->count)
@@ -1394,7 +1395,7 @@ static int compare_matrix_params(Restart
         if (prev->outch[mat] != mp->outch[mat])
             return 1;
 
-        for (channel = rh->min_channel; channel <= rh->max_channel; channel++)
+        for (channel = 0; channel < ctx->num_channels; channel++)
             if (prev->coeff[mat][channel] != mp->coeff[mat][channel])
                 return 1;
     }
@@ -1421,7 +1422,7 @@ static int compare_decoding_params(MLPEn
     if (prev->blocksize != dp->blocksize)
         retval |= PARAM_BLOCKSIZE;
 
-    if (compare_matrix_params(rh, prev_mp, mp))
+    if (compare_matrix_params(ctx, prev_mp, mp))
         retval |= PARAM_MATRIX;
 
     for (ch = 0; ch <= rh->max_matrix_channel; ch++)



More information about the FFmpeg-soc mailing list