[FFmpeg-cvslog] nellymoserenc: fix array element ordering

Michael Niedermayer git at videolan.org
Thu Nov 13 12:52:04 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Nov 11 13:26:56 2014 +0100| [aa7c429c4e8e561009176d51b7dcb626c85eb276] | committer: Vittorio Giovara

nellymoserenc: fix array element ordering

Fixes assertion failures and valgrind warnings in trellis encoder.

CC: libav-stable at libav.org
Bug-Id: CID 732256 / CID 732257

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aa7c429c4e8e561009176d51b7dcb626c85eb276
---

 libavcodec/nellymoserenc.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c
index 9a84591..302c69c 100644
--- a/libavcodec/nellymoserenc.c
+++ b/libavcodec/nellymoserenc.c
@@ -62,8 +62,8 @@ typedef struct NellyMoserEncodeContext {
     DECLARE_ALIGNED(32, float, mdct_out)[NELLY_SAMPLES];
     DECLARE_ALIGNED(32, float, in_buff)[NELLY_SAMPLES];
     DECLARE_ALIGNED(32, float, buf)[3 * NELLY_BUF_LEN];     ///< sample buffer
-    float           (*opt )[NELLY_BANDS];
-    uint8_t         (*path)[NELLY_BANDS];
+    float           (*opt )[OPT_SIZE];
+    uint8_t         (*path)[OPT_SIZE];
 } NellyMoserEncodeContext;
 
 static float pow_table[POW_TABLE_SIZE];     ///< -pow(2, -i / 2048.0 - 3.0);
@@ -228,8 +228,8 @@ static void get_exponent_dynamic(NellyMoserEncodeContext *s, float *cand, int *i
     int i, j, band, best_idx;
     float power_candidate, best_val;
 
-    float  (*opt )[NELLY_BANDS] = s->opt ;
-    uint8_t(*path)[NELLY_BANDS] = s->path;
+    float  (*opt )[OPT_SIZE] = s->opt ;
+    uint8_t(*path)[OPT_SIZE] = s->path;
 
     for (i = 0; i < NELLY_BANDS * OPT_SIZE; i++) {
         opt[0][i] = INFINITY;



More information about the ffmpeg-cvslog mailing list