[FFmpeg-trac] #9095(avcodec:new): h264_qsv DECODER is corrupted after flush [WINDOWS]
FFmpeg
trac at avcodec.org
Fri Feb 5 16:38:39 EET 2021
#9095: h264_qsv DECODER is corrupted after flush [WINDOWS]
-------------------------------------+-------------------------------------
Reporter: teslan | Type: defect
Status: new | Priority: important
Component: avcodec | Version: git-
Keywords: qsv, | master
h264_qsv, flush, seek, | Blocked By:
avcodec_flush_buffers, |
avcodec_send_packet |
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Unlike any other h264 decoder, '''h264_qsv''' is corrupted during a
standard seeking procedure - specifically after
`avcodec_flush_buffers(ctx)` and/or `avcodec_send_packet(ctx, NULL)` is
called.
First, `avcodec_send_packet()` yields `AVERROR_BUG` a couple of times and
then only `AVERROR_EINVAL` is being returned until I stop the decoding.
Errors `Error initializing the MFX video decoder: undefined behavior
(-16)` and `Unsupported pixel format.` are being logged in great quantity
while still trying to decode.
After flushing, no valid frames are returned from the decoder.
'''Note that when none of these flush functions are called after a seek,
the decoder continues to work without any logged errors (but annoying
artifacts are present, as expected)'''
Platforms tested:
Intel Ivy Bridge (i7-3632QM)
Intel Ice Lake (i5-1035G4)
So this spans almost through all the generations
How to reproduce:
Despite the fact that I need this in my application, the defect
demonstrates itself also in ffplay:
{{{
% .\ffplay.exe -codec:v h264_qsv .\video-001.ts
ffplay version 4.3.2-2021-02-02-full_build-www.gyan.dev Copyright (c)
2003-2021 the FFmpeg developers
built with gcc 10.2.0 (Rev6, Built by MSYS2 project)
configuration: --enable-gpl --enable-version3 --enable-shared --disable-
w32threads --disable-autodetect --enable-fontconfig --enable-iconv
--enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-
libsnappy --enable-zlib --enable-libsrt --enable-libssh --enable-libzmq
--enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2
--enable-libdav1d --enable-libzvbi --enable-librav1e --enable-libwebp
--enable-libx264 --enable-libx265 --enable-libxvid --enable-libaom
--enable-libopenjpeg --enable-libvpx --enable-libass --enable-frei0r
--enable-libfreetype --enable-libfribidi --enable-libvidstab --enable-
libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid
--enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va
--enable-dxva2 --enable-libmfx --enable-libcdio --enable-libgme --enable-
libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-
libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame
--enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-
libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis
--enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa
--enable-librubberband --enable-libsoxr --enable-chromaprint
libavutil 56. 51.100 / 56. 51.100
libavcodec 58. 91.100 / 58. 91.100
libavformat 58. 45.100 / 58. 45.100
libavdevice 58. 10.100 / 58. 10.100
libavfilter 7. 85.100 / 7. 85.100
libswscale 5. 7.100 / 5. 7.100
libswresample 3. 7.100 / 3. 7.100
libpostproc 55. 7.100 / 55. 7.100
Input #0, mpegts, from '.\video-001.ts':q= 0KB sq= 0B f=0/0
Duration: 00:39:14.28, start: 0.000000, bitrate: 2199 kb/s
Program 1
Metadata:
service_name : Service01
service_provider: FFmpeg
Stream #0:0[0x100]: Video: h264 (Main) ([27][0][0][0] / 0x001B),
yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 60 fps, 60
tbr, 90k tbn, 120 tbc
......... PRESS RIGHT ARROW HERE (SEEK).............
[h264_qsv @ 00000211e46eb7c0] Error initializing the MFX video decoder:
undefined behavior (-16)
Last message repeated 3 times
[h264_qsv @ 00000211e46eb7c0] Error initializing the MFX video decoder:
undefined behavior (-16)
Last message repeated 1 times
[h264_qsv @ 00000211e46eb7c0] Unsupported pixel format.
Last message repeated 8 times
[h264_qsv @ 00000211e46eb7c0] Unsupported pixel format. 0B f=0/0
Last message repeated 11 times
[h264_qsv @ 00000211e46eb7c0] Unsupported pixel format. 0B f=0/0
Last message repeated 11 times
[h264_qsv @ 00000211e46eb7c0] Unsupported pixel format. 0B f=0/0
Last message repeated 15 times
[h264_qsv @ 00000211e46eb7c0] Unsupported pixel format. 0B f=0/0
Last message repeated 15 times
[h264_qsv @ 00000211e46eb7c0] Unsupported pixel format. 0B f=0/0
Last message repeated 14 times
[h264_qsv @ 00000211e46eb7c0] Unsupported pixel format. 0B f=0/0
......... UNTIL I STOP IT
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9095>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list