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.

H264: extendedError 41000 in 2560x2048

Hello!

Happy New Year and Mary Christmas!

I have use DM368 and H264 codec from ti-dvsdk_dm365-evm_4_02_00_06. I successfully encode 4Mpx (2368x1744) and 5Mpx (2560x1964), but I can't encode 5Mpx (2560x2048).

According with ISO/IEC 14496-10 I use IH264VENC_LEVEL_50, I have read user guide (SPRUEU9B) and set encodingPreset  and encQuality in XDM_HIGH_QUALITY. But I get error when I set encoder dynamic parameters with extendedError 41000. In user guide (SPRUEU9B, p.54) I  have found that problem in XDM_UNSUPPORTEDINPUT (bit 13) and XDM_FATALERROR (bit 15).

How can I solve problem with encoding 5Mpx (2560x2048)?

Thank you and excuse me for my bad english.

  • Hi Kirill,

    Could you post the encoder parameters (both create time and dynamic)?

    Are you setting the values of maxWidth and maxHeight appropriately?

  • Hello Adithya!

    Resolution 2560x1964:
    H264 create
            maxWidth 2560
            maxHeight 1952
            maxFrameRate 30000
            maxBitRate 50000000
            inputChromaFormat 9
            maxInterFrameInterval 1
            inputContentType 0
            reconChromaFormat 9
            profileIdc 100
            levelIdc 50
            entropyMode 1
            transform8x8FlagIntraFrame 1
            transform8x8FlagInterFrame 1
            enableVUIparams 1
            meAlgo 0
            seqScalingFlag 1
            encQuality 2
            encodingPreset 1
            enableARM926Tcm 0
            enableDDRbuff 0
            sliceMode 3
            numTemporalLayers 0
            outputDataMode 1
            sliceFormat 1
    H264 dynamic:
            inputHeight 1952
            inputWidth 2560
            targetBitRate 4000000
            generateHeader 0
            captureWidth 2560
            targetFrameRate 30000
            refFrameRate 30000
            intraFrameInterval 0
            forceFrame -1
            idrFrameInterval 10
            perceptualRC 1
            mvSADoutFlag 1
            intraFrameQP 28
            interPFrameQP 28
            rcQMin 1
            rcQMax 51
            rcQMinI 1
            rcQMaxI 51
            enableBufSEI 0
            enablePicTimSEI 0
            enableROI 1
            metaDataGenerateConsume 0
            disableMVDCostFactor 0
            sliceSize 122
            resetHDVICPeveryFrame 1
            maxDelay 2000

    Resolution 2560x2048:
    H264 create
            maxWidth 2560
            maxHeight 2048
            maxFrameRate 30000
            maxBitRate 50000000
            inputChromaFormat 9
            dataEndianness 1
            maxInterFrameInterval 1
            inputContentType 0
            reconChromaFormat 9
            profileIdc 100
            levelIdc 50
            entropyMode 1
            transform8x8FlagIntraFrame 1
            transform8x8FlagInterFrame 1
            enableVUIparams 1
            meAlgo 0
            seqScalingFlag 1
            encQuality 2
            encodingPreset 1
            enableARM926Tcm 0
            enableDDRbuff 0
            sliceMode 3
            numTemporalLayers 0
            outputDataMode 1
            sliceFormat 1
    H264 dynamic:
            inputHeight 2048
            inputWidth 2560
            targetBitRate 4000000
            generateHeader 0
            captureWidth 2560
            targetFrameRate 30000
            refFrameRate 30000
            intraFrameInterval 0
            forceFrame -1
            idrFrameInterval 10
            perceptualRC 1
            mvSADoutFlag 1
            intraFrameQP 28
            interPFrameQP 28
            rcQMin 1
            rcQMax 51
            rcQMinI 1
            rcQMaxI 51
            enableBufSEI 0
            enablePicTimSEI 0
            enableROI 1
            metaDataGenerateConsume 0
            disableMVDCostFactor 0
            sliceSize 128
            resetHDVICPeveryFrame 1
            maxDelay 2000

  • Hi Kirill,

    Your params looks fine. And we tried at our end, we are able create and encode the 2560x2048 resolution.

    Can you please migrate to latest version encoder and try once?

    latest encoder available @ http://software-dl.ti.com/dsps/dsps_public_sw/codecs/DM36x/index_FDS.html

     

  • Codec 2.30.00.03 not solved problem.

    How can I increase debug level?

  • You can link debug version codec library. Please send us log using this lib.

  • Last lines:
    CODEC_DEBUG_ENABLE: Resource Number - 45
    CODEC_DEBUG_ENABLE: Assigned Edma Channel Index: 58
    CODEC_DEBUG_ENABLE: Assigned Number of TCs: 1  
    CODEC_DEBUG_ENABLE: Assigned Param Space Address: 0x40514740
    CODEC_DEBUG_ENABLE: IRES Call to Open EDMA Channel Successfully Completed
    CODEC_DEBUG_ENABLE: Inside IMCOP Resource allocation
    CODEC_DEBUG_ENABLE: Resource Number - 47
    CODEC_DEBUG_ENABLE: HDVICP resoruce alloted
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Activate Call -> H264VENC_TI_activate
    CODEC_DEBUG_ENABLE: Inside IRES Call to Activate All Resources -> H264VENC_TI_activateAllResources
    CODEC_DEBUG_ENABLE: Control Call With SETPARAM Command
    CODEC_DEBUG_ENABLE: Error IH264VENC_ERR_LEVEL_NOT_FOUND
    CODEC_DEBUG_ENABLE: Inside IRES Call to Deactivate All Resources -> H264VENC_TI_deactivateAllResources
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Deactivate Call -> H264VENC_TI_deactivate
     ERROR  (alg_vidEnc.c|ALG_vidEncSetDynamicParams|455): XDM_SETPARAMS failed, status=-1, error 41000
    CODEC_DEBUG_ENABLE: Inside IRES Call to get Number of Resources -> H264VENC_TI_numResourceDescriptors
    CODEC_DEBUG_ENABLE: Number of Resources Required - 50
    CODEC_DEBUG_ENABLE: Inside IRES Call to Get Resource -> H264VENC_TI_getResouceDescriptors
    CODEC_DEBUG_ENABLE: Exiting IRES Call to Get Resource function
    CODEC_DEBUG_ENABLE: Inside IRES Call to DeInit Resource -> H264VENC_TI_deinitResources
    CODEC_DEBUG_ENABLE: Inside Funtion to get memtab Requirement -> H264VENC_TI_numAlloc
    CODEC_DEBUG_ENABLE: Number of memtabs required: 16
    CODEC_DEBUG_ENABLE: Inside Encoder Handle Structure Free Call -> H264VENC_TI_free
     ERROR  (videoEncodeThr.c|VIDEO_encodeTskCreate|44): ALG_vidEncCreate(0) ERROR  (videoEncodeThr.c|VIDEO_encodeTskMain|342): VIDEO_encodeTskCreate()
     ERROR  (avServerMainThr.c|AVSERVER_tskStart|78):

    Full log in attache 2677.h264_2560_2048.txt

  • Hi Kirill,

    Sorry for delayed reply.

    Looks your parameter set causing level limit error. Can you please try by setting lesser frame rate for reference and target frame rates(lets say 25000 instead of 30000).

    Thanks,

    Veeranna

  • Thank you Veeranna!

    But how framerate linked with frame heigh, I don't see information about this in datasheet and user guide?

  • Hi Kirill,

    This limitation is in h264 standard not with codec. You can have look at http://en.wikipedia.org/wiki/H.264/MPEG-4_AVC

    Now are you able to create encoder for higher resolution ?

    Thanks,

    Veeranna

  • Veeranna Hanchinal said:
    Now are you able to create encoder for higher resolution ?

    Yes, I get video with resolution 2560x2048.

    Where can I found instruction or description for read codec debug output?

  • Hi Kirill,

    codec debug logs will be helpful to check if params are wrong and if codec hangs or crashes. You just needs to search fail/error in logs to find which parameter is going wrong. And there will be prints at  enterence  and exit of  function, so we can identify the flow if it is going wrong.

    And we don't have any particular document to explain this.

    Thanks,

    Veeranna

  • Veeranna Hanchinal said:
    You just needs to search fail/error in logs to find which parameter is going wrong. And there will be prints at  enterence  and exit of  function, so we can identify the flow if it is going wrong.

    Ok, but I see fail or error in my log only when I set dynamic parameters. How can I solve my problem if log don't content message about wrong framerate or I don't see it?

  • Hi Kirill,

    debug log will have prints from create functions also, you can get prints during create time.

    In your case level limit was exceeding, this depends upon frame rate, bit rate, resolution etc. I felt frame rate parameter is safe one to change it.