FFmpeg
Data Structures | Macros | Enumerations | Functions
mvs.c File Reference
#include "ctu.h"
#include "data.h"
#include "refs.h"
#include "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)
 
static int ibc_check_mv (VVCLocalContext *lc, Mv *mv)
 
int ff_vvc_mvp_ibc (VVCLocalContext *lc, const int mvp_l0_flag, const int amvr_shift, Mv *mv)
 
int 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 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 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 mvs.c.

◆ TAB_MVF_PU

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

Definition at line 187 of file 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 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 mvs.c.

◆ MV_MERGE_FROM_NB

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

Definition at line 637 of file 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 960 of file mvs.c.

◆ DERIVE_CORNER_MV

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

Definition at line 977 of file 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 1495 of file 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 1498 of file mvs.c.

◆ MV_BITS

#define MV_BITS   18

Definition at line 1670 of file mvs.c.

◆ IBC_SHIFT

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

Definition at line 1671 of file 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 1765 of file mvs.c.

Enumeration Type Documentation

◆ NeighbourIdx

Enumerator
A0 
A1 
A2 
B0 
B1 
B2 
B3 
NUM_NBS 
NB_IDX_NONE 

Definition at line 523 of file 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 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 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 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 mvs.c.

◆ ff_vvc_no_backward_pred_flag()

int ff_vvc_no_backward_pred_flag ( const VVCLocalContext lc)

Definition at line 121 of file 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 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 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 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 318 of file 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 343 of file 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 366 of file 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 386 of file 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 408 of file 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 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 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 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 548 of file 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 595 of file 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 618 of file 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 628 of file 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 640 of file 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 680 of file 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 696 of file 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 715 of file 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 754 of file 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 780 of file 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 807 of file 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 820 of file 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 846 of file 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 908 of file 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 925 of file 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 950 of file mvs.c.

◆ derive_corner_mvf()

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

Definition at line 963 of file 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 997 of file 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 1011 of file 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 1039 of file 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 1074 of file 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 1122 of file 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 1146 of file 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 1171 of file 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 1196 of file 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 1221 of file 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 1244 of file 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 1271 of file 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 1283 of file 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 1355 of file 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 1402 of file 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 1411 of file 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 1438 of file 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 1470 of file 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 1501 of file 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 1531 of file 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 1546 of file 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 1592 of file 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 1605 of file 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 1643 of file 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 1673 of file 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 1681 of file mvs.c.

Referenced by ff_vvc_luma_mv_merge_ibc(), and ff_vvc_mvp_ibc().

◆ ibc_check_mv()

static int ibc_check_mv ( VVCLocalContext lc,
Mv mv 
)
static

Definition at line 1698 of file mvs.c.

Referenced by ff_vvc_luma_mv_merge_ibc(), and ff_vvc_mvp_ibc().

◆ ff_vvc_mvp_ibc()

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

Definition at line 1713 of file mvs.c.

Referenced by mvp_data_ibc().

◆ ff_vvc_luma_mv_merge_ibc()

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

Definition at line 1722 of file 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 1728 of file 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 1770 of file 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 1785 of file 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 1793 of file 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 1851 of file 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 1885 of file 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 1893 of file 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 1912 of file 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 1919 of file 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 1938 of file mvs.c.

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

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: mvs.c:1728
fc
#define fc(width, name, range_min, range_max)
Definition: cbs_av1.c:472
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: mvs.c:86
FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a)
Definition: sinewin_tablegen.c:29
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: refs.c:69
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: mvs.c:139