VPU MJPEG quant tables

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

VPU MJPEG quant tables

1,099件の閲覧回数
kristofferglemb
Contributor III

Hi,

I have a question regarding the order of the jpeg quantization tables passed to the VPU.

I noticed that when using fslvpuwrap or imxvpuapi that the DQT marker of the JPEG has incorrect ordering. It is in "natural order" but it should be in zig zag order according to the specification.

Looking at the VPU API RM it only states this, in table 4 (Q Matrix Format):

0x000 Y_QMat3 ... Y QMat0

0x03C Y_QMat63 ... Y_QMat60

[...]

And I suppose that the Q Matrix here is ordered according to the JPEG specification. In this case both the VPU API (imx-vpu), fslvpuwrap and imxvpulib needs patching. The imx-vpu lib writes the DQT marker exactly as input to the library but needs to reorder the coefficents as above when passing it to the VPU, and the wrapper libraries should input the tables in zig zag scan order.

Do you agree?

Best regards,

Kristoffer

ラベル(1)
タグ(2)
0 件の賞賛
返信
2 返答(返信)

674件の閲覧回数
joanxie
NXP TechSupport
NXP TechSupport

refer to the VPU API, q matrix is a user-defined matrix, if you use q matrix, one can set the pointer to this matrix, then vpu supports encoding by this q matrix.

0 件の賞賛
返信

674件の閲覧回数
kristofferglemb
Contributor III

Sorry, but that was not an answer to my question.

I will try to rephrase it:

The "q matrix" is specified to be in a certain order (zig zag) in the JPEG header (DQT marker). The imx-vpu library from NXP takes this parameter from the user and puts it in the header as is. The libraries fslvpuwrap and imxvpuapi does not provide the correct matrix order to imx-vpu so the matrix is incorrect in the JPEG header.

But to fix this one needs to understand in which order the VPU expects the coeffiecients. My take is that both the wrapper libraries and imx-vpu are wrong.

0 件の賞賛
返信