[FFmpeg-trac] #7778(avcodec:new): Visual artifacts when decoding with h264_cuvid
FFmpeg
trac at avcodec.org
Fri Mar 8 21:15:43 EET 2019
#7778: Visual artifacts when decoding with h264_cuvid
---------------------------------+--------------------------------------
Reporter: Ilya87 | Type: defect
Status: new | Priority: normal
Component: avcodec | Version: git-master
Keywords: | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
---------------------------------+--------------------------------------
Visualartifacts appear when decoding with cuvid, not with h264 software
decooder. File is lossles h264, created with
-c:v libx264 -preset medium -crf 0 command.
How to reproduce:
{{{
% ffplay -loglevel debug -vcodec h264_cuvid /home/ilya/sample.mkv
ffplay version N-93302-g147ef1d947 Copyright (c) 2003-2019 the FFmpeg
developers
built with gcc 8.2.1 (GCC) 20181127
configuration: --prefix=/usr --disable-debug --disable-static --disable-
stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl
--enable-ladspa --enable-libaom --enable-libass --enable-libbluray
--enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm
--enable-libiec61883 --enable-libjack --enable-libmodplug --enable-
libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-
libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-
libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-
libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-
libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid
--enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-
libvmaf --extra-cflags='-march=native -mtune=native -g0 -O3' --extra-
cxxflags='-march=native -mtune=native -g0 -O3' --enable-version3
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 47.103 / 58. 47.103
libavformat 58. 26.101 / 58. 26.101
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
Input #0, matroska,webm, from '/home/ilya/sample.mkv': 0B f=0/0
Metadata:
encoder : libebml v1.3.6 + libmatroska v1.4.9
creation_time : 2019-03-08T18:53:31.000000Z
Duration: 00:00:49.63, start: 0.000000, bitrate: 30671 kb/s
Stream #0:0: Video: h264 (High 4:4:4 Predictive),
yuv420p(progressive), 1132x482 [SAR 1:1 DAR 566:241], 23.98 fps, 23.98
tbr, 1k tbn, 47.95 tbc (default)
Metadata:
BPS-eng : 30668755
DURATION-eng : 00:00:49.633000000
NUMBER_OF_FRAMES-eng: 1190
NUMBER_OF_BYTES-eng: 190272794
_STATISTICS_WRITING_APP-eng: mkvmerge v31.0.0 ('Dolores In A
Shoestand') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2019-03-08 18:53:31
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
nan M-V: nan fd= 0 aq= 0KB vq= 4446KB sq= 0B f=0/0
[ilya at FORTRESS ~]$ ffplay -loglevel debug -vcodec h264_cuvid
/home/ilya/sample.mkv
ffplay version N-93302-g147ef1d947 Copyright (c) 2003-2019 the FFmpeg
developers
built with gcc 8.2.1 (GCC) 20181127
configuration: --prefix=/usr --disable-debug --disable-static --disable-
stripping --enable-fontconfig --enable-gmp --enable-gnutls --enable-gpl
--enable-ladspa --enable-libaom --enable-libass --enable-libbluray
--enable-libdrm --enable-libfreetype --enable-libfribidi --enable-libgsm
--enable-libiec61883 --enable-libjack --enable-libmodplug --enable-
libmp3lame --enable-libopencore_amrnb --enable-libopencore_amrwb --enable-
libopenjpeg --enable-libopus --enable-libpulse --enable-libsoxr --enable-
libspeex --enable-libssh --enable-libtheora --enable-libv4l2 --enable-
libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-
libx264 --enable-libx265 --enable-libxcb --enable-libxml2 --enable-libxvid
--enable-nvdec --enable-nvenc --enable-omx --enable-shared --enable-
libvmaf --extra-cflags='-march=native -mtune=native -g0 -O3' --extra-
cxxflags='-march=native -mtune=native -g0 -O3' --enable-version3
libavutil 56. 26.100 / 56. 26.100
libavcodec 58. 47.103 / 58. 47.103
libavformat 58. 26.101 / 58. 26.101
libavdevice 58. 6.101 / 58. 6.101
libavfilter 7. 48.100 / 7. 48.100
libswscale 5. 4.100 / 5. 4.100
libswresample 3. 4.100 / 3. 4.100
libpostproc 55. 4.100 / 55. 4.100
Initialized opengl renderer.
[NULL @ 0x7f1d34000b80] Opening '/home/ilya/sample.mkv' for reading
[file @ 0x7f1d34001740] Setting default whitelist 'file,crypto'
[matroska,webm @ 0x7f1d34000b80] Format matroska,webm probed with
size=2048 and score=100
st:0 removing common factor 1000000 from timebase
[matroska,webm @ 0x7f1d34000b80] Before avformat_find_stream_info() pos:
5495 bytes read:33164 seeks:2 nb_streams:1
[h264 @ 0x7f1d34004e00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f1d34004e00] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7f1d34004e00] nal_unit_type: 7(SPS), nal_ref_idc: 3
[h264 @ 0x7f1d34004e00] nal_unit_type: 8(PPS), nal_ref_idc: 3
[h264 @ 0x7f1d34004e00] nal_unit_type: 6(SEI), nal_ref_idc: 0
[h264 @ 0x7f1d34004e00] nal_unit_type: 5(IDR), nal_ref_idc: 3
[h264 @ 0x7f1d34004e00] Format yuv420p chosen by get_format().
[h264 @ 0x7f1d34004e00] Reinit context to 1136x496, pix_fmt: yuv420p
[h264 @ 0x7f1d34004e00] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 2
Last message repeated 2 times
[h264 @ 0x7f1d34004e00] nal_unit_type: 1(Coded slice of a non-IDR
picture), nal_ref_idc: 2
Last message repeated 2 times
[matroska,webm @ 0x7f1d34000b80] All info foundKB sq= 0B f=0/0
[matroska,webm @ 0x7f1d34000b80] After avformat_find_stream_info() pos:
1040540 bytes read:1068209 seeks:2 frames:8
Input #0, matroska,webm, from '/home/ilya/sample.mkv':
Metadata:
encoder : libebml v1.3.6 + libmatroska v1.4.9
creation_time : 2019-03-08T18:53:31.000000Z
Duration: 00:00:49.63, start: 0.000000, bitrate: 30671 kb/s
Stream #0:0, 8, 1/1000: Video: h264 (High 4:4:4 Predictive), 1
reference frame, yuv420p(progressive, left), 1132x482 (1136x496) [SAR 1:1
DAR 566:241], 0/1, 23.98 fps, 23.98 tbr, 1k tbn, 47.95 tbc (default)
Metadata:
BPS-eng : 30668755
DURATION-eng : 00:00:49.633000000
NUMBER_OF_FRAMES-eng: 1190
NUMBER_OF_BYTES-eng: 190272794
_STATISTICS_WRITING_APP-eng: mkvmerge v31.0.0 ('Dolores In A
Shoestand') 64-bit
_STATISTICS_WRITING_DATE_UTC-eng: 2019-03-08 18:53:31
_STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[h264_cuvid @ 0x7f1d340090c0] Format nv12 chosen by get_format().
[h264_cuvid @ 0x7f1d340090c0] Loaded lib: libnvcuvid.so.1
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidGetDecoderCaps
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidCreateDecoder
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidDestroyDecoder
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidDecodePicture
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidGetDecodeStatus
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidReconfigureDecoder
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidMapVideoFrame64
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidUnmapVideoFrame64
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidCtxLockCreate
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidCtxLockDestroy
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidCtxLock
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidCtxUnlock
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidCreateVideoSource
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidCreateVideoSourceW
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidDestroyVideoSource
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidSetVideoSourceState
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidGetVideoSourceState
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidGetSourceVideoFormat
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidGetSourceAudioFormat
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidCreateVideoParser
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidParseVideoData
[h264_cuvid @ 0x7f1d340090c0] Loaded sym: cuvidDestroyVideoParser
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded lib: libcuda.so.1
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuInit
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuDeviceGetCount
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuDeviceGet
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuDeviceGetAttribute
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuDeviceGetName
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuDeviceComputeCapability
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuCtxCreate_v2
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuCtxSetLimit
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuCtxPushCurrent_v2
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuCtxPopCurrent_v2
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuCtxDestroy_v2
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuMemAlloc_v2
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuMemAllocPitch_v2
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuMemsetD8Async
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuMemFree_v2
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuMemcpy2D_v2
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuMemcpy2DAsync_v2
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuGetErrorName
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuGetErrorString
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuStreamCreate
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuStreamQuery
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuStreamSynchronize
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuStreamDestroy_v2
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuStreamAddCallback
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuEventCreate
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuEventDestroy_v2
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuEventSynchronize
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuEventQuery
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuEventRecord
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuLaunchKernel
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuModuleLoadData
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuModuleUnload
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuModuleGetFunction
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuTexObjectCreate
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuTexObjectDestroy
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuGLGetDevices_v2
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuGraphicsGLRegisterImage
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym:
cuGraphicsUnregisterResource
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuGraphicsMapResources
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuGraphicsUnmapResources
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym:
cuGraphicsSubResourceGetMappedArray
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuDeviceGetUuid
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuImportExternalMemory
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuDestroyExternalMemory
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym:
cuExternalMemoryGetMappedBuffer
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym:
cuExternalMemoryGetMappedMipmappedArray
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuMipmappedArrayGetLevel
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuMipmappedArrayDestroy
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym: cuImportExternalSemaphore
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym:
cuDestroyExternalSemaphore
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym:
cuSignalExternalSemaphoresAsync
[AVHWDeviceContext @ 0x7f1d346d2580] Loaded sym:
cuWaitExternalSemaphoresAsync
[h264_cuvid @ 0x7f1d340090c0] CUVID capabilities for h264_cuvid:
[h264_cuvid @ 0x7f1d340090c0] 8 bit: supported: 1, min_width: 48,
max_width: 4096, min_height: 16, max_height: 4096
[h264_cuvid @ 0x7f1d340090c0] 10 bit: supported: 0, min_width: 0,
max_width: 0, min_height: 0, max_height: 0
[h264_cuvid @ 0x7f1d340090c0] 12 bit: supported: 0, min_width: 0,
max_width: 0, min_height: 0, max_height: 0
[h264_cuvid @ 0x7f1d340090c0] Format nv12 chosen by get_format().
[h264_cuvid @ 0x7f1d340090c0] Formats: Original: nv12 | HW: nv12 | SW:
nv12
Video frame changed from size:0x0 format:none serial:-1 to size:1132x482
format:nv12 serial:1
detected 6 logical cores
[ffplay_buffer @ 0x7f1cfc2ede40] Setting 'video_size' to value '1132x482'
[ffplay_buffer @ 0x7f1cfc2ede40] Setting 'pix_fmt' to value '23'
[ffplay_buffer @ 0x7f1cfc2ede40] Setting 'time_base' to value '1/1000'
[ffplay_buffer @ 0x7f1cfc2ede40] Setting 'pixel_aspect' to value '1/1'
[ffplay_buffer @ 0x7f1cfc2ede40] Setting 'frame_rate' to value
'24000/1001'
[ffplay_buffer @ 0x7f1cfc2ede40] w:1132 h:482 pixfmt:nv12 tb:1/1000
fr:24000/1001 sar:1/1 sws_param:
[auto_scaler_0 @ 0x7f1cfc2efa00] Setting 'flags' to value 'bicubic'
[auto_scaler_0 @ 0x7f1cfc2efa00] w:iw h:ih flags:'bicubic' interl:0
[ffplay_buffersink @ 0x7f1cfc2eeb80] auto-inserting filter 'auto_scaler_0'
between the filter 'ffplay_buffer' and the filter 'ffplay_buffersink'
[AVFilterGraph @ 0x7f1cfc2ecd80] query_formats: 2 queried, 0 merged, 1
already done, 0 delayed
[auto_scaler_0 @ 0x7f1cfc2efa00] picking yuv420p out of 2 ref:nv12 alpha:0
[auto_scaler_0 @ 0x7f1cfc2efa00] w:1132 h:482 fmt:nv12 sar:1/1 -> w:1132
h:482 fmt:yuv420p sar:1/1 flags:0x4
Created 1132x482 texture with SDL_PIXELFORMAT_IYUV.
[AVIOContext @ 0x7f1d34009bc0] Statistics: 8325303 bytes read, 2 seeks
ffmpeg version N-93302-g147ef1d947
built on Antegros Linux x86_64
}}}
Patches should be submitted to the ffmpeg-devel mailing list and not this
bug tracker.
--
Ticket URL: <https://trac.ffmpeg.org/ticket/7778>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list