On Fri, Nov 29, 2024 at 6:19 AM Frank Plowman <p...@frankplowman.com> wrote:
> 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 <p...@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); intra_mip_mode is 4 bits, 2 flags are 2 bits. maybe we can use a uint8_t for 3 fields, We only need 1 memset and save 2/3 memory. > x += pps->min_cb_width; > } > cu->intra_pred_mode_y = intra_mip_mode; > -- > 2.47.0 > > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".