[FFmpeg-devel] [PATCH 09/13] avcodec/svq1dec: clear MMX state after MB decode loop
wm4
nfxjfg at googlemail.com
Mon Oct 24 23:00:56 EEST 2016
On Mon, 24 Oct 2016 21:53:22 +0200
Henrik Gramner <henrik at gramner.com> wrote:
> On Mon, Oct 24, 2016 at 9:34 PM, wm4 <nfxjfg at googlemail.com> wrote:
> > a ASM function must, according to the calling convention, reset the
> > MMX state when returning.
> >
> > What FFmpeg does here was misdesigned from the very start.
>
> The decision to issue emms manually instead of after every MMX
> function was a deliberate decision. I'd hardly call it "misdesigned"
> to make SIMD code twice as fast at the cost of technically abusing the
> ABI, which has worked flawlessly for years until very recently.
It's still clearly not a good idea because it violates the ABI directly.
OK let's get back to the "practical" argument that we have not much of
a choice but to violate the ABI.
Then at least the "weaker" assumption, that emms should be called before
calling (or returning to) functions that don't explicitly support MMX,
should be followed.
More information about the ffmpeg-devel
mailing list