[FFmpeg-devel] [PATCH 3/6] avformat/s337m: New ff_s337m_probe()

Nicolas Gaullier nicolas.gaullier at cji.paris
Fri Feb 17 12:12:33 EET 2023

> The logic here is a bit hairy and I don't have time atm to digest it, but is it entirely contained in S337m or would one need to read other specs too?

ff_s337m_probe is very similar to s337m_probe: what mainly differs is the input parameters.
The one little thing I added is the S337M_PROBE_GUARDBAND_MIN_BYTES.
Currently it is set to 0, so has no effect (and of course I can remove it if someone object).
There is two things to know about it:
- one is that some DolbyE decoder implementations does not support the s337m sync word to be the first word,
A minimal guard band (full of zero) is required in such a case : 1 word is enough in the cases I experimented.
One developer might find it useful to set S337M_PROBE_GUARDBAND_MIN_BYTES to 1 in order to ffprobe-qc/reject such files.
- one other thing is that, currently, the detection is based on 3 consecutive samples,
But there are other implementations in the wild. A common single-sample implementation is to simply require
a sufficient S337M_PROBE_GUARDBAND_MIN_BYTES in order to avoid a fake detection.
(for 16 bits, this is really dangerous!; for 24 bits, I think it is fair but would still require some little additions to be 100% sure).


More information about the ffmpeg-devel mailing list