aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vvc/vvc_mvs.h
diff options
context:
space:
mode:
authorNuo Mi <nuomi2021@gmail.com>2023-12-05 22:45:11 +0800
committerNuo Mi <nuomi2021@gmail.com>2024-01-03 23:15:11 +0800
commit603d0bd1719cb78b4d663c2b68db27d64e4f6233 (patch)
tree9e1d0a0acc5356961d4f59b6f7a3b1c499926394 /libavcodec/vvc/vvc_mvs.h
parentc1a3d17491d03447ee9452b34d17e6939798c29e (diff)
downloadffmpeg-603d0bd1719cb78b4d663c2b68db27d64e4f6233.tar.gz
vvcdec: add motion vector decoder
Co-authored-by: Xu Mu <toxumu@outlook.com> Co-authored-by: Frank Plowman <post@frankplowman.com> Co-authored-by: Shaun Loo <shaunloo10@gmail.com> Co-authored-by: Wu Jianhua <toqsxw@outlook.com>
Diffstat (limited to 'libavcodec/vvc/vvc_mvs.h')
-rw-r--r--libavcodec/vvc/vvc_mvs.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/libavcodec/vvc/vvc_mvs.h b/libavcodec/vvc/vvc_mvs.h
new file mode 100644
index 0000000000..6c46f9fdb2
--- /dev/null
+++ b/libavcodec/vvc/vvc_mvs.h
@@ -0,0 +1,46 @@
+/*
+ * VVC motion vector decoder
+ *
+ * Copyright (C) 2023 Nuo Mi
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_VVC_VVC_MVS_H
+#define AVCODEC_VVC_VVC_MVS_H
+
+#include "vvcdec.h"
+
+void ff_vvc_round_mv(Mv *mv, int lshift, int rshift);
+void ff_vvc_clip_mv(Mv *mv);
+void ff_vvc_mv_scale(Mv *dst, const Mv *src, int td, int tb);
+void ff_vvc_luma_mv_merge_mode(VVCLocalContext *lc, int merge_idx, int ciip_flag, MvField *mv);
+void ff_vvc_luma_mv_merge_gpm(VVCLocalContext *lc, const int merge_gpm_idx[2], MvField *mv);
+void ff_vvc_mvp(VVCLocalContext *lc, const int *mvp_lx_flag, const int amvr_shift, MotionInfo *mi);
+void ff_vvc_sb_mv_merge_mode(VVCLocalContext *lc, int merge_subblock_idx, PredictionUnit *pu);
+void ff_vvc_affine_mvp(VVCLocalContext *lc, const int *mvp_lx_flag, const int amvr_shift, MotionInfo* mi);
+void ff_vvc_store_sb_mvs(const VVCLocalContext *lc, PredictionUnit *pu);
+void ff_vvc_store_mv(const VVCLocalContext *lc, const MotionInfo *mi);
+void ff_vvc_store_mvf(const VVCLocalContext *lc, const MvField *mvf);
+void ff_vvc_store_gpm_mvf(const VVCLocalContext *lc, const PredictionUnit* pu);
+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);
+
+#endif //AVCODEC_VVC_VVC_MVS_H