[FFmpeg-devel] [PATCH 3/6] lavc/vvc: Store MIP information over entire CU area

Frank Plowman post at frankplowman.com
Fri Nov 29 00:17:25 EET 2024


Previously, the code only stored the MIP mode and transpose flag in the
relevant tables at the top-left corner of the CU.  This information ends
up being retrieved in ff_vvc_intra_pred_* not based on the CU position
but instead the transform unit position (specifically, using the x0 and
y0 from get_luma_predict_unit).  There might be multiple transform units
in a CU, hence the top-left corner of the transform unit might not
coincide with the top-left corner of the CU.  Consequently, we need to
store the MIP information at all positions in the CU, not only its
top-left corner, as we already do for the MIP flag.

Signed-off-by: Frank Plowman <post at frankplowman.com>
---
 libavcodec/vvc/ctu.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vvc/ctu.c b/libavcodec/vvc/ctu.c
index 1e06119cfd..0030938cf5 100644
--- a/libavcodec/vvc/ctu.c
+++ b/libavcodec/vvc/ctu.c
@@ -975,8 +975,8 @@ static void intra_luma_pred_modes(VVCLocalContext *lc)
             for (int y = 0; y < (cb_height>>log2_min_cb_size); y++) {
                 int width = cb_width>>log2_min_cb_size;
                 memset(&fc->tab.imf[x],  cu->intra_mip_flag, width);
-                fc->tab.imtf[x] = intra_mip_transposed_flag;
-                fc->tab.imm[x]  = intra_mip_mode;
+                memset(&fc->tab.imtf[x], intra_mip_transposed_flag, width);
+                memset(&fc->tab.imm[x], intra_mip_mode, width);
                 x += pps->min_cb_width;
             }
             cu->intra_pred_mode_y = intra_mip_mode;
-- 
2.47.0



More information about the ffmpeg-devel mailing list