• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Color shifting with r408
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Color shifting with r408


  • Subject: Re: Color shifting with r408
  • From: Robert Monaghan <email@hidden>
  • Date: Wed, 23 Dec 2009 16:04:32 -0800

Hi Darrin,

I am supporting Rec709 at the moment. All of my testing has been specifically with this colorspace.
I pay attention to the colorInfo, so that I can select the appropriate matrix.

Here is what I have for 709:

toYCbCrCoeff[0][0] = 0.2126;
toYCbCrCoeff[0][1] = 0.7152;
toYCbCrCoeff[0][2] = 0.0722;
toYCbCrCoeff[1][0] = -0.114572;
toYCbCrCoeff[1][1] = -0.385428;
toYCbCrCoeff[1][2] = 0.5;
toYCbCrCoeff[2][0] = 0.5;
toYCbCrCoeff[2][1] = -0.454153;
toYCbCrCoeff[2][2] = -0.045847;


toRgbCoeff[0][0] = 1.0;
toRgbCoeff[0][1] = 0.0;
toRgbCoeff[0][2] = 1.5748;
toRgbCoeff[1][0] = 1.0;
toRgbCoeff[1][1] = -0.187324;
toRgbCoeff[1][2] = -0.468124;
toRgbCoeff[2][0] = 1.0;
toRgbCoeff[2][1] = 1.8556;
toRgbCoeff[2][2] = 0.0;

Beyond that, I am using a fairly straight forward set of math, to match.
I am not sure if a 1.8/2.2 gamma shift is needed. There doesn't appear to be any flags that would indicate the need.
(At least for Snow Leopard.) I am finding that the requested colorspace is rec709.

Let me know if you need more details.

Thanks!

bob.


On Dec 23, 2009, at 2:54 PM, Darrin Cardani wrote:

On Dec 23, 2009, at 2:32 PM, Robert Monaghan wrote:

I am working on a FxPlug Filter. I have created a simple filter that uses both r408 and r4fl.
Currently, the filter takes incoming r408 (or r4fl) bytes, converts them to RGB, does some work, and then back to r408.

I am having a really difficult time trying to get the r408 image to match the r4fl image. The r4fl is always darker than the r408.
I am on Snow Leopard, testing with Final Cut Pro 7.0.1. I am using a scale value of 255/219 on the incoming Y channel,
and a value of 219/255 to scale back out.
The formula looks something li

The odd part about this, is that the code that I normally use in my QuickTime component to convert from r408/r4fl to RGB (and back) doesn't work with this API.
I get color shifting with r408 and luminance problems with r4fl.

Can anyone suggest some ways of tweaking the YCbCr <-> RGB code to get a match? (Or better yet, post a recommended C code sample for both r408 and r4fl).


Can you be more specific? What matrices are you using for the conversion? Are you checking to see whether you're getting Rec 601 or Rec 709? Are both cases broken?

Darrin
--
Darrin Cardani
email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Color shifting with r408
      • From: Darrin Cardani <email@hidden>
References: 
 >Color shifting with r408 (From: Robert Monaghan <email@hidden>)
 >Re: Color shifting with r408 (From: Darrin Cardani <email@hidden>)

  • Prev by Date: Re: Color shifting with r408
  • Next by Date: Re: Color shifting with r408
  • Previous by thread: Re: Color shifting with r408
  • Next by thread: Re: Color shifting with r408
  • Index(es):
    • Date
    • Thread