Questions about decoding jpeg by HW (bugs?)

Questions about decoding jpeg by HW (bugs?)

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

publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

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.

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya