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.

TDA2SX: Failed to create enclink with a resolution of 2560*1280.

Part Number: TDA2SX

[HOST] [IPU2 ] 34.234246 s: ENCODE: Create in progress ... !!!
[HOST] [IPU2 ] 34.234520 s: ENCODE:EncLink_codecCreate 0 numQue 1... !!!
[HOST] [IPU2 ] 34.681754 s: ENCODE: Creating CH0 of 2560 x 1280, pitch = (4096, 4096) [1] [0], bitrate = 10000 Kbps ...
[HOST] [IPU2 ] 34.888824 s: ENCODE: CH0: H264EncCreated:H264ENC_TI DEV.500.V.H264AVC.E.IVAHD.02.01.09.01
[HOST] [IPU2 ] 34.889068 s: ENCODE: ERROR: ALGCONTROL FAILED CMD=0x00000001 (status=ffffffff) !!!
[HOST] [IPU2 ] 34.889190 s: LINK ERR::linkID:900004f::channelID:0::errorCode:-5::FileName:iva_enc/encLink_h264.c::linuNum:1186::errorCondition:(algStatus == XDM_EOK)

My enclink configuration is:

pLinkChPrm->format = SYSTEM_IVIDEO_H264HP;
pLinkChPrm->profile = 100;
pLinkChPrm->dataLayout = VENC_FIELD_SEPARATED;
pLinkChPrm->fieldMergeEncodeEnable = FALSE;
pLinkChPrm->enableAnalyticinfo = 0;
pLinkChPrm->enableWaterMarking = 0;
pLinkChPrm->maxBitRate = -1;
pLinkChPrm->encodingPreset = SYSTEM_XDM_MED_SPEED_HIGH_QUALITY;
/* Set encodingPreset to SYSTEM_XDM_USER_DEFINED
if SEI/meta data needs to be enabled */
/* pLinkChPrm->encodingPreset = SYSTEM_XDM_USER_DEFINED; */
pLinkChPrm->rateControlPreset = SYSTEM_IVIDEO_LOW_DELAY;
pLinkChPrm->enableHighSpeed = FALSE;
pLinkChPrm->enableSVCExtensionFlag = FALSE;
pLinkChPrm->numTemporalLayer = 0;
pLinkChPrm->overrideInputScanFormat= 0;
pLinkChPrm->fieldPicEncode = 0;
pLinkChPrm->IDRFrameInterval = 1;

