#4614(undetermined:new): sws_dither arguments aren't affecting output in colorspace conversion
#4614: sws_dither arguments aren't affecting output in colorspace conversion -------------------------------------+------------------------------------- Reporter: surfdog2020 | Type: defect Status: new | Priority: critical Component: | Version: 2.6.3 undetermined | Blocked By: Keywords: sws_dither | Reproduced by developer: 0 dithering | Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Summary of the bug: providing arguments into 'sws_dither' never affects the output. It appears that no matter which dithering algorithm you specify in sws_dither (of the 4 that are available), ffmpeg ignores it and uses the same dithering algorithm for colorspace conversion no matter what. MD5s of the output .yuv files confirms this. How to reproduce: {{{ commands only : ./ffmpeg -v debug -y -i /mnt/storage/ProRes_10bit_422.mov -t 30 -pix_fmt yuv420p -an -threads 36 -vf scale=1920:-1:sws_dither=a_dither mnt/storage/raw_8bit_420_adither.yuv ffmpeg version 2.6.3- http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2015 the FFmpeg developers ./ffmpeg -v debug -y -i /mnt/storage/ProRes_10bit_422.mov -t 30 -pix_fmt yuv420p -an -threads 36 -vf scale=1920:-1:sws_dither=bayer mnt/storage/raw_8bit_420_bayer.yuv ffmpeg version 2.6.3- http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.9.2 (Debian 4.9.2-16) '''[Jared@transcoder:~/Downloads/ffmpeg-2.6.3-64bit-static]$ md5sum /mnt/storage/raw_8bit_420_bayer.yuv 203cb43ecc97aa16d7203626750a14ad /mnt/storage/raw_8bit_420_bayer.yuv''' [Jared@transcoder:~/Downloads/ffmpeg-2.6.3-64bit-static]$ md5sum /mnt/storage/raw_8bit_420_adither.yuv '''203cb43ecc97aa16d7203626750a14ad /mnt/storage/raw_8bit_420_adither.yuv''' commands with full output: [Jared@transcoder:~/Downloads/ffmpeg-2.6.3-64bit-static]$sudo ./ffmpeg -v debug -y -i /mnt/storage/ProRes_10bit_422.mov -t 30 -pix_fmt yuv420p -an -threads 36 -vf scale=1920:-1:sws_dither=a_dither mnt/storage/raw_8bit_420_adither.yuv ffmpeg version 2.6.3- http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.9.2 (Debian 4.9.2-16) configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable- libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable- libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable- gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --cc=gcc-4.9 libavutil 54. 20.100 / 54. 20.100 libavcodec 56. 26.100 / 56. 26.100 libavformat 56. 25.101 / 56. 25.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 11.102 / 5. 11.102 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100 Splitting the commandline. Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-i' ... matched as input file with argument '/mnt/storage/ProRes_10bit_422.mov'. Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '30'. Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv420p'. Reading option '-an' ... matched as option 'an' (disable audio) with argument '1'. Reading option '-threads' ... matched as AVOption 'threads' with argument '36'. Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'scale=1920:-1:sws_dither=a_dither'. Reading option 'mnt/storage/raw_8bit_420.yuv_adither.yuv' ... matched as output file. Finished splitting the commandline. Parsing a group of options: global . Applying option v (set logging level) with argument debug. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input file /mnt/storage/ProRes_10bit_422.mov. Successfully parsed a group of options. Opening an input file: /mnt/storage/ProRes_10bit_422.mov. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x48e6680] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x48e6680] Before avformat_find_stream_info() pos: 14083960832 bytes read:253481 seeks:5 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x48e6680] All info found [mov,mp4,m4a,3gp,3g2,mj2 @ 0x48e6680] After avformat_find_stream_info() pos: 98224 bytes read:343513 seeks:6 frames:1 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/mnt/storage/ProRes_10bit_422.mov': Metadata: creation_time : 2015-03-26 19:59:36 timecode : 00:57:50:00 Duration: 00:13:49.08, start: 0.000000, bitrate: 135899 kb/s Stream #0:0(eng), 1, 1/24000: Video: prores (apch / 0x68637061), yuv422p10le(bt709), 1920x1080, 1/24000, 135654 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc (default) Metadata: creation_time : 2015-03-26 19:59:36 handler_name : Apple Alias Data Handler encoder : Apple ProRes 422 (HQ) Stream #0:1(eng), 0, 1/24000: Data: none (tmcd / 0x64636D74), 1/24, 0 kb/s (default) Metadata: creation_time : 2015-03-26 19:59:36 handler_name : Apple Alias Data Handler reel_name : Unnamed timecode : 00:57:50:00 Successfully opened the file. Parsing a group of options: output file mnt/storage/raw_8bit_420.yuv_adither.yuv. Applying option t (record or transcode "duration" seconds of audio/video) with argument 30. Applying option pix_fmt (set pixel format) with argument yuv420p. Applying option an (disable audio) with argument 1. Applying option vf (set video filters) with argument scale=1920:-1:sws_dither=a_dither. Successfully parsed a group of options. Opening an output file: mnt/storage/raw_8bit_420.yuv_adither.yuv. Successfully opened the file. [Parsed_scale_0 @ 0x48ee3e0] Setting 'w' to value '1920' [Parsed_scale_0 @ 0x48ee3e0] Setting 'h' to value '-1' [Parsed_scale_0 @ 0x48ee3e0] Setting 'sws_dither' to value 'a_dither' [Parsed_scale_0 @ 0x48ee3e0] Setting 'flags' to value '0x4' [Parsed_scale_0 @ 0x48ee3e0] w:1920 h:-1 flags:'0x4' interl:0 [graph 0 input from stream 0:0 @ 0x48eeae0] Setting 'video_size' to value '1920x1080' [graph 0 input from stream 0:0 @ 0x48eeae0] Setting 'pix_fmt' to value '74' [graph 0 input from stream 0:0 @ 0x48eeae0] Setting 'time_base' to value '1/24000' [graph 0 input from stream 0:0 @ 0x48eeae0] Setting 'pixel_aspect' to value '1/1' [graph 0 input from stream 0:0 @ 0x48eeae0] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 0:0 @ 0x48eeae0] Setting 'frame_rate' to value '24000/1001' [graph 0 input from stream 0:0 @ 0x48eeae0] w:1920 h:1080 pixfmt:yuv422p10le tb:1/24000 fr:24000/1001 sar:1/1 sws_param:flags=2 [format @ 0x48dbb40] compat: called with args=[yuv420p] [format @ 0x48dbb40] Setting 'pix_fmts' to value 'yuv420p' [AVFilterGraph @ 0x48dbe20] query_formats: 5 queried, 4 merged, 0 already done, 0 delayed [Parsed_scale_0 @ 0x48ee3e0] w:1920 h:1080 fmt:yuv422p10le sar:1/1 -> w:1920 h:1080 fmt:yuv420p sar:1/1 flags:0x4 detected 32 logical cores Output #0, rawvideo, to 'mnt/storage/raw_8bit_420.yuv_adither.yuv': Metadata: timecode : 00:57:50:00 encoder : Lavf56.25.101 Stream #0:0(eng), 0, 1001/24000: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1001/24000, q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default) Metadata: creation_time : 2015-03-26 19:59:36 handler_name : Apple Alias Data Handler encoder : Lavc56.26.100 rawvideo Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> rawvideo (native)) Press [q] to stop, [?] for help Cliping frame in rate conversion by 0.000008 [output stream 0:0 @ 0x48d1fe0] EOF on sink link output stream 0:0:default.kbits/s No more output streams to write to, finishing. frame= 720 fps= 63 q=0.0 Lsize= 2187000kB time=00:00:30.03 bitrate=596600.2kbits/s video:2187000kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000% Input file #0 (/mnt/storage/ProRes_10bit_422.mov): Input stream #0:0 (video): 721 packets read (64913072 bytes); 721 frames decoded; Input stream #0:1 (data): 0 packets read (0 bytes); Total: 721 packets (64913072 bytes) demuxed Output file #0 (mnt/storage/raw_8bit_420.yuv_adither.yuv): Output stream #0:0 (video): 720 frames encoded; 720 packets muxed (2239488000 bytes); Total: 720 packets (2239488000 bytes) muxed 721 frames successfully decoded, 0 decoding errors [AVIOContext @ 0x48ebca0] Statistics: 0 seeks, 68400 writeouts [AVIOContext @ 0x48e5e40] Statistics: 65166553 bytes read, 71 seeks [Jared@transcoder:~/Downloads/ffmpeg-2.6.3-64bit-static]$ sudo ./ffmpeg -v debug -y -i /mnt/storage/ProRes_10bit_422.mov -t 30 -pix_fmt yuv420p -an -threads 36 -vf scale=1920:-1:sws_dither=bayer mnt/storage/raw_8bit_420_bayer.yuv ffmpeg version 2.6.3- http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.9.2 (Debian 4.9.2-16) configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable- libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable- libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable- gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --cc=gcc-4.9 libavutil 54. 20.100 / 54. 20.100 libavcodec 56. 26.100 / 56. 26.100 libavformat 56. 25.101 / 56. 25.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 11.102 / 5. 11.102 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 1.100 / 1. 1.100 libpostproc 53. 3.100 / 53. 3.100 Splitting the commandline. Reading option '-v' ... matched as option 'v' (set logging level) with argument 'debug'. Reading option '-y' ... matched as option 'y' (overwrite output files) with argument '1'. Reading option '-i' ... matched as input file with argument '/mnt/storage/ProRes_10bit_422.mov'. Reading option '-t' ... matched as option 't' (record or transcode "duration" seconds of audio/video) with argument '30'. Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel format) with argument 'yuv420p'. Reading option '-an' ... matched as option 'an' (disable audio) with argument '1'. Reading option '-threads' ... matched as AVOption 'threads' with argument '36'. Reading option '-vf' ... matched as option 'vf' (set video filters) with argument 'scale=1920:-1:sws_dither=bayer'. Reading option 'mnt/storage/raw_8bit_420.yuv_bayer.yuv' ... matched as output file. Finished splitting the commandline. Parsing a group of options: global . Applying option v (set logging level) with argument debug. Applying option y (overwrite output files) with argument 1. Successfully parsed a group of options. Parsing a group of options: input file /mnt/storage/ProRes_10bit_422.mov. Successfully parsed a group of options. Opening an input file: /mnt/storage/ProRes_10bit_422.mov. [mov,mp4,m4a,3gp,3g2,mj2 @ 0x37a5680] Format mov,mp4,m4a,3gp,3g2,mj2 probed with size=2048 and score=100 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x37a5680] Before avformat_find_stream_info() pos: 14083960832 bytes read:253481 seeks:5 [mov,mp4,m4a,3gp,3g2,mj2 @ 0x37a5680] All info found [mov,mp4,m4a,3gp,3g2,mj2 @ 0x37a5680] After avformat_find_stream_info() pos: 98224 bytes read:343513 seeks:6 frames:1 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/mnt/storage/ProRes_10bit_422.mov': Metadata: creation_time : 2015-03-26 19:59:36 timecode : 00:57:50:00 Duration: 00:13:49.08, start: 0.000000, bitrate: 135899 kb/s Stream #0:0(eng), 1, 1/24000: Video: prores (apch / 0x68637061), yuv422p10le(bt709), 1920x1080, 1/24000, 135654 kb/s, SAR 1:1 DAR 16:9, 23.98 fps, 23.98 tbr, 24k tbn, 24k tbc (default) Metadata: creation_time : 2015-03-26 19:59:36 handler_name : Apple Alias Data Handler encoder : Apple ProRes 422 (HQ) Stream #0:1(eng), 0, 1/24000: Data: none (tmcd / 0x64636D74), 1/24, 0 kb/s (default) Metadata: creation_time : 2015-03-26 19:59:36 handler_name : Apple Alias Data Handler reel_name : Unnamed timecode : 00:57:50:00 Successfully opened the file. Parsing a group of options: output file mnt/storage/raw_8bit_420.yuv_bayer.yuv. Applying option t (record or transcode "duration" seconds of audio/video) with argument 30. Applying option pix_fmt (set pixel format) with argument yuv420p. Applying option an (disable audio) with argument 1. Applying option vf (set video filters) with argument scale=1920:-1:sws_dither=bayer. Successfully parsed a group of options. Opening an output file: mnt/storage/raw_8bit_420.yuv_bayer.yuv. Successfully opened the file. [Parsed_scale_0 @ 0x37ad3e0] Setting 'w' to value '1920' [Parsed_scale_0 @ 0x37ad3e0] Setting 'h' to value '-1' [Parsed_scale_0 @ 0x37ad3e0] Setting 'sws_dither' to value 'bayer' [Parsed_scale_0 @ 0x37ad3e0] Setting 'flags' to value '0x4' [Parsed_scale_0 @ 0x37ad3e0] w:1920 h:-1 flags:'0x4' interl:0 [graph 0 input from stream 0:0 @ 0x37adae0] Setting 'video_size' to value '1920x1080' [graph 0 input from stream 0:0 @ 0x37adae0] Setting 'pix_fmt' to value '74' [graph 0 input from stream 0:0 @ 0x37adae0] Setting 'time_base' to value '1/24000' [graph 0 input from stream 0:0 @ 0x37adae0] Setting 'pixel_aspect' to value '1/1' [graph 0 input from stream 0:0 @ 0x37adae0] Setting 'sws_param' to value 'flags=2' [graph 0 input from stream 0:0 @ 0x37adae0] Setting 'frame_rate' to value '24000/1001' [graph 0 input from stream 0:0 @ 0x37adae0] w:1920 h:1080 pixfmt:yuv422p10le tb:1/24000 fr:24000/1001 sar:1/1 sws_param:flags=2 [format @ 0x379ab40] compat: called with args=[yuv420p] [format @ 0x379ab40] Setting 'pix_fmts' to value 'yuv420p' [AVFilterGraph @ 0x379ae20] query_formats: 5 queried, 4 merged, 0 already done, 0 delayed [Parsed_scale_0 @ 0x37ad3e0] w:1920 h:1080 fmt:yuv422p10le sar:1/1 -> w:1920 h:1080 fmt:yuv420p sar:1/1 flags:0x4 detected 32 logical cores Output #0, rawvideo, to 'mnt/storage/raw_8bit_420.yuv_bayer.yuv': Metadata: timecode : 00:57:50:00 encoder : Lavf56.25.101 Stream #0:0(eng), 0, 1001/24000: Video: rawvideo (I420 / 0x30323449), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 1001/24000, q=2-31, 200 kb/s, 23.98 fps, 23.98 tbn, 23.98 tbc (default) Metadata: creation_time : 2015-03-26 19:59:36 handler_name : Apple Alias Data Handler encoder : Lavc56.26.100 rawvideo Stream mapping: Stream #0:0 -> #0:0 (prores (native) -> rawvideo (native)) Press [q] to stop, [?] for help Cliping frame in rate conversion by 0.000008 [output stream 0:0 @ 0x3790fe0] EOF on sink link output stream 0:0:default.kbits/s No more output streams to write to, finishing. frame= 720 fps= 66 q=0.0 Lsize= 2187000kB time=00:00:30.03 bitrate=596600.2kbits/s video:2187000kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000% Input file #0 (/mnt/storage/ProRes_10bit_422.mov): Input stream #0:0 (video): 721 packets read (64913072 bytes); 721 frames decoded; Input stream #0:1 (data): 0 packets read (0 bytes); Total: 721 packets (64913072 bytes) demuxed Output file #0 (mnt/storage/raw_8bit_420.yuv_bayer.yuv): Output stream #0:0 (video): 720 frames encoded; 720 packets muxed (2239488000 bytes); Total: 720 packets (2239488000 bytes) muxed 721 frames successfully decoded, 0 decoding errors [AVIOContext @ 0x37aaca0] Statistics: 0 seeks, 68400 writeouts [AVIOContext @ 0x37a4e40] Statistics: 65166553 bytes read, 71 seeks [Jared@transcoder:~/Downloads/ffmpeg-2.6.3-64bit-static]$ md5sum /mnt/storage/raw_8bit_420_bayer.yuv 203cb43ecc97aa16d7203626750a14ad /mnt/storage/raw_8bit_420_bayer.yuv [Jared@transcoder:~/Downloads/ffmpeg-2.6.3-64bit-static]$ md5sum /mnt/storage/raw_8bit_420_adither.yuv 203cb43ecc97aa16d7203626750a14ad /mnt/storage/raw_8bit_420_adither.yuv }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: sws_dither arguments aren't affecting output in colorspace conversion -------------------------------------+------------------------------------- Reporter: surfdog2020 | Owner: Type: defect | Status: new Priority: normal | Component: Version: 2.6.3 | undetermined Keywords: sws_dither | Resolution: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by cehoyos): * priority: critical => normal Comment: Please test current FFmpeg git head. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: sws_dither arguments aren't affecting output in colorspace conversion -------------------------------------+------------------------------------- Reporter: surfdog2020 | Owner: Type: defect | Status: new Priority: normal | Component: Version: 2.6.3 | undetermined Keywords: sws_dither | Resolution: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by surfdog2020): Same thing is still happening , even with the with latest version from git head and the latest version of all libraries. Here is the output with the new versions numbers of the libraries : ffmpeg version N-72843-g9c89392 Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5) configuration: --prefix=/home/jared/ffmpeg_build --pkg-config- flags=--static --extra-cflags=-I/home/jared/ffmpeg_build/include --extra- ldflags=-L/home/jared/ffmpeg_build/lib --bindir=/home/jared/bin --enable- gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable- libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree libavutil 54. 27.100 / 54. 27.100 libavcodec 56. 41.100 / 56. 41.100 libavformat 56. 36.100 / 56. 36.100 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 16.101 / 5. 16.101 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.100 / 1. 2.100 libpostproc 53. 3.100 / 53. 3.100 -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
Please test current FFmpeg git head. Same thing is still happening , even with the with latest version from git
#4614: sws_dither arguments aren't affecting output in colorspace conversion -------------------------------------+------------------------------------- Reporter: surfdog2020 | Owner: Type: defect | Status: new Priority: normal | Component: Version: 2.6.3 | undetermined Keywords: sws_dither | Resolution: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by surfdog2020): Replying to [comment:1 cehoyos]: head and the latest version of all libraries. Here is the output with the new versions numbers of the libraries : ffmpeg version N-72843-g9c89392 Copyright (c) 2000-2015 the FFmpeg developers built with gcc 4.6 (Ubuntu/Linaro? 4.6.3-1ubuntu5) configuration: --prefix=/home/jared/ffmpeg_build --pkg-config- flags=--static --extra-cflags=-I/home/jared/ffmpeg_build/include --extra- ldflags=-L/home/jared/ffmpeg_build/lib --bindir=/home/jared/bin --enable- gpl --enable-libass --enable-libfdk-aac --enable-libfreetype --enable- libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265 --enable-nonfree libavutil 54. 27.100 / 54. 27.100 libavcodec 56. 41.100 / 56. 41.100 libavformat 56. 36.100 / 56. 36.100 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 16.101 / 5. 16.101 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.100 / 1. 2.100 libpostproc 53. 3.100 / 53. 3.100 -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: sws_dither arguments aren't affecting output in colorspace conversion -------------------------------------+------------------------------------- Reporter: surfdog2020 | Owner: Type: defect | Status: new Priority: normal | Component: Version: 2.6.3 | undetermined Keywords: sws_dither | Resolution: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by heleppkes): Try to pass the sws flag to make it print info about the conversion parameters used, I don't remember the syntax off-hand .. but if it says that its using a "specialized" converter, then it won't execute the generic dithering pass. You can usually force the generic path by passing the accurate rounding an full internal chroma flags. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: sws_dither arguments aren't affecting output in colorspace conversion -------------------------------------+------------------------------------- Reporter: surfdog2020 | Owner: Type: defect | Status: new Priority: normal | Component: Version: 2.6.3 | undetermined Keywords: sws_dither | Resolution: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by surfdog2020): I'm guessing that you wanted me to add '-sws_flags print_info' to my command line. If that is the case, I see no mention of a "specialized" converter being used. I only see the following get added to my command's output: SwScaler: reducing / aligning filtersize 1 -> 4 Last message repeated 1 times SwScaler: reducing / aligning filtersize 1 -> 1 SwScaler: reducing / aligning filtersize 9 -> 8 [swscaler @ 0x43a9060] bicubic scaler, from yuv422p10le to yuv420p using MMXEXT [swscaler @ 0x43a9060] 1920x1080 -> 1920x1080 [swscaler @ 0x43a9060] lum srcW=1920 srcH=1080 dstW=1920 dstH=1080 xInc=65536 yInc=65536 [swscaler @ 0x43a9060] chr srcW=960 srcH=1080 dstW=960 dstH=540 xInc=65536 yInc=131072 Can you also clarify how one can pass in the "accurate rounding" of the internal chroma flags? -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: sws_dither arguments aren't affecting output in colorspace conversion -------------------------------------+------------------------------------- Reporter: surfdog2020 | Owner: Type: defect | Status: new Priority: normal | Component: Version: 2.6.3 | undetermined Keywords: sws_dither | Resolution: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by heleppkes): Try with "-sws_flags +accurate_rnd+full_chroma_inp+full_chroma_int", that should hopefully make it perform a high quality conversion with dithering. The last option is probably not needed for your use-case, IIRC its only needed when you upsample chroma, not downsample. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: sws_dither arguments aren't affecting output in colorspace conversion -------------------------------------+------------------------------------- Reporter: surfdog2020 | Owner: Type: defect | Status: new Priority: normal | Component: Version: 2.6.3 | undetermined Keywords: sws_dither | Resolution: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by surfdog2020): I'm looking to be able to specify the dithering algorithm used. I tried: ./ffmpeg -v debug -sws_flags +accurate_rnd+full_chroma_inp+full_chroma_int -y -i /mnt/storage/ProRes_10bit_422.mov -t 30 -pix_fmt yuv420p -an -threads 36 -vf scale=1920:-1:sws_dither='''a_dither''' mnt/storage/raw_8bit_420_adither.yuv ./ffmpeg -v debug -sws_flags +accurate_rnd+full_chroma_inp+full_chroma_int -y -i /mnt/storage/ProRes_10bit_422.mov -t 30 -pix_fmt yuv420p -an -threads 36 -vf scale=1920:-1:sws_dither='''bayer''' mnt/storage/raw_8bit_420_bayer.yuv Both output files are still equal to each other, have the same md5 value. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: 10bit->8bit user selectable dither -------------------------------------+------------------------------------- Reporter: surfdog2020 | Owner: Type: enhancement | Status: open Priority: normal | Component: swscale Version: git-master | Resolution: Keywords: sws_dither | Blocked By: dithering | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Changes (by michael): * status: new => open * type: defect => enhancement * version: 2.6.3 => git-master * component: undetermined => swscale Comment: I dont think this case is supported currently but it would be nice to add support for -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:8> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: 10bit->8bit user selectable dither -------------------------------------+------------------------------------- Reporter: surfdog2020 | Owner: Type: enhancement | Status: open Priority: normal | Component: swscale Version: git-master | Resolution: Keywords: sws_dither | Blocked By: dithering | Reproduced by developer: 0 Blocking: | Analyzed by developer: 0 | -------------------------------------+------------------------------------- Comment (by surfdog2020): Replying to [comment:8 michael]:
I dont think this case is supported currently but it would be nice to add support for
The documentation says that this should be already supported, see: https://ffmpeg.org/ffmpeg-all.html#Scaler-Options, this was my reasoning in marking it as a defect instead of enhancement. Regardless of the label, I agree that this is functionality that would be beneficial to have, as some folks prefer one way of dithering over another. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:9> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: 10bit->8bit user selectable dither -------------------------------------+----------------------------------- Reporter: surfdog2020 | Owner: Type: enhancement | Status: open Priority: wish | Component: swscale Version: git-master | Resolution: Keywords: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by cehoyos): * keywords: sws_dither dithering => dithering * priority: normal => wish -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:10> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: YUV 10bpc (10-bit per component) -> 8bpc, user controlled dithering -------------------------------------+----------------------------------- Reporter: surfdog2020 | Owner: Type: enhancement | Status: open Priority: wish | Component: swscale Version: git-master | Resolution: Keywords: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:11> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: YUV 10bpc (10-bit per component) -> 8bpc, user controlled dithering -------------------------------------+----------------------------------- Reporter: surfdog2020 | Owner: Type: enhancement | Status: open Priority: wish | Component: swscale Version: git-master | Resolution: Keywords: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by gdgsdg123): Build from: https://zeranoe.com/builds/win64/static/win64/static/ffmpeg-20190416-036b4b0... [[BR]] [[BR]] It's still the case in recent version. [[BR]] [[BR]] [[BR]] What if one preferred no dither? (for the sake of compressibility... or just because banding/discoloration is preferred over noise) [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] [[BR]] Suggested workaround (for no dither): YUV 10bpc -> RGB24 -> YUV 8bpc -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:12> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: swscale YUV 10bpc (10-bit per component) -> 8bpc, user controlled dithering -------------------------------------+----------------------------------- Reporter: surfdog2020 | Owner: Type: enhancement | Status: open Priority: wish | Component: swscale Version: git-master | Resolution: Keywords: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:13> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: swscale YUV 10bpc (10-bit per component) -> 8bpc, user controlled dithering -------------------------------------+----------------------------------- Reporter: surfdog2020 | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: swscale Version: git-master | Resolution: Keywords: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Balling): That is no longer the case with -vf scale=sws_dither=0 or -scale=sws_dither=none, both produce same results dufferent from auto dither. Please test! Please note that there still appears some dither from 10 bit to 8 bit that produces a pair of colors instead of one, -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:14> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: swscale YUV 10bpc (10-bit per component) -> 8bpc, user controlled dithering -------------------------------------+----------------------------------- Reporter: surfdog2020 | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: swscale Version: git-master | Resolution: Keywords: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by MasterQuestionable): ͏ This suggested workaround mostly doesn't work: ͏ As demonstrated: https://trac.ffmpeg.org/ticket/11254 ͏ (<[/wiki/colorspace#src colorspace]> images origin from) -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:15> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: swscale YUV 10bpc (10-bit per component) -> 8bpc, user controlled dithering -------------------------------------+----------------------------------- Reporter: surfdog2020 | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: swscale Version: git-master | Resolution: Keywords: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Balling): Replying to [comment:15 MasterQuestionable]:
͏ This suggested workaround mostly doesn't work: ͏ As demonstrated: https://trac.ffmpeg.org/ticket/11254 ͏ (<[/wiki/colorspace#src colorspace]> images origin from)
It does work. Before saying stuff check md5 of the produced file. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:16> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4614: swscale YUV 10bpc (10-bit per component) -> 8bpc, user controlled dithering -------------------------------------+----------------------------------- Reporter: surfdog2020 | Owner: (none) Type: enhancement | Status: open Priority: wish | Component: swscale Version: git-master | Resolution: Keywords: dithering | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by MasterQuestionable): * cc: MasterQuestionable (added) Comment: ͏ The "RGB24 -> YUV 8bpc" maybe working. ͏ While the later YUV 8bpc -> RGB24 apparently failed. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4614#comment:17> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg