h264parse: accumulate a second AU when the current AU is a field
That full frames are expected in alignment=au(both HEVC and H264), so need to accumulate a second AU when the current AU is a field for interlaced bitstreams in h264parse.
Merge request reports
Activity
added 1 commit
- b4f8d930 - msdkdec : fix decoding issue for interlaced bitstream.
BTW MFX_BITSTREAM_COMPLETE_FRAME was added to resolve https://bugzilla.gnome.org/show_bug.cgi?id=795783, could you check whether you patch adds decoding latency?
@sree, I don’t think it’s a MediaSDK issue. Referring to sample_decode, it’s not enough to set MediaSDK to low latency mode just by setting MFX_BITSTREAM_COMPLETE_FRAME, other processing is also needed. In addition, I found that no matter whether this flag is set or not, there is no significant difference in the total decoding execution time.
@fuweitax can you explain in the commit log why this change is required for MediaSDK, the reasons why MFX_BITSTREAM_COMPLETE_FRAME breaks interlaced bitstreams.
According to documentation[1] if we set MFX_BITSTREAM_COMPLETE_FRAME without filling all the frame's information, it would output broken images, perhaps for interlaced we don't fill all the required frame's data. Thus the bug is in other part of gst-msdk, not here. This looks more than a quick hack rather than a real fix.
@vjaquez this is also what I mean, we can't just set this flag to reduce decoding latency, it might treat a field as a complete frame for interlaced bitstreams. So what dou you think we should do? Maybe add a property "low latency mode" as optional? This seems to be a new feature, not a bug, right?
added 67 commits
-
b4f8d930...55bb8966 - 67 commits from branch
gstreamer:master
-
b4f8d930...55bb8966 - 67 commits from branch
added 1 commit
- 005d218c - h265parse: modify the way to check the validity of slice data.
added 1 commit
- 0465d0b3 - msdkdec : fix decoding issue for interlaced bitstream
@vjaquez Hi, I have refined this patch, please check it. Thanks.
added 1 commit
- 966a94e5 - msdkdec : fix decoding issue for interlaced bitstream
2203 2203 h264parse->discont = FALSE; 2204 2204 } 2205 2205 2206 if (!h264parse->nalparser->last_sps->frame_mbs_only_flag) 2207 GST_BUFFER_FLAG_SET (buffer, GST_VIDEO_BUFFER_FLAG_INTERLACED); 2208 else 2209 GST_BUFFER_FLAG_UNSET (buffer, GST_VIDEO_BUFFER_FLAG_INTERLACED); https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/blob/master/gst-libs/gst/video/video-frame.h#L179 Hi, according to the comment for GstVideoBufferFlags, this flag also can be used for encoded data.
changed this line in version 7 of the diff
887 888 return GST_FLOW_ERROR; 888 889 } 889 890 891 if (GST_BUFFER_FLAG_IS_SET (input_buffer, GST_VIDEO_BUFFER_FLAG_INTERLACED)) 892 is_interlaced = TRUE; Hi, I suspect no matter whether the stream is interlaced or not, we need to make sure that the data passed to MediaSDK is a complete frame if we set the flag "MFX_BITSTREAM_COMPLETE_FRAME". As you mentioned in !228 (comment 139361), if we don't know if this stream is interlaced from API consumer side, how can we judge whether this flag should be set?
Should we still slove this issue as you mentioned in !228 (comment 139361)? I suspect this is not a MediaSDK issue, sample_decode works well with the flag for the same stream.
changed this line in version 7 of the diff