[FFmpeg-devel] PATCH - libmad MP3 decoding support
David Fletcher
David at megapico.co.uk
Tue May 3 01:50:01 EEST 2022
On 2/5/2022, "Martin Storsjö" martin at martin.st wrote:
> That sounds like there's an issue with some of the ARM implementations of
> DSP functions, that only exists in implementations for less featureful ARM
> instruction sets.
>
> (It could theoretically be a compiler bug also but I think it's much more
> probable that it's a bug in a seldom used codepath in ffmpeg.)
>
> If you pass "-cpuflags 0" to ffmpeg, does the issue vanish? (If it does,
> it would suggest an issue in e.g. an armv5/armv6 specific implementation
> of some DSP functions.) Does if vanish if you configure with
> --arch=generic? (That would omit all ARM specific DSP routines and just
> use plain C code.)
>
> On a more modern ARM cpu, if it works correctly normally, does the issue
> appear if you use "-cpuflags 0"? That would indicate an issue in one of
> the ARM specific routines that are enabled without cpuflags (e.g. that
> don't require anything above armv4).
>
Hi Martin,
Thanks for these tips. I've posted a bug tracker about this issue, and
also created some sample audio files that demonstrate things working
well on ARMv7, but with distortion on ARMv4.
https://trac.ffmpeg.org/ticket/9764
So far I've been using the libav libraries rather than ffmpeg so it's
not so easy to pass "-cpuflags 0". But this is I think doing the same
thing I've been doing with when configuring to compile FFmpeg. I tried
a range of --disable-vfp --disable-neon --enable-asm or --disable-asm.
I could not find a combination that makes the issue go away. As you say,
that could well indicate something in an ARM routine that always runs,
and is not superseded by an ARM5 or higher alternative when the CPU can
handle that.
I've not tried --arch=generic. I'm cross-compiling on x86 targeting
ARMv4 so the cross-compile will stop working properly if I take out
--arch=armv4t.
I'll do some further investigation and see if I can create ffmpeg
through the cross-compilation rather than the transcode program I've
been using (this is based on the example transcode_aac).
Many thanks, David.
More information about the ffmpeg-devel
mailing list