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 decoder - YVU420 support ?

Guru 20755 points

Hello,

I am using TI's decoder HDVICP 2.0 decoder which is described in datasheet as following "Supports YUV 420 semi-planar color subsampling format". 
The encoded stream was encoded in YVU420 (U,V swapped).

Does TI's encoder can support the encoded format ? If not - what can be done to make is possible ?

Thank you,

Ran

  • Hi Ran,

    Encoder input YUV format doesn't  matter for encoded bit-stream.  Irrespective of input YUV Bit-stream will be H264 Standard compliant. So TI encoder stream will be decodeble by any H264 decoder and TI decoder will decode all H264 bitsream.

    Thanks,

    Veeranna

  • Hi Veeranna,

    I did not fully understand.
    1. I am NOT using TI's encoder - only TI's decoder.
    2. I was told that the "other encoder" uses YVU420 (UV swapped).
    3. TI's encoder datasheet states that it "support YUV420 planar"

    So the question is if TI's decoder will be capable of decoding the bitstream.

    This is the mpeg-ts of the "other encoder" bitstream:

    https://drive.google.com/file/d/0B22GsWueReZTeEpLbzBGUXVLbEU/view?usp=sharing



    Thanks,
    Ran

  • Hi Ran,

    Yes TI decoder will decode this stream, please extract elementary stream from MPEG-TS and feed to the decoder.

    Thanks,
    Veeranna
  • Hi Veeranna,

    One more question if I may.
    If the H.264 bitstream doesn't care about the chroma type, why does "Sequence Parameter Set" (SPS) has chroma field ?

    Regards,
    Ran
  • Hi Ran,
    Chroma_format_idc in SPS tells whether YUV in monochrome. 420,422 or 444. The stream has chroma_format_idc = 420, our decoder will decode this stream.
    Regarding UV swap at encoder, we can re-swap after decoding. If you share expected output YUV, we will compare with our decoder output and comment more on this.

    Thanks,
    Veeranna
  • Hi Veeranna,

    Thank you very much for this assistance.

    > If you share expected output YUV, we will compare with our decoder output and comment more on this.

    I required YUV from decoder->display (it already works like this when I encode - and then decode - the stream using TI's encoder).

    1. Do I need to do some sort of UV swap after decoding (because the original frames were YVU) ?How can it be easily done ?

    2. Another thing, if I play in VLC the mpeg-ts (I've added link to it above), and check tools->codec media, I see YUV (not YVU as I expected according to what was told me about this stream) , do you know why ?

    /* ========================= TI_814X_BUILD case ==============================
    |
    IPC_BITS_OUT_A8 (BitStream)
    |
    IPC_BITS_IN (Video)
    |
    DEC (YUV420SP)
    |
    IPC_OUT (Video)
    |
    IPC_IN (Vpss)
    | (16 channels)
    MP_SCLR (Vpss)
    |
    DUP
    |

    Thank you very much!

    Ran

  • Hi,

    It seems that the "other encoder" information that was given to me was mistake.
    It is "TI's H264 DM6148 V1.14 Encoder".
    So I guess there is no issue here, both support YUV420, and no swapping is required anywhere ,
    Right ?

    Thanks,
    Ran
  • Thank you very much!