I wanted to convert YUY2 to YUV422, but the color of the image was not correct after calling ippiYCbCr422_8u_C2P3R().
I successfully converted to YUV422 by YUY2 -> YUV420 -> YUV422 for the same data.
It seems to me that ippiYCbCr422_8u_C2P3R() has a bug.
連結已複製
The YUY2 -> YUV422 was not implemented originally in UMC::ColorSpaceConversion, but I added the branch in
ColorSpaceConversion::GetFrame
{
...
switch
(srcFormat) {...
case YUY2:
switch (dstFormat) {
...
case
YUV422: status = ippiYCbCr422_8u_C2P3R(pSrc[0], pSrcStep[0], pDstYVU, pDstStepYVU, srcSize); break;}
}
}
After I added the code, I just used the VideoProcessing object to do the conversion:
pYUV422_8bit
->SetAlignment(16); pYUV422_8bit->Init(width, height, YUV422, 8); pYUV422_8bit->Alloc(); ret = m_pVideoProcessing->GetFrame(pYUY2_8bit,pYUV422_8bit);The result was not correct.
But I could do the conversion in two steps like
YUY2 -> YUV420 -> YUV422
may be the issue is in the way you call this function, I mean parameters you put into function may not correlate with what function expecting?
This function work quite perfectin IPPJPEG codec (JPEGView sample).
Regards,
Vladimir
