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.

OMAP4460:Get the size of input bitstream of the HW decoder.

Other Parts Discussed in Thread: 4460

Hello all:

When I input the H264 bitstream to the hardware decoder, It will output the OMX_TI_COLOR_FormatYUV420PackedSemiPlanar data.

I can get the size of output data throuth calling function _iomx->getParameter(_node, OMX_IndexParamPortDefinition, &def, sizeof(def)) .

However there are crops around the output data. Now How can I get the crop size and How can I get the size of input bitstream.

All the above are based on android 4.0 and Omap 4460.

Thank you.

regards,

Wenliang Chang

  • After analysing the data, I found that the left crop is 32,the top is 24 and bottom 72.

    But how can I get above sizes through calling getParameter or GetConfig?

    And  how can I get the right crop and the size of input size?

  • Hi Chang,

    You can get the actual frame size and the position information using the following GetConfig call in your application as follows:

    _iomx->getConfig(_node, OMX_IndexConfigCommonOutputCrop, &omx_crop_req, sizeof(omx_crop_req))

    The sample definition of omx_crop_req is as highlighted below.

    OMX_CONFIG_RECTTYPE omx_crop_req;

    /**
     * Frame size plus position
     *
     * STRUCT MEMBERS:
     *  nSize      : Size of the structure in bytes
     *  nVersion   : OMX specification version information
     *  nPortIndex : Port that this structure applies to
     *  nLeft      : X Coordinate of the top left corner of the valid data rectangle
     *  nTop       : Y Coordinate of the top left corner of the valid data rectangle
     *  nWidth     : Width of the valid data
     *  nHeight    : Height of the valid data
     */
    typedef struct OMX_CONFIG_RECTTYPE {
        OMX_U32         nSize;
        OMX_VERSIONTYPE nVersion;
        OMX_U32         nPortIndex;
        OMX_S32         nLeft;
        OMX_S32         nTop;
        OMX_U32         nWidth;
        OMX_U32         nHeight;
    } OMX_CONFIG_RECTTYPE;

    I guess this would clarify your query on how to obtain the crop and input size parameters using GetConfig call.

    Thanks & Best Regards,

    Venkat

  • Hi Chang,

    There is API which is getConfig can get crop information of bit stream. For width and height of bit stream, you can parse it befoer hw decoding. Or you can get it through parameters in out put port.

    regards,

    guangx