[FFmpeg-trac] #2394(swscale:new): BGRA downscaling shift colors
FFmpeg
trac at avcodec.org
Thu Mar 21 21:05:26 CET 2013
#2394: BGRA downscaling shift colors
--------------------------------------+---------------------------------
Reporter: Cigaes | Owner:
Type: defect | Status: new
Priority: normal | Component: swscale
Version: git-master | Keywords: bgra
Blocked By: | Blocking:
Reproduced by developer: 0 | Analyzed by developer: 0
--------------------------------------+---------------------------------
Downscaling in BGRA produce a color shift.
How to reproduce:
{{{
./ffmpeg_g -lavfi color=c=blue:s=256x256,format=bgra,scale=4:4 \
-vframes 1 -f rawvideo - | xxd
}}}
{{{
ffmpeg version N-51202-gf8217da Copyright (c) 2000-2013 the FFmpeg
developers
built on Mar 21 2013 20:43:35 with gcc 4.7 (Debian 4.7.2-5)
configuration: --enable-shared --disable-static --enable-gpl --enable-
libx264 --enable-libass --enable-libfreetype --enable-libopus --assert-
level=2
libavutil 52. 22.100 / 52. 22.100
libavcodec 55. 1.100 / 55. 1.100
libavformat 55. 0.100 / 55. 0.100
libavdevice 55. 0.100 / 55. 0.100
libavfilter 3. 48.100 / 3. 48.100
libswscale 2. 2.100 / 2. 2.100
libswresample 0. 17.102 / 0. 17.102
libpostproc 52. 2.100 / 52. 2.100
Output #0, rawvideo, to 'pipe:':
Metadata:
encoder : Lavf55.0.100
Stream #0:0: Video: rawvideo (BGRA / 0x41524742), bgra, 4x4 [SAR 1:1
DAR 1:1], q=2-31, 200 kb/s, 90k tbn, 25 tbc
Stream mapping:
scale -> Stream #0:0 (rawvideo)
Press [q] to stop, [?] for help
frame= 1 fps=0.0 q=0.0 Lsize= 0kB time=00:00:00.04 bitrate=
12.8kbits/s
video:0kB audio:0kB subtitle:0 global headers:0kB muxing overhead
0.000000%
0000000: ed00 00f6 ed00 00f6 ed00 00f6 ed00 00f6 ................
0000010: e700 00f4 e700 00f4 e700 00f4 e700 00f4 ................
0000020: fd00 00ff fd00 00ff fd00 00ff fd00 00ff ................
0000030: fd00 00ff fd00 00ff fd00 00ff fd00 00ff ................
}}}
The same thing with RGBA instead of BGRA produces uniform {{{0000 fdff}}},
which seems correct.
The phenomenon increases with the downscaling factor. The output size,
OTOH, does not matter much. Only the last two lines are exempt.
--
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2394>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list