Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Nuo Mi <nuomi2021@gmail.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Nuo Mi <nuomi2021@gmail.com>
Subject: [FFmpeg-devel] [PATCH 05/18] avcodec/vvcdec: misc, remove unused EMULATED_EDGE_{LUMA, CHROMA}, EMULATED_EDGE_DMVR_{LUAM, CHROMA}
Date: Sun, 19 May 2024 21:27:36 +0800
Message-ID: <TYSPR06MB64334727420A79BE2CC28ACFAAE82@TYSPR06MB6433.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <20240519132749.790832-1-nuomi2021@gmail.com>

---
 libavcodec/vvc/inter.c | 24 +++++++-----------------
 1 file changed, 7 insertions(+), 17 deletions(-)

diff --git a/libavcodec/vvc/inter.c b/libavcodec/vvc/inter.c
index 9132bfaee2..cc93184ca0 100644
--- a/libavcodec/vvc/inter.c
+++ b/libavcodec/vvc/inter.c
@@ -142,25 +142,13 @@ static void emulated_edge_bilinear(const VVCLocalContext *lc, uint8_t *dst, cons
     }
 }
 
-#define MC_EMULATED_EDGE(dst, src, src_stride, x_off, y_off)                               \
+#define MC_EMULATED_EDGE(dst, src, src_stride, x_off, y_off)                                                \
     emulated_edge(lc, dst, src, src_stride, x_off, y_off, block_w, block_h, is_chroma)
 
-#define EMULATED_EDGE_LUMA(dst, src, src_stride, x_off, y_off)                      \
-    emulated_edge(lc, dst, src, src_stride, x_off, y_off, block_w, block_h, 0)
-
-#define EMULATED_EDGE_CHROMA(dst, src, src_stride, x_off, y_off)                    \
-    emulated_edge(lc, dst, src, src_stride, x_off, y_off, block_w, block_h, 1)
-
 #define MC_EMULATED_EDGE_DMVR(dst, src, src_stride, x_sb, y_sb, x_off, y_off)                               \
     emulated_edge_dmvr(lc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, is_chroma)
 
-#define EMULATED_EDGE_DMVR_LUMA(dst, src, src_stride, x_sb, y_sb, x_off, y_off)     \
-    emulated_edge_dmvr(lc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, 0)
-
-#define EMULATED_EDGE_DMVR_CHROMA(dst, src, src_stride, x_sb, y_sb, x_off, y_off)   \
-    emulated_edge_dmvr(lc, dst, src, src_stride, x_sb, y_sb, x_off, y_off, block_w, block_h, 1)
-
-#define EMULATED_EDGE_BILINEAR(dst, src, src_stride, x_off, y_off)                  \
+#define MC_EMULATED_EDGE_BILINEAR(dst, src, src_stride, x_off, y_off)                                       \
     emulated_edge_bilinear(lc, dst, src, src_stride, x_off, y_off, pred_w, pred_h)
 
 // part of 8.5.6.6 Weighted sample prediction process
@@ -336,12 +324,13 @@ static void luma_prof_uni(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst
     const int8_t *vf            = ff_vvc_inter_luma_filters[2][my];
     int denom, wx, ox;
     const int weight_flag       = derive_weight_uni(&denom, &wx, &ox, lc, mvf, LUMA);
+    const int is_chroma         = 0;
 
     x_off += mv->x >> 4;
     y_off += mv->y >> 4;
     src   += y_off * src_stride + (x_off * (1 << fc->ps.sps->pixel_shift));
 
-    EMULATED_EDGE_LUMA(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off);
+    MC_EMULATED_EDGE(lc->edge_emu_buffer, &src, &src_stride, x_off, y_off);
     if (cb_prof_flag) {
         fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](prof_tmp, src, src_stride, AFFINE_MIN_BLOCK_SIZE, hf, vf, AFFINE_MIN_BLOCK_SIZE);
         fc->vvcdsp.inter.fetch_samples(prof_tmp, src, src_stride, mx, my);
@@ -369,6 +358,7 @@ static void luma_prof_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_
     const int idx               = av_log2(block_w) - 1;
     int denom, w0, w1, o0, o1;
     const int weight_flag       = derive_weight(&denom, &w0, &w1, &o0, &o1, lc, mvf, LUMA, 0);
+    const int is_chroma         = 0;
 
     for (int i = L0; i <= L1; i++) {
         const Mv *mv            = mvf->mv + i;
@@ -381,7 +371,7 @@ static void luma_prof_bi(VVCLocalContext *lc, uint8_t *dst, const ptrdiff_t dst_
         const int8_t *hf        = ff_vvc_inter_luma_filters[2][mx];
         const int8_t *vf        = ff_vvc_inter_luma_filters[2][my];
 
-        EMULATED_EDGE_LUMA(lc->edge_emu_buffer, &src, &src_stride, ox, oy);
+        MC_EMULATED_EDGE(lc->edge_emu_buffer, &src, &src_stride, ox, oy);
         if (!pu->cb_prof_flag[i]) {
             fc->vvcdsp.inter.put[LUMA][idx][!!my][!!mx](tmp[i], src, src_stride, block_h, hf, vf, block_w);
         } else {
@@ -654,7 +644,7 @@ static void dmvr_mv_refine(VVCLocalContext *lc, MvField *mvf, MvField *orig_mv,
         const int oy            = y_off + (mv->y >> 4) - sr_range;
         ptrdiff_t src_stride    = ref[i]->linesize[LUMA];
         const uint8_t *src      = ref[i]->data[LUMA] + oy * src_stride + (ox * (1 << fc->ps.sps->pixel_shift));
-        EMULATED_EDGE_BILINEAR(lc->edge_emu_buffer, &src, &src_stride, ox, oy);
+        MC_EMULATED_EDGE_BILINEAR(lc->edge_emu_buffer, &src, &src_stride, ox, oy);
         fc->vvcdsp.inter.dmvr[!!my][!!mx](tmp[i], src, src_stride, pred_h, mx, my, pred_w);
     }
 
-- 
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".

  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 ` Nuo Mi [this message]
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 ` [FFmpeg-devel] [PATCH 08/18] avcodec/vvcdec: refact, pred_get_refs return VVCRefPic instead of VVCFrame Nuo Mi
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=TYSPR06MB64334727420A79BE2CC28ACFAAE82@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