RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 755777 - Submit patch upstream and in Red Hat for adding color-matrix for color conversions to ffmpegcolorspace Gstreamer plugin
Summary: Submit patch upstream and in Red Hat for adding color-matrix for color conver...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: gstreamer-plugins-base
Version: 6.1
Hardware: All
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Benjamin Otte
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks: 782183
TreeView+ depends on / blocked
 
Reported: 2011-11-22 02:29 UTC by Heath Petty
Modified: 2018-12-01 18:48 UTC (History)
7 users (show)

Fixed In Version: gstreamer-plugins-base-0.10.29-2.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-11-20 13:43:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
What its supposed to look like (10.34 KB, image/jpeg)
2011-11-22 02:29 UTC, Heath Petty
no flags Details
test movie (350.34 KB, video/quicktime)
2011-11-22 02:30 UTC, Heath Petty
no flags Details
patch to gstreamer plugin (1.27 KB, patch)
2011-11-22 02:30 UTC, Heath Petty
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:1473 0 normal SHIPPED_LIVE gstreamer-plugins-base enhancement update 2012-11-20 18:43:00 UTC

Description Heath Petty 2011-11-22 02:29:35 UTC
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.

Comment 1 Heath Petty 2011-11-22 02:30:28 UTC
Created attachment 534900 [details]
test movie

Comment 2 Heath Petty 2011-11-22 02:30:56 UTC
Created attachment 534901 [details]
patch to gstreamer plugin

Comment 3 Benjamin Otte 2011-11-22 17:22:33 UTC
Filed upstream as https://bugzilla.gnome.org/show_bug.cgi?id=664579

Comment 6 RHEL Program Management 2012-07-10 06:27:49 UTC
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.

Comment 7 Daniel Kinon 2012-07-10 15:15:47 UTC
(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

Comment 8 RHEL Program Management 2012-07-10 23:22:22 UTC
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.

Comment 9 RHEL Program Management 2012-09-07 05:18:08 UTC
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.

Comment 13 Benjamin Otte 2012-09-19 13:10:30 UTC
Did a uild with the patch applied.

Comment 18 errata-xmlrpc 2012-11-20 13:43:49 UTC
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


Note You need to log in before you can comment on or make changes to this bug.