GNOME Bugzilla – Bug 574461
mpeg2dec: Lower rank and make avdec_mpeg2video PRIMARY
Last modified: 2016-01-21 18:40:48 UTC
Hi, we should lower the rank of mpeg2dec and make ffdec_mpeg2video PRIMARY as it's much faster and I'm not aware of any issues with it. Comments? :)
In addition to being faster, it does direct-rendering in all cases, whereas mpeg2dec will only do it if the output width/height are multiples of 16 (basically this breaks for all HD content with a height of 1080 (mpeg2dec will decode internally to a height of 1088).
> Comments? :) Let's do that *after* the releases, not five minutes before we release ..
Agree with Tim. Removing blocker flag
Maybe we can do this now? If nobody has arguments against this I'll do it :)
100% ok with me !
commit 40c87181c5e9289c43ace1ceeca1b064755a4151 Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Tue May 12 11:19:00 2009 +0200 mpeg2dec: Lower rank to MARGINAL to make ffdec_mpeg2video the default ffdec_mpeg2video is much faster, fixes bug #574461. commit 2dd5e8f983e09b5a5d2977aa1cfad9f5cdb7e2ab Author: Sebastian Dröge <sebastian.droege@collabora.co.uk> Date: Tue May 12 11:20:08 2009 +0200 ffdec: Update rank of ffdec_mpeg2video to SECONDARY to make it the default ffdec_mpeg2video is much faster, fixes bug #574461.
This might have been a bad idea in the end: * on amd64 I'm seeing ffdec_mpeg2video being 10-20% slower than mpeg2dec (on any video size) * the interlaced format handling in ffmpeg is bad/poor * the colorspace isn't properly respected (it clamps the values) * the timestamping is a mess in ffmpeg to say the least (EVEN after the X-th attempt at fixing it in gst-ffmpeg) * mpeg2dec *HAS* a documented exhaustive API * mpeg2dec has always been more resilient to errors. Shoot me, we need to revert the situation... NOW !
commit 83bf3a9f37f4a5d3f56a727db19fb668d8482408 Author: Edward Hervey <bilboed@bilboed.com> Date: Wed May 13 19:32:16 2009 +0200 mpeg2dec: Revert ranking switch with ffdec_mpeg2video. Fixes #574461 commit 9fdc5a5d64cd7fd71d1bd568423b24c56461eacb Author: Edward Hervey <bilboed@bilboed.com> Date: Wed May 13 19:35:32 2009 +0200 gstffmpegdec: demote mpeg2 video decoding back to MARGINAL. Fixes #574461
Reopening because we never got to track down any of the issues then to be able to swap mpeg2dec and ffdec_mpeg2video ranks, with no open bugs to track this. libmpeg2 is not really maintained at all, so I believe we need some parties to step up and maintain it, or get the maintained backing code ffdec_mpeg2video preferred at least.
Edward, any news on this?
Still requires investigation :( quite a few issues from comment 7 still apply.
Yah, we really should switch back to having the libav decoder as PRIMARY. libmpeg2 hasn't been maintained in ... 7 years :( Items to check before switching: (In reply to comment #7) > * on amd64 I'm seeing ffdec_mpeg2video being 10-20% slower than mpeg2dec (on > any video size) [FIXED] It's now faster, by 50%. > * the interlaced format handling in ffmpeg is bad/poor That is a generic issue (See also bug #687684) > * the colorspace isn't properly respected (it clamps the values) Check colorimetry. > * the timestamping is a mess in ffmpeg to say the least (EVEN after the X-th > attempt at fixing it in gst-ffmpeg) [FIXED] > * mpeg2dec *HAS* a documented exhaustive API [FIXED] > * mpeg2dec has always been more resilient to errors. Debatable nowadays :)
Regarding colorimetry, after verifying on a few samples, the result seems correct
As before, something to try in 1.3, not shortly before 1.2. Also, both should work fine in all circumstances. If some decoder is broken in some way, lowering the rank is not helping, since it may still be plugged if the higher rank one is not installed.
Only 2 and a half year late :) commit e9a04cd1539d153b487f4606644d4d7c44fcb03e Author: Edward Hervey <edward@centricular.com> Date: Thu Jan 21 17:34:38 2016 +0100 mpeg2dec: Demote rank to SECONDARY https://bugzilla.gnome.org/show_bug.cgi?id=574461 commit da335a0ea368d2f71e2824adc3e027332db8a58c Author: Edward Hervey <edward@centricular.com> Date: Thu Jan 21 17:35:51 2016 +0100 avvidec: Bring mpeg video decoders up to PRIMARY rank We should have done that ages ago ... https://bugzilla.gnome.org/show_bug.cgi?id=574461
Ok, seems fair. We'll see of it goes, maybe ;-P About the direct rendering, I believe the ffmpeg stuff is a bit worst then the mpeg2dec current state, but with a 50% faster decoding speed, this is clearly not relevant. (In reply to Edward Hervey from comment #13) > Regarding colorimetry, after verifying on a few samples, the result seems > correct Colorimetry information is not currently passed from libav to gstreamer. So if your stream has default colorimetry for the frame size, it will be fine, otherwise, it will be wrong. libmpeg2 didn't expose the colorimetry of the decoded stream.