This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

the use of vicp pack function

Hi,

I used the VICP API function CPIS_YCbCrPack() to realize the YUV444P->YUV444I, however I found the output data is errored.

The result as follow: 

And the pui8YComponent is the YUV444I output data, the pui8RComponent is the input Y data, pui8GComponent is the input Cb data, pui8BComponent is the input Cr data.

My code as follow: 

PackBase.srcFormat[0] = CPIS_YUV_444P;
PackBase.srcBuf[0].ptr = pui8RIn;
PackBase.srcBuf[0].stride = i32Width;
PackBase.srcBuf[1].ptr = pui8GIn;
PackBase.srcBuf[1].stride = i32Width;
PackBase.srcBuf[2].ptr = pui8BIn;
PackBase.srcBuf[2].stride = i32Width;
PackBase.dstFormat[0] = CPIS_YUV_444ILE;
PackBase.dstBuf[0].ptr = pui8BGROut;
PackBase.dstBuf[0].stride = i32Width;
PackBase.procBlockSize.width = 16;
PackBase.procBlockSize.height = 16;
PackBase.roiSize.width = i32Width;
PackBase.roiSize.height = i32Height;
PackBase.numInput = i32Width*i32Height;
PackBase.numOutput = i32Width*i32Height;

PackParms.colorSpace = CPIS_444_8BIT_TO_444_8BIT;
PackParms.qShift = 0;
PackParms.sat_high = 255;
PackParms.sat_high_set = 255;
PackParms.sat_low = 0;
PackParms.sat_low_set = 0;
PackParms.scale = 1;

Could you give me some advices? Thanks.

Regards,

Tianxing

  • Hi,

    Can you try the GPP_YCbCrPack() version, does it output the same thing ?

    regards,

    Victor

  • Hi Victor,

    I try the GPP_CPIS_YCbCrPack( ), and I modified the _GPP_YCbCrPack.c line 140 as follow:

    else if (colorSpace == CPIS_444_8BIT_TO_444_8BIT) {
                  *dst++ = *src2++ * scale;                    -->              *dst++ = *src2++ * scale;
                  *dst++ = *src1++ * scale;                    -->              *dst++ = *src1++ * scale;
                  *dst++ = *src1++ * scale;                    -->              *dst++ = *src3++ * scale;
                  *dst++ = *src3++ * scale;                    -->              *dst++ = *src2++ * scale;
                  *dst++ = *src3++ * scale;                    -->              *dst++ = *src1++ * scale;
                  *dst++ = *src2++ * scale;                    -->              *dst++ = *src3++ * scale;
    }
    else if (colorSpace == CPIS_422_8BIT_TO_444_8BIT) {
                  *dst++ = *src2 * scale;                        -->               *dst++ = *src2++ * scale;
                  *dst++ = *src1++ * scale;                   -->                *dst++ = *src1++ * scale;
                  *dst++ = *src1++ * scale;                   -->                *dst++ = *src3++ * scale;
                  *dst++ = *src3 * scale;                        -->                *dst++ = *src2++ * scale;
                  *dst++ = *src3++ * scale;                   -->                *dst++ = *src1++ * scale;
                  *dst++ = *src2++ * scale;                   -->                *dst++ = *src3++ * scale;
    }

    And the output data is correct.

    What should I do if I want to get the corrected output data used the CPIS_API.

    Regrads,

    Tianxing

  • Hi Tianxing,

    The implementation of imxenc_YCbCrPack() called in _YcbCrPack.c must be changed. We can provide you the name of a 3rd party who could do it.

    regards,

    Victor

  • Hi Victor,

    Should I wait for some days?

    It is so urgent for us, could you help us contact them, thanks.

    regards,

    Tianxing.

  • Hi Victor,

    Could you tell me the name and the way of contact of a 3rd party who could resolve my problem.

    Thank you.

    Tianxing

  • Hi Tianxing,

    Are you still chasing behind your problem? Let me know if you need any help.