FFmpeg
Data Structures | Macros | Enumerations | Functions
vvc_mvs.c File Reference
#include "vvc_ctu.h"
#include "vvc_data.h"
#include "vvc_refs.h"
#include "vvc_mvs.h"

Go to the source code of this file.

Data Structures

struct  SubblockParams
 
struct  Neighbour
 
struct  NeighbourContext
 

Macros

#define IS_SAME_MV(a, b)   (AV_RN64A(a) == AV_RN64A(b))
 
#define CHECK_MVSET(l)
 
#define TAB_MVF(x, y)   tab_mvf[((y) >> MIN_PU_LOG2) * min_pu_width + ((x) >> MIN_PU_LOG2)]
 
#define TAB_MVF_PU(v)   TAB_MVF(x ## v, y ## v)
 
#define TAB_CP_MV(lx, x, y)   fc->tab.cp_mv[lx][((((y) >> min_cb_log2_size) * min_cb_width + ((x) >> min_cb_log2_size)) ) * MAX_CONTROL_POINTS]
 
#define DERIVE_TEMPORAL_COLOCATED_MVS(sb_flag)
 
#define MV_MERGE_FROM_NB(nb)   mv_merge_from_nb(&nctx, nb)
 
#define AFFINE_MERGE_FROM_NBS(nbs)   affine_merge_from_nbs(&nctx, nbs, FF_ARRAY_ELEMS(nbs), mi)
 
#define DERIVE_CORNER_MV(nbs)   derive_corner_mvf(nctx, nbs, FF_ARRAY_ELEMS(nbs))
 
#define AFFINE_MVP_FROM_NBS(nbs)   mvp_from_nbs(&nctx, nbs, FF_ARRAY_ELEMS(nbs), lx, ref_idx, amvr_shift, cps, num_cp) \
 
#define MVP_FROM_NBS(nbs)   mvp_from_nbs(&nctx, nbs, FF_ARRAY_ELEMS(nbs), lx, ref_idx, amvr_shift, mv, 1) \
 
#define MV_BITS   18
 
#define IBC_SHIFT(v)   ((v) >= (1 << (MV_BITS - 1)) ? ((v) - (1 << MV_BITS)) : (v))
 
#define AFFINE_MVP_CONSTRUCTED_CP(cands, cp)
 

Enumerations

enum  NeighbourIdx {
  A0, A1, A2, B0,
  B1, B2, B3, NUM_NBS,
  NB_IDX_NONE = NUM_NBS
}
 

Functions

static av_always_inline int is_same_mer (const VVCFrameContext *fc, const int xN, const int yN, const int xP, const int yP)
 
static av_always_inline int compare_mv_ref_idx (const MvField *n, const MvField *o)
 
static av_always_inline void mv_compression (Mv *motion)
 
void ff_vvc_mv_scale (Mv *dst, const Mv *src, int td, int tb)
 
static int check_mvset (Mv *mvLXCol, Mv *mvCol, int colPic, int poc, const RefPicList *refPicList, int X, int refIdxLx, const RefPicList *refPicList_col, int listCol, int refidxCol)
 
int ff_vvc_no_backward_pred_flag (const VVCLocalContext *lc)
 
static int derive_temporal_colocated_mvs (const VVCLocalContext *lc, MvField temp_col, int refIdxLx, Mv *mvLXCol, int X, int colPic, const RefPicList *refPicList_col, int sb_flag)
 
static int temporal_luma_motion_vector (const VVCLocalContext *lc, const int refIdxLx, Mv *mvLXCol, const int X, int check_center, int sb_flag)
 
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, const int dmvr)
 
static int derive_cb_prof_flag_lx (const VVCLocalContext *lc, const PredictionUnit *pu, int lx, int is_fallback)
 
static int is_fallback_mode (const SubblockParams *sp, const PredFlag pred_flag)
 
static void init_subblock_params (SubblockParams *sp, const MotionInfo *mi, const int cb_width, const int cb_height, const int lx)
 
static void derive_subblock_diff_mvs (const VVCLocalContext *lc, PredictionUnit *pu, const SubblockParams *sp, const int lx)
 
static void store_cp_mv (const VVCLocalContext *lc, const MotionInfo *mi, const int lx)
 
void ff_vvc_store_sb_mvs (const VVCLocalContext *lc, PredictionUnit *pu)
 
void ff_vvc_store_gpm_mvf (const VVCLocalContext *lc, const PredictionUnit *pu)
 
void ff_vvc_store_mvf (const VVCLocalContext *lc, const MvField *mvf)
 
void ff_vvc_store_mv (const VVCLocalContext *lc, const MotionInfo *mi)
 
static int is_a0_available (const VVCLocalContext *lc, const CodingUnit *cu)
 
static void init_neighbour_context (NeighbourContext *ctx, const VVCLocalContext *lc)
 
static av_always_inline PredMode pred_flag_to_mode (PredFlag pred)
 
static int check_available (Neighbour *n, const VVCLocalContext *lc, const int check_mer)
 
