mirror of
https://github.com/zebrajr/opencv.git
synced 2026-01-15 12:15:17 +00:00
imgcodecs: avif: set matrixCoefficients to UNSPECIFIED for monochrome images
Fixes issue with libavif >= 1.3.0 where subsampling with identity matrix coefficients is invalid. Aligns OpenCV AVIF writer with updated libavif conformance rules.
This commit is contained in:
@@ -86,7 +86,7 @@ AvifImageUniquePtr ConvertToAvif(const cv::Mat &img, bool lossless, int bit_dept
|
||||
result->yuvFormat = AVIF_PIXEL_FORMAT_YUV400;
|
||||
result->colorPrimaries = AVIF_COLOR_PRIMARIES_UNSPECIFIED;
|
||||
result->transferCharacteristics = AVIF_TRANSFER_CHARACTERISTICS_UNSPECIFIED;
|
||||
result->matrixCoefficients = AVIF_MATRIX_COEFFICIENTS_IDENTITY;
|
||||
result->matrixCoefficients = AVIF_MATRIX_COEFFICIENTS_UNSPECIFIED;
|
||||
result->yuvRange = AVIF_RANGE_FULL;
|
||||
result->yuvPlanes[0] = img.data;
|
||||
result->yuvRowBytes[0] = img.step[0];
|
||||
|
||||
Reference in New Issue
Block a user