Can i.MX53 support mulitiple decoder more than 4 instances?

cancel
Showing results for 
Search instead for 
Did you mean: 

Can i.MX53 support mulitiple decoder more than 4 instances?

1,081 Views
JasonShi1z
Contributor I

Hello, we are working on a NVR like project with i.MX53, we want to decode 8 or 16 H.264 streams from external devices like IPCamera or USB camera (with H.264 video encoder inside), for the multiple video preview, we want to live view a combined big image by using 8 or 16 QCIF small images which are decode from H.264 stream. But I found in VPU spec that it can only handle 4 decode instances synchronically, it means that i can only decode 4 h.264 stream at same time, so i can only connet 4 external devices. For the performance, I think it's easy for i.MX53's VPU to handle 16 QCIF bitstream decoding, 16CIF's resolution is only a D1 (720x576). Maybe the restriction of max 4 decode instances is due to the firmware of BIT 16 bit DSP. All of the h.264 stream are from same H.264 video encoder, so I think the BIT don't need reload the decode code frequently, it will save some performance and context set switching bandwidth.

Do you have some BIT firmware which can handle more decode instances than 4  with api of vpu_DecOpen()?

We are working on the i.MX53 for 4 months, and if i.MX53 can not handle this, how about i.MX6?

Thanks.

0 Kudos
8 Replies

111 Views
JasonShi1z
Contributor I

The mxc_vpu_test.out app can support multiple decoding and display, right? But we failed.

Can anyone give us a correct example with -options?

Thanks in advance.

Jason

0 Kudos

111 Views
JasonShi1z
Contributor I

the log of running 2 files decoding with mxc_vpu_test:

./mxc_vpu_test.out  -D "-i /app/test1.mp4 -j 0    -k 0   -w 176 -h 144 " \
>                     -D "-i /app/test2.mp4 -j 176 -k 0   -w 176 -h 144 "
[INFO] VPU test program built on Sep 24 2011 21:30:30
[INFO] Product Info: i.MX53
[INFO] VPU firmware version: 1.4.41
[INFO] VPU library version: 5.3.2
[INFO] Format: STD_MPEG4
[INFO] MPEG4 class: MPEG4
[INFO] Input file "/app/test1.mp4" opened.
[INFO] Format: STD_MPEG4
[INFO] MPEG4 class: MPEG4
[INFO] Input file "/app/test2.mp4" opened.
[INFO] Mpeg4 Profile: 0 Level: 3 Interlaced: 0
[INFO] Aspect Ratio Table index: 1
[INFO] Decoder: widtmxc_ipu mxc_ipu: Channel already disabled 10
mxc_ipu mxc_ipu: Channel already uninitialized 10
h = 176, height = 144, fps = 15,mxc_ipu mxc_ipu: Channel already disabled 10
mxc_ipu mxc_ipu: Channel already uninitialized 10
 count = 4
[INFO] CROP left/top/right/bottom 0 0 0 0
[INFO] Display fps will be 0
[INFO] Display to 176 144, top offset 0, left offset 0
[INFO] Mpeg4 Profile: 0 Level: 3 Interlaced: 0
[INFO] Aspect Ratio Table index: 1
[INFO] Decoder: width = 176, height = 144, fps = 15, count = 4
[INFO] CROP left/top/right/bottom 0 0 0 0
[INFO] Display fps will be 0
[ERR] VIDIOC_S_OUTPUT failed
[INFO] 150 frames took 4970480 microseconds
[INFO] dec fps = 1724.85
[INFO] total fps= 30.18
mxc_ipu mxc_ipu: warning: wait for bg sync eof timeout
mxc_ipu mxc_ipu: warning: wait for bg sync eof timeout
root@lucid-desktop:/unit_tests#

0 Kudos

111 Views
JasonShi1z
Contributor I

Dear Mr. ZeeFrench,

First, we did not succeed with your gstream example on our QSB, does it have any other dependency?

Second, we don't want to use gstream for decoding, we just want to run it in our own application. Gstream is too complex for us to implemented, mxc_vpu_test is good example for multi-decoding, but we found we get many errors with it.

For mxc_vpu_test, it should decode 2 files at same time, we use it as follow:

 ./mxc_vpu_test.out -D "-i ./test1.mp4 -j 0   -k 0   -w 176 -h 144 " \
                   -D "-i ./test2.mp4 -j 176 -k 0   -w 176 -h 144 " 

If we decode it with only one file (test1.mp4), it works well. but when decode it with 2 files, then failed.

The test1.mp4 and test2.mp4 are copied from same file in the config fold. but we get errors when display in V4L2.

Or we are running 2 instance like yours here:

./mxc_vpu_test.out -D "-i ./test1.mp4 -j 0   -k 0   -w 176 -h 144 " &
./mxc_vpu_test.out -D "-i ./test2.mp4 -j 176 -k 0   -w 176 -h 144 " &
[ERR]   VIDIOC_S_OUTPUT failed

And we still get errors.

Regards. Jason

0 Kudos

111 Views
ZeeFrench
NXP Employee
NXP Employee

Hi Jason,

gst-launch playbin2 uri=file:///media/SD/video1.mp4 video-sink='mfw_isink disp-width=640 disp-height=512 disp-top=0 disp-left=0 display=DVI'&
gst-launch playbin2 uri=file:///media/SD/video2.mp4 video-sink='mfw_isink disp-width=640 disp-height=512 disp-top=0 disp-left=640 display=DVI'&
gst-launch playbin2 uri=file:///media/SD/video3.mp4 video-sink='mfw_isink disp-width=640 disp-height=512 disp-top=512 disp-left=0 display=DVI'&
gst-launch playbin2 uri=file:///media/SD/video4.mp4 video-sink='mfw_isink disp-width=640 disp-height=512 disp-top=512 disp-left=640 display=DVI'

This has been tested on  QSB with 1024x768 @ 16 bpp screen decoding / resizing videos up to vga (remove sound track and have your videos at correct size if possible), above you will meet VPU / memory bandwith limitations sooner or later.

Cheers, ZF.

0 Kudos

111 Views
JasonShi1z
Contributor I

Do you have some test application samples for decoding more than 2 instances in parallel? The mxc_vpu_test is only for 1 decoding, we found some problems inside V4L2 when we run more than 2 instances?

We proved that we can decode 8 instances in parallel, and saved the decoded data into files. We are new to iMX serials, and need more help on how to display multi-decoded-images on same screen.

Regards. 

0 Kudos

111 Views
JasonShi1z
Contributor I

Thank you, Mr. ZeeFrench,

Finally we found that i.MX53 can support 8 parallel codec instances and this was proven. The previous SDK is 4 instances, and the latest one is 8 instances.

It's very expected that i.MX6 can support more instances.

Regards.

0 Kudos

111 Views
ZeeFrench
NXP Employee
NXP Employee

Hi, yes you are limited to 4 parrallel instances on 53 but i.MX6 vpu doesn't have this limitation anymore.

0 Kudos

111 Views
JasonShi1z
Contributor I

It's so quiet here, no one can answer me?

0 Kudos