Media (Intel® oneAPI 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 sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

Questions about decoding jpeg by HW (bugs?)

Kilik_K_
Beginner
142 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
142 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.
Reply