Browse Source

swscale/range_convert: fix mpeg ranges in yuv range conversion for non-8-bit pixel formats

There is an issue with the constants used in YUV to YUV range conversion,
where the upper bound is not respected when converting to mpeg range.

With this commit, the constants are calculated at runtime, depending on
the bit depth. This approach also allows us to more easily understand how
the constants are derived.

For bit depths <= 14, the number of fixed point bits has been set to 14
for all conversions, to simplify the code.
For bit depths > 14, the number of fixed points bits has been raised and
set to 18, to allow for the conversion to be accurate enough for the mpeg
range to be respected.

The convert functions now take the conversion constants (coeff and offset)
as function arguments.
For bit depths <= 14, coeff is unsigned 16-bit and offset is 32-bit.
For bit depths > 14, coeff is unsigned 32-bit and offset is 64-bit.

x86_64:
chrRangeFromJpeg8_1920_c:    2127.4   2125.0  (1.00x)
chrRangeFromJpeg16_1920_c:   2325.2   2127.2  (1.09x)
chrRangeToJpeg8_1920_c:      3166.9   3168.7  (1.00x)
chrRangeToJpeg16_1920_c:     2152.4   3164.8  (0.68x)
lumRangeFromJpeg8_1920_c:    1263.0   1302.5  (0.97x)
lumRangeFromJpeg16_1920_c:   1080.5   1299.2  (0.83x)
lumRangeToJpeg8_1920_c:      1886.8   2112.2  (0.89x)
lumRangeToJpeg16_1920_c:     1077.0   1906.5  (0.56x)

aarch64 A55:
chrRangeFromJpeg8_1920_c:   28835.2  28835.6  (1.00x)
chrRangeFromJpeg16_1920_c:  28839.8  32680.8  (0.88x)
chrRangeToJpeg8_1920_c:     23074.7  23075.4  (1.00x)
chrRangeToJpeg16_1920_c:    17318.9  24996.0  (0.69x)
lumRangeFromJpeg8_1920_c:   15389.7  15384.5  (1.00x)
lumRangeFromJpeg16_1920_c:  15388.2  17306.7  (0.89x)
lumRangeToJpeg8_1920_c:     19227.8  19226.6  (1.00x)
lumRangeToJpeg16_1920_c:    15387.0  21146.3  (0.73x)

aarch64 A76:
chrRangeFromJpeg8_1920_c:    6324.4   6268.1  (1.01x)
chrRangeFromJpeg16_1920_c:   6339.9  11521.5  (0.55x)
chrRangeToJpeg8_1920_c:      9656.0   9612.8  (1.00x)
chrRangeToJpeg16_1920_c:     6340.4  11651.8  (0.54x)
lumRangeFromJpeg8_1920_c:    4422.0   4420.8  (1.00x)
lumRangeFromJpeg16_1920_c:   4420.9   5762.0  (0.77x)
lumRangeToJpeg8_1920_c:      5949.1   5977.5  (1.00x)
lumRangeToJpeg16_1920_c:     4446.8   5946.2  (0.75x)

NOTE: all simd optimizations for range_convert have been disabled.
      they will be re-enabled when they are fixed for each architecture.

NOTE2: the same issue still exists in rgb2yuv conversions, which is not
       addressed in this commit.
Ramiro Polla 5 months ago
parent
commit
384fe39623

+ 5 - 0
libswscale/aarch64/swscale.c

@@ -225,6 +225,10 @@ void ff_chrRangeToJpeg_neon(int16_t *dstU, int16_t *dstV, int width);
 
 av_cold void ff_sws_init_range_convert_aarch64(SwsInternal *c)
 {
+    /* This code is currently disabled because of changes in the base
+     * implementation of these functions. This code should be enabled
+     * again once those changes are ported to this architecture. */
+#if 0
     int cpu_flags = av_get_cpu_flags();
 
     if (have_neon(cpu_flags)) {
@@ -238,6 +242,7 @@ av_cold void ff_sws_init_range_convert_aarch64(SwsInternal *c)
             }
         }
     }
