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.

Some problems with jpeg encoder on DM355

Hello everybody

             I have gotten the yuv file from the encode demo provided by TI. And  i used the jpegenc example to generate the yuv file into jpeg file.Then i got some pictures like these.I just added some codes in the video1.c file int encode demo,and get the yuv file,then break the while loop in the video1.c file.The first yuv file is ok,but the second or the

third may be error.I want to know if there is anyone can help me.thank you.

 

 

 

 

////////////////////////////////////////////////////////////////////////////////////////////////////////

 FILE               *outputFp      = NULL;
       
  outputFp = fopen("pic.yuv", "w");
          if (fwrite(ce.virtBuf, ce.bufSize, 1, outputFp) != 1) {
                ERR("Error writing the yuv data to  file\n");
            }
          else
          printf("success write .yuv file in the linux file system\n");
         
        
        
         break;
       if (encodeVideoBuffer(hEncode, ce.virtBuf, ce.bufSize,
                             we.encodedBuffer, &we.frameSize,
                              envp->imageWidth, envp->imageHeight) == FAILURE) {
            breakLoop(THREAD_FAILURE);
        }

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

  • Hi Winnie,

    From the description and images, it does not look to be a JPEG Encoder issue.

    It seems that either fileread for next frame is not happening correctly or the input buffer address passed to encoder is wrong.

    Please verify those things.

     

    Regards,

    Tej