Hi Darrin,
The sequence settings are generally set to a ProRes 422 flavor. I have been testing with 422 HQ. Its a long story, but I am prototyping a new product. I have transcoded footage into ProRes for testing. This seems to work really well for my tests. The color shifting/gamma/luminance problem is identical whether I am using ProRes or my custom QuickTime format.
I have a sample XCode project that does a simple r408->RGB and back. (It also has a r4fl conversion too.) Would it be helpful to send this to you?
Thanks! (And merry xmas!)
bob..
On Dec 23, 2009, at 4:29 PM, Darrin Cardani wrote: Robert, Those look correct to me. The gamma should be 2.2, so you shouldn't need to do any conversion. (BTW, you can use the [-FxImage colorInfo] method to get that information.) What are your sequence settings?
Darrin
On Dec 23, 2009, at 4:04 PM, Robert Monaghan wrote: 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
|