static const MvFieldmv_merge_candidate (const VVCLocalContext *lc, const int x_cand, const int y_cand)
 
static const MvFieldmv_merge_from_nb (NeighbourContext *ctx, const NeighbourIdx nb)
 
static int mv_merge_spatial_candidates (const VVCLocalContext *lc, const int merge_idx, const MvField **nb_list, MvField *cand_list, int *nb_merge_cand)
 
static int mv_merge_temporal_candidate (const VVCLocalContext *lc, MvField *cand)
 
static int mv_merge_history_candidates (const VVCLocalContext *lc, const int merge_idx, const MvField **nb_list, MvField *cand_list, int *num_cands)
 
static int mv_merge_pairwise_candidate (MvField *cand_list, const int num_cands, const int is_b)
 
static void mv_merge_zero_motion_candidate (const VVCLocalContext *lc, const int merge_idx, MvField *cand_list, int num_cands)
 
static void mv_merge_mode (const VVCLocalContext *lc, const int merge_idx, MvField *cand_list)
 
void ff_vvc_luma_mv_merge_mode (VVCLocalContext *lc, const int merge_idx, const int ciip_flag, MvField *mv)
 
void ff_vvc_luma_mv_merge_gpm (VVCLocalContext *lc, const int merge_gpm_idx[2], MvField *mv)
 
static void affine_cps_from_nb (const VVCLocalContext *lc, const int x_nb, int y_nb, const int nbw, const int nbh, const int lx, Mv *cps, int num_cps)
 
static int affine_neighbour_cb (const VVCFrameContext *fc, const int x_nb, const int y_nb, int *x_cb, int *y_cb, int *cbw, int *cbh)
 
static int affine_merge_candidate (const VVCLocalContext *lc, const int x_cand, const int y_cand, MotionInfo *mi)
 
static int affine_merge_from_nbs (NeighbourContext *ctx, const NeighbourIdx *nbs, const int num_nbs, MotionInfo *cand)
 
static const MvFieldderive_corner_mvf (NeighbourContext *ctx, const NeighbourIdx *neighbour, const int num_neighbour)
 
static av_always_inline int compare_pf_ref_idx (const MvField *A, const struct MvField *B, const struct MvField *C, const int lx)
 
static av_always_inline void sb_clip_location (const VVCLocalContext *lc, const int x_ctb, const int y_ctb, const Mv *temp_mv, int *x, int *y)
 
static void sb_temproal_luma_motion (const VVCLocalContext *lc, const int x_ctb, const int y_ctb, const Mv *temp_mv, int x, int y, uint8_t *pred_flag, Mv *mv)
 
static int sb_temporal_luma_motion_data (const VVCLocalContext *lc, const MvField *a1, const int x_ctb, const int y_ctb, MvField *ctr_mvf, Mv *temp_mv)
 
static int sb_temporal_merge_candidate (const VVCLocalContext *lc, NeighbourContext *nctx, PredictionUnit *pu)
 
static int affine_merge_const1 (const MvField *c0, const MvField *c1, const MvField *c2, MotionInfo *mi)
 
static int affine_merge_const2 (const MvField *c0, const MvField *c1, const MvField *c3, MotionInfo *mi)
 
static int affine_merge_const3 (const MvField *c0, const MvField *c2, const MvField *c3, MotionInfo *mi)
 
static int affine_merge_const4 (const MvField *c1, const MvField *c2, const MvField *c3, MotionInfo *mi)
 
static int affine_merge_const5 (const MvField *c0, const MvField *c1, MotionInfo *mi)
 
static int affine_merge_const6 (const MvField *c0, const MvField *c2, const int cb_width, const int cb_height, MotionInfo *mi)
 
static void affine_merge_zero_motion (const VVCLocalContext *lc, MotionInfo *mi)
 
static int affine_merge_const_candidates (const VVCLocalContext *lc, MotionInfo *mi, NeighbourContext *nctx, const int merge_subblock_idx, int num_cands)
 
static int sb_mv_merge_mode (const VVCLocalContext *lc, const int merge_subblock_idx, PredictionUnit *pu)
 
void ff_vvc_sb_mv_merge_mode (VVCLocalContext *lc, const int merge_subblock_idx, PredictionUnit *pu)
 
static int mvp_candidate (const VVCLocalContext *lc, const int x_cand, const int y_cand, const int lx, const int8_t *ref_idx, Mv *mv)
 
static int affine_mvp_candidate (const VVCLocalContext *lc, const int x_cand, const int y_cand, const int lx, const int8_t *ref_idx, Mv *cps, const int num_cp)
 
static int mvp_from_nbs (NeighbourContext *ctx, const NeighbourIdx *nbs, const int num_nbs, const int lx, const int8_t *ref_idx, const int amvr_shift, Mv *cps, const int num_cps)
 
static int mvp_spatial_candidates (const VVCLocalContext *lc, const int mvp_lx_flag, const int lx, const int8_t *ref_idx, const int amvr_shift, Mv *mv, int *nb_merge_cand)
 
