[FFmpeg-trac] #9186(avcodec:new): [regression] JPEG Encode Broken since 059fc2d9da53
FFmpeg
trac at avcodec.org
Tue Apr 13 19:12:00 EEST 2021
#9186: [regression] JPEG Encode Broken since 059fc2d9da53
-------------------------------------+-------------------------------------
Reporter: uartie | Type: defect
Status: new | Priority: critical
Component: avcodec | Version: git-
Keywords: jpeg, | master
mjpeg, encode | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
Summary of the bug:
JPEG encode with mjpeg_vaapi or mjpeg_qsv broken since:
{{{
commit 059fc2d9da5364627613fb3e6424079e14dbdfd3
Author: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
Date: Tue Apr 6 03:01:14 2021 +0200
avcodec/mjpegenc: Include all supported pix_fmts in mpegenc pix_fmts
Currently said list contains only the pixel formats that are always
supported irrespective of the range and the value of
strict_std_compliance. This makes the MJPEG encoder an outlier as all
other codecs put all potentially supported pixel formats into said
list
and error out if the chosen pixel format is unsupported. This commit
brings it therefore in line with the other encoders.
The behaviour of fftools/ffmpeg_filter.c has been preserved. A more
informed decision would be possible if colour range were available
at this point, but it isn't.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
}}}
I have not tested other jpeg encoder plugins.
How to reproduce:
mjpeg_vaapi:
{{{
% ffmpeg -hwaccel vaapi -vaapi_device /dev/dri/renderD128 \
-f lavfi -i yuvtestsrc=duration=5:size=qcif:rate=30 \
-vf "format=nv12,hwupload" -c:v mjpeg_vaapi \
-y output.mjpeg
ffmpeg version N-101944-g33db0cbfd083 Copyright (c) 2000-2021 the FFmpeg
developers
built with gcc 9 (GCC)
configuration: --prefix=/home/uaeoff/Work/workspace/media/install
--disable-static --enable-shared --enable-libdrm --enable-vaapi --enable-
libmfx --disable-amf --disable-audiotoolbox --disable-cuda --disable-cuda-
sdk --disable-cuvid --disable-d3d11va --disable-dxva2 --disable-libnpp
--disable-mmal --disable-nvdec --disable-nvenc --disable-omx --disable-
omx-rpi --disable-rkmpp --disable-v4l2-m2m --disable-vdpau --disable-
videotoolbox --enable-gpl --enable-libx264 --enable-libx265
libavutil 56. 72.100 / 56. 72.100
libavcodec 58.136.101 / 58.136.101
libavformat 58. 78.100 / 58. 78.100
libavdevice 58. 14.100 / 58. 14.100
libavfilter 7.111.100 / 7.111.100
libswscale 5. 10.100 / 5. 10.100
libswresample 3. 10.100 / 3. 10.100
libpostproc 55. 10.100 / 55. 10.100
Input #0, lavfi, from 'yuvtestsrc=duration=5:size=qcif:rate=30':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (444P / 0x50343434), yuv444p, 176x144 [SAR
1:1 DAR 11:9], 30 tbr, 30 tbn, 30 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (mjpeg_vaapi))
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter
'Parsed_hwupload_1' and the filter 'auto_scaler_1'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
Conversion failed!
}}}
mjpeg_qsv:
{{{
fmpeg -init_hw_device qsv=qsv:hw -qsv_device /dev/dri/renderD128 \
-hwaccel qsv -filter_hw_device qsv -hwaccel_output_format qsv \
-f lavfi -i smptebars=duration=5:size=qcif:rate=1 \
-vf 'format=nv12,hwupload=extra_hw_frames=120' -c:v mjpeg_qsv \
-y output.mjpeg
ffmpeg version N-101944-g33db0cbfd083 Copyright (c) 2000-2021 the FFmpeg
developers
built with gcc 9 (GCC)
configuration: --prefix=/home/uaeoff/Work/workspace/media/install
--disable-static --enable-shared --enable-libdrm --enable-vaapi --enable-
libmfx --disable-amf --disable-audiotoolbox --disable-cuda --disable-cuda-
sdk --disable-cuvid --disable-d3d11va --disable-dxva2 --disable-libnpp
--disable-mmal --disable-nvdec --disable-nvenc --disable-omx --disable-
omx-rpi --disable-rkmpp --disable-v4l2-m2m --disable-vdpau --disable-
videotoolbox --enable-gpl --enable-libx264 --enable-libx265
libavutil 56. 72.100 / 56. 72.100
libavcodec 58.136.101 / 58.136.101
libavformat 58. 78.100 / 58. 78.100
libavdevice 58. 14.100 / 58. 14.100
libavfilter 7.111.100 / 7.111.100
libswscale 5. 10.100 / 5. 10.100
libswresample 3. 10.100 / 3. 10.100
libpostproc 55. 10.100 / 55. 10.100
Input #0, lavfi, from 'smptebars=duration=5:size=qcif:rate=1':
Duration: N/A, start: 0.000000, bitrate: N/A
Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 176x144 [SAR
1:1 DAR 11:9], 1 fps, 1 tbr, 1 tbn, 1 tbc
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> mjpeg (mjpeg_qsv))
Press [q] to stop, [?] for help
Impossible to convert between the formats supported by the filter
'Parsed_hwupload_1' and the filter 'auto_scaler_1'
Error reinitializing filters!
Failed to inject frame into filter network: Function not implemented
Error while processing the decoded data for stream #0:0
Conversion failed!
}}}
Software stack:
{{{
libva (master) heads/master-0-gfb31fe67f303
gmmlib (master) heads/master-0-ge4234d0639cf
intel-vaapi-driver (master) heads/master-0-gd87db2111a33
intel-media-driver (master) heads/master-0-g4cd769caa440
msdk (master) heads/master-0-g6ca8b3be0770
ffmpeg (master) heads/master-0-g33db0cbfd083
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9186>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list