[FFmpeg-trac] #1261(swscale:reopened): yellowish color with resize and -pix_fmt pal8

FFmpeg trac at avcodec.org
Tue Apr 2 00:07:06 EEST 2019


#1261: yellowish color with resize and -pix_fmt pal8
------------------------------------+------------------------------------
             Reporter:  ami_stuff   |                    Owner:
                 Type:  defect      |                   Status:  reopened
             Priority:  normal      |                Component:  swscale
              Version:  git-master  |               Resolution:
             Keywords:  pal8        |               Blocked By:
             Blocking:              |  Reproduced by developer:  1
Analyzed by developer:  0           |
------------------------------------+------------------------------------
Changes (by gdgsdg123):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 Build from:
 https://ffmpeg.zeranoe.com/builds/win64/static/ffmpeg-20190331-27c94c5-win64-static.zip
 {{{
 ffmpeg -report -i "C:\Image-before-scaling.png" -pix_fmt pal8 -sws_flags
 bicubic+accurate_rnd+full_chroma_int -vf scale=iw*2:ih*2 bicubic_text.png
 }}}
 gives bitexact result... (bitexact as previous)
 [[BR]]
 [[BR]]
 [[BR]]
 Previous command:
 {{{
 ffmpeg -report -i "C:\Image-before-scaling.png" -pix_fmt pal8 -sws_flags
 bicubic+accurate_rnd -vf scale=iw*2:ih*2 bicubic_text.png
 }}}
 [[BR]]
 [[BR]]
 [[BR]]
 [[BR]]
 [[BR]]
 Log:
 {{{
 ffmpeg started on 2019-04-02 at 04:40:24
 Report written to "ffmpeg-20190402-044024.log"
 Command line:
 ffmpeg -report -i "C:\\Image-before-scaling.png" -pix_fmt pal8 -sws_flags
 bicubic+accurate_rnd+full_chroma_int -vf "scale=iw*2:ih*2"
 bicubic_text.png
 ffmpeg version N-93506-g27c94c57dc Copyright (c) 2000-2019 the FFmpeg
 developers
   built with gcc 8.2.1 (GCC) 20190212
   configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
 fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
 libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame
 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
 --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
 --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
 libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
 --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
 --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-
 nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
   libavutil      56. 26.100 / 56. 26.100
   libavcodec     58. 48.100 / 58. 48.100
   libavformat    58. 26.101 / 58. 26.101
   libavdevice    58.  7.100 / 58.  7.100
   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
 Splitting the commandline.
 Reading option '-report' ... matched as option 'report' (generate a
 report) with argument '1'.
 Reading option '-i' ... matched as input url with argument 'C:\Image-
 before-scaling.png'.
 Reading option '-pix_fmt' ... matched as option 'pix_fmt' (set pixel
 format) with argument 'pal8'.
 Reading option '-sws_flags' ... matched as AVOption 'sws_flags' with
 argument 'bicubic+accurate_rnd+full_chroma_int'.
 Reading option '-vf' ... matched as option 'vf' (set video filters) with
 argument 'scale=iw*2:ih*2'.
 Reading option 'bicubic_text.png' ... matched as output url.
 Finished splitting the commandline.
 Parsing a group of options: global .
 Applying option report (generate a report) with argument 1.
 Successfully parsed a group of options.
 Parsing a group of options: input url C:\Image-before-scaling.png.
 Successfully parsed a group of options.
 Opening an input file: C:\Image-before-scaling.png.
 [NULL @ 0000000000501a00] Opening 'C:\Image-before-scaling.png' for
 reading
 [file @ 00000000005033c0] Setting default whitelist 'file,crypto'
 [png_pipe @ 0000000000501a00] Format png_pipe probed with size=2048 and
 score=99
 [png_pipe @ 0000000000501a00] Before avformat_find_stream_info() pos: 0
 bytes read:716 seeks:0 nb_streams:1
 [png_pipe @ 0000000000501a00] After avformat_find_stream_info() pos: 716
 bytes read:716 seeks:0 frames:1
 Input #0, png_pipe, from 'C:\Image-before-scaling.png':
   Duration: N/A, bitrate: N/A
     Stream #0:0, 1, 1/25: Video: png, pal8(pc), 109x40, 25 tbr, 25 tbn, 25
 tbc
 Successfully opened the file.
 Parsing a group of options: output url bicubic_text.png.
 Applying option pix_fmt (set pixel format) with argument pal8.
 Applying option vf (set video filters) with argument scale=iw*2:ih*2.
 Successfully parsed a group of options.
 Opening an output file: bicubic_text.png.
 Successfully opened the file.
 detected 16 logical cores
 Stream mapping:
   Stream #0:0 -> #0:0 (png (native) -> png (native))
 Press [q] to stop, [?] for help
 cur_dts is invalid (this is harmless if it occurs once at the start per
 stream)
 cur_dts is invalid (this is harmless if it occurs once at the start per
 stream)
 [Parsed_scale_0 @ 0000000002a4dcc0] Setting 'w' to value 'iw*2'
 [Parsed_scale_0 @ 0000000002a4dcc0] Setting 'h' to value 'ih*2'
 [Parsed_scale_0 @ 0000000002a4dcc0] Setting 'flags' to value 'bicubic'
 [Parsed_scale_0 @ 0000000002a4dcc0] Setting 'sws_flags' to value
 'bicubic+accurate_rnd+full_chroma_int'
 [Parsed_scale_0 @ 0000000002a4dcc0] w:iw*2 h:ih*2 flags:'bicubic' interl:0
 [graph 0 input from stream 0:0 @ 0000000002a4efc0] Setting 'video_size' to
 value '109x40'
 [graph 0 input from stream 0:0 @ 0000000002a4efc0] Setting 'pix_fmt' to
 value '11'
 [graph 0 input from stream 0:0 @ 0000000002a4efc0] Setting 'time_base' to
 value '1/25'
 [graph 0 input from stream 0:0 @ 0000000002a4efc0] Setting 'pixel_aspect'
 to value '0/1'
 [graph 0 input from stream 0:0 @ 0000000002a4efc0] Setting 'sws_param' to
 value 'flags=2'
 [graph 0 input from stream 0:0 @ 0000000002a4efc0] Setting 'frame_rate' to
 value '25/1'
 [graph 0 input from stream 0:0 @ 0000000002a4efc0] w:109 h:40 pixfmt:pal8
 tb:1/25 fr:25/1 sar:0/1 sws_param:flags=2
 [format @ 0000000002a59440] Setting 'pix_fmts' to value 'pal8'
 [AVFilterGraph @ 0000000002a4d600] query_formats: 4 queried, 3 merged, 0
 already done, 0 delayed
 [Parsed_scale_0 @ 0000000002a4dcc0] w:109 h:40 fmt:pal8 sar:0/1 -> w:218
 h:80 fmt:pal8 sar:0/1 flags:0x4
 Output #0, image2, to 'bicubic_text.png':
   Metadata:
     encoder         : Lavf58.26.101
     Stream #0:0, 0, 1/25: Video: png, pal8, 218x80, q=2-31, 200 kb/s, 25
 fps, 25 tbn, 25 tbc
     Metadata:
       encoder         : Lavc58.48.100 png
 Clipping frame in rate conversion by 0.000008
 cur_dts is invalid (this is harmless if it occurs once at the start per
 stream)
 cur_dts is invalid (this is harmless if it occurs once at the start per
 stream)
 [out_0_0 @ 0000000002a59280] EOF on sink link out_0_0:default.
 No more output streams to write to, finishing.
 [image2 @ 0000000000503500] Opening 'bicubic_text.png' for writing
 [file @ 0000000002a80bc0] Setting default whitelist 'file,crypto'
 [AVIOContext @ 000000000a329900] Statistics: 0 seeks, 1 writeouts
 frame=    1 fps=0.0 q=-0.0 Lsize=N/A time=00:00:00.04 bitrate=N/A
 speed=4.44x
 video:3kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 Input file #0 (C:\Image-before-scaling.png):
   Input stream #0:0 (video): 1 packets read (716 bytes); 1 frames decoded;
   Total: 1 packets (716 bytes) demuxed
 Output file #0 (bicubic_text.png):
   Output stream #0:0 (video): 1 frames encoded; 1 packets muxed (3380
 bytes);
   Total: 1 packets (3380 bytes) muxed
 1 frames successfully decoded, 0 decoding errors
 [AVIOContext @ 000000000050b640] Statistics: 716 bytes read, 0 seeks

 }}}
 [[BR]]
 [[BR]]
 Highlight:
 {{{
 [swscaler @ 000000000297a840] Forcing full internal H chroma due to input
 having non subsampled chroma
 }}}
 is missing. (comparing to previous log)
 [[BR]]
 [[BR]]
 Which implied `full_chroma_int` are set in both operations.
 [[BR]]
 [[BR]]
 [[BR]]
 [[BR]]
 [[BR]]
 Off-topic:
 What's the difference between `full_chroma_int` and `full_chroma_inp`?..
 And their relationship? (dependencies, etc...)

--
Ticket URL: <https://trac.ffmpeg.org/ticket/1261#comment:7>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list