CIppImage * pImage = new CIppImage();Note: I've tried ippiYUV422ToRGB_8u_C2C3R as well.
Ipp8u* pAux = ippiMalloc_8u_C3(s.width, s.height * 2, &auxStep);
Ipp8u* pMiddle = pAux + (auxStep * s.height);
ippError = ippiYCbCr422ToBGR_8u_C2C3R((Ipp8u*)imaging.gpLeftBuffer, gDstStep, pAux, auxStep, s);
ippError = ippiYCbCr422ToBGR_8u_C2C3R((Ipp8u*)imaging.gpRightBuffer, gDstStep, pMiddle, auxStep, s);
CIppImage * pImage = new CIppImage();And copy the RGB data into it:
s.height *= 2;
success = pImage->Alloc(s, 3, 8);
pImage->CopyFrom(pAux, auxStep, s);
pJpegSettings->quality = 8;
pJpegSettings->restart_interval = 0;
pJpegSettings->huffman_opt = 0;
pJpegSettings->point_transform = 0;
pJpegSettings->predictor = 1;
pJpegSettings->use_qdct = 1;
pJpegSettings->mode = JPEG_BASELINE;
pJpegSettings->color = JC_UNKNOWN;
pJpegSettings->sampling = JS_422;
pJpegSettings->dct_scale = JD_1_1;
pJpegSettings->comment_size = 0;Do you guys have any idea what is the problem here ?
If your input format is YUY2 (YCbCr422) then you can use IPP JPEG codec directly. You need to set input color as JC_YCBCR and input sampling as JS_422. Note, codec do not support resampling, that means you also need to specify JPEG color as JC_YCBCR and JPEG sampling as JS_422.
Be aware that quality level you are using (8) is very low. You will get lot of compression artifacts as a result. Of course compression ration will be higher. Usually, level 75 provides good tradeoff for generic applications.