+#endif
 }
 
 av_cold void ff_sws_init_swscale_aarch64(SwsInternal *c)

+ 4 - 2
libswscale/hscale.c

@@ -59,7 +59,8 @@ static int lum_h_scale(SwsInternal *c, SwsFilterDescriptor *desc, int sliceY, in
         }
 
         if (c->lumConvertRange)
-            c->lumConvertRange((int16_t*)dst[dst_pos], dstW);
+            c->lumConvertRange((int16_t*)dst[dst_pos], dstW,
+                               c->lumConvertRange_coeff, c->lumConvertRange_offset);
 
         desc->dst->plane[0].sliceH += 1;
 
@@ -192,7 +193,8 @@ static int chr_h_scale(SwsInternal *c, SwsFilterDescriptor *desc, int sliceY, in
         }
 
         if (c->chrConvertRange)
-            c->chrConvertRange((uint16_t*)dst1[dst_pos1+i], (uint16_t*)dst2[dst_pos2+i], dstW);
+            c->chrConvertRange((uint16_t*)dst1[dst_pos1+i], (uint16_t*)dst2[dst_pos2+i], dstW,
+                               c->chrConvertRange_coeff, c->chrConvertRange_offset);
 
         desc->dst->plane[1].sliceH += 1;
         desc->dst->plane[2].sliceH += 1;

+ 93 - 20
libswscale/swscale.c

@@ -156,82 +156,98 @@ static void hScale8To19_c(SwsInternal *c, int16_t *_dst, int dstW,
 
 // FIXME all pal and rgb srcFormats could do this conversion as well
 // FIXME all scalers more complex than bilinear could do half of this transform
-static void chrRangeToJpeg_c(int16_t *dstU, int16_t *dstV, int width)
+static void chrRangeToJpeg_c(int16_t *dstU, int16_t *dstV, int width,
+                             uint32_t _coeff, int64_t _offset)
 {
+    uint16_t coeff = _coeff;
+    int32_t offset = _offset;
     int i;
     for (i = 0; i < width; i++) {
-        int U = (dstU[i] * 4663 - 9289992) >> 12; // -264
-        int V = (dstV[i] * 4663 - 9289992) >> 12; // -264
+        int U = (dstU[i] * coeff + offset) >> 14;
+        int V = (dstV[i] * coeff + offset) >> 14;
         dstU[i] = FFMIN(U, (1 << 15) - 1);
         dstV[i] = FFMIN(V, (1 << 15) - 1);
     }
 }
 
-static void chrRangeFromJpeg_c(int16_t *dstU, int16_t *dstV, int width)
+static void chrRangeFromJpeg_c(int16_t *dstU, int16_t *dstV, int width,
+                               uint32_t _coeff, int64_t _offset)
 {
+    uint16_t coeff = _coeff;
+    int32_t offset = _offset;
     int i;
     for (i = 0; i < width; i++) {
-        dstU[i] = (dstU[i] * 1799 + 4081085) >> 11; // 1469
-        dstV[i] = (dstV[i] * 1799 + 4081085) >> 11; // 1469
+        dstU[i] = (dstU[i] * coeff + offset) >> 14;
+        dstV[i] = (dstV[i] * coeff + offset) >> 14;
     }
 }
 
-static void lumRangeToJpeg_c(int16_t *dst, int width)
+static void lumRangeToJpeg_c(int16_t *dst, int width,
+                             uint32_t _coeff, int64_t _offset)
 {
+    uint16_t coeff = _coeff;
+    int32_t offset = _offset;
     int i;
     for (i = 0; i < width; i++) {
-        int Y = (dst[i] * 19077 - 39057361) >> 14;
+        int Y = (dst[i] * coeff + offset) >> 14;
         dst[i] = FFMIN(Y, (1 << 15) - 1);
     }
 }
 
-static void lumRangeFromJpeg_c(int16_t *dst, int width)
+static void lumRangeFromJpeg_c(int16_t *dst, int width,
+                               uint32_t _coeff, int64_t _offset)
 {
+    uint16_t coeff = _coeff;
+    int32_t offset = _offset;
     int i;
     for (i = 0; i < width; i++)
-        dst[i] = (dst[i] * 14071 + 33561947) >> 14;
+        dst[i] = (dst[i] * coeff + offset) >> 14;
 }
 
-static void chrRangeToJpeg16_c(int16_t *_dstU, int16_t *_dstV, int width)
+static void chrRangeToJpeg16_c(int16_t *_dstU, int16_t *_dstV, int width,
+                               uint32_t coeff, int64_t offset)
 {
     int i;
     int32_t *dstU = (int32_t *) _dstU;
     int32_t *dstV = (int32_t *) _dstV;
     for (i = 0; i < width; i++) {
-        int U = ((int)(dstU[i] * 4663U - (9289992 << 4))) >> 12; // -264
-        int V = ((int)(dstV[i] * 4663U - (9289992 << 4))) >> 12; // -264
+        int U = ((int64_t) dstU[i] * coeff + offset) >> 18;
+        int V = ((int64_t) dstV[i] * coeff + offset) >> 18;
         dstU[i] = FFMIN(U, (1 << 19) - 1);
         dstV[i] = FFMIN(V, (1 << 19) - 1);
     }
 }
 
-static void chrRangeFromJpeg16_c(int16_t *_dstU, int16_t *_dstV, int width)
+static void chrRangeFromJpeg16_c(int16_t *_dstU, int16_t *_dstV, int width,
+                                 uint32_t coeff, int64_t offset)
 {
     int i;
     int32_t *dstU = (int32_t *) _dstU;
     int32_t *dstV = (int32_t *) _dstV;
     for (i = 0; i < width; i++) {
-        dstU[i] = (dstU[i] * 1799 + (4081085 << 4)) >> 11; // 1469
-        dstV[i] = (dstV[i] * 1799 + (4081085 << 4)) >> 11; // 1469
+        dstU[i] = ((int64_t) dstU[i] * coeff + offset) >> 18;
+        dstV[i] = ((int64_t) dstV[i] * coeff + offset) >> 18;
     }
 }
 
-static void lumRangeToJpeg16_c(int16_t *_dst, int width)
+static void lumRangeToJpeg16_c(int16_t *_dst, int width,
+                               uint32_t coeff, int64_t offset)
 {
     int i;
     int32_t *dst = (int32_t *) _dst;
     for (i = 0; i < width; i++) {
-        int Y = ((int)(dst[i] * 4769U - (39057361 << 2))) >> 12;
+        int Y = ((int64_t) dst[i] * coeff + offset) >> 18;
         dst[i] = FFMIN(Y, (1 << 19) - 1);
     }
 }
 
-static void lumRangeFromJpeg16_c(int16_t *_dst, int width)
+static void lumRangeFromJpeg16_c(int16_t *_dst, int width,
+                                 uint32_t coeff, int64_t offset)
 {
     int i;
     int32_t *dst = (int32_t *) _dst;
     for (i = 0; i < width; i++)
-        dst[i] = ((int)(dst[i]*(14071U/4) + (33561947<<4)/4)) >> 12;
+        dst[i] = ((int64_t) dst[i] * coeff + offset) >> 18;
 }
 
 
@@ -547,11 +563,68 @@ int ff_swscale(SwsInternal *c, const uint8_t *const src[], const int srcStride[]
     return dstY - lastDstY;
 }
 
+/*
+ * Solve for coeff and offset:
+ * dst = ((src << src_shift) * coeff + offset) >> (mult_shift + src_shift)
+ *
+ * If SwsInternal->dstBpc is > 14, coeff is uint16_t and offset is int32_t,
+ * otherwise (SwsInternal->dstBpc is <= 14) coeff is uint32_t and offset is
+ * int64_t.
+ */
+static void solve_range_convert(uint16_t src_min, uint16_t src_max,
+                                uint16_t dst_min, uint16_t dst_max,
+                                int src_bits, int src_shift, int mult_shift,
+                                uint32_t *coeff, int64_t *offset)
+{
+    uint16_t src_range = src_max - src_min;
+    uint16_t dst_range = dst_max - dst_min;
+    int total_shift = mult_shift + src_shift;
+    *coeff = AV_CEIL_RSHIFT(((uint64_t) dst_range << total_shift) / src_range, src_shift);
+    *offset = ((int64_t) dst_max << total_shift) -
+              ((int64_t) src_max << src_shift) * *coeff;
+}
+
+static void init_range_convert_constants(SwsInternal *c)
+{
+    const int bit_depth = c->dstBpc ? c->dstBpc : 8;
+    const int src_bits = bit_depth <= 14 ? 15 : 19;
+    const int src_shift = src_bits - bit_depth;
+    const int mult_shift = bit_depth <= 14 ? 14 : 18;
+    const uint16_t mpeg_min = 16U << (bit_depth - 8);
+    const uint16_t mpeg_max_lum = 235U << (bit_depth - 8);
+    const uint16_t mpeg_max_chr = 240U << (bit_depth - 8);
+    const uint16_t jpeg_max = (1U << bit_depth) - 1;
+    uint16_t src_min, src_max_lum, src_max_chr;
+    uint16_t dst_min, dst_max_lum, dst_max_chr;
+    if (c->opts.src_range) {
+        src_min     = 0;
+        src_max_lum = jpeg_max;
+        src_max_chr = jpeg_max;
+        dst_min     = mpeg_min;
+        dst_max_lum = mpeg_max_lum;
+        dst_max_chr = mpeg_max_chr;
+    } else {
+        src_min     = mpeg_min;
+        src_max_lum = mpeg_max_lum;
+        src_max_chr = mpeg_max_chr;
+        dst_min     = 0;
+        dst_max_lum = jpeg_max;
+        dst_max_chr = jpeg_max;
+    }
+    solve_range_convert(src_min, src_max_lum, dst_min, dst_max_lum,
+                        src_bits, src_shift, mult_shift,
+                        &c->lumConvertRange_coeff, &c->lumConvertRange_offset);
+    solve_range_convert(src_min, src_max_chr, dst_min, dst_max_chr,
+                        src_bits, src_shift, mult_shift,
+                        &c->chrConvertRange_coeff, &c->chrConvertRange_offset);
+}
+
 av_cold void ff_sws_init_range_convert(SwsInternal *c)
 {
     c->lumConvertRange = NULL;
     c->chrConvertRange = NULL;
     if (c->opts.src_range != c->opts.dst_range && !isAnyRGB(c->opts.dst_format)) {
+        init_range_convert_constants(c);
         if (c->dstBpc <= 14) {
             if (c->opts.src_range) {
                 c->lumConvertRange = lumRangeFromJpeg_c;

+ 22 - 4
libswscale/swscale_internal.h

@@ -647,10 +647,28 @@ struct SwsInternal {
                     const int32_t *filterPos, int filterSize);
     /** @} */
 
-    /// Color range conversion function for luma plane if needed.
-    void (*lumConvertRange)(int16_t *dst, int width);
-    /// Color range conversion function for chroma planes if needed.
-    void (*chrConvertRange)(int16_t *dst1, int16_t *dst2, int width);
+    /**
+     * Color range conversion functions if needed.
+     * If SwsInternal->dstBpc is > 14:
+     * - int16_t *dst (data is 15 bpc)
+     * - uint16_t coeff
+     * - int32_t offset
+     * Otherwise (SwsInternal->dstBpc is <= 14):
+     * - int32_t *dst (data is 19 bpc)
+     * - uint32_t coeff
+     * - int64_t offset
+     */
+    /** @{ */
+    void (*lumConvertRange)(int16_t *dst, int width,
+                            uint32_t coeff, int64_t offset);
+    void (*chrConvertRange)(int16_t *dst1, int16_t *dst2, int width,
+                            uint32_t coeff, int64_t offset);
+    /** @} */
+
+    uint32_t lumConvertRange_coeff;
+    uint32_t chrConvertRange_coeff;
+    int64_t  lumConvertRange_offset;
+    int64_t  chrConvertRange_offset;
 
     int needs_hcscale; ///< Set if there are chroma planes to be converted.
 

+ 5 - 0
libswscale/x86/swscale.c

@@ -474,12 +474,17 @@ RANGE_CONVERT_FUNCS_DECL(avx2);
 
 av_cold void ff_sws_init_range_convert_x86(SwsInternal *c)
 {
+    /* This code is currently disabled because of changes in the base
+     * implementation of these functions. This code should be enabled
+     * again once those changes are ported to this architecture. */
+#if 0
     int cpu_flags = av_get_cpu_flags();
     if (EXTERNAL_AVX2_FAST(cpu_flags)) {
         RANGE_CONVERT_FUNCS(avx2);
     } else if (EXTERNAL_SSE2(cpu_flags)) {
         RANGE_CONVERT_FUNCS(sse2);
     }
+#endif
 }
 
 av_cold void ff_sws_init_swscale_x86(SwsInternal *c)

+ 60 - 8
tests/checkasm/sw_range_convert.c

@@ -68,7 +68,8 @@ static void check_lumConvertRange(int from)
     int32_t *dst0_32 = (int32_t *) dst0;
     int32_t *dst1_32 = (int32_t *) dst1;
 
-    declare_func(void, int16_t *dst, int width);
+    declare_func(void, int16_t *dst, int width,
+                       uint32_t coeff, int64_t offset);
 
     sws = sws_alloc_context();
     if (sws_init_context(sws, NULL, NULL) < 0)
@@ -83,6 +84,10 @@ static void check_lumConvertRange(int from)
         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
         int bit_depth = desc->comp[0].depth;
         int sample_size = bit_depth == 16 ? sizeof(int32_t) : sizeof(int16_t);
+        int src_shift = bit_depth <= 14 ? 15 - bit_depth : 19 - bit_depth;
+        int mpeg_min = 16 << (bit_depth - 8);
+        int mpeg_max = 235 << (bit_depth - 8);
+        int jpeg_max = (1 << bit_depth) - 1;
         sws->src_format = pix_fmt;
         sws->dst_format = pix_fmt;
         c->dstBpc = bit_depth;
@@ -92,16 +97,37 @@ static void check_lumConvertRange(int from)
             if (check_func(c->lumConvertRange, "%s%d_%d", func_str, bit_depth, width)) {
                 randomize_buffers(dst0, dst1, bit_depth, width);
                 if (bit_depth == 16) {
+                    if (!from) {
+                        dst1_32[0] = dst0_32[0] = mpeg_min << src_shift;
+                        dst1_32[1] = dst0_32[1] = mpeg_max << src_shift;
+                    }
                     dst1_32[2] = dst0_32[2] = -1;
                 } else {
+                    if (!from) {
+                        dst1[0] = dst0[0] = mpeg_min << src_shift;
+                        dst1[1] = dst0[1] = mpeg_max << src_shift;
+                    }
                     dst1[2] = dst0[2] = -1;
                 }
-                call_ref(dst0, width);
-                call_new(dst1, width);
+                call_ref(dst0, width,
+                         c->lumConvertRange_coeff, c->lumConvertRange_offset);
+                call_new(dst1, width,
+                         c->lumConvertRange_coeff, c->lumConvertRange_offset);
                 if (memcmp(dst0, dst1, width * sample_size))
                     fail();
+                if (!from) {
+                    /* check that the mpeg range is respected */
+                    if (bit_depth == 16) {
+                        if ((dst1_32[0] >> src_shift) > 0 || (dst1_32[1] >> src_shift) != jpeg_max)
+                            fail();
+                    } else {
+                        if ((dst1[0] >> src_shift) > 0 || (dst1[1] >> src_shift) != jpeg_max)
+                            fail();
+                    }
+                }
                 if (width == LARGEST_INPUT_SIZE && (bit_depth == 8 || bit_depth == 16))
-                    bench_new(dst1, width);
+                    bench_new(dst1, width,
+                              c->lumConvertRange_coeff, c->lumConvertRange_offset);
             }
         }
     }
@@ -125,7 +151,8 @@ static void check_chrConvertRange(int from)
     int32_t *dstU0_32 = (int32_t *) dstU0;
     int32_t *dstU1_32 = (int32_t *) dstU1;
 
-    declare_func(void, int16_t *dstU, int16_t *dstV, int width);
+    declare_func(void, int16_t *dstU, int16_t *dstV, int width,
+                       uint32_t coeff, int64_t offset);
 
     sws = sws_alloc_context();
     if (sws_init_context(sws, NULL, NULL) < 0)
@@ -140,6 +167,10 @@ static void check_chrConvertRange(int from)
         const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(pix_fmt);
         int bit_depth = desc->comp[0].depth;
         int sample_size = bit_depth == 16 ? sizeof(int32_t) : sizeof(int16_t);
+        int src_shift = bit_depth <= 14 ? 15 - bit_depth : 19 - bit_depth;
+        int mpeg_min = 16 << (bit_depth - 8);
+        int mpeg_max = 240 << (bit_depth - 8);
+        int jpeg_max = (1 << bit_depth) - 1;
         sws->src_format = pix_fmt;
         sws->dst_format = pix_fmt;
         c->dstBpc = bit_depth;
@@ -150,17 +181,38 @@ static void check_chrConvertRange(int from)
                 randomize_buffers(dstU0, dstU1, bit_depth, width);
                 randomize_buffers(dstV0, dstV1, bit_depth, width);
                 if (bit_depth == 16) {
+                    if (!from) {
+                        dstU1_32[0] = dstU0_32[0] = mpeg_min << src_shift;
+                        dstU1_32[1] = dstU0_32[1] = mpeg_max << src_shift;
+                    }
                     dstU1_32[2] = dstU0_32[2] = -1;
                 } else {
+                    if (!from) {
+                        dstU1[0] = dstU0[0] = mpeg_min << src_shift;
+                        dstU1[1] = dstU0[1] = mpeg_max << src_shift;
+                    }
                     dstU1[2] = dstU0[2] = -1;
                 }
-                call_ref(dstU0, dstV0, width);
-                call_new(dstU1, dstV1, width);
+                call_ref(dstU0, dstV0, width,
+                         c->chrConvertRange_coeff, c->chrConvertRange_offset);
+                call_new(dstU1, dstV1, width,
+                         c->chrConvertRange_coeff, c->chrConvertRange_offset);
                 if (memcmp(dstU0, dstU1, width * sample_size) ||
                     memcmp(dstV0, dstV1, width * sample_size))
                     fail();
+                if (!from) {
+                    /* check that the mpeg range is respected */
+                    if (bit_depth == 16) {
+                        if ((dstU1_32[0] >> src_shift) > 0 || (dstU1_32[1] >> src_shift) != jpeg_max)
+                            fail();
+                    } else {
+                        if ((dstU1[0] >> src_shift) > 0 || (dstU1[1] >> src_shift) != jpeg_max)
+                            fail();
+                    }
+                }
                 if (width == LARGEST_INPUT_SIZE && (bit_depth == 8 || bit_depth == 16))
-                    bench_new(dstU1, dstV1, width);
+                    bench_new(dstU1, dstV1, width,
+                              c->chrConvertRange_coeff, c->chrConvertRange_offset);
             }
         }
     }

+ 50 - 50
tests/ref/fate/filter-alphaextract_alphamerge_rgb

@@ -3,53 +3,53 @@
 #codec_id 0: rawvideo
 #dimensions 0: 352x288
 #sar 0: 0/1
-0,          0,          0,        1,   405504, 0x6d5666c8
-0,          1,          1,        1,   405504, 0x4813ba17
-0,          2,          2,        1,   405504, 0x23880ee1
-0,          3,          3,        1,   405504, 0x3709926b
-0,          4,          4,        1,   405504, 0x1748e102
-0,          5,          5,        1,   405504, 0x12b4472b
-0,          6,          6,        1,   405504, 0x0441fe6b
-0,          7,          7,        1,   405504, 0x4fa8d058
-0,          8,          8,        1,   405504, 0xa0d810fb
-0,          9,          9,        1,   405504, 0xaca3ca02
-0,         10,         10,        1,   405504, 0x0afe65ea
-0,         11,         11,        1,   405504, 0xb81a9bd1
-0,         12,         12,        1,   405504, 0xb85f10eb
-0,         13,         13,        1,   405504, 0x4dc5e992
-0,         14,         14,        1,   405504, 0x6e9f8042
-0,         15,         15,        1,   405504, 0xf8e58f43
-0,         16,         16,        1,   405504, 0xc717635c
-0,         17,         17,        1,   405504, 0x5928548d
-0,         18,         18,        1,   405504, 0x8f2295f9
-0,         19,         19,        1,   405504, 0x5c449294
-0,         20,         20,        1,   405504, 0xe8c5d6ef
-0,         21,         21,        1,   405504, 0x3608a811
-0,         22,         22,        1,   405504, 0xa3788a12
-0,         23,         23,        1,   405504, 0x90ad93a3
-0,         24,         24,        1,   405504, 0x26c603bc
-0,         25,         25,        1,   405504, 0x055d69a8
-0,         26,         26,        1,   405504, 0x834747ea
-0,         27,         27,        1,   405504, 0x16eea5dd
-0,         28,         28,        1,   405504, 0xa2af8e0d
-0,         29,         29,        1,   405504, 0x65d2380f
-0,         30,         30,        1,   405504, 0xf4858c72
-0,         31,         31,        1,   405504, 0x90755bc9
-0,         32,         32,        1,   405504, 0xabfac3b0
-0,         33,         33,        1,   405504, 0x4a76adbd
-0,         34,         34,        1,   405504, 0x633183e9
-0,         35,         35,        1,   405504, 0xcb8ff8fe
-0,         36,         36,        1,   405504, 0x9c96074a
-0,         37,         37,        1,   405504, 0x700ea35c
-0,         38,         38,        1,   405504, 0x31bb483c
-0,         39,         39,        1,   405504, 0x50dd7ca7
-0,         40,         40,        1,   405504, 0x047988a0
-0,         41,         41,        1,   405504, 0xe4d7a9dd
-0,         42,         42,        1,   405504, 0x455d82ab
-0,         43,         43,        1,   405504, 0x8f875343
-0,         44,         44,        1,   405504, 0x8be18c94
-0,         45,         45,        1,   405504, 0x75431a7d
-0,         46,         46,        1,   405504, 0x08122c08
-0,         47,         47,        1,   405504, 0xfca4159a
-0,         48,         48,        1,   405504, 0x90c9afd6
-0,         49,         49,        1,   405504, 0x817e3b6a
+0,          0,          0,        1,   405504, 0x91b5634d
+0,          1,          1,        1,   405504, 0x16b3b6c6
+0,          2,          2,        1,   405504, 0x94660b56
+0,          3,          3,        1,   405504, 0x99098f0b
+0,          4,          4,        1,   405504, 0x2a9edda5
+0,          5,          5,        1,   405504, 0xe59d4392
+0,          6,          6,        1,   405504, 0x3172fb02
+0,          7,          7,        1,   405504, 0xa735ccd3
+0,          8,          8,        1,   405504, 0xb0440d78
+0,          9,          9,        1,   405504, 0xa5aac67c
+0,         10,         10,        1,   405504, 0x73d06232
+0,         11,         11,        1,   405504, 0x84f19818
+0,         12,         12,        1,   405504, 0xdf0c0dce
+0,         13,         13,        1,   405504, 0xdf82e624
+0,         14,         14,        1,   405504, 0xf2737cd2
+0,         15,         15,        1,   405504, 0xaa8d8bac
+0,         16,         16,        1,   405504, 0x90695fdb
+0,         17,         17,        1,   405504, 0xb5875106
+0,         18,         18,        1,   405504, 0x6af5929e
+0,         19,         19,        1,   405504, 0x7dff8ef2
+0,         20,         20,        1,   405504, 0x3b28d388
+0,         21,         21,        1,   405504, 0x902aa4d2
+0,         22,         22,        1,   405504, 0x940c869f
+0,         23,         23,        1,   405504, 0xef4c9017
+0,         24,         24,        1,   405504, 0xdb110019
+0,         25,         25,        1,   405504, 0x54b96612
+0,         26,         26,        1,   405504, 0x50de446d
+0,         27,         27,        1,   405504, 0xfb31a27b
+0,         28,         28,        1,   405504, 0xdc678a45
+0,         29,         29,        1,   405504, 0xc4263483
+0,         30,         30,        1,   405504, 0x87a288b1
+0,         31,         31,        1,   405504, 0xb34d5878
+0,         32,         32,        1,   405504, 0xaa69c04c
+0,         33,         33,        1,   405504, 0x625ea9f3
+0,         34,         34,        1,   405504, 0xa56f806d
+0,         35,         35,        1,   405504, 0xcbe0f58d
+0,         36,         36,        1,   405504, 0xeba003e1
+0,         37,         37,        1,   405504, 0x5e22a00c
+0,         38,         38,        1,   405504, 0x4160446c
+0,         39,         39,        1,   405504, 0xee35793d
+0,         40,         40,        1,   405504, 0x604d854c
+0,         41,         41,        1,   405504, 0x6a1ca614
+0,         42,         42,        1,   405504, 0x28cf7f5d
+0,         43,         43,        1,   405504, 0xa1654ff2
+0,         44,         44,        1,   405504, 0xbbbf88d7
+0,         45,         45,        1,   405504, 0x7d8e16d3
+0,         46,         46,        1,   405504, 0x149c286c
+0,         47,         47,        1,   405504, 0x023b1202
+0,         48,         48,        1,   405504, 0xfb37ac74
+0,         49,         49,        1,   405504, 0xb03837d4

+ 1 - 1
tests/ref/fate/filter-pixdesc-gray10be

@@ -1 +1 @@
-pixdesc-gray10be    987bee0355054fcfc915e1e41aad523a
+pixdesc-gray10be    7ea33650899480c5ff55b4dd1eb21f7a

+ 1 - 1
tests/ref/fate/filter-pixdesc-gray10le

@@ -1 +1 @@
-pixdesc-gray10le    674bed2aa8686b78dd5fa4b15c15c655
+pixdesc-gray10le    5da6368b2a0a4b86eb2596f7316742df

+ 1 - 1
tests/ref/fate/filter-pixdesc-gray12be

@@ -1 +1 @@
-pixdesc-gray12be    29aeecc116c4b3e0c5109810fbd9ca17
+pixdesc-gray12be    063a64bcfcc5744b931dcade2a513454

Some files were not shown because too many files changed in this diff