pLinkDynPrm->intraFrameInterval = 25;
pLinkDynPrm->targetBitRate = 10*1000*1000;
pLinkDynPrm->interFrameInterval = 1;
pLinkDynPrm->mvAccuracy = SYSTEM_IVIDENC2_MOTIONVECTOR_QUARTERPEL;
pLinkDynPrm->inputFrameRate = pObj->inputFps;
pLinkDynPrm->rcAlg = 0;
pLinkDynPrm->qpMin = 0;
pLinkDynPrm->qpMax = 51;
pLinkDynPrm->qpInit = 25;
pLinkDynPrm->vbrDuration = 8;
pLinkDynPrm->vbrSensitivity = 0;
/* Set maxPicSizeRatioI to 1 for IDR or I-Frame only mode */
pLinkDynPrm->maxPicSizeRatioI = 640;

  • It's very urgent. Can someone help with it?

  • Hi,

    Can you make sure your previous link is feeding data at that resolution.

    I doubt your previous link is providing smaller resolution.

    Can you print static and dynamic params of algorithm from enclink_h264_set_static_params() and enclink_h264_set_dynamic_params().

    regards,

    Anuj

  • It has nothing to do with the data source, because the resolution of 1280*720 I set before can be created successfully, but it cannot be created after the resolution is changed, I am printing it, and I will post it later, thank you

  • Hi Anuj,

    [HOST] [IPU2 ] 32.315805 s: ENCODE: Create in progress ... !!!
    [HOST] [IPU2 ] 32.316019 s: ENCODE:EncLink_codecCreate 0 numQue 1... !!!
    [HOST] [IPU2 ] 32.765265 s: ENCODE: Creating CH0 of 2560 x 1440, pitch = (2560, 2560) [1] [0], bitrate = 10000 Kbps ...
    [HOST] [IPU2 ] 32.765814 s: enclink_codec_set_ch_alg_create_params maxWidth 2560 maxHeight 1440
    [HOST] [IPU2 ] 32.766028 s:
    [HOST] [IPU2 ] 32.766089 s: --------- CH 0 : H264 ENC : Dynamic Params -------
    [HOST] [IPU2 ] 32.766150 s:
    [HOST] [IPU2 ] 32.766180 s: videnc2DynamicParams -> inputHeight : 1440
    [HOST] [IPU2 ] 32.766272 s: videnc2DynamicParams -> inputWidth : 2560
    [HOST] [IPU2 ] 32.766363 s: videnc2DynamicParams -> refFrameRate : 30000
    [HOST] [IPU2 ] 32.766455 s: videnc2DynamicParams -> targetFrameRate : 30000
    [HOST] [IPU2 ] 32.766516 s: videnc2DynamicParams -> targetBitRate : 10000000
    [HOST] [IPU2 ] 32.766607 s: videnc2DynamicParams -> intraFrameInterval : 20
    [HOST] [IPU2 ] 32.766729 s: videnc2DynamicParams -> generateHeader : 0
    [HOST] [IPU2 ] 32.766821 s: videnc2DynamicParams -> captureWidth : 2560
    [HOST] [IPU2 ] 32.766882 s: videnc2DynamicParams -> forceFrame : -1
    [HOST] [IPU2 ] 32.766973 s: videnc2DynamicParams -> interFrameInterval : 1
    [HOST] [IPU2 ] 32.767065 s: videnc2DynamicParams -> mvAccuracy : 2
    [HOST] [IPU2 ] 32.767126 s: videnc2DynamicParams -> sampleAspectRatioHeight : 1
    [HOST] [IPU2 ] 32.767217 s: videnc2DynamicParams -> sampleAspectRatioWidth : 1
    [HOST] [IPU2 ] 32.767309 s: videnc2DynamicParams -> ignoreOutbufSizeFlag : 1
    [HOST] [IPU2 ] 32.767370 s: videnc2DynamicParams -> lateAcquireArg : -1
    [HOST] [IPU2 ] 32.767461 s:
    [HOST] [IPU2 ] 32.767492 s: rateControlParams -> rateControlParamsPreset : 1
    [HOST] [IPU2 ] 32.767583 s: rateControlParams -> scalingMatrixPreset : 0
    [HOST] [IPU2 ] 32.767675 s: rateControlParams -> rcAlgo : 0
    [HOST] [IPU2 ] 32.767766 s: rateControlParams -> qpI : 25
    [HOST] [IPU2 ] 32.767858 s: rateControlParams -> qpMaxI : 51
    [HOST] [IPU2 ] 32.767949 s: rateControlParams -> qpMinI : 0
    [HOST] [IPU2 ] 32.768010 s: rateControlParams -> qpP : 25
    [HOST] [IPU2 ] 32.768102 s: rateControlParams -> qpMaxP : 51
    [HOST] [IPU2 ] 32.768193 s: rateControlParams -> qpMinP : 0
    [HOST] [IPU2 ] 32.768285 s: rateControlParams -> qpOffsetB : 4
    [HOST] [IPU2 ] 32.768376 s: rateControlParams -> qpMaxB : 44
    [HOST] [IPU2 ] 32.768437 s: rateControlParams -> qpMinB : 10
    [HOST] [IPU2 ] 32.768529 s: rateControlParams -> allowFrameSkip : 0
    [HOST] [IPU2 ] 32.768620 s: rateControlParams -> removeExpensiveCoeff : 0
    [HOST] [IPU2 ] 32.768712 s: rateControlParams -> chromaQPIndexOffset : 0
    [HOST] [IPU2 ] 32.768803 s: rateControlParams -> IPQualityFactor : 0
    [HOST] [IPU2 ] 32.768895 s: rateControlParams -> initialBufferLevel : 2500000
    [HOST] [IPU2 ] 32.768986 s: rateControlParams -> HRDBufferSize : 2500000
    [HOST] [IPU2 ] 32.769078 s: rateControlParams -> minPicSizeRatioI : 0
    [HOST] [IPU2 ] 32.769139 s: rateControlParams -> maxPicSizeRatioI : 0
    [HOST] [IPU2 ] 32.769230 s: rateControlParams -> minPicSizeRatioP : 0
    [HOST] [IPU2 ] 32.769322 s: rateControlParams -> maxPicSizeRatioP : 0
    [HOST] [IPU2 ] 32.769383 s: rateControlParams -> minPicSizeRatioB : 0
    [HOST] [IPU2 ] 32.769474 s: rateControlParams -> maxPicSizeRatioB : 0
    [HOST] [IPU2 ] 32.769566 s: rateControlParams -> enablePRC : 1
    [HOST] [IPU2 ] 32.769657 s: rateControlParams -> enablePartialFrameSkip : 0
    [HOST] [IPU2 ] 32.769749 s: rateControlParams -> discardSavedBits : 1
    [HOST] [IPU2 ] 32.769840 s: rateControlParams -> VBRDuration : 8
    [HOST] [IPU2 ] 32.769932 s: rateControlParams -> VBRsensitivity : 0
    [HOST] [IPU2 ] 32.769993 s: rateControlParams -> skipDistributionWindowLength : 5
    [HOST] [IPU2 ] 32.770084 s: rateControlParams -> numSkipInDistributionWindow : 2
    [HOST] [IPU2 ] 32.770176 s: rateControlParams -> enableHRDComplianceMode : 1
    [HOST] [IPU2 ] 32.770267 s: rateControlParams -> frameSkipThMulQ5 : 0
    [HOST] [IPU2 ] 32.770328 s: rateControlParams -> vbvUseLevelThQ5 : 0
    [HOST] [IPU2 ] 32.770420 s:
    [HOST] [IPU2 ] 32.770450 s: interCodingParams -> interCodingPreset : 0
    [HOST] [IPU2 ] 32.770542 s: interCodingParams -> searchRangeHorP : 144
    [HOST] [IPU2 ] 32.770603 s: interCodingParams -> searchRangeVerP : 32
    [HOST] [IPU2 ] 32.770725 s: interCodingParams -> searchRangeHorB : 144
    [HOST] [IPU2 ] 32.770786 s: interCodingParams -> searchRangeVerB : 16
    [HOST] [IPU2 ] 32.770877 s: interCodingParams -> interCodingBias : 1
    [HOST] [IPU2 ] 32.770938 s: interCodingParams -> skipMVCodingBias : 1
    [HOST] [IPU2 ] 32.770999 s: interCodingParams -> minBlockSizeP : 0
    [HOST] [IPU2 ] 32.771091 s: interCodingParams -> minBlockSizeB : 0
    [HOST] [IPU2 ] 32.771152 s: interCodingParams -> meAlgoMode : 0
    [HOST] [IPU2 ] 32.771243 s:
    [HOST] [IPU2 ] 32.771274 s: intraCodingParams -> intraCodingPreset : 0
    [HOST] [IPU2 ] 32.771365 s: intraCodingParams -> lumaIntra4x4Enable : 0
    [HOST] [IPU2 ] 32.771457 s: intraCodingParams -> lumaIntra8x8Enable : 255
    [HOST] [IPU2 ] 32.771518 s: intraCodingParams -> lumaIntra16x16Enable : 15
    [HOST] [IPU2 ] 32.771609 s: intraCodingParams -> chromaIntra8x8Enable : 15
    [HOST] [IPU2 ] 32.771701 s: intraCodingParams -> chromaComponentEnable : 1
    [HOST] [IPU2 ] 32.771792 s: intraCodingParams -> intraRefreshMethod : 0
    [HOST] [IPU2 ] 32.771884 s: intraCodingParams -> intraRefreshRate : 0
    [HOST] [IPU2 ] 32.771945 s: intraCodingParams -> gdrOverlapRowsBtwFrames : 0
    [HOST] [IPU2 ] 32.772036 s: intraCodingParams -> constrainedIntraPredEnable : 0
    [HOST] [IPU2 ] 32.772128 s: intraCodingParams -> intraCodingBias : 0
    [HOST] [IPU2 ] 32.772189 s:
    [HOST] [IPU2 ] 32.772250 s: sliceCodingParams -> sliceCodingPreset : 0
    [HOST] [IPU2 ] 32.772311 s: sliceCodingParams -> sliceMode : 0
    [HOST] [IPU2 ] 32.772372 s: sliceCodingParams -> sliceUnitSize : 0
    [HOST] [IPU2 ] 32.772463 s: sliceCodingParams -> sliceStartOffset : [0 0 0]
    [HOST] [IPU2 ] 32.772555 s: sliceCodingParams -> streamFormat : 0
    [HOST] [IPU2 ] 32.772616 s:
    [HOST] [IPU2 ] 32.772677 s: sliceGroupChangeCycle : 0
    [HOST] [IPU2 ] 32.772738 s: searchCenter : 32767
    [HOST] [IPU2 ] 32.772829 s: enableStaticMBCount : 0
    [HOST] [IPU2 ] 32.772890 s: enableROI : 0

  • This time I changed the resolution to 2560*1440.

  • Hi Anuj,

    this is staticParams print.

    [HOST] [IPU2 ] 37.076496 s: staticParams->videnc2Params.maxHeight 1440
    [HOST] [IPU2 ] 37.076557 s: staticParams->videnc2Params.maxWidth 2560
    [HOST] [IPU2 ] 37.076648 s: staticParams->videnc2Params.maxInterFrameInterval 1
    [HOST] [IPU2 ] 37.076709 s: staticParams->videnc2Params.inputContentType 0
    [HOST] [IPU2 ] 37.076801 s: staticParams->videnc2Params.inputChromaFormat 9
    [HOST] [IPU2 ] 37.076953 s: staticParams->videnc2Params.profile 100
    [HOST] [IPU2 ] 37.077014 s: staticParams->videnc2Params.level 40
    [HOST] [IPU2 ] 37.077075 s: staticParams->videnc2Params.encodingPreset 6
    [HOST] [IPU2 ] 37.077167 s: staticParams->videnc2Params.level 40
    [HOST] [IPU2 ] 37.077228 s: staticParams->interCodingParams.interCodingPreset 0
    [HOST] [IPU2 ] 37.077319 s: staticParams->intraCodingParams.intraCodingPreset 0
    [HOST] [IPU2 ] 37.077380 s: staticParams->enableAnalyticinfo 0
    [HOST] [IPU2 ] 37.077472 s: staticParams->enableWatermark 0
    [HOST] [IPU2 ] 37.077533 s: staticParams->numTemporalLayer 1
    [HOST] [IPU2 ] 37.077594 s: staticParams->svcCodingParams.svcExtensionFlag 0
    [HOST] [IPU2 ] 37.077685 s: staticParams->sliceCodingParams.sliceCodingPreset 0
    [HOST] [IPU2 ] 37.077746 s: staticParams->sliceCodingParams.sliceMode 0
    [HOST] [IPU2 ] 37.077838 s: staticParams->sliceCodingParams.streamFormat 0
    [HOST] [IPU2 ] 37.077929 s: staticParams->IDRFrameInterval 0
    [HOST] [IPU2 ] 37.077990 s: staticParams->reservedParams[1] 1514062046
    [HOST] [IPU2 ] 37.078082 s: staticParams->entropyCodingMode 1
    [HOST] [IPU2 ] 37.078143 s: staticParams->vuiCodingParams.vuiCodingPreset 1
    [HOST] [IPU2 ] 37.078204 s: staticParams->vuiCodingParams.timingInfoPresentFlag 0
    [HOST] [IPU2 ] 37.078295 s: staticParams->vuiCodingParams.hrdParamsPresentFlag 0

  • It's very urgent. Can someone help with it?

  • Hi,

    In vision_sdk\links_fw\src\rtos\links_ipu\iva\iva_enc\encLink_h264.c Change level in enclink_h264_set_static_params function staticParams->videnc2Params.

    level = IH264_LEVEL_40;    to       staticParams->videnc2Params.level = IH264_LEVEL_51;

    If you still see the issue,

    Print extended error from enclink_h264_control function

            Vps_printf(" ENCODE: ERROR: ALGCONTROL FAILED CMD=0x%08x (status=%08x) !!!\n",

                         cmd, error);

    to

            Vps_printf(" ENCODE: ERROR: ALGCONTROL FAILED CMD=0x%08x (status=%08x) extended error =%08x !!!\n",

                         cmd, error, (IVIDENC2_Status *) status->extendedError);

     

    And please share your observations.

  • Good to know. Can you please mark it verified answer, which resolved the issue?