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.

DM814x YUV422P Capture and OMX Encode

Dear all,

As background, we have setup VIP1 for 24-bit RGB input and capture (using V4L2) and encode (using OMX) via a GStreamer pipeline (see below).  This works fine.

gst-launch v4l2src device=/dev/video5 always-copy=false queue-size=12 num-buffers=1000 ! video/x-raw-yuv-strided,format=\(fourcc\)NV12,width=1920,height=1080,framerate=\(fraction\)60/1 ! omx_h264enc ! video/h264 ! gstperf ! filesink location=sample.h264

We have setup VIP0 for 16-bit YUV422P input.  We want to capture this (using V4L2) and then encode into H264 (using omx) as above with a similar GStreamer pipeline.

gst-launch v4l2src device=/dev/video0 always-copy=false queue-size=12 num-buffers=1000 ! video/x-raw-yuv-strided,format=\(fourcc\)NV12,width=1920,height=1080,framerate=\(fraction\)60/1 ! omx_h264enc ! video/h264 ! gstperf ! filesink location=sample_0.h264

Unfortunately, the encode is corrupted.  Please see the below screenshot (mplayer playing the raw H264 stream).  The alignment of the VLC windows in the capture desktop is correct, they are deliverately placed off the top left and off the bottom right.

The V4L2 capture driver has been tweaked to setup the VIP based on the input requirements:

VIP1 -> videoCaptureMode = VPS_CAPT_VIDEO_MODE_SINGLE_CH_NON_MUX_DISCRETE_SYNC_ACTIVD_VSYNC;
        videoIfMode = VPS_CAPT_IF_MODE_24BIT;
        inDataFormat = FVID2_DF_RGB24_888
VIP0 -> videoCaptureMode = VPS_CAPT_VIDEO_MODE_SINGLE_CH_NON_MUX_EMBEDDED_SYNC;
        videoIfMode = VPS_CAPT_IF_MODE_16BIT;
        inDataFormat = FVID2_DF_YUV422P;

It looks to me like pixel format conversion in the HDVPSS from RGB24 to NV12 works ok but that the conversion from YUV422P to NV12 does not work.

Can anyone provide any help with this issue?

Kind regards,

Danny Cullen