]> git.sesse.net Git - ffmpeg/commit
lavc/qsvdec: set complete_frame flags for progressive picture
authorZhong Li <zhong.li@intel.com>
Sat, 7 Apr 2018 17:38:55 +0000 (19:38 +0200)
committerMaxym Dmytrychenko <maxim.d33@gmail.com>
Sun, 8 Apr 2018 18:47:59 +0000 (20:47 +0200)
commit54307b35311e9a871b3d8ecb2b2eecfc16de0163
tree7cbfcfc67caeef6d1d0a240175f6735a15be7241
parentcca5e4f040971db6de0bfe6968f00c021d8a9c42
lavc/qsvdec: set complete_frame flags for progressive picture

Set the flag MFX_BITSTREAM_COMPLETE_FRAME when it is a progressive picture.
This can fix vc1 decoding segment fault issues because can't set the start
code correctly.

See: ./avconv -hwaccel qsv -c:v vc1_qsv -i /fate-suite/vc1/SA00040.vc1
-vf "hwdownload, format=nv12" -f rawvideo /dev/null

v2: fix some h264 interlaced clips regression
a. field_order of some h264 interlaced video (e.g: cama3_vtc_b.avc) is marked as AV_FIELD_UNKNOWN
   in h264_parser.c. This is not a completed frames.
   So only set the MFX_BITSTREAM_COMPLETE_FRAME when it is progressive.
b. some clips have both progressive and interlaced frames (e.g.CAPAMA3_Sand_F.264),
   the parsed field_order maybe changed druing the decoding progress.

This patch has been verified for other codecs(mpeg2/hevc/vp8).

Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Maxym Dmytrychenko <maxim.d33@gmail.com>
libavcodec/qsvdec.c