Hide Forgot
Created attachment 534898 [details] What its supposed to look like Description of problem: The enclosed patch applies to current HEAD of Gstreamer Base Plugins and adds a small option to prevent colorspace loss / scaling when transcoding from high fidelity JPEG types to other encoders that can accept the those colorspaces (like H.264 encoders). Please submit this minimal patch to the Gstreamer project on our behalf. How reproducible: Always. Steps to Reproduce: 1. Download attached .mov file and run: gst-launch filesrc location=pluge.mov ! qtdemux ! jpegdec ! xvimagesink 2.Compare against the patched version and run: t-launch filesrc location=pluge.mov ! qtdemux ! jpegdec ! video/x-raw-yuv,color-matrix=\(string\)jpeg ! ffmpegcolorspace ! video/x-raw-yuv,color-matrix=\(string\)hdtv ! xvimagesink 3. Actual results: Colors are lost Expected results: being able to specify color-matrix we get a proper display of the video. Attached is a jpeg of what it should look like. Additional info: There are various ways one can interpret data thats in YUV or Y'CbCr format. There are a few different flavors which assume that RGB (0,0,0) is mapped to Y'CbCr (16,128,128), and RGB (255, 255, 255) is mapped to Y'CbCr (235,128,128). People I talk with frequently call this 'scaled range', 'SMPTE range', 'video range', '0-700 mV', or something to that effect. Common versions of this include "rec709" and "601" (or hd and sd). There are a few other flavors which assume that RGB (0,0,0) is mapped to Y'CbCr (0,128,128), and RGB (255,255,255) is mapped to Y'CbCr(255,128,128). Most notiable of these is jpeg. Some folks call these spaces broadly "full range". Most everyone doing "video" assumes that Y'CbCr means the first case. So when we write video formats (theora, webm, h.264, etc), it's safest to format your frames in the correct color space - or at least the correct color range. However, our default color space for data that we're transcoding is in one of the "full range" spaces (they're photojpeg quicktimes). Yes, color space intent can be signalled via metadata, but everyone assumes metadata is wrong :) Anyway, ffmpegcolorspace in gst-plugins-base-0.10.35 includes a transform which gets most of what we want. It's not *entirely* correct, but it does already exist. The existing implementation simply rescales the components, while a more correct implementation would rematrix the source Y'CbCr to the dest Y'CbCr. This patch exposes the exsting ffmpegcolorspace implementation via the color-matrix caps.
Created attachment 534900 [details] test movie
Created attachment 534901 [details] patch to gstreamer plugin
Filed upstream as https://bugzilla.gnome.org/show_bug.cgi?id=664579
This request was not resolved in time for the current release. Red Hat invites you to ask your support representative to propose this request, if still desired, for consideration in the next release of Red Hat Enterprise Linux.
(In reply to comment #6) > This request was not resolved in time for the current release. > Red Hat invites you to ask your support representative to > propose this request, if still desired, for consideration in > the next release of Red Hat Enterprise Linux. I'm going to need clarification on why this issue is being pushed again when there is a perfectly good tested patch attached to this ticket and ready to go. Thanks, -Dan
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development. This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.
This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate, in the next release of Red Hat Enterprise Linux.
Did a uild with the patch applied.
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2012-1473.html