static int mvp_temporal_candidates (const VVCLocalContext *lc, const int mvp_lx_flag, const int lx, const int8_t *ref_idx, const int amvr_shift, Mv *mv, int *num_cands)
 
static int mvp_history_candidates (const VVCLocalContext *lc, const int mvp_lx_flag, const int lx, const int8_t ref_idx, const int amvr_shift, Mv *mv, int num_cands)
 
static void mvp (const VVCLocalContext *lc, const int mvp_lx_flag, const int lx, const int8_t *ref_idx, const int amvr_shift, Mv *mv)
 
void ff_vvc_mvp (VVCLocalContext *lc, const int *mvp_lx_flag, const int amvr_shift, MotionInfo *mi)
 
static int ibc_spatial_candidates (const VVCLocalContext *lc, const int merge_idx, Mv *const cand_list, int *nb_merge_cand)
 
static int ibc_history_candidates (const VVCLocalContext *lc, const int merge_idx, Mv *cand_list, int *nb_merge_cand)
 
static void ibc_add_mvp (Mv *mv, Mv *mvp, const int amvr_shift)
 
static void ibc_merge_candidates (VVCLocalContext *lc, const int merge_idx, Mv *mv)
 
void ff_vvc_mvp_ibc (VVCLocalContext *lc, const int mvp_l0_flag, const int amvr_shift, Mv *mv)
 
void ff_vvc_luma_mv_merge_ibc (VVCLocalContext *lc, const int merge_idx, Mv *mv)
 
static int affine_mvp_constructed_cp (NeighbourContext *ctx, const NeighbourIdx *neighbour, const int num_neighbour, const int lx, const int8_t ref_idx, const int amvr_shift, Mv *cp)
 
static int affine_mvp_const1 (NeighbourContext *nctx, const int lx, const int8_t ref_idx, const int amvr_shift, Mv *cps, int *available)
 
static void affine_mvp_const2 (const int idx, Mv *cps, const int num_cp)
 
static void affine_mvp (const VVCLocalContext *lc, const int mvp_lx_flag, const int lx, const int8_t *ref_idx, const int amvr_shift, MotionModelIdc motion_model_idc, Mv *cps)
 
void ff_vvc_affine_mvp (VVCLocalContext *lc, const int *mvp_lx_flag, const int amvr_shift, MotionInfo *mi)
 
void ff_vvc_round_mv (Mv *mv, const int lshift, const int rshift)
 
void ff_vvc_clip_mv (Mv *mv)
 
static av_always_inline int is_greater_mer (const VVCFrameContext *fc, const int x0, const int y0, const int x0_br, const int y0_br)
 
static void update_hmvp (MvField *hmvp, int *num_hmvp, const MvField *mvf, int(*compare)(const MvField *n, const MvField *o))
 
static int compare_l0_mv (const MvField *n, const MvField *o)
 
void ff_vvc_update_hmvp (VVCLocalContext *lc, const MotionInfo *mi)
 
MvFieldff_vvc_get_mvf (const VVCFrameContext *fc, const int x0, const int y0)
 

Macro Definition Documentation

◆ IS_SAME_MV

#define IS_SAME_MV (   a,
  b 
)    (AV_RN64A(a) == AV_RN64A(b))

Definition at line 28 of file vvc_mvs.c.

◆ CHECK_MVSET

#define CHECK_MVSET (   l)
Value:
check_mvset(mvLXCol, temp_col.mv + l, \
colPic, fc->ps.ph.poc, \
refPicList, X, refIdxLx, \
refPicList_col, L ## l, temp_col.ref_idx[l])

Definition at line 114 of file vvc_mvs.c.

◆ TAB_MVF

#define TAB_MVF (   x,
 
)    tab_mvf[((y) >> MIN_PU_LOG2) * min_pu_width + ((x) >> MIN_PU_LOG2)]

Definition at line 184 of file vvc_mvs.c.

◆ TAB_MVF_PU

#define TAB_MVF_PU (   v)    TAB_MVF(x ## v, y ## v)

Definition at line 187 of file vvc_mvs.c.

◆ TAB_CP_MV

#define TAB_CP_MV (   lx,
  x,
 
)    fc->tab.cp_mv[lx][((((y) >> min_cb_log2_size) * min_cb_width + ((x) >> min_cb_log2_size)) ) * MAX_CONTROL_POINTS]

Definition at line 190 of file vvc_mvs.c.

◆ DERIVE_TEMPORAL_COLOCATED_MVS

#define DERIVE_TEMPORAL_COLOCATED_MVS (   sb_flag)
Value:
refIdxLx, mvLXCol, X, colPic, \
ff_vvc_get_ref_list(fc, ref, x, y), sb_flag)

Definition at line 194 of file vvc_mvs.c.

◆ MV_MERGE_FROM_NB

#define MV_MERGE_FROM_NB (   nb)    mv_merge_from_nb(&nctx, nb)

Definition at line 638 of file vvc_mvs.c.

◆ AFFINE_MERGE_FROM_NBS

