[FFmpeg-trac] #3785(swscale:new): SWSCALE: in_range, in_color_matrix, out_range, out_color_matrix incorrect

FFmpeg trac at avcodec.org
Sat Jul 19 22:58:15 CEST 2014


#3785: SWSCALE: in_range, in_color_matrix, out_range, out_color_matrix incorrect
------------------------------------+-----------------------------------
             Reporter:  troy_s      |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  swscale
              Version:  git-master  |               Resolution:
             Keywords:              |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+-----------------------------------

Comment (by troy_s):

 Attached a (hopefully) accurate EXR with the YCbCr values based off of 709
 coefficients.

 Attached an ODS of the matrix formula used to convert the sRGB (shared
 primaries with 709) test chart. Notes on values obtained via the formulas
 revealed by selecting a cell:
 * The matrix scales the luma via the coefficients for sRGB / 709 primaries
 as per XYZ positions. The luminance (Y) values for sRGB / 709 primaries
 for red, green, and blue are 0.2126, 0.7152, and 0.0722 respectively[1]
 * The matrix scales for broadcast range of luma (Y') and Cb / Cr based on
 219/255 for luma, and 224/255 respectively.
 * The offsets are give to correctly position the values for Y, Cb, and Cr.
 These offsets are 16, 128, and 128 respectively.

 [1] We should revisit the need for unique coefficients to cover variable
 color spaces, including the need for uniques for input color spaces alone.
 This extends into the forthcoming ITU-BT-2020 needs that have XYZ absolute
 space models.

--
Ticket URL: <https://trac.ffmpeg.org/ticket/3785#comment:6>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list