You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When converting RGB to YCbCr with libavif, the default color properties are known and mentioned here (sRGB with BT.601 coefficients), but those properties are not set in the AVIF image structure, so unless the user explicitly sets the color space, decoders tend to assume BT.709 and distort the colors. In my opinion libavif should set those fields since it has to make assumptions when converting from RGB anyway.
The text was updated successfully, but these errors were encountered:
FFmpeg libraries keep the color space parameters as unspecified instead of overriding the values to the specified defaults which I think is reasonable if conservative. Maybe it has special-case handling for color-space conversion operations from AVIF internally, but if FFmpeg is used as the decoder and another library performs the color space conversion then having special default color spaces based on the format is impractical (when input is not constrained).
In my case I only ingest files converted from RGB with libavif, so the omission feels like a trap. The encode example isn't explicit about setting the correct color space parameters when converting from RGB, and the defaults are buried in a wiki page (or spec I guess). If there are specific situations where you would not want to set color space parameters when performing the conversion through libavif then I can understand the omission and would just advise setting the defaults in the RGB path of examples/avif_example_encode.c, but if not it just seems like good hygiene to be explicit about the color space when libavif performs the conversion.
When converting RGB to YCbCr with libavif, the default color properties are known and mentioned here (sRGB with BT.601 coefficients), but those properties are not set in the AVIF image structure, so unless the user explicitly sets the color space, decoders tend to assume BT.709 and distort the colors. In my opinion libavif should set those fields since it has to make assumptions when converting from RGB anyway.
The text was updated successfully, but these errors were encountered: