| 224 | } |
| 225 | |
| 226 | static inline void ff_dca_core_dequantize(int32_t *output, const int32_t *input, |
| 227 | int32_t step_size, int32_t scale, int residual, int len) |
| 228 | { |
| 229 | // Account for quantizer step size |
| 230 | int64_t step_scale = (int64_t)step_size * scale; |
| 231 | int n, shift = 0; |
| 232 | |
| 233 | // Limit scale factor resolution to 22 bits |
| 234 | if (step_scale > (1 << 23)) { |
| 235 | shift = av_log2(step_scale >> 23) + 1; |
| 236 | step_scale >>= shift; |
| 237 | } |
| 238 | |
| 239 | // Scale the samples |
| 240 | if (residual) { |
| 241 | for (n = 0; n < len; n++) |
| 242 | output[n] += clip23(norm__(input[n] * step_scale, 22 - shift)); |
| 243 | } else { |
| 244 | for (n = 0; n < len; n++) |
| 245 | output[n] = clip23(norm__(input[n] * step_scale, 22 - shift)); |
| 246 | } |
| 247 | } |
| 248 | |
| 249 | int ff_dca_core_parse(DCACoreDecoder *s, const uint8_t *data, int size); |
| 250 | int ff_dca_core_parse_exss(DCACoreDecoder *s, const uint8_t *data, DCAExssAsset *asset); |
no test coverage detected