Skip to main content
In this topic, we will walk through the usage of impulse response reduction as part of performing convolution on XBOX Series X devices using XDSP. This mechanism was developed as a flexible method for developers to make appropriate trade-offs between a small loss in audio quality and large performance gains, while still taking advantage of the hardware acceleration XDSP has to offer.

Sample Tool and Source Code

The IR transform tool included to assist you with transforming your impulse responses in time domain to frequency domain has been updated to include support for the reduction mechanism. The tool can be set to generate this table by passing a command line parameter to specify the quality (Between 0.0 and 99.9, whereby 0.0 means 99.9% of the energy of the impulse response will be retained, and 99.9 means 99.99% of the power will be retained). With this enabled, XDSP will not process the extremely low power samples of the impulse response (zero to near-zero values) in order to improve the processing speed. The code to set and write the reduction table is in one class called ImpulseResponseReduction in main.cpp file and the function that writes the reduction table is ImpulseResponseReduction::SetReductionBlock. This may be customized to fit your needs so long as the format of the reduction table is as specified below, allowing you to specify how many samples you wish to process for each impulse response block.

Reduction Table Format

The impulse response reduction mechanism works on the basis of a reduction block added to the end of the frequency-domain impulse response buffer. The reduction block is the size of one impulse response block and starts with a 4-byte signature equal to 0xFFFFACE1, followed by up to 15 entries of 4-byte structures. The rest of the block should be 0-filled. The 4-byte structure contain two 16-bit unsigned values: The cut-off frequency and the block index. An example is below:
This example is encoded in little-endian and translates to the below table: When XDSP processes such a reduction block, the following will occur:
  • The hardware will process the full impulse response block up until block 8 (Meaning the first 8 blocks, as blocks are 0-indexed).
  • From block 8 until block 86, the hardware will only process the first 384 samples of each block, discarding the rest of the samples as they are deemed to make very little impact to the output.
  • From block 86 until block 102, the hardware will only process the first 128 samples of each block, discarding the rest of the samples.
  • From block 102 until block 159, the hardware will only process the first 16 samples of each block, discarding the rest of the samples. As the impulse response in this example only has 158 blocks, this represents the last valid entry in the table.
  • The hardware only considers the next entry to be valid if it has a block index that is larger than the current entry; therefore, the rest of the table is populated with the last valid entry to indicate that they are invalid and to be ignored.
This scheme allows the hardware to perform less processing and thereby complete the requested operation at a faster rate, while also providing flexibility to developers to create their own algorithms for optimizing their impulse responses.

Notes

There are several items to take note of when implementing a custom algorithm for generating a valid impulse reduction table:
  • The block index must have a value of at least 8; in other words, the first 8 blocks of the impulse response must never be reduced.
  • The cut-off frequency must be a multiple of 16, and must be at least 16.
  • The cut-off frequency must not exceed the block size; this would be an invalid entry.
  • The impulse response reduction block must be the size of one full impulse response block. It is expected that the space after the table will be 0-filled.
  • When using a stereo impulse response with the reduction mechanism, a reduction block is expected at the end of each channel.
  • Please remember to account for the extra space of the impulse response reduction block when specifying the impulseResponseLengthInFloats parameter in XDspActivationParameters.

Reference API documentation

See also

XDSP Overview
Last modified on August 20, 2026