Corrupted MJPG decoding result with FSL 3.10.17 BSP on i.MX6Q VPU

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Corrupted MJPG decoding result with FSL 3.10.17 BSP on i.MX6Q VPU

1,559 Views
yanfengliu
Contributor III

We are trying the examples from the libfslwap-1.0.46 package which comes together with the FSL 3.10.17 release on a i.MX6Q device.

We found the MJPG decoder can't correctly decode a .mjpg file generated by the VPU itself, the resulted .yuv file looks just have a few rows right at beginning of the picture and the rest pixels are constant color.

The command we are using is "test_dec_arm_elinux", we checked the result using ffplayer on PC.

Does someone have hints about how to resolve this?

Regards,

yf

Labels (4)
7 Replies

1,219 Views
yanfengliu
Contributor III

Finally I am able to decode JPG correctly with "mxc_vpu_test" tool. The output .yuv file is actually correct since it can be encoded as .264 file (w/ "mxc_vpu_test") and displayed correctly.

0 Kudos

1,219 Views
gfine
NXP Employee
NXP Employee

Hi Yanfeng,

So as to not confuse this problem with the JPEG 1024 problem I will handle this through this thread.

You are saying that you encode a video through the vpu, and when you play it back using ffmpeg there are alignment problems and video artifacts? To narrow this down.  Is the same problem seen when using other mpeg players?

Cheers,

Glen

0 Kudos

1,219 Views
yanfengliu
Contributor III

Glen,

Let me try to be more specific so that you can reproduce the issues:

1) FSL release version is "3.10.17-1.0.3"

2) VPU wrapper library is version  1.0.46-r0"

3) program used is the "test_dec_arm_elinux" example comes with the libfslvpuwrap 1.0.46-r0.

4) Test procedure is to use the example to decode a MJPG file generated by the encoder example, it contains only one frame and is JFIF style.

5) The decoder tool command line shows no error, but the result file content is not right.

It seems that I can't upload .mjpg easily on this forum, otherwise I can share you the input file.

UPDATE: I uploaded the input here 1280x720.mjpg test input for libvpuwrap 1.0.46 decoder test but not sure if you can see it.

The result file looks like this in ffplayer, we haven;t tried other players yet.

Unnamed QQ Screenshot20151104082247.png

0 Kudos

1,219 Views
gfine
NXP Employee
NXP Employee

Hi Yanfeng,

I managed to get access to your file.

I tried another player (Ubuntu 14.04 and Image viewer)  and it shows a coffee cup sitting on a desk (see attached capture) .  So it was encoded properly.

We may want to look at the capabilities of whatever player you used to decode. You said "test_dec_arm_elinux" Correct?

MJPEG2.png

I tried gplay and it seems to display properly on a 6Q test baord I have.

Cheers,


Glen

0 Kudos

1,219 Views
yanfengliu
Contributor III

Glen,

Yes we can decode the .MJPG correctly with ffplayer as well --- just as I said the VPU Wrapper sample program works well for mjpg encoding.

Our problem is that when we decode the .mjpg to .yuv using the "test_dec_arm_elinux" sample, then we can't view the result .yuv file correctl --- it looks like incomplete as I show above.

On the other side, when we decode the .mjpg to .yuv using the "mxc_vpu_test" sample (./mxc_vpu_test -D "-i 1280x720.mjpg -f 7 -o 1280x720-vpu.yuv"), we can see a somewhat changed picture but it is complete. see the screen shot below

Unnamed QQ Screenshot20151105082335.png

Regards,

yanfeng

0 Kudos

1,219 Views
ZhongliHe
NXP Employee
NXP Employee

Hi, Yanfeng,

Can you try the VPU unit test tool for the generated JPEG stream with the following command ?

./mxc_vpu_test.out -D "-i 1280x720.mjpg -f 7"

We do not have the permission to download the JPEG stream that you posted. We are asking the permission for downloading this clip so that we can test it in our site.

Thanks

Jones

1,219 Views
yanfengliu
Contributor III

Jones,

Do you have any hints about my problems:

  • with VPU wrapper: the decoded .yuv from the input MJPG looks corrupted after first few rows;
  • with VPU SDK: the decoded .yuv from the input MJPG is complete but the colors are not right. 

Regards,

yanfeng

0 Kudos