FFmpeg
Loading...
Searching...
No Matches
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)
 
#define CHECK_MVSET(l)
 
#define TAB_MVF(x, y)
 
#define TAB_MVF_PU(v)
 
#define TAB_CP_MV(lx, x, y)
 
#define DERIVE_TEMPORAL_COLOCATED_MVS(sb_flag)
 
#define MV_MERGE_FROM_NB(nb)
 
#define AFFINE_MERGE_FROM_NBS(nbs)
 
#define DERIVE_CORNER_MV(nbs)
 
#define AFFINE_MVP_FROM_NBS(nbs)
 
#define MVP_FROM_NBS(nbs)
 
#define MV_BITS   18
 
#define IBC_SHIFT(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 bool dmvr, const PredFlag pf, const bool ciip_flag)
 
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_available (const VVCFrameContext *fc, const int x0, const int y0)
 
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 )
Value:
int a
#define b
Definition input.c:43
#define AV_RN64A(p)

Definition at line 28 of file mvs.c.

Referenced by compare_l0_mv(), compare_mv_ref_idx(), derive_cb_prof_flag_lx(), ibc_history_candidates(), ibc_spatial_candidates(), and mvp_spatial_candidates().

◆ 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])
#define L(x)
Definition vpx_arith.h:36
static const uint16_t fc[]
Definition dcaenc.h:43
#define X
Definition f_ebur128.c:157
static int check_mvset(Mv *mvLXCol, const Mv *mvCol, int colPic, int poc, const RefPicList *refPicList, int X, int refIdxLx, const RefPicList *refPicList_col, int listCol, int refidxCol)
Definition mvs.c:130

Definition at line 114 of file mvs.c.

◆ TAB_MVF

#define TAB_MVF ( x,
y )
Value:
tab_mvf[((y) >> MIN_PU_LOG2) * min_pu_width + ((x) >> MIN_PU_LOG2)]
#define MIN_PU_LOG2
Definition dec.h:42

Definition at line 186 of file mvs.c.

◆ TAB_MVF_PU

#define TAB_MVF_PU ( v)
Value:
TAB_MVF(x ## v, y ## v)
#define TAB_MVF(x, y)
Definition mvs.c:204

Definition at line 189 of file mvs.c.

◆ TAB_CP_MV

#define TAB_CP_MV ( lx,
x,
y )
Value:
fc->tab.cp_mv[lx][((((y) >> min_cb_log2_size) * min_cb_width + ((x) >> min_cb_log2_size)) ) * MAX_CONTROL_POINTS]
#define MAX_CONTROL_POINTS
Definition ctu.h:67

Definition at line 192 of file mvs.c.

Referenced by affine_cps_from_nb().

◆ 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)
static int derive_temporal_colocated_mvs(const HEVCContext *s, MvField temp_col, int refIdxLx, Mv *mvLXCol, int X, int colPic, const RefPicList *refPicList_col)
Definition mvs.c:164
static int ref[MAX_W *MAX_W]
const RefPicList * ff_vvc_get_ref_list(const VVCFrameContext *fc, const VVCFrame *ref, int x0, int y0)
Definition refs.c:76

Definition at line 196 of file mvs.c.

Referenced by sb_temproal_luma_motion(), and temporal_luma_motion_vector().

◆ MV_MERGE_FROM_NB

#define MV_MERGE_FROM_NB ( nb)
Value:
mv_merge_from_nb(&nctx, nb)
static const MvField * mv_merge_from_nb(NeighbourContext *ctx, const NeighbourIdx nb)
Definition mvs.c:650

Definition at line 659 of file mvs.c.

Referenced by mv_merge_spatial_candidates().

◆ AFFINE_MERGE_FROM_NBS

#define AFFINE_MERGE_FROM_NBS ( nbs)
Value:
#define FF_ARRAY_ELEMS(a)
#define mi
static int affine_merge_from_nbs(NeighbourContext *ctx, const NeighbourIdx *nbs, const int num_nbs, MotionInfo *cand)
Definition mvs.c:972

Definition at line 982 of file mvs.c.

Referenced by sb_mv_merge_mode().

◆ DERIVE_CORNER_MV

#define DERIVE_CORNER_MV ( nbs)
Value:
static const MvField * derive_corner_mvf(NeighbourContext *ctx, const NeighbourIdx *neighbour, const int num_neighbour)
Definition mvs.c:985

Definition at line 999 of file mvs.c.

Referenced by affine_merge_const_candidates().

◆ AFFINE_MVP_FROM_NBS

#define AFFINE_MVP_FROM_NBS ( nbs)
Value:
mvp_from_nbs(&nctx, nbs, FF_ARRAY_ELEMS(nbs), lx, ref_idx, amvr_shift, cps, 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)
Definition mvs.c:1492

Definition at line 1517 of file mvs.c.

Referenced by affine_mvp().

◆ MVP_FROM_NBS

#define MVP_FROM_NBS ( nbs)
Value:
mvp_from_nbs(&nctx, nbs, FF_ARRAY_ELEMS(nbs), lx, ref_idx, amvr_shift, mv, 1) \
static const int8_t mv[256][2]
Definition 4xm.c:81

Definition at line 1520 of file mvs.c.

Referenced by mvp_spatial_candidates().

◆ MV_BITS

#define MV_BITS   18

Definition at line 1692 of file mvs.c.

◆ IBC_SHIFT

#define IBC_SHIFT ( v)
Value:
((v) >= (1 << (MV_BITS - 1)) ? ((v) - (1 << MV_BITS)) : (v))
#define MV_BITS
Definition mvs.c:1692

Definition at line 1693 of file mvs.c.

Referenced by ibc_add_mvp().

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

Definition at line 1787 of file mvs.c.

Referenced by affine_mvp_const1().

Enumeration Type Documentation

◆ NeighbourIdx

Enumerator
A0 
A1 
A2 
B0 
B1 
B2 
B3 
NUM_NBS 
NB_IDX_NONE 

Definition at line 527 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

Definition at line 40 of file mvs.c.

◆ 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

Definition at line 202 of file mvs.c.

◆ 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 bool dmvr,
const PredFlag pf,
const bool ciip_flag )

Definition at line 271 of file mvs.c.

Referenced by fill_dmvr_info(), and intra_data().

◆ 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 291 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 323 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 348 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 371 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 391 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 412 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 457 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 502 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 508 of file mvs.c.

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

◆ is_available()

static int is_available ( const VVCFrameContext * fc,
const int x0,
const int y0 )
static

Definition at line 552 of file mvs.c.

Referenced by check_available(), and is_a0_available().

◆ is_a0_available()

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

Definition at line 562 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 605 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 640 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 650 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 662 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 702 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 718 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 737 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 776 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 802 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 829 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 842 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 868 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 930 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 947 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 972 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 985 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 1019 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 1033 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 1061 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 1096 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 1144 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 1168 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 1193 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 1218 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 1243 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 1266 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 1293 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 1305 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 1377 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 1424 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 1433 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 1460 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 1492 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 1523 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 1553 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 1568 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 1614 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 1627 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 1665 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 1695 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 1703 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 1720 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 1735 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 1744 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 1750 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 1792 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 1807 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 1815 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 1873 of file mvs.c.

Referenced by mvp_data().

◆ ff_vvc_round_mv()

◆ ff_vvc_clip_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 1907 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(* compare )(const MvField *n, const MvField *o) )
static

Definition at line 1915 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 1934 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 1941 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 1960 of file mvs.c.

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