#define AFFINE_MERGE_FROM_NBS (   nbs)    affine_merge_from_nbs(&nctx, nbs, FF_ARRAY_ELEMS(nbs), mi)

Definition at line 961 of file vvc_mvs.c.

◆ DERIVE_CORNER_MV

#define DERIVE_CORNER_MV (   nbs)    derive_corner_mvf(nctx, nbs, FF_ARRAY_ELEMS(nbs))

Definition at line 978 of file vvc_mvs.c.

◆ AFFINE_MVP_FROM_NBS

#define AFFINE_MVP_FROM_NBS (   nbs)    mvp_from_nbs(&nctx, nbs, FF_ARRAY_ELEMS(nbs), lx, ref_idx, amvr_shift, cps, num_cp) \

Definition at line 1496 of file vvc_mvs.c.

◆ MVP_FROM_NBS

#define MVP_FROM_NBS (   nbs)    mvp_from_nbs(&nctx, nbs, FF_ARRAY_ELEMS(nbs), lx, ref_idx, amvr_shift, mv, 1) \

Definition at line 1499 of file vvc_mvs.c.

◆ MV_BITS

#define MV_BITS   18

Definition at line 1671 of file vvc_mvs.c.

◆ IBC_SHIFT

#define IBC_SHIFT (   v)    ((v) >= (1 << (MV_BITS - 1)) ? ((v) - (1 << MV_BITS)) : (v))

Definition at line 1672 of file vvc_mvs.c.

◆ AFFINE_MVP_CONSTRUCTED_CP

#define AFFINE_MVP_CONSTRUCTED_CP (   cands,
  cp 
)
Value:
affine_mvp_constructed_cp(nctx, cands, FF_ARRAY_ELEMS(cands), lx, ref_idx, \
amvr_shift, cp)

Definition at line 1749 of file vvc_mvs.c.

Enumeration Type Documentation

◆ NeighbourIdx

Enumerator
A0 
A1 
A2 
B0 
B1 
B2 
B3 
NUM_NBS 
NB_IDX_NONE 

Definition at line 524 of file vvc_mvs.c.

Function Documentation

◆ is_same_mer()

static av_always_inline int is_same_mer ( const VVCFrameContext fc,
const int  xN,
const int  yN,
const int  xP,
const int  yP 
)
static

Definition at line 31 of file vvc_mvs.c.

Referenced by check_available().

◆ compare_mv_ref_idx()

static av_always_inline int compare_mv_ref_idx ( const MvField n,
const MvField o 
)
static

◆ mv_compression()

static av_always_inline void mv_compression ( Mv motion)
static

Definition at line 57 of file vvc_mvs.c.

Referenced by check_mvset().

◆ ff_vvc_mv_scale()

void ff_vvc_mv_scale ( Mv dst,
const Mv src,
int  td,
int  tb 
)

Definition at line 71 of file vvc_mvs.c.

Referenced by check_mvset(), and derive_mmvd().

◆ check_mvset()

static int check_mvset ( Mv mvLXCol,
Mv mvCol,
int  colPic,
int  poc,
const RefPicList refPicList,
int  X,
int  refIdxLx,
const RefPicList refPicList_col,
int  listCol,
int  refidxCol 
)
static

Definition at line 86 of file vvc_mvs.c.

◆ ff_vvc_no_backward_pred_flag()

int ff_vvc_no_backward_pred_flag ( const VVCLocalContext lc)

Definition at line 121 of file vvc_mvs.c.

Referenced by bcw_idx_decode(), and derive_temporal_colocated_mvs().

◆ derive_temporal_colocated_mvs()

static int derive_temporal_colocated_mvs ( const VVCLocalContext lc,
MvField  temp_col,
int  refIdxLx,
Mv mvLXCol,
int  X,
int  colPic,
const RefPicList refPicList_col,
int  sb_flag 
)
static

Definition at line 139 of file vvc_mvs.c.

◆ temporal_luma_motion_vector()

static int temporal_luma_motion_vector ( const VVCLocalContext lc,
const int  refIdxLx,
Mv mvLXCol,
const int  X,
int  check_center,
int  sb_flag 
)
static

◆ 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 
)

◆ ff_vvc_set_intra_mvf()

void ff_vvc_set_intra_mvf ( const VVCLocalContext lc,
const int  dmvr 
)

Definition at line 269 of file vvc_mvs.c.

Referenced by fill_dmvr_info(), and hls_coding_unit().

◆ derive_cb_prof_flag_lx()

static int derive_cb_prof_flag_lx ( const VVCLocalContext lc,
const PredictionUnit pu,
int  lx,
int  is_fallback 
)
static

Definition at line 286 of file vvc_mvs.c.

Referenced by derive_subblock_diff_mvs().

◆ is_fallback_mode()

static int is_fallback_mode ( const SubblockParams sp,
const PredFlag  pred_flag 
)
static

Definition at line 317 of file vvc_mvs.c.

Referenced by init_subblock_params().

◆ init_subblock_params()

static void init_subblock_params ( SubblockParams sp,
const MotionInfo mi,
const int  cb_width,
const int  cb_height,
const int  lx 
)
static

