comparison mlp.h @ 9278:41e285948ffc libavcodec

mlpdec: Max filter orders for FIR and IIR are 8 and 4 respectively.
author ramiro
date Mon, 30 Mar 2009 02:54:19 +0000
parents 753780c4875e
children 19a70bcc2220
comparison
equal deleted inserted replaced
9277:b8e5b7edb2d5 9278:41e285948ffc
48 #define MAX_BLOCKSIZE_POW2 (64 * (MAX_SAMPLERATE / 48000)) 48 #define MAX_BLOCKSIZE_POW2 (64 * (MAX_SAMPLERATE / 48000))
49 49
50 /** number of allowed filters */ 50 /** number of allowed filters */
51 #define NUM_FILTERS 2 51 #define NUM_FILTERS 2
52 52
53 /** The maximum number of taps in either the IIR or FIR filter; 53 /** The maximum number of taps in IIR and FIR filters. */
54 * I believe MLP actually specifies the maximum order for IIR filters as four, 54 #define MAX_FIR_ORDER 8
55 * and that the sum of the orders of both filters must be <= 8. 55 #define MAX_IIR_ORDER 4
56 */
57 #define MAX_FILTER_ORDER 8
58 56
59 /** Code that signals end of a stream. */ 57 /** Code that signals end of a stream. */
60 #define END_OF_STREAM 0xd234d234 58 #define END_OF_STREAM 0xd234d234
61 59
62 #define FIR 0 60 #define FIR 0
65 /** filter data */ 63 /** filter data */
66 typedef struct { 64 typedef struct {
67 uint8_t order; ///< number of taps in filter 65 uint8_t order; ///< number of taps in filter
68 uint8_t shift; ///< Right shift to apply to output of filter. 66 uint8_t shift; ///< Right shift to apply to output of filter.
69 67
70 int32_t coeff[MAX_FILTER_ORDER]; 68 int32_t coeff[MAX_FIR_ORDER];
71 int32_t state[MAX_FILTER_ORDER]; 69 int32_t state[MAX_FIR_ORDER];
72 } FilterParams; 70 } FilterParams;
73 71
74 /** sample data coding information */ 72 /** sample data coding information */
75 typedef struct { 73 typedef struct {
76 FilterParams filter_params[NUM_FILTERS]; 74 FilterParams filter_params[NUM_FILTERS];