52 #define FFT_FIXED_32 1
58 50529027, 44278013, 39403370, 32292987, 27356480, 23729101, 20951060, 18755316
69 int temp, temp1, temp2, temp3, temp4, temp5, temp6, temp7;
71 mul = (dynrng & 0x1f) + 0x20;
72 shift = 4 - ((dynrng << 23) >> 28);
74 round = 1 << (shift-1);
75 for (i=0; i<
len; i+=8) {
78 temp1 = src[i+1] * mul;
80 temp2 = src[i+2] * mul;
82 temp1 = temp1 +
round;
83 dst[i] = temp >>
shift;
84 temp3 = src[i+3] * mul;
85 temp2 = temp2 +
round;
87 dst[i+1] = temp1 >>
shift;
88 temp4 = src[i + 4] * mul;
89 temp3 = temp3 +
round;
90 dst[i+2] = temp2 >>
shift;
92 temp5 = src[i+5] * mul;
93 temp4 = temp4 +
round;
94 dst[i+3] = temp3 >>
shift;
95 temp6 = src[i+6] * mul;
97 dst[i+4] = temp4 >>
shift;
98 temp5 = temp5 +
round;
99 temp7 = src[i+7] * mul;
100 temp6 = temp6 +
round;
102 dst[i+5] = temp5 >>
shift;
103 temp7 = temp7 +
round;
104 dst[i+6] = temp6 >>
shift;
105 dst[i+7] = temp7 >>
shift;
110 for (i=0; i<
len; i+=8) {
113 temp1 = src[i+1] * mul;
114 temp2 = src[i+2] * mul;
116 dst[i] = temp <<
shift;
117 temp3 = src[i+3] * mul;
119 dst[i+1] = temp1 <<
shift;
120 temp4 = src[i + 4] * mul;
121 dst[i+2] = temp2 <<
shift;
123 temp5 = src[i+5] * mul;
124 dst[i+3] = temp3 <<
shift;
125 temp6 = src[i+6] * mul;
127 dst[i+4] = temp4 <<
shift;
128 temp7 = src[i+7] * mul;
130 dst[i+5] = temp5 <<
shift;
131 dst[i+6] = temp6 <<
shift;
132 dst[i+7] = temp7 <<
shift;
143 int out_ch,
int in_ch,
int len)
148 for (i = 0; i <
len; i++) {
150 for (j = 0; j < in_ch; j++) {
151 v0 += samples[j][i] * matrix[j][0];
152 v1 += samples[j][i] * matrix[j][1];
154 samples[0][i] = (v0+2048)>>12;
155 samples[1][i] = (v1+2048)>>12;
157 }
else if (out_ch == 1) {
158 for (i = 0; i <
len; i++) {
160 for (j = 0; j < in_ch; j++)
161 v0 += samples[j][i] * matrix[j][0];
162 samples[0][i] = (v0+2048)>>12;
170 {
"drc_scale",
"percentage of dynamic range compression to apply",
OFFSET(drc_scale),
AV_OPT_TYPE_FLOAT, {.dbl = 1.0}, 0.0, 6.0,
PAR },
171 {
"heavy_compr",
"heavy dynamic range compression enabled",
OFFSET(heavy_compression),
AV_OPT_TYPE_INT, {.i64 = 0 }, 0, 1,
PAR },