From: Nuo Mi <nuomi2021@gmail.com> To: ffmpeg-devel@ffmpeg.org Cc: Nuo Mi <nuomi2021@gmail.com> Subject: [FFmpeg-devel] [PATCH 08/18] avcodec/vvcdec: refact, pred_get_refs return VVCRefPic instead of VVCFrame Date: Sun, 19 May 2024 21:27:39 +0800 Message-ID: <TYSPR06MB6433BC4F0AB455EF4166DB81AAE82@TYSPR06MB6433.apcprd06.prod.outlook.com> (raw) In-Reply-To: <20240519132749.790832-1-nuomi2021@gmail.com> --- libavcodec/vvc/inter.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/libavcodec/vvc/inter.c b/libavcodec/vvc/inter.c index cd96707c02..23d9ac05e6 100644 --- a/libavcodec/vvc/inter.c +++ b/libavcodec/vvc/inter.c @@ -387,15 +387,15 @@ static void luma_prof_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_ fc->vvcdsp.inter.avg(dst, dst_stride, tmp[L0], tmp[L1], block_w, block_h); } -static int pred_get_refs(const VVCLocalContext *lc, VVCFrame *ref[2], const MvField *mv) +static int pred_get_refs(const VVCLocalContext *lc, VVCRefPic *refp[2], const MvField *mv) { - const RefPicList *rpl = lc->sc->rpl; + RefPicList *rpl = lc->sc->rpl; for (int mask = PF_L0; mask <= PF_L1; mask++) { if (mv->pred_flag & mask) { const int lx = mask - PF_L0; - ref[lx] = rpl[lx].refs[mv->ref_idx[lx]].ref; - if (!ref[lx]) + refp[lx] = rpl[lx].refs + mv->ref_idx[lx]; + if (!refp[lx]->ref) return AVERROR_INVALIDDATA; } } @@ -487,9 +487,9 @@ static void pred_regular(VVCLocalContext *lc, const MvField *mvf, const MvField { const VVCFrameContext *fc = lc->fc; const int c_end = fc->ps.sps->r->sps_chroma_format_idc ? CR : LUMA; - VVCFrame *ref[2]; + VVCRefPic *refp[2]; - if (pred_get_refs(lc, ref, mvf) < 0) + if (pred_get_refs(lc, refp, mvf) < 0) return; for (int c_idx = c_start; c_idx <= c_end; c_idx++) { @@ -511,10 +511,10 @@ static void pred_regular(VVCLocalContext *lc, const MvField *mvf, const MvField if (mvf->pred_flag != PF_BI) { const int lx = mvf->pred_flag - PF_L0; - mc_uni(lc, inter, inter_stride, ref[lx]->frame, mvf, + mc_uni(lc, inter, inter_stride, refp[lx]->ref->frame, mvf, x, y, w, h, c_idx, hf_idx, vf_idx); } else { - mc_bi(lc, inter, inter_stride, ref[0]->frame, ref[1]->frame, mvf, orig_mvf, + mc_bi(lc, inter, inter_stride, refp[L0]->ref->frame, refp[L1]->ref->frame, mvf, orig_mvf, x, y, w, h, c_idx, do_bdof, hf_idx, vf_idx); } if (do_ciip) { @@ -660,10 +660,10 @@ static void derive_sb_mv(VVCLocalContext *lc, MvField *mv, MvField *orig_mv, int if (pu->bdof_flag) *sb_bdof_flag = 1; if (pu->dmvr_flag) { - VVCFrame* ref[2]; - if (pred_get_refs(lc, ref, mv) < 0) + VVCRefPic *refp[2]; + if (pred_get_refs(lc, refp, mv) < 0) return; - dmvr_mv_refine(lc, mv, orig_mv, sb_bdof_flag, ref[0]->frame, ref[1]->frame, x0, y0, sbw, sbh); + dmvr_mv_refine(lc, mv, orig_mv, sb_bdof_flag, refp[L0]->ref->frame, refp[L1]->ref->frame, x0, y0, sbw, sbh); set_dmvr_info(fc, x0, y0, sbw, sbh, mv); } } @@ -734,18 +734,18 @@ static void pred_affine_blk(VVCLocalContext *lc) uint8_t *dst0 = POS(0, x, y); const MvField *mv = ff_vvc_get_mvf(fc, x, y); - VVCFrame *ref[2]; + VVCRefPic *refp[2]; - if (pred_get_refs(lc, ref, mv) < 0) + if (pred_get_refs(lc, refp, mv) < 0) return; if (mi->pred_flag != PF_BI) { const int lx = mi->pred_flag - PF_L0; - luma_prof_uni(lc, dst0, fc->frame->linesize[0], ref[lx]->frame, + luma_prof_uni(lc, dst0, fc->frame->linesize[LUMA], refp[lx]->ref->frame, mv, x, y, sbw, sbh, pu->cb_prof_flag[lx], pu->diff_mv_x[lx], pu->diff_mv_y[lx]); } else { - luma_prof_bi(lc, dst0, fc->frame->linesize[0], ref[0]->frame, ref[1]->frame, + luma_prof_bi(lc, dst0, fc->frame->linesize[LUMA], refp[L0]->ref->frame, refp[L1]->ref->frame, mv, x, y, sbw, sbh); } if (fc->ps.sps->r->sps_chroma_format_idc) { -- 2.34.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:[~2024-05-19 13:40 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20240519132749.790832-1-nuomi2021@gmail.com> 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 02/18] avcodec/vvcdec: refact, unify {luma, chroma}_mc to mc Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 03/18] avcodec/vvcdec: refact, unify {luma, chroma}_mc_uni to mc_uni Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 04/18] avcodec/vvcdec: refact, unify {luma, chroma}_mc_bi to mc_bi Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 05/18] avcodec/vvcdec: misc, remove unused EMULATED_EDGE_{LUMA, CHROMA}, EMULATED_EDGE_DMVR_{LUAM, CHROMA} Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 06/18] avcodec/vvcdec: refact, unify pred_regular_{luma, chroma} to pred_regular Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 07/18] avcodec/vvcdec: refact out VVCRefPic from RefPicList Nuo Mi 2024-05-19 13:27 ` Nuo Mi [this message] 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 09/18] avcodec/vvcdec: add vvc inter filters for RPR Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 10/18] avcodec/vvcdec: emulated_edge, use reference frame's sps and pps Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 11/18] avcodec/vvcdec: add RPR dsp Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 12/18] avcodec/vvcdec: inter, wait reference with a diffrent resolution Nuo Mi 2024-05-19 15:20 ` Jean-Baptiste Kempf 2024-05-20 13:25 ` Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 13/18] avcodec/vvcdec: fix dmvr, bdof, cb_prof for RPR Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 14/18] avcodec/vvcdec: refact out luma_prof from luma_prof_bi Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 15/18] avcodec/vvcdec: refact, remove hf_idx and vf_idx from mc_xxx's param list Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 16/18] avcodec/vvcdec: increase edge_emu_buffer for RPR Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 17/18] avcodec/vvcdec: support Reference Picture Resampling Nuo Mi 2024-05-19 13:27 ` [FFmpeg-devel] [PATCH 18/18] Changelog: add DVB compatible information for VVC decoder Nuo Mi 2024-05-21 12:32 ` Nuo Mi
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=TYSPR06MB6433BC4F0AB455EF4166DB81AAE82@TYSPR06MB6433.apcprd06.prod.outlook.com \ --to=nuomi2021@gmail.com \ --cc=ffmpeg-devel@ffmpeg.org \ /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