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.

DM642 JPEG

Dear all:

        Now I am start a routine(jpeg_loopback) in your company,I want to modify the routine to realize optical communications, a circuit board(DM642)used for the encoded data sent, circuit board to receive another one. The sender doesn’t pick up a camera and display screen, the receiver receives the camera and display screen.But now I have a question is that the encoded data(jpg_img[300]) could be sent through a serial port,and the receiver receives the data to fill in the decoding side. At this point theoretically displays should be black,there should be no images,but there is some images to come out,I do not know  why? When I put the parameters of jpg_img[300] in the 300 to 1000,but there have been a mistake in decoding, program execution to decode to stop.I donot know why ? I think the screen appears on the image ,but in fact is not. I donot know whether this data is written into the array in jpg_img[300]. Please help me,thanks! Please forgive my poor English! Thanks.

//Below is my program

chanHandle = &thrProcess.chanListEncode[i];
chanHandle->state = CHAN_ACTIVE;

// Channel Input
inBuf[0] = pMsgBuf->bufY;
inBuf[1] = pMsgBuf->bufU;
inBuf[2] = pMsgBuf->bufV;
ICC_setBuf( chanHandle->cellSet[0].inputIcc[0],
inBuf, sizeof(void *) * 3 );

// Channel Output
// outBuf[0] = &jpg_size;
outBuf[1] = jpg_img;
ICC_setBuf( chanHandle->cellSet[0].outputIcc[0],
outBuf, sizeof(void *) * 2 );
// UTL_logDebug1("ade3: %x", jpg_size);
// buffer=jpg_size;
// Execute Channel
CHAN_execute( chanHandle, framenum );

// Tell the capture routine we're done
SCOM_putMsg( fromProctoInput, pMsgBuf );
// UTL_logDebug1("%x", jpg_size);
//
IdentifyHeader();      //Detection of the frame head
//Receive the encoded data

for(k=0;k<25600;k++)
{
jpg_img[k]=QXDDM642_UART_getChar(QXDuartHandleA);

}
//
// Handle Decode Channel
//
chanHandle = &thrProcess.chanListDecode[i];
chanHandle->state = CHAN_ACTIVE;

// inBuf[0] = &jpg_size;
inBuf[1] = jpg_img;
//UTL_logDebug1("ade3: %d", jpg_size);
//for(k=0;k<128*1000;k++)
// UTL_logDebug1("ade4: %x",jpg_img[k]);
ICC_setBuf( chanHandle->cellSet[0].inputIcc[0],
inBuf, sizeof(void *) * 2 );

outBuf[0] = (void *)dec_out_y;
outBuf[1] = (void *)dec_out_u;
outBuf[2] = (void *)dec_out_v;
ICC_setBuf( chanHandle->cellSet[0].outputIcc[0],
outBuf, sizeof(void *) * 3 );

// Execute Channel
CHAN_execute( chanHandle, framenum );

// Send the buffer to the display task
pMsgBuf = SCOM_getMsg(fromOuttoProc, SYS_FOREVER);

pMsgBuf->bufY = (void *)dec_out_y;
pMsgBuf->bufU = (void *)dec_out_u;
pMsgBuf->bufV = (void *)dec_out_v;
SCOM_putMsg(fromProctoOut,pMsgBuf);
HeadFlag1=0;