1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-02 03:06:28 +02:00
FFmpeg/fftools
Linjie Fu b3a0548a98 fftools/ffmpeg_filter: fix the flags parsing for scaler
Scaler relys on "-sws_flags" option to pass the flags to swscale
and scale filter. Currently passing "sws_flags=xxx" as a filter
option to scaler leads to an incorrect option parsing.

Check and change the string to "flags=xxx" and dumped flags information.
(Refer to parse_sws_flags())

CMD:
$ffmpeg -v verbose -i input.mp4 -sws_flags lanczos+bitexact+accurate_rnd \
        -vf format=yuv420p,scale=800x600 -an -vframes 10 -f md5 -

Before:
[auto_scaler_0 @ 0x7f96c3808680] w:iw h:ih flags:'' interl:0
[auto_scaler_0 @ 0x7f96c3808680] w:1920 h:1080 fmt:yuvj420p sar:0/1 -> w:1920 h:1080 fmt:yuv420p sar:0/1 flags:0x0
[Parsed_scale_1 @ 0x7f96c3806e40] w:1920 h:1080 fmt:yuv420p sar:0/1 -> w:800 h:600 fmt:yuv420p sar:0/1 flags:0x0
MD5=ff1d6091690c6fcd36d458d2a9f648ce

After:
[auto_scaler_0 @ 0x7fe94563b4c0] w:iw h:ih flags:'lanczos+bitexact+accurate_rnd' interl:0
[auto_scaler_0 @ 0x7fe94563b4c0] w:1920 h:1080 fmt:yuvj420p sar:0/1 -> w:1920 h:1080 fmt:yuv420p sar:0/1 flags:0xc0200
[Parsed_scale_1 @ 0x7fe945639d00] w:1920 h:1080 fmt:yuv420p sar:0/1 -> w:800 h:600 fmt:yuv420p sar:0/1 flags:0xc0200
MD5=ff1d6091690c6fcd36d458d2a9f648ce

Signed-off-by: Linjie Fu <linjie.justin.fu@gmail.com>
2021-08-05 22:23:49 +08:00
..
cmdutils.c fftools: Don't set default swscale flags in ffmpeg/ffprobe/ffplay 2021-08-05 22:23:49 +08:00
cmdutils.h fftools/cmdutils.c: Add cmd line option to override detection of cpu count. 2021-07-16 10:06:23 +02:00
ffmpeg_filter.c fftools/ffmpeg_filter: fix the flags parsing for scaler 2021-08-05 22:23:49 +08:00
ffmpeg_hw.c ffmpeg: Don't require a known device to pass a frames context to an encoder 2020-05-03 16:04:27 +01:00
ffmpeg_opt.c ffmpeg_opt: restore documented stream selection behaviour 2021-08-01 09:51:07 +05:30
ffmpeg_qsv.c Remove unnecessary mem.h inclusions 2021-07-22 14:47:57 +02:00
ffmpeg_videotoolbox.c ffmpeg_videotoolbox: skip memory copy if hwaccel_output_format match 2021-06-10 19:54:03 +08:00
ffmpeg.c ffmpeg: fix order between field order autodetection and override 2021-07-25 22:40:49 +03:00
ffmpeg.h avcodec/avcodec: Stop including bsf.h in avcodec.h 2021-07-22 11:14:16 +02:00
ffplay.c fftools: Don't set default swscale flags in ffmpeg/ffprobe/ffplay 2021-08-05 22:23:49 +08:00
ffprobe.c fftools: Don't set default swscale flags in ffmpeg/ffprobe/ffplay 2021-08-05 22:23:49 +08:00
Makefile ffmpeg: remove superfluous custom cuvid hwaccel 2020-03-03 18:11:28 -03:00