22 #ifndef AVCODEC_WAVPACK_H
23 #define AVCODEC_WAVPACK_H
30 #define WV_HEADER_SIZE 32
32 #define WV_MONO 0x00000004
33 #define WV_JOINT_STEREO 0x00000010
34 #define WV_CROSS_DECORR 0x00000020
35 #define WV_FLOAT_DATA 0x00000080
36 #define WV_INT32_DATA 0x00000100
37 #define WV_FALSE_STEREO 0x40000000
38 #define WV_DSD_DATA 0x80000000
40 #define WV_HYBRID_MODE 0x00000008
41 #define WV_HYBRID_SHAPE 0x00000008
42 #define WV_HYBRID_BITRATE 0x00000200
43 #define WV_HYBRID_BALANCE 0x00000400
44 #define WV_INITIAL_BLOCK 0x00000800
45 #define WV_FINAL_BLOCK 0x00001000
47 #define WV_MONO_DATA (WV_MONO | WV_FALSE_STEREO)
49 #define WV_SINGLE_BLOCK (WV_INITIAL_BLOCK | WV_FINAL_BLOCK)
51 #define WV_FLT_SHIFT_ONES 0x01
52 #define WV_FLT_SHIFT_SAME 0x02
53 #define WV_FLT_SHIFT_SENT 0x04
54 #define WV_FLT_ZERO_SENT 0x08
55 #define WV_FLT_ZERO_SIGN 0x10
57 #define WV_MAX_SAMPLES 150000
103 #define GET_MED(n) ((c->median[n] >> 4) + 1)
104 #define DEC_MED(n) c->median[n] -= ((int)(c->median[n] + (128U >> (n)) - 2) / (128 >> (n))) * 2U
105 #define INC_MED(n) c->median[n] += ((int)(c->median[n] + (128U >> (n)) ) / (128 >> (n))) * 5U
108 #define UPDATE_WEIGHT_CLIP(weight, delta, samples, in) \
109 if ((samples) && (in)) { \
110 if (((samples) ^ (in)) < 0) { \
111 (weight) -= (delta); \
112 if ((weight) < -1024) \
115 (weight) += (delta); \
116 if ((weight) > 1024) \
122 6000, 8000, 9600, 11025, 12000, 16000, 22050, 24000,
123 32000, 44100, 48000, 64000, 88200, 96000, 192000, 0
143 res = (
val > 9) ? (res << (
val - 9)) : (res >> (9 -
val));
144 return neg ? -res : res;
static double val(void *priv, double ch)
common internal and external API header
static av_always_inline int wp_exp2(int16_t val)
const uint8_t ff_wp_log2_table[256]
static const int wv_rates[16]
const uint8_t ff_wp_exp2_table[256]
static av_always_inline int wp_log2(uint32_t val)