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.

Issue with IDRFrameInterval of IH264ENC_Params on DM8168 from DVRRDK_01.09.00.16

Hi All,

I am using DVRRDK_01.09.00.16 for DM8168 development and I am facing the issue with IDR frame generation.

According to the RDK, IDRFrameInterval is for interval between two IDR frames,

0 : Only first I frame as IDR

1 : All I frames are IDR

2 : 1 out of 2 I frames are IDR starting from first I-frame

The H264 encoding is running at 30 fps, one I-frame for every 30 frames.  I need all I-frames be IDR frames.

In the RDK, IDRFrameInteval = 1, which is exactly what I want.

BUT, no matter what IDRFrameInterval is set to, all I-Frames not an IDR-Frame, except for the first I-frame.

Is this a bug, or am I missing something?

Thanks,

Chris

  • Hi Chris,

    Can you please let us know the values that you set for below parameters?

    1. maxIntraFrameInterval

    2. MaxInterFrameInterval

    3. IDRFrameInterval

    Please set them as below & try.

    1. maxIntraFrameInterval = 1

    2. MaxInterFrameInterval = 1

    3. IDRFrameInterval  = 1

    4. interFrameInterval = 0

    Please click on "verify" if this answers your query, otherwise reply back.

  • Ramakrishna Adireddy said:

    Hi Chris,

    Can you please let us know the values that you set for below parameters?

    1. maxIntraFrameInterval

    2. MaxInterFrameInterval

    3. IDRFrameInterval

    Please set them as below & try.

    1. maxIntraFrameInterval = 1

    2. MaxInterFrameInterval = 1

    3. IDRFrameInterval  = 1

    4. interFrameInterval = 0

    Please click on "verify" if this answers your query, otherwise reply back.

    Hi all,
    I have the same issue: in the RDK 01.09.00.16 IDRFrameInterval is set to 1, but only the first I-frame seems be a IDR frame.

    As far as I understand, in the RDK:
     * IDRFrameInterval is set to 1 (dvr_rdk/mcfw/src_bios6/links_m3video/iva_enc/encLink_h264.c line 390)
     * MaxInterFrameInterval is not explicity set, so it has the default value ENC_LINK_DEFAULT_ALGPARAMS_MAXINTERFRAMEINTERVAL, i.e. 1
     * interFrameInterval is always set to 1, for each mcfw usercase (for h264 streams)
     * I am not able to find (and so set) maxIntraFrameInterval. The only reference I caught is in
    ti_tools/codecs/REL.500.V.H264AVC.E.IVAHD.02.00.00.04/500.V.H264AVC.E.IVAHD.02.00/IVAHD_001/Client/Test/Src/h264enc_ti_config.c
    but it seems a test application...

    Changing only interFrameInterval to 0 leads a some assertion fails...

    Any helps?
    Thanks in advance

    Ivan

  • Hi Ivan,

    In DVRRDK 01.09.00.16 we identified an issue (after the release :(

    In mcfw/src_bios6/links_m3video/iva_enc/encLink_Common.c file, we missed out the code to set the encodingPreset. Please add the following lines (in red) in implementation of enclink_codec_set_ch_alg_create_params function.

     

        if (pChAlgCreatePrm->inputContentType == IVIDEO_INTERLACED)
        {
             pChAlgCreatePrm->mvDataSize =
                ENC_LINK_GET_INTERLACED_MVBUF_SIZE(
                 pInChInfo->width, pInChInfo->height);
        }
        else
        {
             pChAlgCreatePrm->mvDataSize =
                ENC_LINK_GET_PROGRESSIVE_MVBUF_SIZE(
                 pInChInfo->width, pInChInfo->height);
        }

    +    pChAlgCreatePrm->maxBitRate        = pChCreatePrm->maxBitRate;
    +    pChAlgCreatePrm->encodingPreset    = pChCreatePrm->encodingPreset;
    +    pChAlgCreatePrm->rateControlPreset = pChCreatePrm->rateControlPreset;

        return ENC_LINK_S_SUCCESS;

     

    Regards,

    Anshuman

    PS: Please mark this post as verified, if you think it has answered your question. Thanks.

  • Hi anshuman,

    thanks for your hint! I think I got it now!

    Regards

    Ivan

  • Hi Anshuman,

    Thank you VERY much!  That fixed the problem.

    Chris.