Page 2 of 2

Re: How to put 10 bit YUV 422 data into a DPX file?

Posted: 2009-06-24T02:27:15-07:00
by Nicola
My new suggestion is to plow the YUV422 to YUV444 10bit - so I don't have any quality loss. Now the only problem is that the DPX file doesn't store the right color space. The YUV DPX file obviously shows YUV as RGB colors. The BMP I store as well looks fine - showing the right colors! When I use "identify" for the YUV DPX file it says: "Colorspace: RGB". How can I fix this so the YUV DPX file is interpreted in the right way?

Here you can find the YUV DPX file: http://www.yourfilehost.com/media.php?c ... 01_YUV.dpx

And that's the code:

Code: Select all

          Magick::Blob cImageBlob( psRgbImage, iRgbArraySize * sizeof( short ) );
          Magick::Image cMagickImage( cImageBlob,
            Magick::Geometry( cDvsBuffer.getCols(), cDvsBuffer.getRows() )/*, 10*/, "YCbCr" );

          cMagickImage.level(
            0.0,    // black point
            1023.0, // white point (for 10bit)
            1.0 );  // mid point (1.0 seems to preserve the most unique colors)
          cMagickImage.depth( 10 );

          cMagickImage.colorSpace( MagickCore::YUVColorspace );

          cMagickImage.write( cDestFileName.str() + ".dpx" );

          // FOR TESTING: write also a BMP
          cMagickImage.write( cDestFileName.str() + ".bmp" );
Thanks in advance,
Nicola

Re: How to put 10 bit YUV 422 data into a DPX file?

Posted: 2009-06-24T03:33:50-07:00
by Nicola
OK, I found that the LogColorspace seems to be the one I need! Is this really the only possible solution?

Re: How to put 10 bit YUV 422 data into a DPX file?

Posted: 2009-06-24T06:03:06-07:00
by magick
You probably want the YCbCr colorspace. We're working on a patch to fully support this colorspace. YCbCR444 should be supported in the next point release and YCbCr422 is being worked on now.

Re: How to put 10 bit YUV 422 data into a DPX file?

Posted: 2009-06-24T06:48:05-07:00
by Nicola
magick wrote:You probably want the YCbCr colorspace. We're working on a patch to fully support this colorspace. YCbCR444 should be supported in the next point release and YCbCr422 is being worked on now.
Thanks, good to know...