Definition at line 342 of file vvc_mvs.c.

Referenced by ff_vvc_store_sb_mvs().

◆ derive_subblock_diff_mvs()

static void derive_subblock_diff_mvs ( const VVCLocalContext lc,
PredictionUnit pu,
const SubblockParams sp,
const int  lx 
)
static

Definition at line 365 of file vvc_mvs.c.

Referenced by ff_vvc_store_sb_mvs().

◆ store_cp_mv()

static void store_cp_mv ( const VVCLocalContext lc,
const MotionInfo mi,
const int  lx 
)
static

Definition at line 385 of file vvc_mvs.c.

Referenced by ff_vvc_store_sb_mvs().

◆ ff_vvc_store_sb_mvs()

void ff_vvc_store_sb_mvs ( const VVCLocalContext lc,
PredictionUnit pu 
)

Definition at line 407 of file vvc_mvs.c.

Referenced by ff_vvc_sb_mv_merge_mode(), and mvp_data().

◆ ff_vvc_store_gpm_mvf()

void ff_vvc_store_gpm_mvf ( const VVCLocalContext lc,
const PredictionUnit pu 
)

Definition at line 453 of file vvc_mvs.c.

Referenced by merge_data_gpm().

◆ ff_vvc_store_mvf()

void ff_vvc_store_mvf ( const VVCLocalContext lc,
const MvField mvf 
)

Definition at line 498 of file vvc_mvs.c.

Referenced by merge_data_ciip(), and merge_data_regular().

◆ ff_vvc_store_mv()

void ff_vvc_store_mv ( const VVCLocalContext lc,
const MotionInfo mi 
)

Definition at line 504 of file vvc_mvs.c.

Referenced by merge_data_ibc(), mvp_data(), and mvp_data_ibc().

◆ is_a0_available()

static int is_a0_available ( const VVCLocalContext lc,
const CodingUnit cu 
)
static

Definition at line 549 of file vvc_mvs.c.

Referenced by init_neighbour_context().

◆ init_neighbour_context()

static void init_neighbour_context ( NeighbourContext ctx,
const VVCLocalContext lc 
)
static

◆ pred_flag_to_mode()

static av_always_inline PredMode pred_flag_to_mode ( PredFlag  pred)
static

Definition at line 596 of file vvc_mvs.c.

Referenced by check_available().

◆ check_available()

static int check_available ( Neighbour n,
const VVCLocalContext lc,
const int  check_mer 
)
static

◆ mv_merge_candidate()

static const MvField* mv_merge_candidate ( const VVCLocalContext lc,
const int  x_cand,
const int  y_cand 
)
static

Definition at line 619 of file vvc_mvs.c.

Referenced by mv_merge_from_nb().

◆ mv_merge_from_nb()

static const MvField* mv_merge_from_nb ( NeighbourContext ctx,
const NeighbourIdx  nb 
)
static

Definition at line 629 of file vvc_mvs.c.

◆ mv_merge_spatial_candidates()

static int mv_merge_spatial_candidates ( const VVCLocalContext lc,
const int  merge_idx,
const MvField **  nb_list,
MvField cand_list,
int nb_merge_cand 
)
static

Definition at line 641 of file vvc_mvs.c.

Referenced by mv_merge_mode().

◆ mv_merge_temporal_candidate()

static int mv_merge_temporal_candidate ( const VVCLocalContext lc,
MvField cand 
)
static

Definition at line 681 of file vvc_mvs.c.

Referenced by mv_merge_mode().

◆ mv_merge_history_candidates()

static int mv_merge_history_candidates ( const VVCLocalContext lc,
const int  merge_idx,
const MvField **  nb_list,
MvField cand_list,
int num_cands 
)
static

Definition at line 697 of file vvc_mvs.c.

Referenced by mv_merge_mode().

◆ mv_merge_pairwise_candidate()

static int mv_merge_pairwise_candidate ( MvField cand_list,
const int  num_cands,
const int  is_b 
)
static

Definition at line 716 of file vvc_mvs.c.

Referenced by mv_merge_mode().

◆ mv_merge_zero_motion_candidate()

static void mv_merge_zero_motion_candidate ( const VVCLocalContext lc,
const int  merge_idx,
MvField cand_list,
int  num_cands 
)
static

Definition at line 755 of file vvc_mvs.c.

Referenced by mv_merge_mode().

◆ mv_merge_mode()

static void mv_merge_mode ( const VVCLocalContext lc,
const int  merge_idx,
MvField cand_list 
)
static

Definition at line 781 of file vvc_mvs.c.

Referenced by ff_vvc_luma_mv_merge_gpm(), and ff_vvc_luma_mv_merge_mode().

◆ ff_vvc_luma_mv_merge_mode()

void ff_vvc_luma_mv_merge_mode ( VVCLocalContext lc,
const int  merge_idx,
const int  ciip_flag,
MvField mv 
)

Definition at line 808 of file vvc_mvs.c.

