diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-12 04:19:38 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-12 04:19:38 +0200 |
commit | 62722ae2d4b2e5f632c725e150dde0f7d0fbfe8d (patch) | |
tree | 7689abda3bd41d8ba6146ac4b610f9b8e907fba6 | |
parent | 927d866a9961c17597744436c8508703c2dc8277 (diff) | |
download | ffmpeg-62722ae2d4b2e5f632c725e150dde0f7d0fbfe8d.tar.gz |
nellymoserenc: fix array element ordering
Fixes assertion failures in trellis encoder
Fixes valgrind warnings in trellis encoder
Fixes CID732257
Fixes CID732256
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/nellymoserenc.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/nellymoserenc.c b/libavcodec/nellymoserenc.c index 2b96d47580..4317e32032 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); @@ -240,8 +240,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; |