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.
3069 Discussions

DecodeHeader needs different number of H264 frames under different Intel graphics drivers

jigong
Beginner
555 Views
My debuggings show that the DecoderHeader in the following call needs more data in Intel graphics driver 2770 than that in driver 2778.
sts = m_pmfxDEC->DecodeHeader(&m_mfxBS, &m_mfxVideoParams);

I attached two cases in which I met the problem above. In fact, I also met this situation in other cases. 
//////////////// case 1
V2778 needs 51 bytes

00 00 00 01 27 64 00 28 ac 2b 60 3c 03 3d 80 88
00 00 03 00 08 00 00 03 01 e7 02 00 00 26 25 a0
00 00 8f 09 3d ef 7c 1d a1 c3 2e 00 00 00 01 28
ee 3c b0


v2770 needs 81 bytes

00 00 00 01 27 64 00 28 ac 2b 60 3c 03 3d 80 88
00 00 03 00 08 00 00 03 01 e7 02 00 00 26 25 a0
00 00 8f 09 3d ef 7c 1d a1 c3 2e 00 00 00 01 28
ee 3c b0 00 00 00 01 06 00 07 80 a4 be 00 a4 d0
40 01 07 00 00 03 00 00 03 00 00 04 80 00 00 01 
25

/////case 2////////////////////////////////////////////////

v2778 needs 36 bytes

00 00 00 01 67 64 00 29 ac 34 e5 01 e0 19 68 40
00 65 d3 c0 13 12 d0 23 c6 0c 45 80 00 00 00 01
68 ee bc b0

v 2770 needs 634 bytes

00 00 00 01 67 64 00 29 ac 34 e5 01 e0 19 68 40
00 65 d3 c0 13 12 d0 23 c6 0c 45 80 00 00 00 01
68 ee bc b0 00 00 00 01 06 05 ff ff 49 dc 45 e9
.......(>0)
3d 31 2e 34 30 20 70 62 5f 72 61 74 69 6f 3d 31
2e 33 30 00 80 00 00 00 01 65

////////////////////////////////////////////////////// 
Could someone explain what reasons cause the differences?
Thanks.
Jiuxiang
0 Kudos
5 Replies
Petter_L_Intel
Employee
555 Views
Hi Jiuxiang,

The behavior is very much dependent on the input stream. Could you please provide the full stream for reference? I'm assuming this is H.264 content?

Regards,
Petter
0 Kudos
jigong
Beginner
555 Views
Hi Petter,
I attached a h264 stream for reference. 
After read your reply, I did another 2 tests. I have met the same problem. All h264 streams have different content, but all them were encoded by media sdk encoder (sample_encoder.exe) from raw rgb4 data of different resources.
Regards,
Jiuxiang
0 Kudos
Petter_L_Intel
Employee
555 Views
Hi Jiuxiang,
I do not see any attachment. Could you try to attach it again?
Regards,
Petter
0 Kudos
jigong
Beginner
555 Views
Hi Petter,
See the attachment.
test_1080p.h264
Thanks,
Jiuxiang
0 Kudos
Petter_L_Intel
Employee
555 Views
Hi Juixiang,

I believe the older driver you used had some issues with DecodeHeader that were resolved. The expected behavior of DecodeHeader is to parse the stream for sequence header info (SPS/PPS) until following NAL delimiter is found, such as start of I-frame.

For the case when bitstream buffer just contains SPS and PPS but you still need to parse the header, you will have to pad the buffer at the end with I-frame NAL header to ensure successful DecodeHeader operation.

Regards,
Petter
0 Kudos
Reply