From: toqsxw@gmail.com To: ffmpeg-devel@ffmpeg.org Cc: Wu Jianhua <toqsxw@outlook.com> Subject: [FFmpeg-devel] [PATCH v1 07/23] avcodec/vvc: refact, save pf and ciip_flag in ff_vvc_set_intra_mvf Date: Thu, 1 May 2025 22:43:05 +0800 Message-ID: <20250501144324.958-7-toqsxw@outlook.com> (raw) In-Reply-To: <20250501144324.958-1-toqsxw@outlook.com> From: Wu Jianhua <toqsxw@outlook.com> Signed-off-by: Wu Jianhua <toqsxw@outlook.com> --- libavcodec/vvc/ctu.c | 4 ++-- libavcodec/vvc/mvs.c | 24 ++++++++++++++++++++---- libavcodec/vvc/mvs.h | 2 +- 3 files changed, 23 insertions(+), 7 deletions(-) diff --git a/libavcodec/vvc/ctu.c b/libavcodec/vvc/ctu.c index c621b6d5d6..f77697af08 100644 --- a/libavcodec/vvc/ctu.c +++ b/libavcodec/vvc/ctu.c @@ -1756,7 +1756,7 @@ static void fill_dmvr_info(const VVCLocalContext *lc) const CodingUnit *cu = lc->cu; if (cu->pred_mode == MODE_IBC) { - ff_vvc_set_intra_mvf(lc, 1); + ff_vvc_set_intra_mvf(lc, true, PF_IBC, false); } else { const VVCPPS *pps = fc->ps.pps; const int w = cu->cb_width >> MIN_PU_LOG2; @@ -1849,8 +1849,8 @@ static int hls_coding_unit(VVCLocalContext *lc, int x0, int y0, int cb_width, in return AVERROR_PATCHWELCOME; } else { intra_luma_pred_modes(lc); + ff_vvc_set_intra_mvf(lc, false, PF_INTRA, cu->ciip_flag); } - ff_vvc_set_intra_mvf(lc, 0); } if ((tree_type == SINGLE_TREE || tree_type == DUAL_TREE_CHROMA) && sps->r->sps_chroma_format_idc) { if (pred_mode_plt_flag && tree_type == DUAL_TREE_CHROMA) { diff --git a/libavcodec/vvc/mvs.c b/libavcodec/vvc/mvs.c index 566df158a8..8946b00b5b 100644 --- a/libavcodec/vvc/mvs.c +++ b/libavcodec/vvc/mvs.c @@ -144,7 +144,8 @@ static int derive_temporal_colocated_mvs(const VVCLocalContext *lc, MvField temp const SliceContext *sc = lc->sc; RefPicList* refPicList = sc->rpl; - if (temp_col.pred_flag == PF_INTRA) + if (temp_col.pred_flag == PF_INTRA || + temp_col.pred_flag == PF_IBC) return 0; if (sb_flag){ @@ -266,7 +267,7 @@ void ff_vvc_set_mvf(const VVCLocalContext *lc, const int x0, const int y0, const } } -void ff_vvc_set_intra_mvf(const VVCLocalContext *lc, const int dmvr) +void ff_vvc_set_intra_mvf(const VVCLocalContext *lc, const bool dmvr, const PredFlag pf, const bool ciip_flag) { const VVCFrameContext *fc = lc->fc; const CodingUnit *cu = lc->cu; @@ -277,7 +278,10 @@ void ff_vvc_set_intra_mvf(const VVCLocalContext *lc, const int dmvr) for (int dx = 0; dx < cu->cb_width; dx += min_pu_size) { const int x = cu->x0 + dx; const int y = cu->y0 + dy; - TAB_MVF(x, y).pred_flag = PF_INTRA; + MvField *mv = &TAB_MVF(x, y); + + mv->pred_flag = pf; + mv->ciip_flag = ciip_flag; } } } @@ -599,7 +603,19 @@ static void init_neighbour_context(NeighbourContext *ctx, const VVCLocalContext static av_always_inline PredMode pred_flag_to_mode(PredFlag pred) { - return pred == PF_IBC ? MODE_IBC : (pred == PF_INTRA ? MODE_INTRA : MODE_INTER); + static const PredMode lut[] = { + MODE_INTRA, // PF_INTRA + MODE_INTER, // PF_L0 + MODE_INTER, // PF_L1 + MODE_INTER, // PF_BI + 0, // invalid + MODE_IBC, // PF_IBC + 0, // invalid + 0, // invalid + MODE_PLT, // PF_PLT + }; + + return lut[pred]; } static int check_available(Neighbour *n, const VVCLocalContext *lc, const int check_mer) diff --git a/libavcodec/vvc/mvs.h b/libavcodec/vvc/mvs.h index b2242b2a4d..7150c0b8cf 100644 --- a/libavcodec/vvc/mvs.h +++ b/libavcodec/vvc/mvs.h @@ -43,6 +43,6 @@ void ff_vvc_update_hmvp(VVCLocalContext *lc, const MotionInfo *mi); int ff_vvc_no_backward_pred_flag(const VVCLocalContext *lc); MvField* ff_vvc_get_mvf(const VVCFrameContext *fc, const int x0, const int y0); void ff_vvc_set_mvf(const VVCLocalContext *lc, const int x0, const int y0, const int w, const int h, const MvField *mvf); -void ff_vvc_set_intra_mvf(const VVCLocalContext *lc, int dmvr); +void ff_vvc_set_intra_mvf(const VVCLocalContext *lc, bool dmvr, PredFlag pf, bool ciip_flag); #endif //AVCODEC_VVC_MVS_H -- 2.44.0.windows.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2025-05-01 14:45 UTC|newest] Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-05-01 14:42 [FFmpeg-devel] [PATCH v1 01/23] avcodec/vvc/cabac: add 9.3.3.5 k-th order Exp - Golomb binarization process toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 02/23] avcodec/vvc/cabac: add 9.3.3.7 Fixed-length " toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 03/23] avcodec/vvc/cabac: add palette support toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 04/23] avcodec/vvc: add VVC_MAX_NUM_PALETTE_PREDICTOR_SIZE toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 05/23] avcodec/vvc/ctu: refact out ff_vvc_channel_range toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 06/23] avcodec/vvc: refact out ep_init and ep_init_wpp toqsxw 2025-05-01 14:43 ` toqsxw [this message] 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 08/23] avcodec/vvc/ctu: refact out intra_data toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 09/23] avcodec/vvc/intra: add ff_vvc_palette_derive_scale toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 10/23] avcodec/vvc/ctu: add palette support toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 11/23] avcodec/vvc/filter: skip deblocking filter for palette toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 12/23] avcodec/vvc/intra: add palette coding decoder toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 13/23] avcodec/vvc/cabac: add ff_vvc_cu_act_enabled_flag toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 14/23] avcodec/vvc/ctu: read act_enabled_flag for adaptive color transform toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 15/23] avcodec/vvc/ctu: fix derive_chroma_intra_pred_mode toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 16/23] avcodec/vvc/dsp: update the interface of pred_residual_joint for joint cbcr residual functionality toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 17/23] avcodec/vvc/dsp: add adaptive_color_transform toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 18/23] avcodec/vvc/intra: fix scaling process for transform coefficients toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 19/23] avcodec/vvc/intra: refact, predict jcbcr to tb->coeffs toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 20/23] avcodec/vvc/intra: make lmcs_scale_chroma inplace toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 21/23] avcodec/vvc/intra: refact out lmcs_scale_chroma and add_residual toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 22/23] avcodec/vvc: add adaptive color transform support toqsxw 2025-05-01 14:43 ` [FFmpeg-devel] [PATCH v1 23/23] Changelog: VVC supports all content of SCC toqsxw 2025-05-10 12:59 ` Nuo Mi 2025-05-14 13:40 [FFmpeg-devel] [PATCH v1 01/23] avcodec/vvc/cabac: add 9.3.3.5 k-th order Exp - Golomb binarization process toqsxw 2025-05-14 13:40 ` [FFmpeg-devel] [PATCH v1 07/23] avcodec/vvc: refact, save pf and ciip_flag in ff_vvc_set_intra_mvf toqsxw
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20250501144324.958-7-toqsxw@outlook.com \ --to=toqsxw@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ --cc=toqsxw@outlook.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git