AnsweredAssumed Answered

VPU MJPEG encode 8192x8192

Question asked by Peter Bergin on Mar 25, 2015
Latest reply on Mar 21, 2016 by Cristian Pandele

I am trying to test the VPU capability to encode a picture to JPEG. The i.Mx6 manual and datasheets state that it is possible to encode pictures up to 8192x8192 pixels in the VPU. I want to verify this but has not succeded due to memory allocation problems. Can anyone give me a suggestion how to verify and test the capability of i.Mx6 to JPEG encode a picture of size 8192x8192 in the VPU?

 

I have tested on a Nitrogen6_max board with 4GB of RAM. I am running Yocto on current master branch (1.8 WIP) with 3.10.53 kernel. On this plattform I have tested gstreamer0.10, gstreamer1.0 and mxc_vpu_test with the same result. In Gstream 1.0 the maximum resolution into

imxvpuenc_mjpeg is 1920x1080, any reason for this constraint?

 

Gstreamer 0.10:

GST_DEBUG=vpuenc:5 gst-launch-0.10 -v videotestsrc num-buffers=1 ! video/x-raw-yuv,format=\(fourcc\)UYVY,width=8192,height=8192,framerate=1/1,color-matrix=hdtv ! ffmpegcolorspace ! video/x-raw-yuv,format=\(fourcc\)NV12,width=8192,height=8192,framerate=1/1 ! vpuenc codec=mjpg ! filesink location=sample.jpg

 

From stdout:

0:00:02.042111334   678  0x101fd20 ERROR                 vpuenc /home/sepbe/yocto/nitrogen_master/build/tmp/work/nitrogen6x-poky-linux-gnueabi/gst-fsl-plugin/4.0.2-r0/gst-fsl-plugins-4.0.2/src/video/vpu/src/vpuenc.c:325:vpuenc_core_mem_alloc_dma_buffer: func VPU_EncGetMem failed!!

 

From /var/log/messages:

mxc_vpu 2040000.vpu: Physical memory allocation error!
mxc_vpu 2040000.vpu: Physical memory allocation error!
Mar 25 09:31:27 nitrogen6x user.err kernel: mxc_vpu 2040000.vpu: Physical memory allocation error!
Mar 25 09:31:27 nitrogen6x user.err kernel: mxc_vpu 2040000.vpu: Physical memory allocation error!

 

 

mxc_vpu_test:

root@nitrogen6x:~# VPU_TEST_DBG=5 ./mxc_vpu_test.out -E "-i /home/root/sample_8192_8192.yuv -o /home/root/images/image-205_yuv444.jpg -f 7 -c 1 -w 8192 -h 8192"
[INFO] main.c:515 VPU test program built on Mar 25 2015 09:24:14
[INFO] Product Info: i.MX6Q/D/S
[INFO] main.c:538 VPU firmware version: 3.1.1_r46061
[INFO] main.c:540 VPU library version: 5.4.27
[INFO] utils.c:535 Format: STD_MJPG
[INFO] utils.c:411 Input file "/home/root/sample_8192_8192.yuv" opened.
[INFO] utils.c:435 Output file "/home/root/images/image-205_yuv444.jpg" opened.
[INFO] enc.c:980 Capture/Encode fps will be 30
[DEBUG] enc.c:400 minfb 0
[ERR] mem allocation failed!
Frame buffer allocation failure
[ERR] enc.c:507 failed to allocate single framebuf
root@nitrogen6x:~# 

 

Regards,

/Peter

Outcomes