Referenced by merge_data_ciip(), and merge_data_regular().

◆ ff_vvc_luma_mv_merge_gpm()

void ff_vvc_luma_mv_merge_gpm ( VVCLocalContext lc,
const int  merge_gpm_idx[2],
MvField mv 
)

Definition at line 821 of file vvc_mvs.c.

Referenced by merge_data_gpm().

◆ affine_cps_from_nb()

static void affine_cps_from_nb ( const VVCLocalContext lc,
const int  x_nb,
int  y_nb,
const int  nbw,
const int  nbh,
const int  lx,
Mv cps,
int  num_cps 
)
static

Definition at line 847 of file vvc_mvs.c.

Referenced by affine_merge_candidate(), and affine_mvp_candidate().

◆ affine_neighbour_cb()

static int affine_neighbour_cb ( const VVCFrameContext fc,
const int  x_nb,
const int  y_nb,
int x_cb,
int y_cb,
int cbw,
int cbh 
)
static

Definition at line 909 of file vvc_mvs.c.

Referenced by affine_merge_candidate(), and affine_mvp_candidate().

◆ affine_merge_candidate()

static int affine_merge_candidate ( const VVCLocalContext lc,
const int  x_cand,
const int  y_cand,
MotionInfo mi 
)
static

Definition at line 926 of file vvc_mvs.c.

Referenced by affine_merge_from_nbs().

◆ affine_merge_from_nbs()

static int affine_merge_from_nbs ( NeighbourContext ctx,
const NeighbourIdx nbs,
const int  num_nbs,
MotionInfo cand 
)
static

Definition at line 951 of file vvc_mvs.c.

◆ derive_corner_mvf()

static const MvField* derive_corner_mvf ( NeighbourContext ctx,
const NeighbourIdx neighbour,
const int  num_neighbour 
)
static

Definition at line 964 of file vvc_mvs.c.

Referenced by sb_temporal_merge_candidate().

◆ compare_pf_ref_idx()

static av_always_inline int compare_pf_ref_idx ( const MvField A,
const struct MvField B,
const struct MvField C,
const int  lx 
)
static

◆ sb_clip_location()

static av_always_inline void sb_clip_location ( const VVCLocalContext lc,
const int  x_ctb,
const int  y_ctb,
const Mv temp_mv,
int x,
int y 
)
static

Definition at line 998 of file vvc_mvs.c.

Referenced by sb_temproal_luma_motion().

◆ sb_temproal_luma_motion()

static void sb_temproal_luma_motion ( const VVCLocalContext lc,
const int  x_ctb,
const int  y_ctb,
const Mv temp_mv,
int  x,
int  y,
uint8_t *  pred_flag,
Mv mv 
)
static

Definition at line 1012 of file vvc_mvs.c.

Referenced by sb_temporal_luma_motion_data(), and sb_temporal_merge_candidate().

◆ sb_temporal_luma_motion_data()

static int sb_temporal_luma_motion_data ( const VVCLocalContext lc,
const MvField a1,
const int  x_ctb,
const int  y_ctb,
MvField ctr_mvf,
Mv temp_mv 
)
static

Definition at line 1040 of file vvc_mvs.c.

Referenced by sb_temporal_merge_candidate().

◆ sb_temporal_merge_candidate()

static int sb_temporal_merge_candidate ( const VVCLocalContext lc,
NeighbourContext nctx,
PredictionUnit pu 
)
static

Definition at line 1075 of file vvc_mvs.c.

Referenced by sb_mv_merge_mode().

◆ affine_merge_const1()

static int affine_merge_const1 ( const MvField c0,
const MvField c1,
const MvField c2,
MotionInfo mi 
)
static

Definition at line 1123 of file vvc_mvs.c.

Referenced by affine_merge_const_candidates().

◆ affine_merge_const2()

static int affine_merge_const2 ( const MvField c0,
const MvField c1,
const MvField c3,
MotionInfo mi 
)
static

Definition at line 1147 of file vvc_mvs.c.

Referenced by affine_merge_const_candidates().

◆ affine_merge_const3()

static int affine_merge_const3 ( const MvField c0,
const MvField c2,
const MvField c3,
MotionInfo mi 
)
static

Definition at line 1172 of file vvc_mvs.c.

Referenced by affine_merge_const_candidates().

◆ affine_merge_const4()

static int affine_merge_const4 ( const MvField c1,
const MvField c2,
const MvField c3,
MotionInfo mi 
)
static

Definition at line 1197 of file vvc_mvs.c.

Referenced by affine_merge_const_candidates().

◆ affine_merge_const5()

static int affine_merge_const5 ( const MvField c0,
const MvField c1,
MotionInfo mi 
)
static

Definition at line 1222 of file vvc_mvs.c.

Referenced by affine_merge_const_candidates().

◆ affine_merge_const6()

static int affine_merge_const6 ( const MvField c0,
const MvField c2,
const int  cb_width,
const int  cb_height,
MotionInfo mi 
)
static

Definition at line 1245 of file vvc_mvs.c.

