Opened 14 years ago
Closed 12 years ago
#45 closed defect (fixed)
FFplay do not respect resize alghoritm set in the sourcecode
Reported by: | ami_stuff | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | unspecified | Keywords: | roundup |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
issue 1804
https://roundup.libav.org/file834/test.tif
When I run FFplay like this:
ffplay -x 504 -y 376 test.tif
the picture will be displayed incorrectly (looks like chessboard).
this is not reproducible with ffmpeg:
ffmpeg -i test.tif -s 504x376 out.bmp
C:\>ffmpeg -i test.tif
FFmpeg version SVN-r22379, Copyright (c) 2000-2010 the FFmpeg developers
built on Mar 9 2010 06:09:18 with gcc 4.4.2
configuration: --enable-memalign-hack --cross-prefix=i686-mingw32- --cc=ccache
-i686-mingw32-gcc --arch=i686 --target-os=mingw32 --enable-runtime-cpudetect --e
nable-avisynth --enable-gpl --enable-version3 --enable-bzlib --enable-libgsm --e
nable-libfaad --enable-pthreads --enable-libvorbis --enable-libtheora --enable-l
ibspeex --enable-libmp3lame --enable-libopenjpeg --enable-libxvid --enable-libsc
hroedinger --enable-libx264 --enable-libopencore_amrwb --enable-libopencore_amrn
b
libavutil 50.11. 0 / 50.11. 0
libavcodec 52.58. 0 / 52.58. 0
libavformat 52.55. 0 / 52.55. 0
libavdevice 52. 2. 0 / 52. 2. 0
libswscale 0.10. 0 / 0.10. 0
Input #0, image2, from 'test.tif':
Duration: 00:00:00.04, start: 0.000000, bitrate: N/A
Stream #0.0: Video: tiff, monob, 1024x768, 25 tbr, 25 tbn, 25 tbc
At least one output file must be specified
Change History (7)
comment:2 by , 14 years ago
I'm ok with this change. There is also "-s XxY" option to remove/repleace.
BTW. Maybe it would be also possible to expand scale filter a bit to set the alghoritm at the command line, so this alghoritm would repleace the dafault algo set in the program's source code:
-vf scale=504:376:lanczos
follow-up: 4 comment:3 by , 14 years ago
ok, there is an "-sws_flags" option for this, but I'm unable to make it to work with ffplay:
this works:
ffmpeg -i test.tif -vf scale=504:376 -sws_flags bilinear out.bmp
this doesn't work:
ffplay -i test.tif -vf scale=504:376 -sws_flags bilinear
and it seems there is another regression, because ffmpeg generates wrong resized pic with at least bilinear/fast_bilinear rescale algo selected (g5381823 11.04.2011)
comment:4 by , 14 years ago
Replying to ami_stuff:
ok, there is an "-sws_flags" option for this, but I'm unable to make it to work with ffplay:
this works:
ffmpeg -i test.tif -vf scale=504:376 -sws_flags bilinear out.bmp
this doesn't work:
ffplay -i test.tif -vf scale=504:376 -sws_flags bilinear
-vf scale=504:376:flags=2 can be used as a workaround
and it seems there is another regression, because ffmpeg generates wrong resized pic with at least bilinear/fast_bilinear rescale algo selected (g5381823 11.04.2011)
ffmpeg uses mono colospace as output did you mean another issue ?
comment:5 by , 14 years ago
-vf scale=504:376:flags=2 can be used as a workaround
ah, ok
ffmpeg uses mono colospace as output did you mean another issue ?
IIRC the problem was releted to ticket #52, so it's fixed now
comment:6 by , 12 years ago
Keywords: | roundup added |
---|
comment:7 by , 12 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
The remaining problem with sws_flags is no longer reproduceable
Replying to ami_stuff:
Hi,
the problem depends on the brittle implementation of the -x/-y and filtering interaction logic.
Workaround: use -vf scale=504:376
I suggest to remove -x and -y (and the maintainance burden of keeping two distinct logic paths) in favor of -vf scale=w:h, and make docs and code points to -vf scale.
Would you consider acceptable such a solution?