[MPlayer-dev-eng] MPlayer/MEncoder crash on using -vf scale and expand together. Fix attached.

Alex C alexc.xander at yahoo.in
Fri Oct 28 19:49:23 CEST 2011


Sorry for the f***-up on diff'ing. That's what I get for depriving myself of sleep:-( (due to watching recorded TV shows---that's why I convert so many videos with strange scaling etc.).


> The part that is missing is why libswscale requires alignment (also, how
> much? After this change it's still pure chance if our provided stride
> and what libswscale needs match) and why that should be acceptable.
> So far it looks to me like libswscale just has a single broken SSE3
> function that requires more alignment than it may.

The reason libswscale requires alignment is that the culprit SSE3 function (yuv2yuvX_sse3) has been added very recently. This has led to the new alignment requirement, which was exposed as the ffmpeg bug which I mentioned earlier. This will affect all users of libswscale, IMHO. Michael N. corrected it in the ffmpeg frontend (through libavfilter), but MPlayer doesn't use libavfilter, so a similar correction was needed. More thought on this is needed.


I also wonder if the alignment requirement could decrease performance to the point that the SSE3 optimisation becomes meaningless, but I've not been able to measure any difference either way. Encoding still takes up the lion's share of CPU time and scaler efficiency is not a factor even on a slow single core like mine.


As for libswscale being broken, I can only say Amen!
I remember a long talk I had on #mplayer with Compn; he said that libswscale is the oldest and cruftiest code in mplayer and possibly no-one understands its inner working anymore, except perhaps michaelni. Exaggeration being accounted for, I don't think he was far off the mark. libswscale's working is so opaque that no-one can clarify what it does when scaling. I prefer to use AVISynth's resizers when I can, but I use GNU/Linux with wine being a pain. Also, avs2yuv does not integrate well with mencoder. The devs must re-evaluate libswscale. Perhaps it is better going with libavfilter. I'm seriously evaluating y4mscaler for my personal use now after this (yet another) libswscaler fiasco.

Thanks.

---
AC

Live Free Or Die


More information about the MPlayer-dev-eng mailing list