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.

H.264 aspect ratio

Guru 20755 points

Hello,

I'm using DM8168 HDVICP H.264 codec, and would like to underatang what is the usage of aspect ratio parameter in this codec. Is it used to change the encoded frame, or is it just some kind of header of H.264 ?

Support of aspect ratio means that input frame and output frame will be different in terms of scaling,padding, as I understand. Does the codec support such things or is all that need to be done before the frame gets into TI's codec ?
Is there a support for image blank padding in codec ?

Thank you,

Ran 

  • Hi Ran,

    Codec reads this aspect ration only to code as a syntax element in VUI information.

    It does not do any other operation as you are guessing like scaling, frame rate conversion or black padding.

    Regards,

    Venu

  • Hi Venu,

    1. Is there any frame processing involved in codec , aside of coding frame to bitstream ?
    2. scalingWidth is described as "Scaled image width for post processing for decoder. Not applicable for encoders.", what is it used for ?
    3. imagePitch, for padding is done before the framge gets into codec ? is it the blank padding ?

     

    Best Regards,

    Ran

  • raneliya said:
    Is there any frame processing involved in codec , aside of coding frame to bitstream ?

    No.

    raneliya said:
    scalingWidth is described as "Scaled image width for post processing for decoder. Not applicable for encoders.", what is it used for ?

    For the display buffer pitch.

    raneliya said:
    imagePitch, for padding is done before the framge gets into codec ? is it the blank padding ?

    Yes ImagePitch can be greather than or equal to imageWidth for varied reasons. 

    Regards,

    Venu

  • Hi Venu,

    >Codec reads this aspect ration only to code as a syntax element in VUI information.

    1. How does codec reads the aspect ratio ? Does the encoder reads this as input parameter before writing it to VUI ? 

    2. When the decoder reads the bitstream what does it do with given aspect ratio ? how is it used in the decoder side ?

    Thanks,

    Ran

  • Application@enc side provides the aspect ratio the encoder as a parameter -> Encoder encodes the aspect ratio as a syntax element as part of VUI info in the final bitstream  -> Decoder decodes the aspect ratio syntax element from the bitstream and populates the VUI info structure to be passed to Application@dec side -> Application @dec side get the VUI info from the decoder which has the aspect ratio and might use this info for further processing (if needed) like scaling etc.

    Regards,

    Venu

  • It's exactly what I needed, many thanks!

    Ran