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.

Alternate of 'DecodedOrder' (depricated now) option in H264 decoder

Ramashankar
New Contributor III
1,551 Views

Hi,

I am having two kind of h264 streams, first one is created by Intel Media_SDK_2016.0.1 h264 encoder on Windows OS and second one is created by VAAPI h264 encoder on Fedora20 OS. Both streams are encoded in Display order and both are being played well in VLC.

Now when i am decoding these streams using Intel Media_SDK_2016.0.1 h264 decoder (API version 1.17), then output frames are not coming in correct order for VAAPI encoded h264 stream, but for Media SDK encoded stream output is in proper order.

Later I set the DecodedOrder parameter to 1 (m_mfxVideoParams.mfx.DecodedOrder = 1) before decoder init then output frames started coming in proper order for VAPPI encoded stream too.

Now, i have following queries and need the resolution:

1. I read in media sdk manual (API version 1.17) that:

DecodedOrder: Deprecated; Used to instruct the decoder to decoded output in the decoded order. Always set this parameter to zero.

If this option is deprecated, then what is the alternative now to get the decoder output in display order?

2. I noticed that if I set DecodedOrder parameter to 1 and try to run it on a old Graphic card/driver (which supports API version 1.4) then decoder initialization is always failing with error code MFX_ERR_UNSUPPORTED. If i change it to 0 then it init is successful.

So can you please let me know form which API version onward this option is supported and from which version onward it got depricated?

3. h264 stream encoded in display order using intel media sdk is getting decoded in proper order even if I dont't set DecodedOrder value to 1, but VAAPI encoded stream not. So it creates a doubt that probably VAPPI encoded stream is not correctly encoded in display order. But at the same time VLC player is able to decode and render both streams in correct order, so I am not sure which module to look for proper solution. Can you guide me here?

Reproducer:

i. I am attaching two streams: "Dump_Windows_Encoder.h264" is created by intel media sdk encoder on WIndows and "Dump_Linux_Encoder.h264" is created by VAAPI encoder on Fedora. If you play these streams in VLC, they will run properly.

ii. Decode and render these stream using sample_decode.exe and observe the output.

Command line options: [sample_decode.exe h264 -i Dump_Linux_Encoder.h264 -r -f 24]

0 Kudos
17 Replies
Mark_L_Intel1
Moderator
1,551 Views

Hi Ramashankar,

I have reproduced this issue and submitted the bug to the develop team.

I am also trying to get the answer to your questions. I will give you update once I get back from them.

Mark

0 Kudos
Ramashankar
New Contributor III
1,551 Views

Hi Mark,

Thanks for the confirmation on issue reproduction. I will be eagerly waiting for your next update on this. Please do inform as soon as you can.

0 Kudos
Ramashankar
New Contributor III
1,551 Views

Hi Mark,

Is there any update on this?

0 Kudos
Mark_L_Intel1
Moderator
1,551 Views

Hi Ramashankar,

I checked, no update yet. I will let you know once there is update.

Mark

0 Kudos
Ramashankar
New Contributor III
1,551 Views

Hi Mark,

Thanks for the reply. Ok, i will wait further. Well, It would be great if you can suggest by when I should enquire it next?

0 Kudos
Ramashankar
New Contributor III
1,551 Views

Hi Mark, Other IMSDK experts,

Is there any update on this? Has developer team fixed this bug?

0 Kudos
Ramashankar
New Contributor III
1,551 Views

Hi Intel forum support team,

Please suggest if any solution is available for this issue also?

0 Kudos
Mark_L_Intel1
Moderator
1,551 Views

Hi Ramashankar,

Sorry for the late response, I checked but the dev team doesn't check it yet.

I have sent a comment to them to push.

Mark

0 Kudos
Ramashankar
New Contributor III
1,551 Views

Hi Mark,

Glad to see your response on this thread, hoping now to get a solution or work around soon on this issue. 

Regards,

0 Kudos
Beese__Erin
Beginner
1,551 Views

Any further updates on this issue?

0 Kudos
Mark_L_Intel1
Moderator
1,551 Views

Hi Ramashankar,

I am very apologized for the delay, I didn't keep up with this bug quite often.

I check the bug but it doesn't have updated yet, I have contacted the dev team and they are looking at it now.

Mark

0 Kudos
Ramashankar
New Contributor III
1,551 Views

Hi Mark,

Thanks for your reply. I would like to share an update on this issue through which I could make it to work .

I modified VAAPI h264 encoder in order to generate VUI and HRD parameters in SPS frame (it was not generated earlier). After this, the new encoded stream is getting decoded by intel SDK decoder properly and output is in correct order.

But as I am still unsure why and how it fixed the issue, it will be good to get the actual root cause and proper fix for this issue. Hope above input will help dev team to figure out the root cause.

0 Kudos
Mark_L_Intel1
Moderator
1,551 Views

Thanks so much,

I will let the dev team know.

By the way, I just posted this article to build the full set of the Intel media stack on the latest kernel with the generic Linux distribution:

https://software.intel.com/en-us/articles/build-and-debug-open-source-media-stack

You might try this method to look into the driver layer.

Mark

0 Kudos
Mark_L_Intel1
Moderator
1,492 Views

Hi Ramashankar,

Sorry for being so long for this issue.

I have been trying to clean up this request and I just got feedback from dev team that DecodecOrder should work for both AVC and HEVC.

Here is the PR in GitHub:

https://github.com/Intel-Media-SDK/MediaSDK/commit/f3a4318d0a912bcdc9b387b2fbbee5c113adf44a#diff-223315361f714398d98dbd463b6f1872ccd45d4a192bc0da036fb2096c0ce868

Could you try the late release in GitHub to see if this being fixed?

Mark

0 Kudos
Ramashankar
New Contributor III
1,463 Views

Thanks Mark for the confirmation. I will be able to check the latest release in few days.

From my original queries, point 1 is clear now, point 2 is irrelevant for me now. but point 3 is still a grey area for me. Can you help to figure out this behaviour?

Thanks,

 

0 Kudos
Mark_L_Intel1
Moderator
1,454 Views

Sure, let's look at #3.

I think the question is about VAAPI encode, could you clarify followings?

  • When you say VAAPI encode, which application do you use? Does that mean you access VAAPI yourself?
  • When you have problem with VAAPI encode, was it using i965 or iHD?

I doubt the ordering difference was caused by i965.

Mark

0 Kudos
RamashankarAgrahari
796 Views

- We developed our custom application using intel VAAPI to encode the stream.

- yes, it was using i965.

As this issue was on our old hardware, which is out of support now, so you can close this issue.

~

Ramashankar

0 Kudos
Reply