Referenced by affine_merge_const_candidates().

◆ affine_merge_zero_motion()

static void affine_merge_zero_motion ( const VVCLocalContext lc,
MotionInfo mi 
)
static

Definition at line 1272 of file vvc_mvs.c.

Referenced by sb_mv_merge_mode().

◆ affine_merge_const_candidates()

static int affine_merge_const_candidates ( const VVCLocalContext lc,
MotionInfo mi,
NeighbourContext nctx,
const int  merge_subblock_idx,
int  num_cands 
)
static

Definition at line 1284 of file vvc_mvs.c.

Referenced by sb_mv_merge_mode().

◆ sb_mv_merge_mode()

static int sb_mv_merge_mode ( const VVCLocalContext lc,
const int  merge_subblock_idx,
PredictionUnit pu 
)
static

Definition at line 1356 of file vvc_mvs.c.

Referenced by ff_vvc_sb_mv_merge_mode().

◆ ff_vvc_sb_mv_merge_mode()

void ff_vvc_sb_mv_merge_mode ( VVCLocalContext lc,
const int  merge_subblock_idx,
PredictionUnit pu 
)

Definition at line 1403 of file vvc_mvs.c.

Referenced by merge_data_subblock().

◆ mvp_candidate()

static int mvp_candidate ( const VVCLocalContext lc,
const int  x_cand,
const int  y_cand,
const int  lx,
const int8_t *  ref_idx,
Mv mv 
)
static

Definition at line 1412 of file vvc_mvs.c.

Referenced by mvp_from_nbs().

◆ affine_mvp_candidate()

static int affine_mvp_candidate ( const VVCLocalContext lc,
const int  x_cand,
const int  y_cand,
const int  lx,
const int8_t *  ref_idx,
Mv cps,
const int  num_cp 
)
static

Definition at line 1439 of file vvc_mvs.c.

Referenced by mvp_from_nbs().

◆ mvp_from_nbs()

static int mvp_from_nbs ( NeighbourContext ctx,
const NeighbourIdx nbs,
const int  num_nbs,
const int  lx,
const int8_t *  ref_idx,
const int  amvr_shift,
Mv cps,
const int  num_cps 
)
static

Definition at line 1471 of file vvc_mvs.c.

◆ mvp_spatial_candidates()

static int mvp_spatial_candidates ( const VVCLocalContext lc,
const int  mvp_lx_flag,
const int  lx,
const int8_t *  ref_idx,
const int  amvr_shift,
Mv mv,
int nb_merge_cand 
)
static

Definition at line 1502 of file vvc_mvs.c.

Referenced by mvp().

◆ mvp_temporal_candidates()

static int mvp_temporal_candidates ( const VVCLocalContext lc,
const int  mvp_lx_flag,
const int  lx,
const int8_t *  ref_idx,
const int  amvr_shift,
Mv mv,
int num_cands 
)
static

Definition at line 1532 of file vvc_mvs.c.

Referenced by mvp().

◆ mvp_history_candidates()

static int mvp_history_candidates ( const VVCLocalContext lc,
const int  mvp_lx_flag,
const int  lx,
const int8_t  ref_idx,
const int  amvr_shift,
Mv mv,
int  num_cands 
)
static

Definition at line 1547 of file vvc_mvs.c.

Referenced by mvp().

◆ mvp()

static void mvp ( const VVCLocalContext lc,
const int  mvp_lx_flag,
const int  lx,
const int8_t *  ref_idx,
const int  amvr_shift,
Mv mv 
)
static

◆ ff_vvc_mvp()

void ff_vvc_mvp ( VVCLocalContext lc,
const int mvp_lx_flag,
const int  amvr_shift,
MotionInfo mi 
)

Definition at line 1593 of file vvc_mvs.c.

Referenced by mvp_data().

◆ ibc_spatial_candidates()

static int ibc_spatial_candidates ( const VVCLocalContext lc,
const int  merge_idx,
Mv *const  cand_list,
int nb_merge_cand 
)
static

Definition at line 1606 of file vvc_mvs.c.

Referenced by ibc_merge_candidates().

◆ ibc_history_candidates()

static int ibc_history_candidates ( const VVCLocalContext lc,
const int  merge_idx,
Mv cand_list,
int nb_merge_cand 
)
static

Definition at line 1644 of file vvc_mvs.c.

Referenced by ibc_merge_candidates().

◆ ibc_add_mvp()

static void ibc_add_mvp ( Mv mv,
Mv mvp,
const int  amvr_shift 
)
inlinestatic

Definition at line 1674 of file vvc_mvs.c.

Referenced by ff_vvc_mvp_ibc().

◆ ibc_merge_candidates()

static void ibc_merge_candidates ( VVCLocalContext lc,
const int  merge_idx,
Mv mv 
)
static

Definition at line 1682 of file vvc_mvs.c.

Referenced by ff_vvc_luma_mv_merge_ibc(), and ff_vvc_mvp_ibc().

◆ ff_vvc_mvp_ibc()

