Incorrect dynamic aspect ratio when decoding an H.264 elementary stream.

Incorrect dynamic aspect ratio when decoding an H.264 elementary stream.

Hi,

I have an H.264 elementary stream file which contains (picture) aspect ratio changes (from 4/3 to 16/9, then back to 4/3). (These values are stored in the VUI part of the SPS). The resolution of the stream does not change.

I'm trying to track the aspect ratio changes at output level, i.e from the output surface returned by DecodeFrameAsync. I was hoping to get the aspect ratio from mfxFrameSurface1::Info::AspectRatioW/H, but it seems these values, although correct for the first frames, never get updated when the input aspect ratio changes. I tried to get the aspect ratio using GetVideoParam, same story : the returned values never changes once initialized.

It seems the decoder is correctly getting the aspect ratio at the beginning of the stream, but does not see aspect ratio changes. Is it a known issue? Is dynamic aspect ratio supposed to be supported?

At the moment, I'm able to detect aspect ratio changes by manually parsing the SPS (returned by GetVideoParam), but it seems the returned SPS does not refer to the next picture returned by DecodeFrameAsync, but to the last parsed SPS.

Actually, I'm having the same issue (i.e Info::AspectRatioW/H not updated) with an MPEG2 Video input, except that in the MPEG2 case, the above workaround (i.e parsing the sequence_header) seems to achieve frame-accurate results.

I'm using the following version of the Intel Media SDK : Version 3.5.811.41085
I got the issue with both modes : MFX_IMPL_SOFTWARE and MFX_IMPL_HARDWARE.

Thanks for your help!

8 Beiträge / 0 neu
Letzter Beitrag
Nähere Informationen zur Compiler-Optimierung finden Sie in unserem Optimierungshinweis.

Hi,

Yes, I believe you are correct in that the AspectRatio parameters does not get updated dynamically. But as you say parsing the header manually should work. I do find it a bit strange that the parsed SPS data does not line up with decoded frame.

Would you be able to share your stream so that we can try to reproduce your environment?

I will also look into if there is anything we can do to also convey dynamic aspectratio changes directly in the mfxVideoParam structure.

Regards,Petter

Hi,

Thanks for your reply!
Here's an H.264 elementary stream causing the problem.

http://software.intel.com/file/45488

"I will also look into if there is anything we can do to also convey
dynamic aspectratio changes directly in the mfxVideoParam structure."

That would be great.

Regards,
Jerome

Hi Jerome,

we are looking into this further, please be patient with us.

Regarding the stream you provided. I cannot see any aspect ratio changes. As far as I can see all SPS packets has an aspect ratio setting of 16/15.

Regards,Petter

Hi,

Picture #200 (at 0x262580) conveys one aspect ratio change.
The associated SPS (at 0x262586), with seq_parameter_set_id=25, has a 64/45 pixel aspect ratio.

Thanks for looking into this issue!

Regards,
Jerome

Ah, see that now. My mistake. Thanks for clarifying.
Regards,Petter

Hi Petter,
anything new regarding this issue? Did you reproduce the problem?

Thanks,
Jerome

Yes,

this is considered a bug and we are working on fixing it. In the meantime, please try to use workaround.

Regards,Petter

Kommentar hinterlassen

Bitte anmelden, um einen Kommentar hinzuzufügen. Sie sind noch nicht Mitglied? Jetzt teilnehmen