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.

How to start Gradual Decoder Refresh(GDR) on DM385 ipnc_rdk?

I work with IPNC_RDK_V3.8.0

I read about the H264_Encoder_HDVICP2_UserGuide,

where I get the idea that the GDR may help with the quality of video and make the video stream stable.

  • Hi Yang Zheng,

              GDR will not help you to improve the Quality of Video in every scenario. Its a feature which is more useful in Error Resiliency. It also has below silent features which may be useful in some scenarios - 

    • Bits consumption is now distributed over a group of N frames
      • Delay at decoding end reduces
      • Frame skips are reduced
    • At the end of N frames all MBs are intra coded - Error propagation is terminated
    • Breathing artifacts at low bitrates can be reduced

    Regards

    Gajanan

  • Thanks for ur help.

    I will use RTSP to transport the video stream,GDR can help with the time delay,for there is no more big frame like I Frame.
    Is that right?

    And I still want to know where should I call control  IH264ENC_CTRL_START_GDR.

    Regards

    yang

  • Hi yang zheng,

             To know how to use it please refer H.264 Encoder User Guide Appendix O. It has all the required details.

    Regards

    Gajanan

  • Hi Gajanan Maske1,

    I got some confusion about GDR mecanism.

    Accroding to the H264_Encoder_HDVICP2_UserGuide,

    I should set IVIDENC2_InArgs::control = IH264ENC_CTRL_START_GDR.

    It means one refresh at one change. Is that right?

    But I have seen that it's only set at function EncLinkH264_algDynamicParamUpdate.

    When I changed the code to let it go inside ,it reported with error like followed.

    ------------------------------------------------------------------------------------------------------------------------------------------------------------------
    [m3video] 45042:!ERROR!:ENCLINK::links_m3video/iva_enc/encLink_h264.c:[202]::INTERNAL ERROR:-1
    [m3video] ALGCONTROL FAILED:CMD:1
    [m3video] ERROR: IH264ENC_MAX_BIT_RATE_VOILATION = 7,
    [m3video] ERROR: XDM_UNSUPPORTEDPARAM = 14,
    [m3video] ERROR: XDM_FATALERROR = 15
    [m3video] ERROR: IH264ENC_UNSUPPORTED_VIDENC2DYNAMICPARAMS = 30,
    [m3video] ERROR: IH264ENC_UNSUPPORTED_H264ENCDYNAMICPARAMS = 31,
    [m3video] 45043:WARN
    [m3video] ENCLINK: ERROR in Run time parameters changes, Extended Error code:-1073692544
    [m3video] Extended error c000c480 for reqObjIndex 0
    [m3video] 45044:WARN
    [m3video] ENCLINK:ERROR in Enclink_h264EncodeFrameBatch.Status[-1] for IVAHD_0
    [m3video] 45044:WARN
    [m3video] ENC : IVAHDID : 0 ENCLINK:ERROR in EncLink_SubmitBatch.Status[-1]
    [m3video] ---------------enter_there 222----------------------
    [m3video] Unhandled Exception:
    [m3video] Exception occurred in ThreadType_Task
    [m3video] handle: 0x8d428ac4.
    [m3video] stack base: 0x8d5bbdc0.
    [m3video] stack size: 0x2000.
    [m3video] R0 = 0x8d0bb380 R8 = 0x8d423fa8
    [m3video] R1 = 0x8d0be010 R9 = 0x8d0be010
    [m3video] R2 = 0x00000000 R10 = 0x00000001
    [m3video] R3 = 0x8d424098 R11 = 0xffffffff
    [m3video] R4 = 0x8d424098 R12 = 0x8d423fa8
    [m3video] R5 = 0x000004ac SP(R13) = 0x8d5bdc18
    [m3video] R6 = 0x8d0bb384 LR(R14) = 0x8cd50223
    [m3video] R7 = 0x8d0bd780 PC(R15) = 0x00000000
    [m3video] PSR = 0x80000000
    [m3video] ICSR = 0x0440f803
    [m3video] MMFSR = 0x00
    [m3video] BFSR = 0x00
    [m3video] UFSR = 0x0002
    [m3video] HFSR = 0x40000000
    [m3video] DFSR = 0x00000000
    [m3video] MMAR = 0xe000ed34
    [m3video] BFAR = 0xe000ed38
    [m3video] AFSR = 0x00000000
    [m3video] Terminating Execution...
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------
    And where should I change IVIDENC2_InArgs::control into IH264ENC_CTRL_START_GDR?

    Regards,

    Yang
  • Here is my params,

    [m3video] --------- CH 0 : H264 ENC : Dynamic Params -------
    [m3video]
    [m3video] videnc2DynamicParams -> inputHeight : 538976288
    [m3video] videnc2DynamicParams -> inputWidth : 538976288
    [m3video] interCodingParams-> interCodingPreset : 32
    [m3video] interCodingParams-> searchRangeHorP : 12589
    [m3video] interCodingParams-> searchRangeVerP : 14128
    [m3video] interCodingParams-> searchRangeHorB : 13875
    [m3video] interCodingParams-> searchRangeVerB : 12857
    [m3video] interCodingParams-> interCodingBias : 54
    [m3video] interCodingParams-> skipMVCodingBias : 55
    [m3video] interCodingParams-> minBlockSizeP : 50
    [m3video] interCodingParams-> minBlockSizeB : 0
    [m3video] interCodingParams-> meAlgoMode : -43
    [m3video]
    [m3video] intraCodingParams-> intraCodingPreset : 0
    [m3video] intraCodingParams-> lumaIntra4x4Enable : 0
    [m3video] intraCodingParams-> lumaIntra8x8Enable : 0
    [m3video] intraCodingParams-> lumaIntra8x8Enable : 0
    [m3video] intraCodingParams-> chromaIntra8x8Enable : 0
    [m3video] intraCodingParams-> chromaComponentEnable : 0
    [m3video] intraCodingParams-> intraRefreshMethod : 0
    [m3video] intraCodingParams-> intraRefreshRate : -29349
    [m3video] intraCodingParams-> gdrOverlapRowsBtwFrames : 19005
    [m3video] intraCodingParams-> constrainedIntraPredEnable : -29484
    [m3video] intraCodingParams-> constrainedIntraPredEnable : -5
    [m3video]
    [m3video] nalUnitControlParams -> naluControlPreset : -29479
    [m3video] nalUnitControlParams -> naluPresentMaskStartOfSequence : -9112
    [m3video] nalUnitControlParams -> naluPresentMaskIDRPicture : -29349
    [m3video] nalUnitControlParams -> naluPresentMaskIntraPicture : 2048
    [m3video] nalUnitControlParams -> naluPresentMaskNonIntraPicture : 0
    [m3video] nalUnitControlParams -> naluPresentMaskEndOfSequence : 0
    [m3video]
    [m3video] sliceCodingParams-> sliceCodingPreset : 0
    [m3video] sliceCodingParams-> sliceMode : 4096
    [m3video] sliceCodingParams-> sliceUnitSize : 1
    [m3video] sliceCodingParams-> sliceStartOffset[IH264ENC_MAX_NUM_SLICE_START_OFFSET] : 2 0 0
    [m3video] sliceCodingParams-> streamFormat : 0
    [m3video]
    [m3video] loopFilterParams-> loopfilterPreset : 0
    [m3video] loopFilterParams-> loopfilterDisableIDC : 3
    [m3video] loopFilterParams-> filterOffsetA : 89
    [m3video] loopFilterParams-> filterOffsetB : 34
    [m3video]
    [m3video] fmoCodingParams-> fmoCodingPreset : 21
    [m3video] fmoCodingParams-> numSliceGroups : -6
    [m3video] fmoCodingParams-> liceGroupMapType : -40
    [m3video] fmoCodingParams-> liceGroupChangeDirectionFlag : -116
    [m3video] fmoCodingParams-> liceGroupChangeRate : 40
    [m3video] fmoCodingParams-> sliceGroupChangeCycle : -29480
    [m3video] fmoCodingParams-> sliceGroupParams : [5120 256]
    [m3video]
    [m3video] vuiCodingParams-> vuiCodingPreset : 0
    [m3video] vuiCodingParams-> aspectRatioInfoPresentFlag : 0
    [m3video] vuiCodingParams-> aspectRatioIdc : 0
    [m3video] vuiCodingParams-> videoSignalTypePresentFlag : 0
    [m3video] vuiCodingParams-> videoFormat : 32
    [m3video] vuiCodingParams-> videoFullRangeFlag : 80
    [m3video] vuiCodingParams-> timingInfoPresentFlag : 240
    [m3video] vuiCodingParams-> hrdParamsPresentFlag : 191
    [m3video] vuiCodingParams-> numUnitsInTicks : 0
    [m3video]
    [m3video] stereoInfoParams-> stereoInfoPreset : 166
    [m3video] stereoInfoParams-> topFieldIsLeftViewFlag : 111
    [m3video] stereoInfoParams-> viewSelfContainedFlag : 93
    [m3video]
    [m3video] framePackingSEIParams-> framePackingPreset : 141
    [m3video] framePackingSEIParams-> framePackingType : 153
    [m3video] framePackingSEIParams-> frame0PositionX : 111
    [m3video] framePackingSEIParams-> frame0PositionY : 93
    [m3video] framePackingSEIParams-> frame1PositionX : 141
    [m3video] framePackingSEIParams-> frame1PositionY : 157
    [m3video]
    [m3video] svcCodingParams-> svcExtensionFlag : 218
    [m3video] svcCodingParams-> dependencyID : 140
    [m3video] svcCodingParams-> qualityID : 156
    [m3video] svcCodingParams-> enhancementProfileID : 46
    [m3video] svcCodingParams-> layerIndex : 218
    [m3video] svcCodingParams-> refLayerDQId : -116
    [m3video]
    [m3video] interlaceCodingType : 0
    [m3video] bottomFieldIntra : 0
    [m3video] gopStructure : 0
    [m3video] entropyCodingMode : 65
    [m3video] transformBlockSize : 0
    [m3video] log2MaxFNumMinus4 : 0
    [m3video] picOrderCountType : 0
    [m3video] enableWatermark : 0
    [m3video] IDRFrameInterval : -1923359588
    [m3video] maxIntraFrameInterval : -1923256492
    [m3video] debugTraceLevel : 0
    [m3video] lastNFramesToLog : 0
    [m3video] enableAnalyticinfo : -29
    [m3video] enableGMVSei : 72
    [m3video] constraintSetFlags : -44
    [m3video] enableRCDO : -116
    [m3video] enableLongTermRefFrame : -1932244492
    [m3video] LTRPPeriod : -1073692672
    [m3video] searchCenter : 0
    [m3video] enableStaticMBCount : -108
    [m3video] extMemoryDebugTraceAddr : -1
    [m3video] numTemporalLayer : 8
    [m3video] referencePicMarking: 0
    [m3video] extMemoryDebugTraceSize : -1925054463
    [m3video] enableROI : 0
    [m3video]
    [m3video]
    [m3video] bottomFieldIntra : 46
    [m3video] gopStructure : -38
    [m3video] entropyCodingMode : -116
    [m3video] transformBlockSize : -1
    [m3video] log2MaxFNumMinus4 : -1
    [m3video] picOrderCountType : -1
    [m3video] enableWatermark : -1
    [m3video] IDRFrameInterval : -1923359588
    [m3video] maxIntraFrameInterval : -1923256492
    [m3video] debugTraceLevel : 0
    [m3video] lastNFramesToLog : 0
    [m3video] enableAnalyticinfo : -29
    [m3video] enableGMVSei : 72
    [m3video] constraintSetFlags : -44
    [m3video] enableRCDO : -116
    [m3video] enableLongTermRefFrame : -1932244492
    [m3video] LTRPPeriod : -1073692672
    [m3video] searchCenter : 0
    [m3video] enableStaticMBCount : -108
    [m3video] extMemoryDebugTraceAddr : -1
    [m3video] numTemporalLayer : 8
    [m3video] referencePicMarking: 0
    [m3video] extMemoryDebugTraceSize : -1925054463
    [m3video] enableROI : 0
    [m3video]
  • Here is my params .

    [m3video] --------- CH 0 : H264 ENC : Dynamic Params -------
    [m3video]
    [m3video] videnc2DynamicParams -> inputHeight : 538976288
    [m3video] videnc2DynamicParams -> inputWidth : 538976288
    [m3video] interCodingParams-> interCodingPreset : 32
    [m3video] interCodingParams-> searchRangeHorP : 12589
    [m3video] interCodingParams-> searchRangeVerP : 14128
    [m3video] interCodingParams-> searchRangeHorB : 13875
    [m3video] interCodingParams-> searchRangeVerB : 12857
    [m3video] interCodingParams-> interCodingBias : 54
    [m3video] interCodingParams-> skipMVCodingBias : 55
    [m3video] interCodingParams-> minBlockSizeP : 50
    [m3video] interCodingParams-> minBlockSizeB : 0
    [m3video] interCodingParams-> meAlgoMode : -43
    [m3video]
    [m3video] intraCodingParams-> intraCodingPreset : 0
    [m3video] intraCodingParams-> lumaIntra4x4Enable : 0
    [m3video] intraCodingParams-> lumaIntra8x8Enable : 0
    [m3video] intraCodingParams-> lumaIntra8x8Enable : 0
    [m3video] intraCodingParams-> chromaIntra8x8Enable : 0
    [m3video] intraCodingParams-> chromaComponentEnable : 0
    [m3video] intraCodingParams-> intraRefreshMethod : 0
    [m3video] intraCodingParams-> intraRefreshRate : -29349
    [m3video] intraCodingParams-> gdrOverlapRowsBtwFrames : 19005
    [m3video] intraCodingParams-> constrainedIntraPredEnable : -29484
    [m3video] intraCodingParams-> constrainedIntraPredEnable : -5
    [m3video]
    [m3video] nalUnitControlParams -> naluControlPreset : -29479
    [m3video] nalUnitControlParams -> naluPresentMaskStartOfSequence : -9112
    [m3video] nalUnitControlParams -> naluPresentMaskIDRPicture : -29349
    [m3video] nalUnitControlParams -> naluPresentMaskIntraPicture : 2048
    [m3video] nalUnitControlParams -> naluPresentMaskNonIntraPicture : 0
    [m3video] nalUnitControlParams -> naluPresentMaskEndOfSequence : 0
    [m3video]
    [m3video] sliceCodingParams-> sliceCodingPreset : 0
    [m3video] sliceCodingParams-> sliceMode : 4096
    [m3video] sliceCodingParams-> sliceUnitSize : 1
    [m3video] sliceCodingParams-> sliceStartOffset[IH264ENC_MAX_NUM_SLICE_START_OFFSET] : 2 0 0
    [m3video] sliceCodingParams-> streamFormat : 0
    [m3video]
    [m3video] loopFilterParams-> loopfilterPreset : 0
    [m3video] loopFilterParams-> loopfilterDisableIDC : 3
    [m3video] loopFilterParams-> filterOffsetA : 89
    [m3video] loopFilterParams-> filterOffsetB : 34
    [m3video]
    [m3video] fmoCodingParams-> fmoCodingPreset : 21
    [m3video] fmoCodingParams-> numSliceGroups : -6
    [m3video] fmoCodingParams-> liceGroupMapType : -40
    [m3video] fmoCodingParams-> liceGroupChangeDirectionFlag : -116
    [m3video] fmoCodingParams-> liceGroupChangeRate : 40
    [m3video] fmoCodingParams-> sliceGroupChangeCycle : -29480
    [m3video] fmoCodingParams-> sliceGroupParams : [5120 256]
    [m3video]
    [m3video] vuiCodingParams-> vuiCodingPreset : 0
    [m3video] vuiCodingParams-> aspectRatioInfoPresentFlag : 0
    [m3video] vuiCodingParams-> aspectRatioIdc : 0
    [m3video] vuiCodingParams-> videoSignalTypePresentFlag : 0
    [m3video] vuiCodingParams-> videoFormat : 32
    [m3video] vuiCodingParams-> videoFullRangeFlag : 80
    [m3video] vuiCodingParams-> timingInfoPresentFlag : 240
    [m3video] vuiCodingParams-> hrdParamsPresentFlag : 191
    [m3video] vuiCodingParams-> numUnitsInTicks : 0
    [m3video]
    [m3video] stereoInfoParams-> stereoInfoPreset : 166
    [m3video] stereoInfoParams-> topFieldIsLeftViewFlag : 111
    [m3video] stereoInfoParams-> viewSelfContainedFlag : 93
    [m3video]
    [m3video] framePackingSEIParams-> framePackingPreset : 141
    [m3video] framePackingSEIParams-> framePackingType : 153
    [m3video] framePackingSEIParams-> frame0PositionX : 111
    [m3video] framePackingSEIParams-> frame0PositionY : 93
    [m3video] framePackingSEIParams-> frame1PositionX : 141
    [m3video] framePackingSEIParams-> frame1PositionY : 157
    [m3video]
    [m3video] svcCodingParams-> svcExtensionFlag : 218
    [m3video] svcCodingParams-> dependencyID : 140
    [m3video] svcCodingParams-> qualityID : 156
    [m3video] svcCodingParams-> enhancementProfileID : 46
    [m3video] svcCodingParams-> layerIndex : 218
    [m3video] svcCodingParams-> refLayerDQId : -116
    [m3video]
    [m3video] interlaceCodingType : 0
    [m3video] bottomFieldIntra : 0
    [m3video] gopStructure : 0
    [m3video] entropyCodingMode : 65
    [m3video] transformBlockSize : 0
    [m3video] log2MaxFNumMinus4 : 0
    [m3video] picOrderCountType : 0
    [m3video] enableWatermark : 0
    [m3video] IDRFrameInterval : -1923359588
    [m3video] maxIntraFrameInterval : -1923256492
    [m3video] debugTraceLevel : 0
    [m3video] lastNFramesToLog : 0
    [m3video] enableAnalyticinfo : -29
    [m3video] enableGMVSei : 72
    [m3video] constraintSetFlags : -44
    [m3video] enableRCDO : -116
    [m3video] enableLongTermRefFrame : -1932244492
    [m3video] LTRPPeriod : -1073692672
    [m3video] searchCenter : 0
    [m3video] enableStaticMBCount : -108
    [m3video] extMemoryDebugTraceAddr : -1
    [m3video] numTemporalLayer : 8
    [m3video] referencePicMarking: 0
    [m3video] extMemoryDebugTraceSize : -1925054463
    [m3video] enableROI : 0
    [m3video]
    [m3video]
    [m3video] bottomFieldIntra : 46
    [m3video] gopStructure : -38
    [m3video] entropyCodingMode : -116
    [m3video] transformBlockSize : -1
    [m3video] log2MaxFNumMinus4 : -1
    [m3video] picOrderCountType : -1
    [m3video] enableWatermark : -1
    [m3video] IDRFrameInterval : -1923359588
    [m3video] maxIntraFrameInterval : -1923256492
    [m3video] debugTraceLevel : 0
    [m3video] lastNFramesToLog : 0
    [m3video] enableAnalyticinfo : -29
    [m3video] enableGMVSei : 72
    [m3video] constraintSetFlags : -44
    [m3video] enableRCDO : -116
    [m3video] enableLongTermRefFrame : -1932244492
    [m3video] LTRPPeriod : -1073692672
    [m3video] searchCenter : 0
    [m3video] enableStaticMBCount : -108
    [m3video] extMemoryDebugTraceAddr : -1
    [m3video] numTemporalLayer : 8
    [m3video] referencePicMarking: 0
    [m3video] extMemoryDebugTraceSize : -1925054463
    [m3video] enableROI : 0
    [m3video]
  • Hi Yang,

               Looks like the parameters values dumped have some issues & dumping garbage values. To enable the GDR, you have to enable the below parameters :

    Set intraCodingPreset as IH264_INTRACODING_USERDEFINED (1) and
    Set intraRefreshMethod as IH264_INTRAREFRESH_GDR (4)

    User can set GDR to be started at any picture during encoding session. To
    start GDR, user need to set below parameter
    IVIDENC2_InArgs::control = IH264ENC_CTRL_START_GDR

    GDR Controlling params - 

    intraRefreshRate This parameter is treated/interpreted as the number of rows to be
    intra refreshed per frame. 

    Supported values are [0, NonZero]
    gdrOverlapRows This parameter is the number of rows overlap between successive
    GDR frames and value should be less than intraRefreshRate.

    Supported values are [0, NonZero].

             For more information, please refer H.264 Encoder UserGuide Appendix O.

    Regards

    Gajanan

  • Hi Gajanan,

    Thanks for your reply, I do the same request as what the UserGuide says now.

    But it still not work, the error report turns to this.

    [m3video] 6737:!ERROR!:ENCLINK::links_m3video/iva_enc/encLink_h264.c:[202]::INTERNAL ERROR:-1
    [m3video] ALGCONTROL FAILED:CMD:1
    [m3video] ERROR: XDM_UNSUPPORTEDPARAM = 14,
    [m3video] ERROR: XDM_FATALERROR = 15
    [m3video] ERROR: IH264ENC_UNSUPPORTED_H264ENCDYNAMICPARAMS = 31,
    [m3video] 6738:WARN
    [m3video] ENCLINK: ERROR in Run time parameters changes, Extended Error code:-2147434496
    [m3video] Extended error 8000c000 for reqObjIndex 0
    [m3video] 6738:WARN
    [m3video] ENCLINK:ERROR in Enclink_h264EncodeFrameBatch.Status[-1] for IVAHD_0
    [m3video] 6738:WARN
    [m3video] ENC : IVAHDID : 0 ENCLINK:ERROR in EncLink_SubmitBatch.Status[-1]

    Regards,

    Yang
  • Hi Yang,

    Can you upload the all the Proper configuration parameters. Looks like you have enabled the unsupported params.

    Regards
    Gajanan
  • Hi Gajanan,

    It should not be.

    I only change parameters into
    dynamicParams->interCodingParams.interCodingPreset =IH264_INTERCODING_HIGH_SPEED;
    dynamicParams->interCodingParams.meAlgoMode=IH264ENC_MOTIONESTMODE_HIGH_SPEED;
    dynamicParams->intraCodingParams.intraCodingPreset =IH264_INTRACODING_USERDEFINED;
    dynamicParams->intraCodingParams.intraRefreshMethod =IH264_INTRAREFRESH_GDR;
    dynamicParams->intraCodingParams.intraRefreshRate =10;
    dynamicParams->intraCodingParams.gdrOverlapRowsBtwFrames =2;

    Nothing else .(And I will set control to IH264ENC_CTRL_START_GDR)

    Before I change ,every thing works well.

    Regards,

    Yang
  • Hi Yang,

                     I agree that you did modified only params which you uploaded in the previous mail. But these params may depend on other params due to which Codec is reporting errors. So please reply with Extended error codes (status[].extErrorCode ) you are getting with the params  .  And also upload all the params which will help to rectify the wrong params.

    Regards

    Gajanan

  • Hi Gajanan,


    I have just solved this problem. Appreaciate your help.

    I wrongly thought that I should set the params every time I want a GDR , so that I change the params all the time. This caused the problem.

    Now , I just init the params at first , and the problem is solved.

    There is still a confusion,that the params I call GDR is like these
    dynamicParams->interCodingParams.interCodingPreset =IH264_INTERCODING_DEFAULT;
    dynamicParams->interCodingParams.meAlgoMode =IH264ENC_MOTIONESTMODE_DEFAULT;
    dynamicParams->intraCodingParams.intraCodingPreset =IH264_INTRACODING_USERDEFINED;
    dynamicParams->intraCodingParams.intraRefreshMethod =IH264_INTRAREFRESH_GDR;
    dynamicParams->intraCodingParams.intraRefreshRate =4;
    dynamicParams->intraCodingParams.gdrOverlapRowsBtwFrames =1;

    While the default value is like these
    dynamicParams->interCodingParams.interCodingPreset =IH264_INTERCODING_HIGH_SPEED;
    dynamicParams->interCodingParams.meAlgoMode =IH264ENC_MOTIONESTMODE_HIGH_SPEED;
    dynamicParams->intraCodingParams.intraCodingPreset =IH264_INTRACODING_HIGH_SPEED;

    These difference will cause a lower efficiency or not?

    Anyway,thanks a lot.

    Regards,

    Yang
  • Hi Yang Zheg,

    yang zheng said:
    While the default value is like these
    dynamicParams->interCodingParams.interCodingPreset =IH264_INTERCODING_HIGH_SPEED;
    dynamicParams->interCodingParams.meAlgoMode =IH264ENC_MOTIONESTMODE_HIGH_SPEED;
    dynamicParams->intraCodingParams.intraCodingPreset =IH264_INTRACODING_HIGH_SPEED;

              These are not the default values. I think the encodingPreset value is in HighSpeed mode. Change it to User XDM_USER_DEFINED Mode.

    This may resolve your problem.

    Regards

    Gajanan

  • Hi Gajanan,

    I got another problem,when I set parameters into GDR, I can't call EncLink_codecSetForceIDR to do forceIDR job.

    Do you have any idea about this?

    Regards

    yang.
  • Hi Yang,

                GDR means the Gradual Decoder Refresh. So I or IDR frame is not required because the frame is refreshed in multple frame depending on the requirement.

    So instead of I frame, its split into many frames. 

                So Forcing IDR frame is not required. If I or IDR frame is forced, then GDR will be disabled & needs to be enabled again for next frame after IDR.

    Regards

    Gajanan

  • Hi Gajanan,

    I need forceIDR to dynamiclly change the resolution ,it's needed. But when I set params to GDR ,it will be an error if I call forceIDR.
    If I do not set params to GDR ,it's OK to run forceIDR. So I think if forceIDR can not work when dynamic params set into GDR environment?(even I have't set inArgs->videnc2InArgs.control = IH264ENC_CTRL_START_GDR)

    And I have print the extErrorCode, it's 
    0 , c00, 0, 4000, 0
    And
    Extended error 8000c000 for reqObjIndex 0.

    Regards

    yang

  • Hi Yang,

                     When ForceIDR is set then ""inArgs->videnc2InArgs.control != IH264ENC_CTRL_START_GDR"". I think what you are doing is correct. But looks like extErrorCode print  has some issue. The values does not look correct extErrorCode. So can you recheck the values of extErrorCode??

    Based on that we can take decision what is the wrong config issue. 

    Regards

    Gajanan

  • Hi Gajanan

    All problems is solved now,finally.

    The main reason caused all these is the params when I create the enc link is wrong.
    I set the pLinkChPrm->StreamPreset in a wrong value, it caused the wrong value of transformBlockSize.
    And now it's OK.Really appreciate your help, thanks for your patience.

    Regards

    yang