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.

AM5728: H.264 encoder support for SEI

Part Number: AM5728

Hi, 

I want to include Picture Timing SEI in a H264 file encoded by IVA.

I can include SEI data but I think that is invalid data. I want to know the way to include Picture Timing SEI.

To include SEI data, I checked H264_Encoder_HDVICP2_UserGuide ( Appendix B ), and following code was added to gstducatih264enc.c.

  params->nalUnitControlParams.naluControlPreset =
      IH264_NALU_CONTROL_USERDEFINED;

  params->nalUnitControlParams.naluPresentMaskStartOfSequence = 0x21A0; 
  params->nalUnitControlParams.naluPresentMaskIDRPicture = 0x21A0;      
  params->nalUnitControlParams.naluPresentMaskIntraPicture = 0x0002;
  params->nalUnitControlParams.naluPresentMaskNonIntraPicture = 0x0002;
  params->nalUnitControlParams.naluPresentMaskEndOfSequence = 0x0C00;   
  /* IDR frame includs SEI */
  IH264ENC_SET_NALU(params->nalUnitControlParams.naluPresentMaskIDRPicture, SEI);

gstreamer pipeline

gst-launch-1.0 -e \
v4l2src device=/dev/video1 num-buffers=2000 io-mode=4 ! \
'video/x-raw,format=(string)YUY2,width=(int)1280,height=(int)720,framerate=(fraction)30/1' ! \
queue ! vpe num-input-buffers=8 ! 'video/x-raw,format=(string)NV12,width=(int)1280,height=(int)720' ! queue! \
ducatih264enc level=level-51 profile=high intra-interval=10 inter-interval=5 ! queue ! h264parse ! filesink location=test.h264

I parse the NALU in test.h264 using ffmpeg. 

It seems that Picture Timing SEI exsists but SEI payload size is only one. So, I think it is invalid SEI data.

I want to know the way to include Picture Timing SEI.

My environment is,

board: AM5728 evm

SDK ver: 5.03

camera: mt9t11

Best Regard, 

Reona