void ff_vvc_mvp_ibc ( VVCLocalContext lc,
const int  mvp_l0_flag,
const int  amvr_shift,
Mv mv 
)

Definition at line 1699 of file vvc_mvs.c.

Referenced by mvp_data_ibc().

◆ ff_vvc_luma_mv_merge_ibc()

void ff_vvc_luma_mv_merge_ibc ( VVCLocalContext lc,
const int  merge_idx,
Mv mv 
)

Definition at line 1707 of file vvc_mvs.c.

Referenced by merge_data_ibc().

◆ affine_mvp_constructed_cp()

static int affine_mvp_constructed_cp ( NeighbourContext ctx,
const NeighbourIdx neighbour,
const int  num_neighbour,
const int  lx,
const int8_t  ref_idx,
const int  amvr_shift,
Mv cp 
)
static

Definition at line 1712 of file vvc_mvs.c.

◆ affine_mvp_const1()

static int affine_mvp_const1 ( NeighbourContext nctx,
const int  lx,
const int8_t  ref_idx,
const int  amvr_shift,
Mv cps,
int available 
)
static

Definition at line 1754 of file vvc_mvs.c.

Referenced by affine_mvp().

◆ affine_mvp_const2()

static void affine_mvp_const2 ( const int  idx,
Mv cps,
const int  num_cp 
)
static

Definition at line 1769 of file vvc_mvs.c.

Referenced by affine_mvp().

◆ affine_mvp()

static void affine_mvp ( const VVCLocalContext lc,
const int  mvp_lx_flag,
const int  lx,
const int8_t *  ref_idx,
const int  amvr_shift,
MotionModelIdc  motion_model_idc,
Mv cps 
)
static

Definition at line 1777 of file vvc_mvs.c.

Referenced by ff_vvc_affine_mvp().

◆ ff_vvc_affine_mvp()

void ff_vvc_affine_mvp ( VVCLocalContext lc,
const int mvp_lx_flag,
const int  amvr_shift,
MotionInfo mi 
)

Definition at line 1835 of file vvc_mvs.c.

Referenced by mvp_data().

◆ ff_vvc_round_mv()

void ff_vvc_round_mv ( Mv mv,
const int  lshift,
const int  rshift 
)

◆ ff_vvc_clip_mv()

void ff_vvc_clip_mv ( Mv mv)

◆ is_greater_mer()

static av_always_inline int is_greater_mer ( const VVCFrameContext fc,
const int  x0,
const int  y0,
const int  x0_br,
const int  y0_br 
)
static

Definition at line 1869 of file vvc_mvs.c.

Referenced by ff_vvc_update_hmvp().

◆ update_hmvp()

static void update_hmvp ( MvField hmvp,
int num_hmvp,
const MvField mvf,
int(*)(const MvField *n, const MvField *o)  compare 
)
static

Definition at line 1877 of file vvc_mvs.c.

Referenced by ff_vvc_update_hmvp().

◆ compare_l0_mv()

static int compare_l0_mv ( const MvField n,
const MvField o 
)
static

Definition at line 1896 of file vvc_mvs.c.

Referenced by ff_vvc_update_hmvp().

◆ ff_vvc_update_hmvp()

void ff_vvc_update_hmvp ( VVCLocalContext lc,
const MotionInfo mi 
)

Definition at line 1903 of file vvc_mvs.c.

Referenced by inter_data().

◆ ff_vvc_get_mvf()

MvField* ff_vvc_get_mvf ( const VVCFrameContext fc,
const int  x0,
const int  y0 
)

Definition at line 1922 of file vvc_mvs.c.

Referenced by cu_get_max_y(), derive_affine_mvc(), derive_sb_mv(), and pred_affine_blk().

derive_temporal_colocated_mvs
static int derive_temporal_colocated_mvs(const VVCLocalContext *lc, MvField temp_col, int refIdxLx, Mv *mvLXCol, int X, int colPic, const RefPicList *refPicList_col, int sb_flag)
Definition: vvc_mvs.c:139
fc
#define fc(width, name, range_min, range_max)
Definition: cbs_av1.c:464
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
affine_mvp_constructed_cp
static int affine_mvp_constructed_cp(NeighbourContext *ctx, const NeighbourIdx *neighbour, const int num_neighbour, const int lx, const int8_t ref_idx, const int amvr_shift, Mv *cp)
Definition: vvc_mvs.c:1712
X
@ X
Definition: vf_addroi.c:27
ref
static int ref[MAX_W *MAX_W]
Definition: jpeg2000dwt.c:112
L
#define L(x)
Definition: vpx_arith.h:36
ff_vvc_get_ref_list
const RefPicList * ff_vvc_get_ref_list(const VVCFrameContext *fc, const VVCFrame *ref, int x0, int y0)
Definition: vvc_refs.c:67
check_mvset
static int check_mvset(Mv *mvLXCol, Mv *mvCol, int colPic, int poc, const RefPicList *refPicList, int X, int refIdxLx, const RefPicList *refPicList_col, int listCol, int refidxCol)
Definition: vvc_mvs.c:86