decode jpeg images.

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

decode jpeg images.

Jump to solution
739 Views
omerlevin
Contributor I

Hello, I am trying to decode JPEG images using "Line buffer Mode". Reviewing the documentation in "i.MX 6Dual/6Quad VPU Application Programming Interface Linux Reference Manual" Rev L3.0.35_4.1.0, 09/2013, and the mxc_vpu_test (from LTIB) I have a few questions.

- It seems there are quite a few differences in the flow: The test is not setting DecOpenParam.jpgLineBufferMode, thus using a default value of 0, meaning (according to the documentation) 'Line-Buffer Mode". In this mode, according to the flowchart in <3.3.1.1>, functions vpu_DecUpdateBitstreamBuffer()/vpu_DecGetBitstreamBuffer() should only be called once at the start of decoding, and not per frame as done in the test code. Similar call is done to Vpu_DecStartOneFrame().

- According to the documentation, in line buffer mode (DecOpenParam.jpgLineBufferMode =0) There's a need to "set bitstream to bitstreambuffer start address" (p.43). How should that be done?

When trying to do it by transferring the decoder input stream to bitstreambuffer start address using vpu_DecUpdateBitstreamBuffer() or vpu_DecBitBufferFlush(), vpu_DecGetOutputInfo() returns with decodingSuccess=17 (vpu needs more bitstream in rollback mode).

My version info below.

Thanks in advance.

Omer

my version info

Product Info: i.MX6Q

VPU firmware version: 2.1.5_r32515

VPU library version: 5.4.6

Labels (1)
0 Kudos
1 Solution
533 Views
omerlevin
Contributor I

I found the issue:

From the above mentioned documentation ("i.MX 6Dual/6Quad VPU Application Programming Interface Linux Reference Manual", last revision I've found is L3.0.35_4.1.0, 09/2013), 3.2.3 - DecOpenParam, for jpgLineBufferMode description it says:

"jpgLineBufferMode where 0 is a LineBuffer mode and 1 is a streaming mode."

But actually it's the opposite.

0 is a streaming mode.

1 is a LineBuffer mode.

I've tested it and seems to be working well. I will happy if someone from freescale will confirm and update the manual.

thanks

View solution in original post

0 Kudos
1 Reply
534 Views
omerlevin
Contributor I

I found the issue:

From the above mentioned documentation ("i.MX 6Dual/6Quad VPU Application Programming Interface Linux Reference Manual", last revision I've found is L3.0.35_4.1.0, 09/2013), 3.2.3 - DecOpenParam, for jpgLineBufferMode description it says:

"jpgLineBufferMode where 0 is a LineBuffer mode and 1 is a streaming mode."

But actually it's the opposite.

0 is a streaming mode.

1 is a LineBuffer mode.

I've tested it and seems to be working well. I will happy if someone from freescale will confirm and update the manual.

thanks

0 Kudos