comparison mlp.h @ 10273:38147f0f94cc libavcodec

Specify maximum sample rate of MLP by defining the factor relative to 48000 instead of directly. This makes clear that the code assumes the maximum sample rate to be a multiple of 48000 and also removes the division from the MAX_BLOCKSIZE macros, which causes an issue with the Solaris assembler where "/" is a comment marker unless the --divide option is used.
author reimar
date Sat, 26 Sep 2009 16:04:35 +0000
parents d0fe5dc427f0
children
comparison
equal deleted inserted replaced
10272:cc02e912d20e 10273:38147f0f94cc
45 /** Maximum number of substreams that can be decoded. 45 /** Maximum number of substreams that can be decoded.
46 * MLP's limit is 2. TrueHD supports at least up to 3. 46 * MLP's limit is 2. TrueHD supports at least up to 3.
47 */ 47 */
48 #define MAX_SUBSTREAMS 3 48 #define MAX_SUBSTREAMS 3
49 49
50 /** which multiple of 48000 the maximum sample rate is */
51 #define MAX_RATEFACTOR 4
50 /** maximum sample frequency seen in files */ 52 /** maximum sample frequency seen in files */
51 #define MAX_SAMPLERATE 192000 53 #define MAX_SAMPLERATE (MAX_RATEFACTOR * 48000)
52 54
53 /** maximum number of audio samples within one access unit */ 55 /** maximum number of audio samples within one access unit */
54 #define MAX_BLOCKSIZE (40 * (MAX_SAMPLERATE / 48000)) 56 #define MAX_BLOCKSIZE (40 * MAX_RATEFACTOR)
55 /** next power of two greater than MAX_BLOCKSIZE */ 57 /** next power of two greater than MAX_BLOCKSIZE */
56 #define MAX_BLOCKSIZE_POW2 (64 * (MAX_SAMPLERATE / 48000)) 58 #define MAX_BLOCKSIZE_POW2 (64 * MAX_RATEFACTOR)
57 59
58 /** number of allowed filters */ 60 /** number of allowed filters */
59 #define NUM_FILTERS 2 61 #define NUM_FILTERS 2
60 62
61 /** The maximum number of taps in IIR and FIR filters. */ 63 /** The maximum number of taps in IIR and FIR filters. */