Originally committed as revision 26328 to svn://svn.ffmpeg.org/ffmpeg/trunk
Sascha Sommer authored on 2011/01/15 01:36:57... | ... |
@@ -100,9 +100,10 @@ |
100 | 100 |
#define MAX_BANDS 29 ///< max number of scale factor bands |
101 | 101 |
#define MAX_FRAMESIZE 32768 ///< maximum compressed frame size |
102 | 102 |
|
103 |
+#define WMAPRO_BLOCK_MIN_BITS 6 ///< log2 of min block size |
|
103 | 104 |
#define WMAPRO_BLOCK_MAX_BITS 12 ///< log2 of max block size |
104 | 105 |
#define WMAPRO_BLOCK_MAX_SIZE (1 << WMAPRO_BLOCK_MAX_BITS) ///< maximum block size |
105 |
-#define WMAPRO_BLOCK_SIZES (WMAPRO_BLOCK_MAX_BITS - BLOCK_MIN_BITS + 1) ///< possible block sizes |
|
106 |
+#define WMAPRO_BLOCK_SIZES (WMAPRO_BLOCK_MAX_BITS - WMAPRO_BLOCK_MIN_BITS + 1) ///< possible block sizes |
|
106 | 107 |
|
107 | 108 |
|
108 | 109 |
#define VLCBITS 9 |
... | ... |
@@ -417,8 +418,8 @@ static av_cold int decode_init(AVCodecContext *avctx) |
417 | 417 |
|
418 | 418 |
/** init MDCT, FIXME: only init needed sizes */ |
419 | 419 |
for (i = 0; i < WMAPRO_BLOCK_SIZES; i++) |
420 |
- ff_mdct_init(&s->mdct_ctx[i], BLOCK_MIN_BITS+1+i, 1, |
|
421 |
- 1.0 / (1 << (BLOCK_MIN_BITS + i - 1)) |
|
420 |
+ ff_mdct_init(&s->mdct_ctx[i], WMAPRO_BLOCK_MIN_BITS+1+i, 1, |
|
421 |
+ 1.0 / (1 << (WMAPRO_BLOCK_MIN_BITS + i - 1)) |
|
422 | 422 |
/ (1 << (s->bits_per_sample - 1))); |
423 | 423 |
|
424 | 424 |
/** init MDCT windows: simple sinus window */ |
... | ... |
@@ -1021,7 +1022,7 @@ static void wmapro_window(WMAProDecodeCtx *s) |
1021 | 1021 |
winlen = s->subframe_len; |
1022 | 1022 |
} |
1023 | 1023 |
|
1024 |
- window = s->windows[av_log2(winlen) - BLOCK_MIN_BITS]; |
|
1024 |
+ window = s->windows[av_log2(winlen) - WMAPRO_BLOCK_MIN_BITS]; |
|
1025 | 1025 |
|
1026 | 1026 |
winlen >>= 1; |
1027 | 1027 |
|
... | ... |
@@ -1233,7 +1234,7 @@ static int decode_subframe(WMAProDecodeCtx *s) |
1233 | 1233 |
} |
1234 | 1234 |
|
1235 | 1235 |
/** apply imdct (ff_imdct_half == DCTIV with reverse) */ |
1236 |
- ff_imdct_half(&s->mdct_ctx[av_log2(subframe_len) - BLOCK_MIN_BITS], |
|
1236 |
+ ff_imdct_half(&s->mdct_ctx[av_log2(subframe_len) - WMAPRO_BLOCK_MIN_BITS], |
|
1237 | 1237 |
s->channel[c].coeffs, s->tmp); |
1238 | 1238 |
} |
1239 | 1239 |
} |