Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.

Questions about decoding jpeg by HW (bugs?)

Kilik_K_
Beginner
302 Views

Hi,

I'm trying to using sample_decode.exe to do jpeg hw decode.  There're 2 questions that I am confused about...

Hope that someone can give a guide, great thanks in advance !!!

First, 

The function CJPEGFrameReader::ReadNextFrame(mfxBitstream *pBS) in sample_utils.cpp.

Shouldn't the condition check ...

MSDK_CHECK_NOT_EQUAL(FindSOImarkers(pBS) == 2, true, MFX_ERR_NOT_ENOUGH_BUFFER);

be like this ===> 

MSDK_CHECK_NOT_EQUAL(FindSOImarkers(pBS) <= 2, true, MFX_ERR_NOT_ENOUGH_BUFFER);

Because if a jpeg file doen'st contain thumbnail inside metadata( nSOI =1, it will return "NOT_ENOUGH_BUFFER", here), and finally return error at upper function.

Did I misunderstand this code ??

Second.

Is there any resolution restriction for hw jpeg decode ? 8000 x 6000, 10000 x 5000 ?

I think that if the decoded result is treated as a d3d suface, the resolution upper bound should be the maximum d3d texture size.

Did I misundertand this ?

PS : The version of Media SDK is 3.5.915.45327

0 Kudos
1 Reply
Kilik_K_
Beginner
302 Views
Sorry, I figured out !! I think the original code in CJPEGFrameReader::ReadNextFrame(mfxBitstream *pBS) is much more appropriate for MJPEG, and when I'm trying to decode a still JPEG with thumbnails inside (maybe 3 "FFD8" pattern in this file), I should add additional handling for these cases.
0 Kudos
Reply