#4812(undetermined:new): scale filter does not apply pure range change
#4812: scale filter does not apply pure range change -------------------------------------+------------------------------------- Reporter: rmk | Type: defect Status: new | Priority: normal Component: | Version: undetermined | unspecified Keywords: | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------- It appears the scale filter (or libswscale underneath) does not scale the input if only the range (tv vs. pc) has to be changed. Steps to reproduce: 1) Produce a file that contains tv range (16-235) luma values {{{ ffmpeg -i ~/tmp/colortest/gradient-broadcast-range.mov -vf scale=in_range=tv:out_range=pc -c:v ffv1 ~/tmp/colortest/tv-to-full.mov ffmpeg version N-74650-ga16251a Copyright (c) 2000-2015 the FFmpeg developers built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn) configuration: --enable-gpl libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 58.100 / 56. 58.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 37.100 / 5. 37.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/krueger/tmp/colortest /gradient-broadcast-range.mov': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf56.40.101 Duration: 00:00:00.04, start: 0.000000, bitrate: 2628 kb/s Stream #0:0(eng): Video: ffv1 (FFV1 / 0x31564646), yuv420p, 256x256, 2483 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : DataHandler encoder : Lavc56.58.100 ffv1 [mov @ 0x7fea32013200] Using MS style video codec tag, the file may be unplayable! Output #0, mov, to '/Users/krueger/tmp/colortest/tv-to-full.mov': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf56.40.101 Stream #0:0(eng): Video: ffv1, yuv420p, 256x256, q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc (default) Metadata: handler_name : DataHandler encoder : Lavc56.58.100 ffv1 Stream mapping: Stream #0:0 -> #0:0 (ffv1 (native) -> ffv1 (native)) Press [q] to stop, [?] for help frame= 1 fps=0.0 q=-0.0 Lsize= 13kB time=00:00:00.04 bitrate=2628.6kbits/s video:12kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 5.846823% }}} 2) Verify the range is correct {{{ ffprobe -f lavfi movie=/Users/krueger/tmp/colortest/gradient-broadcast- range.mov,signalstats -show_entries frame_tags=lavfi.signalstats.YMAX,lavfi.signalstats.YMIN ffprobe version N-74650-ga16251a Copyright (c) 2007-2015 the FFmpeg developers built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn) configuration: --enable-gpl libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 58.100 / 56. 58.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 37.100 / 5. 37.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, lavfi, from 'movie=/Users/krueger/tmp/colortest/gradient- broadcast-range.mov,signalstats': Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 256x256 [SAR 1:1 DAR 1:1], 12800 tbr, 12800 tbn, 12800 tbc [FRAME] TAG:lavfi.signalstats.YMIN=16 TAG:lavfi.signalstats.YMAX=235 [/FRAME] }}} 3) Attempt to scale this to full range {{{ ffmpeg -i ~/tmp/colortest/gradient-broadcast-range.mov -vf scale=in_range=tv:out_range=pc -c:v ffv1 -y ~/tmp/colortest/tv-to-full.mov ffmpeg version N-74650-ga16251a Copyright (c) 2000-2015 the FFmpeg developers built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn) configuration: --enable-gpl libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 58.100 / 56. 58.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 37.100 / 5. 37.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/Users/krueger/tmp/colortest /gradient-broadcast-range.mov': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf56.40.101 Duration: 00:00:00.04, start: 0.000000, bitrate: 190 kb/s Stream #0:0(eng): Video: ffv1 (FFV1 / 0x31564646), yuv420p, 256x256, 45 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default) Metadata: handler_name : DataHandler encoder : Lavc56.58.100 ffv1 [mov @ 0x7fed4080fc00] Using MS style video codec tag, the file may be unplayable! Output #0, mov, to '/Users/krueger/tmp/colortest/tv-to-full.mov': Metadata: major_brand : qt minor_version : 512 compatible_brands: qt encoder : Lavf56.40.101 Stream #0:0(eng): Video: ffv1, yuv420p, 256x256, q=2-31, 200 kb/s, 25 fps, 12800 tbn, 25 tbc (default) Metadata: handler_name : DataHandler encoder : Lavc56.58.100 ffv1 Stream mapping: Stream #0:0 -> #0:0 (ffv1 (native) -> ffv1 (native)) Press [q] to stop, [?] for help frame= 1 fps=0.0 q=-0.0 Lsize= 1kB time=00:00:00.04 bitrate= 190.2kbits/s video:0kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 322.666656% }}} 4) Check actual range of output file {{{ ffprobe -f lavfi movie=/Users/krueger/tmp/colortest/tv-to- full.mov,signalstats -show_entries frame_tags=lavfi.signalstats.YMAX,lavfi.signalstats.YMIN ffprobe version N-74650-ga16251a Copyright (c) 2007-2015 the FFmpeg developers built with Apple LLVM version 6.1.0 (clang-602.0.49) (based on LLVM 3.6.0svn) configuration: --enable-gpl libavutil 54. 31.100 / 54. 31.100 libavcodec 56. 58.100 / 56. 58.100 libavformat 56. 40.101 / 56. 40.101 libavdevice 56. 4.100 / 56. 4.100 libavfilter 5. 37.100 / 5. 37.100 libswscale 3. 1.101 / 3. 1.101 libswresample 1. 2.101 / 1. 2.101 libpostproc 53. 3.100 / 53. 3.100 Input #0, lavfi, from 'movie=/Users/krueger/tmp/colortest/tv-to- full.mov,signalstats': Duration: N/A, start: 0.000000, bitrate: N/A Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 256x256 [SAR 1:1 DAR 1:1], 12800 tbr, 12800 tbn, 12800 tbc [FRAME] TAG:lavfi.signalstats.YMIN=16 TAG:lavfi.signalstats.YMAX=235 [/FRAME] }}} Related discussion on the mailing list: http://thread.gmane.org/gmane.comp.video.ffmpeg.user/57005/focus=57093 -- Ticket URL: <https://trac.ffmpeg.org/ticket/4812> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4812: scale filter does not apply pure range change -------------------------------------+------------------------------------- Reporter: rmk | Owner: Type: defect | Status: new Priority: normal | Component: Version: unspecified | undetermined Keywords: | Resolution: Blocking: | Blocked By: Analyzed by developer: 0 | Reproduced by developer: 0 -------------------------------------+------------------------------------- Comment (by cehoyos): Is there really a difference to ticket #4805? (Can one ticket be fixed without the other?) -- Ticket URL: <https://trac.ffmpeg.org/ticket/4812#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4812: scale filter does not apply pure range change ------------------------------------+----------------------------------- Reporter: rmk | Owner: Type: defect | Status: open Priority: normal | Component: swscale Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ------------------------------------+----------------------------------- Changes (by cehoyos): * status: new => open * version: unspecified => git-master * component: undetermined => swscale * reproduced: 0 => 1 Comment: This is still reproducible with 1acd6311a100859f3ef4119790da9d5cb5546979 afaict. -- Ticket URL: <https://trac.ffmpeg.org/ticket/4812#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4812: scale filter does not apply pure range change ------------------------------------+----------------------------------- Reporter: rmk | Owner: Type: defect | Status: open Priority: normal | Component: swscale Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ------------------------------------+----------------------------------- Comment (by rmk): I just noticed, I made a copy & paste error in the ticket. The first step (generating the broadcast range file) should be this instead: {{{ ffmpeg -f lavfi -i nullsrc=s=256x256 -vf geq='16+220*(X/W):128:128' -pix_fmt yuv420p -vframes 1 -c:v ffv1 -y ~/tmp/colortest/gradient- broadcast-range.mov }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/4812#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4812: scale filter does not apply pure range change ------------------------------------+----------------------------------- Reporter: rmk | Owner: Type: defect | Status: open Priority: normal | Component: swscale Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ------------------------------------+----------------------------------- Comment (by rmk): Yes, it's still there. Checked with current head (d5911e6963c0a50cd0ae8d964b08eb128d27b860). -- Ticket URL: <https://trac.ffmpeg.org/ticket/4812#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4812: scale filter does not apply pure range change ------------------------------------+----------------------------------- Reporter: rmk | Owner: Type: defect | Status: open Priority: normal | Component: swscale Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ------------------------------------+----------------------------------- Comment (by cehoyos): Does attached patch make a difference for you? -- Ticket URL: <https://trac.ffmpeg.org/ticket/4812#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4812: scale filter does not apply pure range change ------------------------------------+----------------------------------- Reporter: rmk | Owner: Type: defect | Status: open Priority: normal | Component: swscale Version: git-master | Resolution: Keywords: | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ------------------------------------+----------------------------------- Comment (by rmk): Yes, looks good now: {{{ [FRAME] TAG:lavfi.signalstats.YMIN=0 TAG:lavfi.signalstats.YMAX=255 [/FRAME] }}} -- Ticket URL: <https://trac.ffmpeg.org/ticket/4812#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#4812: scale filter does not apply pure range change ------------------------------------+------------------------------------ Reporter: rmk | Owner: Type: defect | Status: closed Priority: normal | Component: avfilter Version: git-master | Resolution: fixed Keywords: scale | Blocked By: Blocking: | Reproduced by developer: 1 Analyzed by developer: 0 | ------------------------------------+------------------------------------ Changes (by cehoyos): * keywords: => scale * resolution: => fixed * status: open => closed * component: swscale => avfilter Comment: Hopefully fixed in 0cb6c0ec488e324443b49b36f1224d3e5af420c4 -- Ticket URL: <https://trac.ffmpeg.org/ticket/4812#comment:7> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg