[FFmpeg-cvslog] [SCM] branch master updated. dff08a3d2a fate/vvc: add vvc-conformance-FIELD_A_4

ffmpeg-git at ffmpeg.org ffmpeg-git at ffmpeg.org
Fri Aug 8 20:21:00 EEST 2025


The branch, master has been updated
       via  dff08a3d2ac3a5a627a4140ac6d642f708ed4e06 (commit)
       via  6d391cb2da44a4236bed328e0bf41c59d1938e70 (commit)
       via  6e100b796397b7c85baa790e3c0fcebf0ac80d9d (commit)
       via  de15422064f3ec2832ee1e007e81f1b248a85e75 (commit)
       via  8c9a2f40ad82e33a10cf7d90f44e3695c2cbeece (commit)
       via  77b9b9420b8a9b74db9934f32bdb3fd077e7a66d (commit)
      from  35ea45835484b90490e7d1704ef99ccb7b775578 (commit)


- Log -----------------------------------------------------------------
commit dff08a3d2ac3a5a627a4140ac6d642f708ed4e06
Author:     Wu Jianhua <toqsxw at outlook.com>
AuthorDate: Wed Jun 4 02:00:07 2025 +0800
Commit:     Timo Rothenpieler <timo at rothenpieler.org>
CommitDate: Fri Aug 8 16:55:12 2025 +0000

    fate/vvc: add vvc-conformance-FIELD_A_4
    
    Signed-off-by: Wu Jianhua <toqsxw at outlook.com>

diff --git a/tests/fate/vvc.mak b/tests/fate/vvc.mak
index 60bc390d66..6d7873f6e4 100644
--- a/tests/fate/vvc.mak
+++ b/tests/fate/vvc.mak
@@ -26,6 +26,7 @@ VVC_SAMPLES_10BIT =       \
     WP_A_3                \
     WPP_A_3               \
     WRAP_A_4              \
+    FIELD_A_4             \
 
 VVC_SAMPLES_422_10BIT =   \
     10b422_L_5            \
diff --git a/tests/ref/fate/vvc-conformance-FIELD_A_4 b/tests/ref/fate/vvc-conformance-FIELD_A_4
new file mode 100644
index 0000000000..bd36624eb4
--- /dev/null
+++ b/tests/ref/fate/vvc-conformance-FIELD_A_4
@@ -0,0 +1,25 @@
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 720x240
+#sar 0: 1/1
+0,          0,          0,        1,   518400, 0xc9a6c44a
+0,          1,          1,        1,   518400, 0x69aebed0
+0,          2,          2,        1,   518400, 0x579c56eb
+0,          3,          3,        1,   518400, 0xa362c795
+0,          4,          4,        1,   518400, 0xaa91f040
+0,          5,          5,        1,   518400, 0x23fbd4bf
+0,          6,          6,        1,   518400, 0x1964b60f
+0,          7,          7,        1,   518400, 0xfe1c25d5
+0,          8,          8,        1,   518400, 0x959474f6
+0,          9,          9,        1,   518400, 0xa39557ac
+0,         10,         10,        1,   518400, 0x04ad1eaa
+0,         11,         11,        1,   518400, 0x8b290745
+0,         12,         12,        1,   518400, 0x2de33aab
+0,         13,         13,        1,   518400, 0xaada1b0a
+0,         14,         14,        1,   518400, 0xf7d23ea4
+0,         15,         15,        1,   518400, 0xdbd0d590
+0,         16,         16,        1,   518400, 0x457c8b65
+0,         17,         17,        1,   518400, 0x1963514d
+0,         18,         18,        1,   518400, 0x2774fa12
+0,         19,         19,        1,   518400, 0xd56b3113

commit 6d391cb2da44a4236bed328e0bf41c59d1938e70
Author:     Wu Jianhua <toqsxw at outlook.com>
AuthorDate: Wed Jun 4 01:55:14 2025 +0800
Commit:     Timo Rothenpieler <timo at rothenpieler.org>
CommitDate: Fri Aug 8 16:55:12 2025 +0000

    fate/vvc: add vvc-conformance-ACT_A_3
    
    Signed-off-by: Wu Jianhua <toqsxw at outlook.com>

diff --git a/tests/fate/vvc.mak b/tests/fate/vvc.mak
index 0d8b5015e0..60bc390d66 100644
--- a/tests/fate/vvc.mak
+++ b/tests/fate/vvc.mak
@@ -32,6 +32,7 @@ VVC_SAMPLES_422_10BIT =   \
 
 VVC_SAMPLES_444_10BIT =   \
     CROP_B_4              \
+    ACT_A_3               \
 
 # not tested:
 # BOUNDARY_A_3 (too big)
diff --git a/tests/ref/fate/vvc-conformance-ACT_A_3 b/tests/ref/fate/vvc-conformance-ACT_A_3
new file mode 100644
index 0000000000..e145aeb67f
--- /dev/null
+++ b/tests/ref/fate/vvc-conformance-ACT_A_3
@@ -0,0 +1,70 @@
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1280x720
+#sar 0: 0/1
+0,          0,          0,        1,  5529600, 0xdb9b6d0d
+0,          1,          1,        1,  5529600, 0x960e474e
+0,          2,          2,        1,  5529600, 0xf1cb1670
+0,          3,          3,        1,  5529600, 0xc4fa3d5e
+0,          4,          4,        1,  5529600, 0x2912fa02
+0,          5,          5,        1,  5529600, 0xb9acfc3e
+0,          6,          6,        1,  5529600, 0xea39f561
+0,          7,          7,        1,  5529600, 0xeff704c9
+0,          8,          8,        1,  5529600, 0xb972e1d6
+0,          9,          9,        1,  5529600, 0x0cf45b11
+0,         10,         10,        1,  5529600, 0xee7b876f
+0,         11,         11,        1,  5529600, 0xbe7d6952
+0,         12,         12,        1,  5529600, 0x809d6cd4
+0,         13,         13,        1,  5529600, 0x5b4502e1
+0,         14,         14,        1,  5529600, 0xf23878bd
+0,         15,         15,        1,  5529600, 0x25eb4d6d
+0,         16,         16,        1,  5529600, 0x7fcfaeed
+0,         17,         17,        1,  5529600, 0x4e2c9003
+0,         18,         18,        1,  5529600, 0x69e6385b
+0,         19,         19,        1,  5529600, 0xb8681116
+0,         20,         20,        1,  5529600, 0x90b890ca
+0,         21,         21,        1,  5529600, 0x94ec15bb
+0,         22,         22,        1,  5529600, 0x0dcaf2e5
+0,         23,         23,        1,  5529600, 0x52897d14
+0,         24,         24,        1,  5529600, 0x578f7356
+0,         25,         25,        1,  5529600, 0x90113d89
+0,         26,         26,        1,  5529600, 0x2b09a1de
+0,         27,         27,        1,  5529600, 0xc3036365
+0,         28,         28,        1,  5529600, 0xb13cb584
+0,         29,         29,        1,  5529600, 0x1ea6ae1a
+0,         30,         30,        1,  5529600, 0xfd408ed8
+0,         31,         31,        1,  5529600, 0x36d1bdae
+0,         32,         32,        1,  5529600, 0xe7dc95a4
+0,         33,         33,        1,  5529600, 0x8f9ac8b9
+0,         34,         34,        1,  5529600, 0x6af3a821
+0,         35,         35,        1,  5529600, 0xc72ac000
+0,         36,         36,        1,  5529600, 0x0fab2899
+0,         37,         37,        1,  5529600, 0x3ea41597
+0,         38,         38,        1,  5529600, 0x5535be74
+0,         39,         39,        1,  5529600, 0x02ba563e
+0,         40,         40,        1,  5529600, 0xdfbfa9a5
+0,         41,         41,        1,  5529600, 0x9bed96fa
+0,         42,         42,        1,  5529600, 0x3a9df1e9
+0,         43,         43,        1,  5529600, 0x3c84b16d
+0,         44,         44,        1,  5529600, 0xb10a26c8
+0,         45,         45,        1,  5529600, 0x5a30baee
+0,         46,         46,        1,  5529600, 0xaa55eba4
+0,         47,         47,        1,  5529600, 0x1873de87
+0,         48,         48,        1,  5529600, 0x3ad98e8e
+0,         49,         49,        1,  5529600, 0xf1a58485
+0,         50,         50,        1,  5529600, 0x43e678df
+0,         51,         51,        1,  5529600, 0xf6f10a9e
+0,         52,         52,        1,  5529600, 0xe89bd6c0
+0,         53,         53,        1,  5529600, 0x0b793b1b
+0,         54,         54,        1,  5529600, 0xef4898d3
+0,         55,         55,        1,  5529600, 0x5b0f10d0
+0,         56,         56,        1,  5529600, 0xec2cc417
+0,         57,         57,        1,  5529600, 0x887759fe
+0,         58,         58,        1,  5529600, 0x47a45789
+0,         59,         59,        1,  5529600, 0xa0f6933b
+0,         60,         60,        1,  5529600, 0x77290b7a
+0,         61,         61,        1,  5529600, 0xbfa5a26d
+0,         62,         62,        1,  5529600, 0xee99b0d5
+0,         63,         63,        1,  5529600, 0x0fdd7e97
+0,         64,         64,        1,  5529600, 0x3173af66

commit 6e100b796397b7c85baa790e3c0fcebf0ac80d9d
Author:     Wu Jianhua <toqsxw at outlook.com>
AuthorDate: Wed Jun 4 01:50:28 2025 +0800
Commit:     Timo Rothenpieler <timo at rothenpieler.org>
CommitDate: Fri Aug 8 16:55:12 2025 +0000

    fate/vvc: add vvc-conformance-10b422_L_5
    
    This commit added 10b422_L_5 for testing palette mode.
    
    Signed-off-by: Wu Jianhua <toqsxw at outlook.com>

diff --git a/tests/fate/vvc.mak b/tests/fate/vvc.mak
index c882010713..0d8b5015e0 100644
--- a/tests/fate/vvc.mak
+++ b/tests/fate/vvc.mak
@@ -27,6 +27,9 @@ VVC_SAMPLES_10BIT =       \
     WPP_A_3               \
     WRAP_A_4              \
 
+VVC_SAMPLES_422_10BIT =   \
+    10b422_L_5            \
+
 VVC_SAMPLES_444_10BIT =   \
     CROP_B_4              \
 
@@ -35,11 +38,12 @@ VVC_SAMPLES_444_10BIT =   \
 # OPI_B_3 (Inter layer ref support needed)
 # VPS_A_3 (Inter layer ref support needed)
 
-FATE_VVC_VARS := 8BIT 10BIT 444_10BIT
+FATE_VVC_VARS := 8BIT 10BIT 422_10BIT 444_10BIT
 $(foreach VAR,$(FATE_VVC_VARS), $(eval VVC_TESTS_$(VAR) := $(addprefix fate-vvc-conformance-, $(VVC_SAMPLES_$(VAR)))))
 
 $(VVC_TESTS_8BIT): SCALE_OPTS := -pix_fmt yuv420p
 $(VVC_TESTS_10BIT): SCALE_OPTS := -pix_fmt yuv420p10le -vf scale
+$(VVC_TESTS_422_10BIT): SCALE_OPTS := -pix_fmt yuv422p10le -vf scale
 $(VVC_TESTS_444_10BIT): SCALE_OPTS := -pix_fmt yuv444p10le -vf scale
 fate-vvc-conformance-%: CMD = framecrc -c:v vvc -i $(TARGET_SAMPLES)/vvc-conformance/$(subst fate-vvc-conformance-,,$(@)).bit $(SCALE_OPTS)
 fate-vvc-output-ref: CMD = framecrc -c:v vvc -i $(TARGET_SAMPLES)/vvc/Hierarchical.bit $(SCALE_OPTS)
@@ -49,6 +53,7 @@ fate-vvc-wpp-single-slice-pic: CMD = framecrc -c:v vvc -i $(TARGET_SAMPLES)/vvc/
 FATE_VVC-$(call FRAMECRC, VVC, VVC, VVC_PARSER) += $(VVC_TESTS_8BIT) fate-vvc-output-ref
 FATE_VVC-$(call FRAMECRC, VVC, VVC, VVC_PARSER SCALE_FILTER) +=                   \
                                                     $(VVC_TESTS_10BIT)            \
+                                                    $(VVC_TESTS_422_10BIT)        \
                                                     $(VVC_TESTS_444_10BIT)        \
                                                     fate-vvc-frames-with-ltr      \
                                                     fate-vvc-wpp-single-slice-pic \
diff --git a/tests/ref/fate/vvc-conformance-10b422_L_5 b/tests/ref/fate/vvc-conformance-10b422_L_5
new file mode 100644
index 0000000000..373c550b1f
--- /dev/null
+++ b/tests/ref/fate/vvc-conformance-10b422_L_5
@@ -0,0 +1,22 @@
+#tb 0: 1/25
+#media_type 0: video
+#codec_id 0: rawvideo
+#dimensions 0: 1920x1080
+#sar 0: 0/1
+0,          0,          0,        1,  8294400, 0x4c24b4d8
+0,          1,          1,        1,  8294400, 0xfcaa4734
+0,          2,          2,        1,  8294400, 0xc9a32414
+0,          3,          3,        1,  8294400, 0x7a42ba51
+0,          4,          4,        1,  8294400, 0xcf8b2dd5
+0,          5,          5,        1,  8294400, 0x2f0701ec
+0,          6,          6,        1,  8294400, 0x863f665f
+0,          7,          7,        1,  8294400, 0xef2e70bd
+0,          8,          8,        1,  8294400, 0xeb221c2b
+0,          9,          9,        1,  8294400, 0x3c074b8f
+0,         10,         10,        1,  8294400, 0xb246c65a
+0,         11,         11,        1,  8294400, 0x94ede8e8
+0,         12,         12,        1,  8294400, 0x2143a40b
+0,         13,         13,        1,  8294400, 0xc04eb9e3
+0,         14,         14,        1,  8294400, 0x00f3a419
+0,         15,         15,        1,  8294400, 0x6ae90b65
+0,         16,         16,        1,  8294400, 0x36375084

commit de15422064f3ec2832ee1e007e81f1b248a85e75
Author:     Wu Jianhua <toqsxw at outlook.com>
AuthorDate: Sun Jun 8 23:15:24 2025 +0800
Commit:     Timo Rothenpieler <timo at rothenpieler.org>
CommitDate: Fri Aug 8 16:55:12 2025 +0000

    avcodec/vvc/dec: fix typo and also output log when the checksum is correct
    
    It's helpful for developers and the same as the hevcdec.
    
    Signed-off-by: Wu Jianhua <toqsxw at outlook.com>

diff --git a/libavcodec/vvc/dec.c b/libavcodec/vvc/dec.c
index 90fff3a03f..6f52306080 100644
--- a/libavcodec/vvc/dec.c
+++ b/libavcodec/vvc/dec.c
@@ -1112,13 +1112,11 @@ static int frame_end(VVCContext *s, VVCFrameContext *fc)
                 return ret;
 
             ret = ff_h274_hash_verify(s->hash_ctx, &sei->picture_hash, fc->ref->frame, fc->ps.pps->width, fc->ps.pps->height);
-            if (ret < 0) {
-                av_log(s->avctx, AV_LOG_ERROR,
-                    "Verifying checksum for frame with decoder_order %d: failed\n",
-                    (int)fc->decode_order);
-                if (s->avctx->err_recognition & AV_EF_EXPLODE)
-                    return ret;
-            }
+            av_log(s->avctx, ret < 0 ? AV_LOG_ERROR : AV_LOG_DEBUG,
+                "Verifying checksum for frame with decode_order %d: %s\n",
+                (int)fc->decode_order, ret < 0 ? "incorrect": "correct");
+            if (ret < 0 && (s->avctx->err_recognition & AV_EF_EXPLODE))
+                return ret;
         }
     }
 

commit 8c9a2f40ad82e33a10cf7d90f44e3695c2cbeece
Author:     Wu Jianhua <toqsxw at outlook.com>
AuthorDate: Wed Jun 4 02:35:41 2025 +0800
Commit:     Timo Rothenpieler <timo at rothenpieler.org>
CommitDate: Fri Aug 8 16:55:12 2025 +0000

    avcodec/h274: fix hash verification on BE
    
    Signed-off-by: Wu Jianhua <toqsxw at outlook.com>

diff --git a/libavcodec/h274.c b/libavcodec/h274.c
index 248af8119b..332d0c2c52 100644
--- a/libavcodec/h274.c
+++ b/libavcodec/h274.c
@@ -27,6 +27,7 @@
 
 #include "libavutil/avassert.h"
 #include "libavutil/bswap.h"
+#include "libavcodec/bswapdsp.h"
 #include "libavutil/crc.h"
 #include "libavutil/imgutils.h"
 #include "libavutil/md5.h"
@@ -795,15 +796,41 @@ static const int8_t R64T[64][64] = {
     }
 };
 
-static int verify_plane_md5(struct AVMD5 *ctx,
-    const uint8_t *src, const int w, const int h, const int stride,
-    const uint8_t *expected)
+struct H274HashContext {
+    int type;
+    struct AVMD5 *ctx;
+
+#if HAVE_BIGENDIAN
+    BswapDSPContext bdsp;
+    uint8_t *buf;
+    int      buf_size;
+#endif
+};
+
+static av_always_inline void bswap16_buf_if_be(H274HashContext *s, const int ps, const uint8_t **src, const int w)
+{
+#if HAVE_BIGENDIAN
+    if (ps) {
+        s->bdsp.bswap16_buf((uint16_t *)s->buf,
+            (const uint16_t *)*src, w);
+        *src = s->buf;
+    }
+#endif
+}
+
+static int verify_plane_md5(H274HashContext *s,
+    const uint8_t *_src, const int w, const int h, const int stride,
+    const int ps, const uint8_t *expected)
 {
 #define MD5_SIZE 16
+    struct AVMD5 *ctx = s->ctx;
     uint8_t md5[MD5_SIZE];
+
     av_md5_init(ctx);
     for (int j = 0; j < h; j++) {
-        av_md5_update(ctx, src, w);
+        const uint8_t *src = &_src[j * stride];
+        bswap16_buf_if_be(s, ps, &src, w);
+        av_md5_update(ctx, src, w << ps);
         src += stride;
     }
     av_md5_final(ctx, md5);
@@ -814,15 +841,16 @@ static int verify_plane_md5(struct AVMD5 *ctx,
     return 0;
 }
 
-static int verify_plane_crc(const uint8_t *src, const int w, const int h, const int stride,
-    uint16_t expected)
+static int verify_plane_crc(H274HashContext *s, const uint8_t *_src, const int w, const int h, const int stride,
+    const int ps, uint16_t expected)
 {
     uint32_t crc = 0x0F1D;     // CRC-16-CCITT-AUG
     const AVCRC *ctx = av_crc_get_table(AV_CRC_16_CCITT);
 
-    expected = av_le2ne32(expected);
     for (int j = 0; j < h; j++) {
-        crc = av_crc(ctx, crc, src, w);
+        const uint8_t *src = &_src[j * stride];
+        bswap16_buf_if_be(s, ps, &src, w);
+        crc = av_crc(ctx, crc, src, w << ps);
         src += stride;
     }
     crc = av_bswap16(crc);
@@ -863,11 +891,6 @@ enum {
     HASH_LAST = HASH_CHECKSUM,
 };
 
-struct H274HashContext {
-    int type;
-    struct AVMD5 *ctx;
-};
-
 void ff_h274_hash_freep(H274HashContext **ctx)
 {
     if (*ctx) {
@@ -875,6 +898,9 @@ void ff_h274_hash_freep(H274HashContext **ctx)
         if (c->ctx)
             av_free(c->ctx);
         av_freep(ctx);
+#if HAVE_BIGENDIAN
+        av_freep(&c->buf);
+#endif
     }
 }
 
@@ -906,6 +932,10 @@ int ff_h274_hash_init(H274HashContext **ctx, const int type)
             return AVERROR(ENOMEM);
     }
 
+#if HAVE_BIGENDIAN
+    ff_bswapdsp_init(&c->bdsp);
+#endif
+
     return 0;
 }
 
@@ -932,10 +962,22 @@ int ff_h274_hash_verify(H274HashContext *c, const H274SEIPictureHash *hash,
         const uint8_t *src = frame->data[i];
         const int stride   = frame->linesize[i];
 
+#if HAVE_BIGENDIAN
+        if (c->type != HASH_CHECKSUM) {
+            if (ps) {
+                av_fast_malloc(&c->buf, &c->buf_size,
+                    FFMAX3(frame->linesize[0], frame->linesize[1],
+                        frame->linesize[2]));
+                if (!c->buf)
+                    return AVERROR(ENOMEM);
+            }
+        }
+#endif
+
         if (c->type == HASH_MD5SUM)
-            err = verify_plane_md5(c->ctx, src, w << ps, h, stride, hash->md5[i]);
+            err = verify_plane_md5(c, src, w, h, stride, ps, hash->md5[i]);
         else if (c->type == HASH_CRC)
-            err = verify_plane_crc(src, w << ps, h, stride, hash->crc[i]);
+            err = verify_plane_crc(c, src, w, h, stride, ps, hash->crc[i]);
         else if (c->type == HASH_CHECKSUM)
             err = verify_plane_checksum(src, w, h, stride, ps, hash->checksum[i]);
         if (err < 0)

commit 77b9b9420b8a9b74db9934f32bdb3fd077e7a66d
Author:     Wu Jianhua <toqsxw at outlook.com>
AuthorDate: Wed Jun 4 01:07:17 2025 +0800
Commit:     Timo Rothenpieler <timo at rothenpieler.org>
CommitDate: Fri Aug 8 16:55:12 2025 +0000

    avcodec/vvc/ctu: should use the width and height of the start component
    
    This commit fixed decoding the DUAL_TREE_CHROMA palette coding unit
    
    Signed-off-by: Wu Jianhua <toqsxw at outlook.com>

diff --git a/libavcodec/vvc/ctu.c b/libavcodec/vvc/ctu.c
index fd7d07f438..18cbe0fe0f 100644
--- a/libavcodec/vvc/ctu.c
+++ b/libavcodec/vvc/ctu.c
@@ -1966,7 +1966,7 @@ static void palette_qp(VVCLocalContext *lc, VVCTreeType tree_type, const bool es
             u16[off] = pix;                                         \
     } while (0)
 
-#define PALETTE_INDEX(x, y) index[(y) * cu->cb_width + (x)]
+#define PALETTE_INDEX(x, y) index[(y) * width + (x)]
 
 // 6.5.3 Horizontal and vertical traverse scan order array initialization process
 // The hTravScan and vTravScan tables require approximately 576 KB of memory.
@@ -1984,12 +1984,15 @@ static int palette_subblock_data(VVCLocalContext *lc,
     const CodingUnit *cu = lc->cu;
     TransformUnit *tu    = cu->tus.head;
     const VVCSPS *sps    = lc->fc->ps.sps;
+    const int width      = tu->tbs[0].tb_width;
+    const int height     = tu->tbs[0].tb_height;
     const int min_pos    = subset_id << 4;
-    const int max_pos    = FFMIN(min_pos + 16, cu->cb_width * cu->cb_height);
-    const int wmask      = cu->cb_width  - 1;
-    const int hmask      = cu->cb_height - 1;
-    const int wlog2      = av_log2(cu->cb_width);
-    const int hlog2      = av_log2(cu->cb_height);
+    const int max_pos    = FFMIN(min_pos + 16, width * height);
+    const int wmask      = width  - 1;
+    const int hmask      = height - 1;
+    const int wlog2      = av_log2(width);
+    const int hlog2      = av_log2(height);
+    const int start_idx  = tu->tbs[0].c_idx;
     const uint8_t esc    = cu->plt[tu->tbs[0].c_idx].size;
     uint8_t run_copy[16] = { 0 };
 
@@ -2040,10 +2043,11 @@ static int palette_subblock_data(VVCLocalContext *lc,
 
     for (int c = 0; c < tu->nb_tbs; c++) {
         TransformBlock *tb = &tu->tbs[c];
-        const Palette *plt = cu->plt + tb->c_idx;
+        const int c_idx    = tb->c_idx;
+        const Palette *plt = &cu->plt[c_idx];
         const int scale    = ff_vvc_palette_derive_scale(lc, tu, tb);
-        const int hs       = sps->hshift[c];
-        const int vs       = sps->vshift[c];
+        const int hs       = sps->hshift[c_idx] - sps->hshift[start_idx];
+        const int vs       = sps->vshift[c_idx] - sps->vshift[start_idx];
         uint8_t *u8        = (uint8_t *)tb->coeffs;
         uint16_t *u16      = (uint16_t *)tb->coeffs;
 
@@ -2089,9 +2093,12 @@ static int hls_palette_coding(VVCLocalContext *lc, const VVCTreeType tree_type)
     uint8_t run_type[MAX_PALETTE_CU_SIZE * MAX_PALETTE_CU_SIZE];
     uint8_t index[MAX_PALETTE_CU_SIZE * MAX_PALETTE_CU_SIZE];
 
+    TransformUnit *tu;
+
     ff_vvc_channel_range(&start, &end, tree_type, sps->r->sps_chroma_format_idc);
 
-    if (!palette_add_tu(lc, start, end, tree_type))
+    tu = palette_add_tu(lc, start, end, tree_type);
+    if (!tu)
         return AVERROR(ENOMEM);
 
     predictor_size = pp[start].size;
@@ -2119,7 +2126,7 @@ static int hls_palette_coding(VVCLocalContext *lc, const VVCTreeType tree_type)
     palette_qp(lc, tree_type, escape_present);
 
     index[0] = 0;
-    for (int i = 0; i <= (cu->cb_width * cu->cb_height - 1) >> 4; i++) {
+    for (int i = 0; i <= (tu->tbs[0].tb_width * tu->tbs[0].tb_height - 1) >> 4; i++) {
         ret = palette_subblock_data(lc, max_index, i, transpose,
             run_type, index, &prev_run_pos, &adjust);
         if (ret < 0)

-----------------------------------------------------------------------

Summary of changes:
 libavcodec/h274.c                         | 72 ++++++++++++++++++++++++-------
 libavcodec/vvc/ctu.c                      | 29 ++++++++-----
 libavcodec/vvc/dec.c                      | 12 +++---
 tests/fate/vvc.mak                        |  9 +++-
 tests/ref/fate/vvc-conformance-10b422_L_5 | 22 ++++++++++
 tests/ref/fate/vvc-conformance-ACT_A_3    | 70 ++++++++++++++++++++++++++++++
 tests/ref/fate/vvc-conformance-FIELD_A_4  | 25 +++++++++++
 7 files changed, 205 insertions(+), 34 deletions(-)
 create mode 100644 tests/ref/fate/vvc-conformance-10b422_L_5
 create mode 100644 tests/ref/fate/vvc-conformance-ACT_A_3
 create mode 100644 tests/ref/fate/vvc-conformance-FIELD_A_4


hooks/post-receive
-- 



More information about the ffmpeg-cvslog mailing list