Skip to content

DSP options for convenience

nu774 edited this page Nov 7, 2013 · 10 revisions

qaac supports the following DSP options.

  • Lowpass filter (--lowpass)
  • Sample rate conversion (--rate)
  • Normalization (--normalize)
  • Gain adjustment (--gain)
  • Channel reordering (--chanmap)
  • Matrix mixer (--matrix-preset, --matrix-file)
  • Delay (--delay)
  • Quantization (-b, --bits-per-sample)
  • Dynamic range compressor (--drc)

--rate depends on libsoxr, and --lowpass, --matrix-preset, --matrix-file depend on libsoxconvolver.

Note that --normalize, --gain, --matrix-preset, --matrix-file, --rate, --lowpass, --drc will convert internal sample format to float. In other words, only --chanmap and --delay preserves sample format of input. When you want to force output bit depth of WAV or ALAC, use -b.

Besides, channels are internally/automatically reordered. At first, channels are reordered to the Microsoft order (such as L C R to L R C). Before encoding to AAC/ALAC, it is reordered again to AAC order (such as C L R). Of course, this reordering works properly only when the input channel layout is known. If not known, qaac uses the default guess, and it's always Microsoft order. You can use --chanmap and --chanmask to let qaac know the channel layout.

DSP chain is processed in the following order. As you can see, when matrix mixer and --chanmap is processed, channels are in Microsoft WAV order. You have to take it into account when you use these options.

  1. Delay
  2. Reordering to Microsoft order
  3. Matrix mixer
  4. Channel reordering with --chanmap
  5. Reordering to AAC order (AAC/ALAC)
  6. Sample rate conversion
  7. Lowpass filter
  8. Dynamic range compression
  9. Normalization
  10. Gain adjustment
  11. Quantization