Intel-FFmpeg-Plugin / Intel_FFmpeg_plugins

mirror of git://source.ffmpeg.org/ffmpeg.git
http://ffmpeg.org
Other
35 stars 19 forks source link

MFXVideoDECODE_DecodeFrameAsync return -14 if level_idc too low in 264 stream #37

Closed YaboWei closed 6 years ago

YaboWei commented 6 years ago

Hi, all MFXVideoDECODE_DecodeFrameAsync return MFX_ERR_INCOMPATIBLE_VIDEO_PARAM(-14) as title. I have a 264 stream which level_idc is 1.0(too low), MFXVideoDECODE_DecodeFrameAsync failed when I use Intel_ffmpeg-3.4.1, but intel_plugins-3.3.1 is OK!!!

I found MFXVideoDECODE_DecodeHeader is not invoked in Intel_ffmpeg-3.4.1: https://github.com/Intel-FFmpeg-Plugin/Intel_FFmpeg_plugins/blob/489486b4609ee131fbcd25b846ea4a8ef1c7addb/libavcodec/qsvdec.c#L162

Why??

YaboWei commented 6 years ago

My 264 stream https://drive.google.com/open?id=1xID4JCZThqX2xR5KRKzTCkt4634aFSYj

lizhong1008 commented 6 years ago

@YaboWei , you are right. 3.4.1 is using ffmpeg software parser, instead of MSDK parser MFXVideoDECODE_DecodeHeader because FFmpeg community don't like it. Anyway. Will check it today.

lizhong1008 commented 6 years ago

@YaboWei , the resolution of this video is 1520x720. This has (1520 / 16) * (720 /16) = 4275 MBs . If you check <Table A-1 – Level limits> in H264 spec, it is far larger than the Maxframe size of level 1.
In other other words, This video is not extract correct, haven't followed H264 spec. Thus why MSDK return an error. But In my option, MSDK gives a warning is enough, instead of an error. Before MSDK fixed this issue, you workaround it by set a largest level_idc. I provide a patch in https://github.com/Intel-FFmpeg-Plugin/Intel_FFmpeg_plugins/issues/32. It should be workable for your issue.

lizhong1008 commented 6 years ago

Close it and report it to MSDK:https://github.com/Intel-Media-SDK/MediaSDK/issues/582