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.

Quality factor vs Quantization

Guru 20755 points

Hello,

Can you please help me understand the term quality factor related to codec (H.264 encoder), and its difference from quantization parameters ?

Is it possible to read the status of these parameters ?

Regards,

Ran

  • If you referring to "IH264ENC_FrameQualityFactor", then it is currently not used parameter in interface.

    Regards

    Deepak Poddar

  • Hello Ran,

    If you are referring to video quality, then quality of a video encoded is mainly subjective.

    but there are few methods which measures quality of a video but those are objective like involves calculation and comparison with the original data.

    their result are approximate.(read video quality in wiki).

    as for quantization parameter (QP), it is inversely propositional to video quality.

    i mean,in simple language, if  QP is increased then encoded bit generated will be less which will ultimately result in poor video quality and vice versa.

    But QP is not only thing that has effect on video quality, there are many other parameter which has to be taken into consideration.

    hope this is what you were looking for.

    Regards,

    Vinod

  • Hi,

    What is the QP recieved in status, is it what we set as initial QP or is it the real QP used ( QPMIN < QP value < QPMAX) ?

    Regards,

    Ran

  • Hi Vinod,

    can you please refer to the question about qp ?

    Thanks!

    Ran

  • Hi Ran,

    Qp in status is always what is being calculated by the algorithm.

    your initial QP means that you are just providing a starting value for QP. its like a loop after that the algorithm will take care of it.

    Like, if you are running in VBR mode then your QP(the initial QP that you provided ) will remain constant throughout the execution.

    But if you running in CBR mode then the QP will change so as to maintain the bit rate. what i meant is the new QP for every frame / macroblock is calculated depending on the complexity of the current frame, the previous frame QP, bit generated, the buffer size remaining etc.

    so the effect of your initial QP on the Video will last for not more that few frames.

    Regards,

    Vinod.

  • Hi Vinod,

    Thank you very much for answers. I am using H.264/MPEG-4 codec in DM8168. From past Q&A I understood it a bit different: H.264 uses skip frames and stuffing bits, but it was not mention of QP, while VBR in H.264 was mentioned as changing internally QP. From your answer I understand that CBR changes QP, and VBR does not. Can you clarify this ?

    Regards,

    Ran

  • Hi Ran,

    sorry for my last comment "Like, if you are running in VBR mode then your QP(the initial QP that you provided ) will remain constant throughout the execution".

    Well, the thing is,

    Rate control is not a part of the H.264 standard, but the standards group has issued non-normative guidance to aid in implementation.

    So we employ RC algo. for having much better control over bit rate.

    When RC is disabled, only at that time QP will remain constant throughout the process. But if RC is enabled then QP will be manipulated by the RC algo. according to the mode of encoding (CBR or VBR).

    Vinod.

  • also refer to this link, it will clarify doubts for CBR and VBR operation.

    http://forums.adobe.com/thread/398758

    Regards,

    Vinod

  • Hi Vinod,

    Thank you for the link, though it does not make clear the real differences between CBR and VBR related to H.264 TI's codec used with DM8168, i.e. VBR term is used for several different RC algo in H.264 making the understanding more difficult, while the term that should be used is: NON_RC_ALGO, CVBR, CBR, VBR.
    CBR as I understtod from previous threads does not use QP but use: 1. stuffing bits. 2. skip frames. (or does it also use QP ??)  therefore my previous question was if QP is also used or not in CBR too (talking about CBR used in TI'S H.264 codec HDVICP 2.0 codec, not just any CBR). regarding VBR the link you sent say that minmum and maximum bitrate can be selected when using VBR, while in TI'S VBR , H.264, HDVICP2.0 as I understood from previous answers it is always bound on 5% from targetbitrate, and there is no API for selecting the maximum/minimum bitrate. With TI'S H.264 HDVICP 2.0 CVBR rate control we can selected maximum bit rate with given API.

    As I undetsand there is no use about talking about general CBR, VBR algo, since each provider/codec can choose his way to implement rc algo.


    Any comments are welcome,

    Regards,

    Ran