Convert decoder output byte stream to YUV raw image

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

Convert decoder output byte stream to YUV raw image

977 Views
haihoang
Contributor II

Dear NXP Media Team,

I used imx8mqevk board, jpeg decode example on libimxvpuapi2 decode a jpeg image. This is a hardware encode/decode library.

Command:

./jpeg-dec-example -i wall.jpg -o output.bin


Output (detail on attach file) :

output file is `output.bin`
data format: frames to output aligned frame size: 1376 x 768 pixel actual frame size: 1366 x 768 pixel Y/Cb/Cr stride: 1376/1376/1376 Y/Cb/Cr size: 1056768/528384/528384 Y/Cb/Cr offset: 0/1056768/1585152 color format: semi planar YUV 4:2:0 8-bit

Problem:
- File output.bin is byte stream data (dma buffer data) so the data can not display properly on yuv viewer software !

- Could you show me a reference way convert (render) output.bin to standard yuv format (output.yuv)  ?

Sincerely,

HaiHoang

Labels (1)
2 Replies

830 Views
igorpadykov
NXP Employee
NXP Employee

Hi HaiHoang

for conversion may be useful to look at isp application note

https://www.nxp.com/docs/en/application-note/AN12060.pdf 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

830 Views
haihoang
Contributor II

Hi igorpadykov,

   Thanks for your replied, In the AN12060, it seem show how to convert from yuv to rgb format is not prefer with i'm looking for is render from byte stream to yuv format. If you have other suggest, please show me 

Thank you,

HaiHoang

0 Kudos