From cccbfb77607e0f474b257f736403fda66f0f8512 Mon Sep 17 00:00:00 2001 From: Vincent Rabaud Date: Thu, 29 Aug 2024 14:33:15 +0200 Subject: [PATCH] Update the H273 URL to something that exists. --- src/colr.c | 2 +- src/reformat.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/colr.c b/src/colr.c index 7cb4d31537..71d66915f1 100644 --- a/src/colr.c +++ b/src/colr.c @@ -108,7 +108,7 @@ struct avifMatrixCoefficientsTable const float kb; }; -// https://www.itu.int/rec/T-REC-H.273-201612-I/en +// https://www.itu.int/rec/T-REC-H.273-201612-S static const struct avifMatrixCoefficientsTable matrixCoefficientsTables[] = { //{ AVIF_MATRIX_COEFFICIENTS_IDENTITY, "Identity", 0.0f, 0.0f, }, // Handled elsewhere { AVIF_MATRIX_COEFFICIENTS_BT709, "BT.709", 0.2126f, 0.0722f }, diff --git a/src/reformat.c b/src/reformat.c index c665b789de..d59435dedc 100644 --- a/src/reformat.c +++ b/src/reformat.c @@ -183,7 +183,7 @@ static avifBool avifPrepareReformatState(const avifImage * image, const avifRGBI return AVIF_TRUE; } -// Formulas 20-31 from https://www.itu.int/rec/T-REC-H.273-201612-I/en +// Formulas 20-31 from https://www.itu.int/rec/T-REC-H.273-201612-S static int avifYUVColorSpaceInfoYToUNorm(avifYUVColorSpaceInfo * info, float v) { int unorm = (int)avifRoundf(v * info->rangeY + info->biasY); @@ -350,12 +350,12 @@ avifResult avifImageRGBToYUV(avifImage * image, const avifRGBImage * rgb) // RGB -> YUV conversion if (state.yuv.mode == AVIF_REFORMAT_MODE_IDENTITY) { - // Formulas 41,42,43 from https://www.itu.int/rec/T-REC-H.273-201612-I/en + // Formulas 41,42,43 from https://www.itu.int/rec/T-REC-H.273-201612-S yuvBlock[bI][bJ].y = rgbPixel[1]; // G yuvBlock[bI][bJ].u = rgbPixel[2]; // B yuvBlock[bI][bJ].v = rgbPixel[0]; // R } else if (state.yuv.mode == AVIF_REFORMAT_MODE_YCGCO) { - // Formulas 44,45,46 from https://www.itu.int/rec/T-REC-H.273-201612-I/en + // Formulas 44,45,46 from https://www.itu.int/rec/T-REC-H.273-201612-S yuvBlock[bI][bJ].y = 0.5f * rgbPixel[1] + 0.25f * (rgbPixel[0] + rgbPixel[2]); yuvBlock[bI][bJ].u = 0.5f * rgbPixel[1] - 0.25f * (rgbPixel[0] + rgbPixel[2]); yuvBlock[bI][bJ].v = 0.5f * (rgbPixel[0] - rgbPixel[2]); @@ -759,12 +759,12 @@ static avifResult avifImageYUVAnyToRGBAnySlow(const avifImage * image, float R, G, B; if (hasColor) { if (state->yuv.mode == AVIF_REFORMAT_MODE_IDENTITY) { - // Identity (GBR): Formulas 41,42,43 from https://www.itu.int/rec/T-REC-H.273-201612-I/en + // Identity (GBR): Formulas 41,42,43 from https://www.itu.int/rec/T-REC-H.273-201612-S G = Y; B = Cb; R = Cr; } else if (state->yuv.mode == AVIF_REFORMAT_MODE_YCGCO) { - // YCgCo: Formulas 47,48,49,50 from https://www.itu.int/rec/T-REC-H.273-201612-I/en + // YCgCo: Formulas 47,48,49,50 from https://www.itu.int/rec/T-REC-H.273-201612-S const float t = Y - Cb; G = Y + Cb; B = t - Cr;