Kyle Mallory
Well-known member
- Joined
- Jan 18, 2007
- Messages
- 620
- Reaction score
- 0
- Points
- 0
- Age
- 54
- Location
- Salt Lake City
- Website
- www.ifastudios.com
I'm not sure why I'm writing this, but I've seen a number of comments, complaints, etc (perhaps even one or two of my own) about the lack of access to the RAW image in the RED SDK. And I want to share my opinion on the subject, for what it's worth.
Before I dig into my thoughts, let me pre-empt myself by saying that prior to B16, I had successfully decoded the R3D data, including image and audio. I had a fully functional, if slow, R3D workflow for IFX's Piranha that included 16bit audio, and 16b/component images. I had also decoded approximately 90% of the available metadata. The shortcomings of my decoder, was unable to process/color match the image using the metadata, and I had implemented only a few, very simple debayer algorithms.
I say this, so you'll understand that I've successfully faced the internals of the R3D file format, like few others outside of RED have. I have also had access to the RED SDK for OSX for a number of weeks now.
So, when I hear comments and criticism with statements like "RED should allow access to the RAW data via the SDK." I find myself perplexed. While I appreciate that some want to offload the debayer process to the GPU, the reality is, for 95% of what anyone and everyone wants to do with their RED footage, can be done using the SDK (minus audio) in its current form.
Additionally, there is as much, if not more processing occurring within the Wavelet/J2C decoding than in the debayer process. In my efforts, using an open source, reference J2C codec, processing a single R3D frame, it took almost 10x longer to decode the frame than it did to debayer it. Understanding that the library is not heavily optimized for performance (unlike RED's SDK), neither was my debayer algorithm.
The biggest problems I faced while implementing my decoder was calculating/populating the respective color transformation matrices necessary to apply the metadata to the "RAW" image to give me the "one light" result.
There are countless algorithms and articles on how to calculate and apply color, tint, white balance, exposure, etc, but unless you have the same "magic numbers" that RED has (ISO 250 = XyZ transform, you will never match the final output of RedCine with that of your own home-grown solution. If you can't match the image characteristics of RED, aside from Timecode and the upcoming lens i/data, then there is absolutely not point to having the metadata.
Understand this: If the metadata is meaningless, then so is the image. Without it, there is little more than your subjective eye that can be used to quantify the results that you get from the RAW, bayered data. Without the SDK, and its internal processing of the RAW image/metadata, any image you might get is essentially worthless. In other words, if you want access to the RAW/debayered data, you might as well throw away the SDK, because the beauty and value of what the SDK offers is its ability to do that magic processing of the image data into something that is quantifiable.
Now, there is an argument that can be made for having "unprocessed frames of 'RAW' RGB data., leaving the work of color matching, exposure compensation, etc. to your favorite application, and bypassing all the metadata and leaving it to your subjective eye. You can still do this with the RED SDK (since it returns an image of RGB data). Simply set the gain values to 1.0, the curve flat, the white balance to 5000 Kelvin, ASA/ISO to 320, color space to Linear or CameraRAW, and everything else to 0.0 or 1.0 (whatever the default is), and you should be getting an unprocessed image.
So, please don't bash RED for not giving you access to the RAW image. Chances are good, if you are like me, you wouldn't know what to do with it anyway. :blink:
Now, having defended RED in this regard, I do want to voice my frustration at the very RED notion of trying to make the R3D format proprietary, and not publishing the specs for the format and the magic numbers of the transformation matrices. I get that RED has intellectual property here, but, having gone through the R3D format myself once already, let me be the first to say, there is little proprietary about it (aside from those magic numbers). RED has stated, at the discontinuation of some of their products such as the matte box, etc. that RED is a CAMERA company. Not a camera accessory company.
I am disappointed that RED has chosen to selectively ignore this position when it comes to their software (Sorry Deanan, Rob, Greame). If RED was truly a Camera company, they would have made life simple for everyone and simply adopted the DCI standard of JPEG2k and MXF as the "data standard", and focused solely on making a camera that "Just works". Pick a standard, or *publish* your own, and let all the software companies do what they do best, write software; while RED, as a camera company does what they do best, build kick-ass cameras. Sure, go ahead, give Apple and Scratch the heads up, and let them build their software. MiniDV and MPEG-2 fought with differences in codec implementations, and occasionally Sony or Pana or Canon would argue "Its the codec..." and someone would do a little research, and blog about it, and it would get discussed to death on DvxUser or DVINFO, but then a general consensus would be reached about a new, better software codec from MainConcepts, or Cineform, or Sorensen, or JimBob's custom SSE2-optimized codec, and everyone would move on, better for it-- and Panasonic/Sony/JVC/Canon would go back to what they do best, making overpriced bricks of plastic and silicone and copper, and calling them Cameras.
So, to finish my general rant... RED: Fix your post workflow, fast, or give it to the community, and let natural selection do what it does best. Everyone else, in the meantime, pipe-down and be glad that the SDK gives you RGB processed data, instead of RAW bayered data. You'd be pissing and moaning even more if the didn't process it for you.
You're comments, criticism, and corrections are welcome. It's late, I've got a headache, and need to go to bed.
Before I dig into my thoughts, let me pre-empt myself by saying that prior to B16, I had successfully decoded the R3D data, including image and audio. I had a fully functional, if slow, R3D workflow for IFX's Piranha that included 16bit audio, and 16b/component images. I had also decoded approximately 90% of the available metadata. The shortcomings of my decoder, was unable to process/color match the image using the metadata, and I had implemented only a few, very simple debayer algorithms.
I say this, so you'll understand that I've successfully faced the internals of the R3D file format, like few others outside of RED have. I have also had access to the RED SDK for OSX for a number of weeks now.
So, when I hear comments and criticism with statements like "RED should allow access to the RAW data via the SDK." I find myself perplexed. While I appreciate that some want to offload the debayer process to the GPU, the reality is, for 95% of what anyone and everyone wants to do with their RED footage, can be done using the SDK (minus audio) in its current form.
Additionally, there is as much, if not more processing occurring within the Wavelet/J2C decoding than in the debayer process. In my efforts, using an open source, reference J2C codec, processing a single R3D frame, it took almost 10x longer to decode the frame than it did to debayer it. Understanding that the library is not heavily optimized for performance (unlike RED's SDK), neither was my debayer algorithm.
The biggest problems I faced while implementing my decoder was calculating/populating the respective color transformation matrices necessary to apply the metadata to the "RAW" image to give me the "one light" result.
There are countless algorithms and articles on how to calculate and apply color, tint, white balance, exposure, etc, but unless you have the same "magic numbers" that RED has (ISO 250 = XyZ transform, you will never match the final output of RedCine with that of your own home-grown solution. If you can't match the image characteristics of RED, aside from Timecode and the upcoming lens i/data, then there is absolutely not point to having the metadata.
Understand this: If the metadata is meaningless, then so is the image. Without it, there is little more than your subjective eye that can be used to quantify the results that you get from the RAW, bayered data. Without the SDK, and its internal processing of the RAW image/metadata, any image you might get is essentially worthless. In other words, if you want access to the RAW/debayered data, you might as well throw away the SDK, because the beauty and value of what the SDK offers is its ability to do that magic processing of the image data into something that is quantifiable.
Now, there is an argument that can be made for having "unprocessed frames of 'RAW' RGB data., leaving the work of color matching, exposure compensation, etc. to your favorite application, and bypassing all the metadata and leaving it to your subjective eye. You can still do this with the RED SDK (since it returns an image of RGB data). Simply set the gain values to 1.0, the curve flat, the white balance to 5000 Kelvin, ASA/ISO to 320, color space to Linear or CameraRAW, and everything else to 0.0 or 1.0 (whatever the default is), and you should be getting an unprocessed image.
So, please don't bash RED for not giving you access to the RAW image. Chances are good, if you are like me, you wouldn't know what to do with it anyway. :blink:
Now, having defended RED in this regard, I do want to voice my frustration at the very RED notion of trying to make the R3D format proprietary, and not publishing the specs for the format and the magic numbers of the transformation matrices. I get that RED has intellectual property here, but, having gone through the R3D format myself once already, let me be the first to say, there is little proprietary about it (aside from those magic numbers). RED has stated, at the discontinuation of some of their products such as the matte box, etc. that RED is a CAMERA company. Not a camera accessory company.
I am disappointed that RED has chosen to selectively ignore this position when it comes to their software (Sorry Deanan, Rob, Greame). If RED was truly a Camera company, they would have made life simple for everyone and simply adopted the DCI standard of JPEG2k and MXF as the "data standard", and focused solely on making a camera that "Just works". Pick a standard, or *publish* your own, and let all the software companies do what they do best, write software; while RED, as a camera company does what they do best, build kick-ass cameras. Sure, go ahead, give Apple and Scratch the heads up, and let them build their software. MiniDV and MPEG-2 fought with differences in codec implementations, and occasionally Sony or Pana or Canon would argue "Its the codec..." and someone would do a little research, and blog about it, and it would get discussed to death on DvxUser or DVINFO, but then a general consensus would be reached about a new, better software codec from MainConcepts, or Cineform, or Sorensen, or JimBob's custom SSE2-optimized codec, and everyone would move on, better for it-- and Panasonic/Sony/JVC/Canon would go back to what they do best, making overpriced bricks of plastic and silicone and copper, and calling them Cameras.
So, to finish my general rant... RED: Fix your post workflow, fast, or give it to the community, and let natural selection do what it does best. Everyone else, in the meantime, pipe-down and be glad that the SDK gives you RGB processed data, instead of RAW bayered data. You'd be pissing and moaning even more if the didn't process it for you.
You're comments, criticism, and corrections are welcome. It's late, I've got a headache, and need to go to bed.