audioconvert: dither in 24 bits

This saves some shifts.
This commit is contained in:
Wim Taymans 2022-06-28 17:15:27 +02:00
parent 7a0f201dc7
commit 22d02a7891
2 changed files with 20 additions and 25 deletions

View file

@ -362,7 +362,7 @@ int convert_init(struct convert *conv)
const struct conv_info *info;
uint32_t i, shift, dither_flags;
shift = 32u - SPA_MIN(conv->quantize, 32u);
shift = 24u - SPA_MIN(conv->quantize, 24u);
shift += conv->noise;
conv->mask = (1ULL << (shift + 1)) - 1;