Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#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)

blue_r210.avi (264.0 KB ) - added by shekh 7 years ago.

Download all attachments as: .zip

Change History (7)

by shekh, 7 years ago

Attachment: blue_r210.avi added

comment:1 by Carl Eugen Hoyos, 7 years ago

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:

$ ffmpeg -i blue_r210.avi -f rawvideo out

The output file shows the expected value of zeros for red and green and 0xFFFF for blue.

comment:2 by shekh, 7 years ago

Keywords: swscale added
Summary: wrong pixel values when decoding r210, r10kwrong 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%
Last edited 7 years ago by shekh (previous) (diff)

comment:3 by Carl Eugen Hoyos, 7 years ago

Component: undeterminedswscale
Keywords: swscale removed
Reproduced by developer: set
Status: newopen
Version: unspecifiedgit-master

comment:5 by Carl Eugen Hoyos, 7 years ago

Resolution: fixed
Status: openclosed

May be fixed in cb1a3eec

comment:6 by shekh, 7 years ago

Nightly from zeranoe works (20170824-f0f4888). Thanks!

Note: See TracTickets for help on using tickets.