FFmpeg
vvc_mvs.h
Go to the documentation of this file.
1 /*
2  * VVC motion vector decoder
3  *
4  * Copyright (C) 2023 Nuo Mi
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #ifndef AVCODEC_VVC_VVC_MVS_H
24 #define AVCODEC_VVC_VVC_MVS_H
25 
26 #include "vvc_ctu.h"
27 
28 void ff_vvc_round_mv(Mv *mv, int lshift, int rshift);
29 void ff_vvc_clip_mv(Mv *mv);
30 void ff_vvc_mv_scale(Mv *dst, const Mv *src, int td, int tb);
31 void ff_vvc_luma_mv_merge_mode(VVCLocalContext *lc, int merge_idx, int ciip_flag, MvField *mv);
32 void ff_vvc_luma_mv_merge_gpm(VVCLocalContext *lc, const int merge_gpm_idx[2], MvField *mv);
33 void ff_vvc_luma_mv_merge_ibc(VVCLocalContext *lc, int merge_idx, Mv *mv);
34 void ff_vvc_mvp(VVCLocalContext *lc, const int *mvp_lx_flag, const int amvr_shift, MotionInfo *mi);
35 void ff_vvc_mvp_ibc(VVCLocalContext *lc, int mvp_l0_flag, int amvr_shift, Mv *mv);
36 void ff_vvc_sb_mv_merge_mode(VVCLocalContext *lc, int merge_subblock_idx, PredictionUnit *pu);
37 void ff_vvc_affine_mvp(VVCLocalContext *lc, const int *mvp_lx_flag, const int amvr_shift, MotionInfo* mi);
39 void ff_vvc_store_mv(const VVCLocalContext *lc, const MotionInfo *mi);
40 void ff_vvc_store_mvf(const VVCLocalContext *lc, const MvField *mvf);
41 void ff_vvc_store_gpm_mvf(const VVCLocalContext *lc, const PredictionUnit* pu);
44 MvField* ff_vvc_get_mvf(const VVCFrameContext *fc, const int x0, const int y0);
45 void ff_vvc_set_mvf(const VVCLocalContext *lc, const int x0, const int y0, const int w, const int h, const MvField *mvf);
46 void ff_vvc_set_intra_mvf(const VVCLocalContext *lc, int dmvr);
47 
48 #endif //AVCODEC_VVC_VVC_MVS_H
ff_vvc_mvp
void ff_vvc_mvp(VVCLocalContext *lc, const int *mvp_lx_flag, const int amvr_shift, MotionInfo *mi)
Definition: vvc_mvs.c:1582
td
#define td
Definition: regdef.h:70
MotionInfo
Definition: vvc_ctu.h:236
mv
static const int8_t mv[256][2]
Definition: 4xm.c:80
w
uint8_t w
Definition: llviddspenc.c:38
ff_vvc_round_mv
void ff_vvc_round_mv(Mv *mv, int lshift, int rshift)
Definition: vvc_mvs.c:1839
ff_vvc_mv_scale
void ff_vvc_mv_scale(Mv *dst, const Mv *src, int td, int tb)
Definition: vvc_mvs.c:71
fc
#define fc(width, name, range_min, range_max)
Definition: cbs_av1.c:472
ff_vvc_clip_mv
void ff_vvc_clip_mv(Mv *mv)
Definition: vvc_mvs.c:1851
ff_vvc_set_intra_mvf
void ff_vvc_set_intra_mvf(const VVCLocalContext *lc, int dmvr)
Definition: vvc_mvs.c:265
ff_vvc_no_backward_pred_flag
int ff_vvc_no_backward_pred_flag(const VVCLocalContext *lc)
Definition: vvc_mvs.c:121
PredictionUnit
Definition: hevcdec.h:315
ff_vvc_store_sb_mvs
void ff_vvc_store_sb_mvs(const VVCLocalContext *lc, PredictionUnit *pu)
Definition: vvc_mvs.c:403
mi
#define mi
Definition: vf_colormatrix.c:106
ff_vvc_sb_mv_merge_mode
void ff_vvc_sb_mv_merge_mode(VVCLocalContext *lc, int merge_subblock_idx, PredictionUnit *pu)
Definition: vvc_mvs.c:1392
ff_vvc_store_mv
void ff_vvc_store_mv(const VVCLocalContext *lc, const MotionInfo *mi)
Definition: vvc_mvs.c:499
VVCLocalContext
Definition: vvc_ctu.h:368
ff_vvc_luma_mv_merge_gpm
void ff_vvc_luma_mv_merge_gpm(VVCLocalContext *lc, const int merge_gpm_idx[2], MvField *mv)
Definition: vvc_mvs.c:815
ff_vvc_update_hmvp
void ff_vvc_update_hmvp(VVCLocalContext *lc, const MotionInfo *mi)
Definition: vvc_mvs.c:1892
MvField
Definition: hevcdec.h:300
ff_vvc_luma_mv_merge_ibc
void ff_vvc_luma_mv_merge_ibc(VVCLocalContext *lc, int merge_idx, Mv *mv)
Definition: vvc_mvs.c:1696
ff_vvc_luma_mv_merge_mode
void ff_vvc_luma_mv_merge_mode(VVCLocalContext *lc, int merge_idx, int ciip_flag, MvField *mv)
Definition: vvc_mvs.c:802
vvc_ctu.h
tb
#define tb
Definition: regdef.h:68
dmvr
static void FUNC() dmvr(int16_t *dst, const uint8_t *_src, const ptrdiff_t _src_stride, const int height, const intptr_t mx, const intptr_t my, const int width)
Definition: vvc_inter_template.c:324
ff_vvc_mvp_ibc
void ff_vvc_mvp_ibc(VVCLocalContext *lc, int mvp_l0_flag, int amvr_shift, Mv *mv)
Definition: vvc_mvs.c:1688
ff_vvc_store_gpm_mvf
void ff_vvc_store_gpm_mvf(const VVCLocalContext *lc, const PredictionUnit *pu)
Definition: vvc_mvs.c:448
ff_vvc_set_mvf
void ff_vvc_set_mvf(const VVCLocalContext *lc, const int x0, const int y0, const int w, const int h, const MvField *mvf)
Definition: vvc_mvs.c:250
ff_vvc_get_mvf
MvField * ff_vvc_get_mvf(const VVCFrameContext *fc, const int x0, const int y0)
Definition: vvc_mvs.c:1911
Mv
Definition: hevcdec.h:295
ff_vvc_affine_mvp
void ff_vvc_affine_mvp(VVCLocalContext *lc, const int *mvp_lx_flag, const int amvr_shift, MotionInfo *mi)
Definition: vvc_mvs.c:1824
src
INIT_CLIP pixel * src
Definition: h264pred_template.c:418
VVCFrameContext
Definition: vvcdec.h:92
h
h
Definition: vp9dsp_template.c:2038
ff_vvc_store_mvf
void ff_vvc_store_mvf(const VVCLocalContext *lc, const MvField *mvf)
Definition: vvc_mvs.c:493