I'm using a custom board with an IMX6DL processor.
I'm on Yocto rocko with kernel 4.9.88
Gstreamer (which encodes correctly) is 1.12.2
libimxvpuapi from rocko is v0.10.3
To reproduce this issue...
Capture Raw Frames and convert to NV12
I captured raw camera frames at 1080p UYVY, then added an overlay and converted the color to NV12 format. I can't share the project I used that added the overlay, but capturing raw camera frames can be done with gstreamer to the same effect.
$gst-launch-1.0 imxv4l2src num-buffers=30 ! video/x-raw,width=1920,height=1080,format=UYVY ! imxvideoconvert_ipu ! video/x-raw,width=1920,height=1080,format=NV12 ! filesink location="gst_1080p.NV12"
Modify example in libimxvpuapi
$git clone git://github.com/Freescale/libimxvpuapi.git
$git checkout v0.10.3
copy in the attached encode-example.c (just changed resolution to 1920x1080, added chroma_interleave=1 to open_params and to imx_vpu_calc_framebuffer_sizes)
followed README.md instructions to compile code, installed on my iMX device
Convert the video
$encode-example -i gst_1080p.NV12 -o convert_test.h264
I copied the convert_test.h264 back to my PC for viewing with ffplay
What DOES work
*encode-example works great with 720p, just not the 1080p videos.
*gstreamer can convert 1080p videos
$gst-launch-1.0 filesrc location="1080_overlay.nv12" ! rawvideoparse use-sink-caps=false width=1920 height=1080 format=nv12 ! vpuenc_h264 ! queue ! flvmux ! filesink location="gst_overlay_1080.mp4"
I took the liberty of sharing my 1080_overlay.nv12 and 720_overlay.nv12 files if you don't want to capture your own raw frames
ConvertTest - Google Drive