#6608 closed defect (fixed)
wrong conversion of pixel format RGB48 -> RGBA64
Reported by: | shekh | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | swscale |
Version: | git-master | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | yes | |
Analyzed by developer: | no |
Description
I observed errors in pixel values and created this test to demonstrate the problem.
The input is filled with pure blue 000003FF but when decoding it becomes b=FFFE g=0000 r=001B
Any color is distorted somehow, not just pure blue.
How to reproduce:
Dont know best way to see pixels with command line, but this way it is quite obvious in hex editor
% ffmpeg.exe -i blue_r210.avi -c:v rawvideo -pix_fmt bgra64 -strict -5 blue64.avi ffmpeg version N-87027-gd826951 from zeranoe static 32bit
Attachments (1)
Change History (7)
by , 7 years ago
Attachment: | blue_r210.avi added |
---|
comment:1 by , 7 years ago
comment:2 by , 7 years ago
Keywords: | swscale added |
---|---|
Summary: | wrong pixel values when decoding r210, r10k → wrong conversion of pixel format RGB48 -> RGBA64 |
Looks like the problem is in swscale and r210 is just one of possible inputs.
With this command (added pix_fmt) there is problem.
$ ffmpeg -i blue_r210.avi -f rawvideo -pix_fmt rgba64 out
ffmpeg version N-87027-gd826951 Copyright (c) 2000-2017 the FFmpeg developers built with gcc 7.1.0 (GCC) configuration: --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib libavutil 55. 74.100 / 55. 74.100 libavcodec 57.103.100 / 57.103.100 libavformat 57. 76.100 / 57. 76.100 libavdevice 57. 7.100 / 57. 7.100 libavfilter 6.100.100 / 6.100.100 libswscale 4. 7.102 / 4. 7.102 libswresample 2. 8.100 / 2. 8.100 libpostproc 54. 6.100 / 54. 6.100 Input #0, avi, from 'blue_r210.avi': Duration: 00:00:00.10, start: 0.000000, bitrate: 21630 kb/s Stream #0:0: Video: r210 (r210 / 0x30313272), rgb48le(10 bpc), 256x256, 10 fps, 10 tbr, 10 tbn, 10 tbc File 'out' already exists. Overwrite ? [y/N] Stream mapping: Stream #0:0 -> #0:0 (r210 (native) -> rawvideo (native)) Press [q] to stop, [?] for help Output #0, rawvideo, to 'out': Metadata: encoder : Lavf57.76.100 Stream #0:0: Video: rawvideo (RBA[64] / 0x40414252), rgba64le, 256x256, q=2-31, 41943 kb/s, 10 fps, 10 tbn, 10 tbc Metadata: encoder : Lavc57.103.100 rawvideo frame= 1 fps=0.0 q=-0.0 Lsize= 512kB time=00:00:00.10 bitrate=41943.0kbits/s speed= 4x video:512kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
comment:3 by , 7 years ago
Component: | undetermined → swscale |
---|---|
Keywords: | swscale removed |
Reproduced by developer: | set |
Status: | new → open |
Version: | unspecified → git-master |
comment:4 by , 7 years ago
Patch sent, feel free to test:
http://ffmpeg.org/pipermail/ffmpeg-devel/2017-August/215151.html
Please understand that valid tickets on this bug tracker need a command line together with its complete, uncut console output.
The title of the ticket you created indicates that you believe there is an issue in the r210 and/or r10k decoder. I tested the following:
The output file shows the expected value of zeros for red and green and 0xFFFF for blue.