[regression] msdkdec: checksum mismatch or double-free in most codecs
Since !180 (merged)
Decoded output between msdk and vaapi codecs do not match. This has been observed with AVC, HEVC, MPEG2, and VC1 codecs. Also, some VP9 decode cases crash with double-free or corruption error with bad commit.
In this AVC example, observe that msdk is missing the first frame:
$ export LIBVA_DRIVER_NAME=iHD
$ export GST_VAAPI_ALL_DRIVERS=1
$ gst-launch-1.0 videotestsrc num-buffers=11 pattern=ball \
! video/x-raw,format=NV12,width=1920,height=1080 \
! msdkh264enc b-frames=3 rate-control=cbr \
! h264parse ! filesink location=test.h264
<snip>
$ gst-launch-1.0 filesrc location=test.h264 \
! h264parse ! msdkh264dec ! checksumsink2 \
file-checksum=true qos=false frame-checksum=true \
plane-checksum=false dump-output=true dump-location=bad.yuv
Setting pipeline to PAUSED ...
libva info: VA-API version 1.4.0
libva info: va_getDriverName() returns 0
libva info: User requested driver 'iHD'
libva info: Trying to open /home/uaeoff/Work/workspace/media/install/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_4
libva info: va_openDriver() returns 0
Pipeline is PREROLLING ...
Got context from element 'msdkh264dec0': gst.msdk.Context=context, gst.msdk.Context=(GstMsdkContext)"\(GstMsdkContext\)\ msdkcontext0";
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
FrameChecksum a9f8d570e9651ad01092b71c51cc0a71
FrameChecksum a4cbbd90b34b69631f182ac21b24fe96
FrameChecksum f92663d7bc3727ee74c152cfd496e3b3
FrameChecksum 412bad5cbe3103230c240e3d59099ce1
FrameChecksum 2af01664f422eb475b0720014f210e56
FrameChecksum be1437ac76a72eacd3b3ede860104da2
FrameChecksum c3a97dcc23e9b7e72ab830f0dc9a17be
FrameChecksum 994272afe3b2a8f4b9dc32ea23ebc582
FrameChecksum d8d1a2b8fff226f4c99c0e172fe7cc84
FrameChecksum 9445e97e9f46419367d8e7cc2f0b5e8d
Got EOS from element "pipeline0".
Execution ended after 0:00:00.101127303
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
1e95c0135586139fd79d254600526cf1
Freeing pipeline ...
$ gst-launch-1.0 filesrc location=test.h264 \
! h264parse ! vaapih264dec ! checksumsink2 \
file-checksum=true qos=false frame-checksum=true \
plane-checksum=false dump-output=true dump-location=good.yuv
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Got context from element 'vaapidecode_h264-0': gst.gl.GLDisplay=context, gst.gl.GLDisplay=(GstGLDisplay)"\(GstGLDisplayX11\)\ gldisplayx11-0";
Got context from element 'vaapidecode_h264-0': gst.vaapi.Display=context, gst.vaapi.Display=(GstVaapiDisplay)"\(GstVaapiDisplayGLX\)\ vaapidisplayglx0";
Redistribute latency...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
FrameChecksum 8dcac5c919eff35248e1f2a7103dbb24
FrameChecksum a9f8d570e9651ad01092b71c51cc0a71
FrameChecksum a4cbbd90b34b69631f182ac21b24fe96
FrameChecksum f92663d7bc3727ee74c152cfd496e3b3
FrameChecksum 412bad5cbe3103230c240e3d59099ce1
FrameChecksum 2af01664f422eb475b0720014f210e56
FrameChecksum be1437ac76a72eacd3b3ede860104da2
FrameChecksum c3a97dcc23e9b7e72ab830f0dc9a17be
FrameChecksum 994272afe3b2a8f4b9dc32ea23ebc582
FrameChecksum d8d1a2b8fff226f4c99c0e172fe7cc84
FrameChecksum 9445e97e9f46419367d8e7cc2f0b5e8d
Got EOS from element "pipeline0".
Execution ended after 0:00:00.161844628
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
a3ba310701e4afa24588ee266c22cf9c
Freeing pipeline ...