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.

MJPEG Encoder on OMAP5

Hi,

I need Streamout MJPEG enocded streams over HTPP on OMAP5 board

OMAP5 doesn't support MJPEG Encoder, instead provides JPEG Encoder as an algorithm. So we are making callback to call JPEG Encoder continously.

We are seeing some heap memory issues with IPP as ON .

With IPP OFF we see some noise in image

I am not sure what the problem is about

  • Hello Pushpa,

    I suggest you seeing in this similar thread for some solutions:
    e2e.ti.com/.../1086829

    Your issue might be occur when 2 or more multiple components as when running Camera and Video Encoder where state changes are mixed.

    Could you attached any videos with your issue?

    Best regards,
    Yanko
  • Hi Yanko,

    Sorry I could not upload video.

    But  that distortion remains constant while in background we can see video being played

    There is no MJPEG Video Encoder available in Ducati Codec binaries. There is no OMX IL  support for JPEG Encoder. Hence we are using Camera API to invoke JPEG Encoder algorithm 

  • Hello Pushpa,

    I would point you that if you use OMAP5 GLSDK 6.04.00.02 there are some limitations:
    OMAPS00301898: Image is cropped when framebuffer size is bigger than display mode when using omapdrm API

    It seems that your issue might be caused by an incorrect framebuffer size.

    Best regards,
    Yanko
  • Hi Yanko,

    I am not using OMAP5 GLSDK 6.04.00.02.
    I am using Android binaries for Panda5 release: omappedia.org/.../Panda5AJ.1.5.1_Release_Notes

    If I stream the same video for 640x480 resolution i don't see that noise in middle of the image, if I stream any resolution above 640x480, then I am getting that noise.

    So is it a buffer size issue?
  • Hello Pushpa,

    Do you know what is the maximal resolutions of the used Camera API?

    I assume that your issue is caused by selecting of an incorrect resolution in camera API. In other words, the product of the width and height of the preview size should not be larger than that of the preferred preview size. In addition, it is recommended to choose a preview size that has the same aspect ratio as the resolution of video to be recorded.

    Please provide more details about your changes in 5AJ1.5.1 release.

    Best regards,
    Yanko
  • Hi Yanko,

    Camera Supports 1080p reso;ution

    I checked with the aspect ratio also and did not find any issues with this

    Since there is no MJPEG Encoder available, we are following camera capture path followed in Defalut Android Camera application

    takePicture() is the function which invokes JPEG Encoder to capture one image. So we are calling this function recursively to capture continuously to work as an MJPEG Encoder.

    We have  removed the Bayer conversion and set IPP to OFF in Ducati.

    With 1080p as input source and 1080p as output picturesize, I am seeing this issue

    whereas with 1080 as input source and 720p or 480p as output picturesize, picture is good enough without any noise

  • Hello Pushpa,

    While recording video, you can now call takePicture() to save a photo without interrupting the video session. Before doing so, you should call VideoSnapshotSupported to be sure the hardware  supports it.

    Use the takePicture() method to take a picture once the preview is started. You can create PictureCallback and ShutterCallback objects and pass them into takePicture().

    If you want to grab images continously, you can create a PreviewCallback that implements Camera.PreviewCallback#onPreviewFrame. For something in between, you can capture only selected preview frames, or set up a delayed action to call takePicture()

    We have  removed the Bayer conversion and set IPP to OFF in Ducati.

    What is the output format from your camera?

    Best regards,

    Yanko

  • Hi Yanko,

    Use the takePicture() method to take a picture once the preview is started. You can create PictureCallback and ShutterCallback objects and pass them into takePicture().

    Right now I am doing the same way. Calling the takePicture() method during preview mode to capture one frame and to capture continuously creating callback function.

    I don't see any issues in capturing the frame continously. But the encoded image is distorted as seen in the above post.

     

    - What is the output format from your camera?

    YUV420Semiplanar

  • Hello Pushpa,

    Do you use Tiler module in your case?
    I suggest checking the set of pixel format in this file

    5AJ.1.5.1/mydroid/hardware/ti/domx/omx_proxy_component/omx_video_enc/src/omx_h264_enc/src/omx_proxy_h264enc.c:

    int COLORCONVERT_PlatformOpaqueToNV12(void *hCC, void *pSrc[],
    133 void *pDst[], int nWidth,
    134 int nHeight, int nStride,
    ...
    794 {
    795 DOMX_DEBUG(" ++TIMM_OSAL_ReadFromPipe() ");
    796: /* Dequeue NV12 buffer for encoder */
    797 eOSALStatus = TIMM_OSAL_ReadFromPipe(pProxy->hBufPipe, &nBufIndex,
    798 sizeof(OMX_PTR), (TIMM_OSAL_U32 *)(&nSize),
    ...
    800 PROXY_assert(eOSALStatus == TIMM_OSAL_ERR_NONE, OMX_ErrorBadParameter, NULL);

    Best regards,
    Yanko
  • This issue got resolved by removing CACNSF3 module from ImageCapture Pipeline