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.

a problem with the _mem4 function

hello everyone,when I using the The _mem4 function, a error that evaluation operation's left operand must be the left value is arise.

however,the other Compiler Intrinsics is right.

the called function gets the gray image :

        void getGrayImageFromUYVY(

char * restrict grayImg,

  const char *  imageData,

int grayImageSize

 )

{

int i;

for(i=grayImageSize; i>7; i-=8){

_mem4(grayImg) = _packh4(_hi(_memd8_const(imageData)),_lo(_memd8_const(imageData)));

_mem4(grayImg + 4) = _packh4(_hi(_memd8_const(imageData+8)),_lo(_memd8_const(imageData+8)));

grayImg+=8;

imageData += 16;

}

}

 

     could you hlep me?

      thanks

      xianfeng

  • I copy pasted your function and it compiles fine for me.  Are you talking about a compilation error, or an execution error?  Could you copy paste the exact error you are getting?

  •     hi MattLipsey,

        I am using the DM6446,MVL5.0 and the DVSDK Version 2_00_00_22 ,I build the videnc_copy codec that contains the getGrayImageFromUYVY()function under       "dvsdk_2_00_00_22/codec_engine_2_23_01/examples/ti/sdo/ce/examples/codecs/videnc_copy",a compilation error  occurred:videnc_copy.c:337:evaluation operation's left operand must be the left value .But I  found the reasion was I called the Intrinsics _mem4().

            However,And then I rebuild the videnc_copy codec under"dvsdk_2_00_00_22/dm6446_dvsdk_combos_2_05/packages/ti/sdo/codecs",It's  right!

                Now,the problem has been solved,but I don't know the real cause.Is because the environment configuration?