[FFmpeg-user] ADPCM block size for XAudio

Martin Wahnschaffe wahnschaffe at gmail.com
Thu Feb 8 09:02:04 EET 2018


>
> Took a bit more than a few minutes, but I managed to compile using MSYS2.
> It means that some dependencies aren't included, but for testing it's ok.
>
> I changed the BLKSIZE constant to 512 and it still didn't work with XAudio.
>
> So I took a closer look at the code. Turns out that the BLKSIZE constant
> is actually used to set the block_align value. Microsoft measues the size
> of a block in samples (
> https://msdn.microsoft.com/de-de/library/windows/desktop/ee415711(v=vs.85).aspx).
> This seems to be different from the block_align used in adpcmenc.c. My
> impression is that frame_size is instead what has to be between 32 and 512.
>
> I tested this by setting BLKSIZE to 70. With my mono wave file this
> resulted in a frame_size of 128 = (BLKSIZE - 7 * avctx->channels) * 2 /
> avctx->channels + 2.
>
> The resulting compressed file is working with XAudio.
>
> I am very unsure if this is the right thing to do.
>

So what should we do about this? Any chance to introduce ADPCM XAudio
compatibility into ffmpeg? There is a lot of games that could profit from
this.


More information about the ffmpeg-user mailing list