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.

Change video codec error and question

Dear Experts,

We are using DVR_RDK 3.5.

We are trying to change codec from REL. 500.V.H264AVC.E.IVAHD.02.00.04.01 to REL. 500.V.H264AVC.E.IVAHD.02.00.08.00. But we meet problems.

Two Questions:

1) we changed maxPicSizeRatioI=640 to maxPicSizeRatioI=30.

if it set maxPicSizeRatioI=640, error IH264ENC_EXTERROR_RATECTRL_IFRAMEPICSIZE is occurred. Why?

 

2) in codec document,

H264_Encoder_HDVICP2_UserGuide.pdf

REL. 500.V.H264AVC.E.IVAHD.02.00.08.00\ 500.V.H264AVC.E.IVAHD.02.00\IVAHD_001\Docs

section 4-79

                  > If maxPicSizeRatioI is from 2 to 30 maxPicSize = averagePicSize *

                  > maxPicSizeRatioI

                  > If maxPicSizeRatioI is from 33 to 960 maxPicSize =

                  > averagePicSize * maxPicSizeRatioI >> Q5

What is Q5??

Plz help and reply~

thx ~

HB

  • Hello,

    hb chen said:
    What is Q5??

    This is fixed point number format.

    To convert a number from floating point to Qn:

    You should multiply the floating point number to 2n where n in this case is 5 and round it to the nearest integer.

    Best Regards,

    Margarita

  • Hi HB,

    hb chen said:

    1) we changed maxPicSizeRatioI=640 to maxPicSizeRatioI=30.

    if it set maxPicSizeRatioI=640, error IH264ENC_EXTERROR_RATECTRL_IFRAMEPICSIZE is occurred. Why?

    The error could possibly be because of the wrong setting of maxPicSizeRatioI with respect to intraFrameInterval.

    Unlike  REL. 500.V.H264AVC.E.IVAHD.02.00.04.01,  in case of REL. 500.V.H264AVC.E.IVAHD.02.00.08.00 the upper limit of maxPicSizeRatioI is restricted to (intraFrameInterval << 5).

    Please refer the description of maxPicSizeRatioI in section 4.2.2.2 IH264ENC_RateControlParams of the User Guide for more details.

     

    Best Regards,

    Nandu.

  • Dear Nandu,

    Based on your description (maxPicSizeRatioI is restricted to (intraFrameInterval << 5)):

    The error could possibly be because of the wrong setting of maxPicSizeRatioI with respect to intraFrameInterval.

    Unlike  REL. 500.V.H264AVC.E.IVAHD.02.00.04.01,  in case of REL. 500.V.H264AVC.E.IVAHD.02.00.08.00 the upper limit of maxPicSizeRatioI is restricted to (intraFrameInterval << 5).

     

    we change maxPicSizeRatioI=640 to maxPicSizeRatioI=30.

    Will this modification affect video quality?

    How to keep same quality when we change codec from E.IVAHD.02.00.04.01 to E.IVAHD.02.00.08.00, and change maxPicSizeRatioI=640 to maxPicSizeRatioI=30??

     

    THX ~

     

    HB

     

     

     

  • Hi HB,

    In the User Guide it is mentioned as follows:

    maximum picture size is computed in the following manner
    If maxPicSizeRatioI is from 2 to 30
    maxPicSize = averagePicSize *maxPicSizeRatioI and


    If maxPicSizeRatioI is from 33 to upperLimitMaxPicSizeRatioI
    maxPicSize = averagePicSize * maxPicSizeRatioI >> Q5

    Hence the change of value from 640 to 30, definitely will not degrade the video quality.

    Also, the value of parameter maxPicSizeRatioI is just a guided value to rate control to determine max picture size and encoder may not strictly follow this. 

    .

    Best Regards,

    Nandu.

  • Dear Nandu,

    A basic question that I might lost the description in document.

    Why does it has to change from 640 to 30(or other value) for codec 02.00.08.00???

    Is there any codec issue?

    HB

  • Dear HB,

    The hard coded limit for maxPicSizeRatioI has been changed and made dependent on the intra frame interval (upperLimitMaxPicSizeRatioI = intraFrameInterval << 5).

    Which means
    when the intra frame interval is 15, then the max value for the ratio, upperLimitMaxPicSizeRatioI = 15<<5 (=480)
    when the intra frame interval is 30, then the max value for the ratio, upperLimitMaxPicSizeRatioI = 30<<5 (=960)
    when the intra frame interval is 60, then the max value for the ratio, upperLimitMaxPicSizeRatioI = 60<<5 (=1920)

    Also as I have mentioned earlier,

    Maximum picture size is computed in the following manner:

    maxPicSize = averagePicSize * maxPicSizeRatioI                  , if maxPicSizeRatioI is from 2 to 30

    maxPicSize = averagePicSize * maxPicSizeRatioI >> Q5       , if maxPicSizeRatioI is from 33 to                          

                                                                                                                    upperLimitMaxPicSizeRatioI

    which means maxPicSize will be same when the maxPicSizeRatioI is 20 or 640.

    .

    Best Regards,

    Nandu.

  • Dear Nandu,

    Do you have recommended value if our ogiainal setting is 640 in old version codec?

    Should we use 20 or 30 for this setting in new codec?

    thx ~

    HB

  • Hi HB,

    20 should be fine.

    Also please keep in mind that this is just a guided value to rate control and encoder may not strictly follow this. 

    .

    Best Regards,

    Nandu.