FFmpeg  4.3
Macros | Functions | Variables
hevc_mvs.c File Reference
#include "hevc.h"
#include "hevcdec.h"

Go to the source code of this file.

Macros

#define MIN_TB_ADDR_ZS(x, y)   s->ps.pps->min_tb_addr_zs[(y) * (s->ps.sps->tb_mask+2) + (x)]
 
#define MATCH_MV(x)   (AV_RN32A(&A.x) == AV_RN32A(&B.x))
 
#define MATCH(x)   (A.x == B.x)
 
#define CHECK_MVSET(l)
 
#define TAB_MVF(x, y)   tab_mvf[(y) * min_pu_width + x]
 
#define TAB_MVF_PU(v)
 
#define DERIVE_TEMPORAL_COLOCATED_MVS
 
#define AVAILABLE(cand, v)   (cand && !(TAB_MVF_PU(v).pred_flag == PF_INTRA))
 
#define PRED_BLOCK_AVAILABLE(v)   z_scan_block_avail(s, x0, y0, x ## v, y ## v)
 
#define COMPARE_MV_REFIDX(a, b)   compare_mv_ref_idx(TAB_MVF_PU(a), TAB_MVF_PU(b))
 
#define MP_MX(v, pred, mx)
 
#define MP_MX_LT(v, pred, mx)
 

Functions

void ff_hevc_set_neighbour_available (HEVCContext *s, int x0, int y0, int nPbW, int nPbH)
 
static av_always_inline int z_scan_block_avail (HEVCContext *s, int xCurr, int yCurr, int xN, int yN)
 
static av_always_inline int is_diff_mer (HEVCContext *s, int xN, int yN, int xP, int yP)
 
static av_always_inline int compare_mv_ref_idx (struct MvField A, struct MvField B)
 
static av_always_inline void mv_scale (Mv *dst, Mv *src, int td, int tb)
 
static int check_mvset (Mv *mvLXCol, Mv *mvCol, int colPic, int poc, RefPicList *refPicList, int X, int refIdxLx, RefPicList *refPicList_col, int listCol, int refidxCol)
 
static int derive_temporal_colocated_mvs (HEVCContext *s, MvField temp_col, int refIdxLx, Mv *mvLXCol, int X, int colPic, RefPicList *refPicList_col)
 
static int temporal_luma_motion_vector (HEVCContext *s, int x0, int y0, int nPbW, int nPbH, int refIdxLx, Mv *mvLXCol, int X)
 
static void derive_spatial_merge_candidates (HEVCContext *s, int x0, int y0, int nPbW, int nPbH, int log2_cb_size, int singleMCLFlag, int part_idx, int merge_idx, struct MvField mergecandlist[])
 
void ff_hevc_luma_mv_merge_mode (HEVCContext *s, int x0, int y0, int nPbW, int nPbH, int log2_cb_size, int part_idx, int merge_idx, MvField *mv)
 
static av_always_inline void dist_scale (HEVCContext *s, Mv *mv, int min_pu_width, int x, int y, int elist, int ref_idx_curr, int ref_idx)
 
static int mv_mp_mode_mx (HEVCContext *s, int x, int y, int pred_flag_index, Mv *mv, int ref_idx_curr, int ref_idx)
 
static int mv_mp_mode_mx_lt (HEVCContext *s, int x, int y, int pred_flag_index, Mv *mv, int ref_idx_curr, int ref_idx)
 
void ff_hevc_luma_mv_mvp_mode (HEVCContext *s, int x0, int y0, int nPbW, int nPbH, int log2_cb_size, int part_idx, int merge_idx, MvField *mv, int mvp_lx_flag, int LX)
 

Variables

static const uint8_t l0_l1_cand_idx [12][2]
 

Macro Definition Documentation

◆ MIN_TB_ADDR_ZS

#define MIN_TB_ADDR_ZS (   x,
 
)    s->ps.pps->min_tb_addr_zs[(y) * (s->ps.sps->tb_mask+2) + (x)]

◆ MATCH_MV

#define MATCH_MV (   x)    (AV_RN32A(&A.x) == AV_RN32A(&B.x))

Definition at line 94 of file hevc_mvs.c.

◆ MATCH

#define MATCH (   x)    (A.x == B.x)

Definition at line 95 of file hevc_mvs.c.

◆ CHECK_MVSET

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

Definition at line 156 of file hevc_mvs.c.

◆ TAB_MVF

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

Definition at line 203 of file hevc_mvs.c.

◆ TAB_MVF_PU

#define TAB_MVF_PU (   v)
Value:
TAB_MVF(((x ## v) >> s->ps.sps->log2_min_pu_size), \
((y ## v) >> s->ps.sps->log2_min_pu_size))

Definition at line 206 of file hevc_mvs.c.

◆ DERIVE_TEMPORAL_COLOCATED_MVS

#define DERIVE_TEMPORAL_COLOCATED_MVS
Value:
refIdxLx, mvLXCol, X, colPic, \

Definition at line 210 of file hevc_mvs.c.

◆ AVAILABLE

#define AVAILABLE (   cand,
 
)    (cand && !(TAB_MVF_PU(v).pred_flag == PF_INTRA))

Definition at line 273 of file hevc_mvs.c.

◆ PRED_BLOCK_AVAILABLE

#define PRED_BLOCK_AVAILABLE (   v)    z_scan_block_avail(s, x0, y0, x ## v, y ## v)

Definition at line 276 of file hevc_mvs.c.

◆ COMPARE_MV_REFIDX

#define COMPARE_MV_REFIDX (   a,
  b 
)    compare_mv_ref_idx(TAB_MVF_PU(a), TAB_MVF_PU(b))

Definition at line 279 of file hevc_mvs.c.

◆ MP_MX

#define MP_MX (   v,
  pred,
  mx 
)
Value:
(x ## v) >> s->ps.sps->log2_min_pu_size, \
(y ## v) >> s->ps.sps->log2_min_pu_size, \
pred, &mx, ref_idx_curr, ref_idx)

Definition at line 570 of file hevc_mvs.c.

◆ MP_MX_LT

#define MP_MX_LT (   v,
  pred,
  mx 
)
Value:
(x ## v) >> s->ps.sps->log2_min_pu_size, \
(y ## v) >> s->ps.sps->log2_min_pu_size, \
pred, &mx, ref_idx_curr, ref_idx)

Definition at line 576 of file hevc_mvs.c.

Function Documentation

◆ ff_hevc_set_neighbour_available()

void ff_hevc_set_neighbour_available ( HEVCContext s,
int  x0,
int  y0,
int  nPbW,
int  nPbH 
)

◆ z_scan_block_avail()

static av_always_inline int z_scan_block_avail ( HEVCContext s,
int  xCurr,
int  yCurr,
int  xN,
int  yN 
)
static

Definition at line 64 of file hevc_mvs.c.

◆ is_diff_mer()

static av_always_inline int is_diff_mer ( HEVCContext s,
int  xN,
int  yN,
int  xP,
int  yP 
)
static

Definition at line 86 of file hevc_mvs.c.

Referenced by derive_spatial_merge_candidates().

◆ compare_mv_ref_idx()

static av_always_inline int compare_mv_ref_idx ( struct MvField  A,
struct MvField  B 
)
static

Definition at line 98 of file hevc_mvs.c.

◆ mv_scale()

static av_always_inline void mv_scale ( Mv dst,
Mv src,
int  td,
int  tb 
)
static

◆ check_mvset()

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

Definition at line 129 of file hevc_mvs.c.

◆ derive_temporal_colocated_mvs()

static int derive_temporal_colocated_mvs ( HEVCContext s,
MvField  temp_col,
int  refIdxLx,
Mv mvLXCol,
int  X,
int  colPic,
RefPicList refPicList_col 
)
static

Definition at line 163 of file hevc_mvs.c.

◆ temporal_luma_motion_vector()

static int temporal_luma_motion_vector ( HEVCContext s,
int  x0,
int  y0,
int  nPbW,
int  nPbH,
int  refIdxLx,
Mv mvLXCol,
int  X 
)
static

Definition at line 218 of file hevc_mvs.c.

Referenced by derive_spatial_merge_candidates(), and ff_hevc_luma_mv_mvp_mode().

◆ derive_spatial_merge_candidates()

static void derive_spatial_merge_candidates ( HEVCContext s,
int  x0,
int  y0,
int  nPbW,
int  nPbH,
int  log2_cb_size,
int  singleMCLFlag,
int  part_idx,
int  merge_idx,
struct MvField  mergecandlist[] 
)
static

Definition at line 285 of file hevc_mvs.c.

Referenced by ff_hevc_luma_mv_merge_mode().

◆ ff_hevc_luma_mv_merge_mode()

void ff_hevc_luma_mv_merge_mode ( HEVCContext s,
int  x0,
int  y0,
int  nPbW,
int  nPbH,
int  log2_cb_size,
int  part_idx,
int  merge_idx,
MvField mv 
)

Definition at line 479 of file hevc_mvs.c.

Referenced by hls_prediction_unit().

◆ dist_scale()

static av_always_inline void dist_scale ( HEVCContext s,
Mv mv,
int  min_pu_width,
int  x,
int  y,
int  elist,
int  ref_idx_curr,
int  ref_idx 
)
static

Definition at line 512 of file hevc_mvs.c.

Referenced by mv_mp_mode_mx_lt().

◆ mv_mp_mode_mx()

static int mv_mp_mode_mx ( HEVCContext s,
int  x,
int  y,
int  pred_flag_index,
Mv mv,
int  ref_idx_curr,
int  ref_idx 
)
static

Definition at line 529 of file hevc_mvs.c.

◆ mv_mp_mode_mx_lt()

static int mv_mp_mode_mx_lt ( HEVCContext s,
int  x,
int  y,
int  pred_flag_index,
Mv mv,
int  ref_idx_curr,
int  ref_idx 
)
static

Definition at line 545 of file hevc_mvs.c.

◆ ff_hevc_luma_mv_mvp_mode()

void ff_hevc_luma_mv_mvp_mode ( HEVCContext s,
int  x0,
int  y0,
int  nPbW,
int  nPbH,
int  log2_cb_size,
int  part_idx,
int  merge_idx,
MvField mv,
int  mvp_lx_flag,
int  LX 
)

Definition at line 582 of file hevc_mvs.c.

Referenced by hevc_luma_mv_mvp_mode().

Variable Documentation

◆ l0_l1_cand_idx

const uint8_t l0_l1_cand_idx[12][2]
static
Initial value:
= {
{ 0, 1, },
{ 1, 0, },
{ 0, 2, },
{ 2, 0, },
{ 1, 2, },
{ 2, 1, },
{ 0, 3, },
{ 3, 0, },
{ 1, 3, },
{ 3, 1, },
{ 2, 3, },
{ 3, 2, },
}

Definition at line 27 of file hevc_mvs.c.

Referenced by derive_spatial_merge_candidates().

check_mvset
static int check_mvset(Mv *mvLXCol, Mv *mvCol, int colPic, int poc, RefPicList *refPicList, int X, int refIdxLx, RefPicList *refPicList_col, int listCol, int refidxCol)
Definition: hevc_mvs.c:129
x
FFmpeg Automated Testing Environment ************************************Introduction Using FATE from your FFmpeg source directory Submitting the results to the FFmpeg result aggregation server Uploading new samples to the fate suite FATE makefile targets and variables Makefile targets Makefile variables Examples Introduction **************FATE is an extended regression suite on the client side and a means for results aggregation and presentation on the server side The first part of this document explains how you can use FATE from your FFmpeg source directory to test your ffmpeg binary The second part describes how you can run FATE to submit the results to FFmpeg’s FATE server In any way you can have a look at the publicly viewable FATE results by visiting this as it can be seen if some test on some platform broke with their recent contribution This usually happens on the platforms the developers could not test on The second part of this document describes how you can run FATE to submit your results to FFmpeg’s FATE server If you want to submit your results be sure to check that your combination of OS and compiler is not already listed on the above mentioned website In the third part you can find a comprehensive listing of FATE makefile targets and variables Using FATE from your FFmpeg source directory **********************************************If you want to run FATE on your machine you need to have the samples in place You can get the samples via the build target fate rsync Use this command from the top level source this will cause FATE to fail NOTE To use a custom wrapper to run the pass ‘ target exec’ to ‘configure’ or set the TARGET_EXEC Make variable Submitting the results to the FFmpeg result aggregation server ****************************************************************To submit your results to the server you should run fate through the shell script ‘tests fate sh’ from the FFmpeg sources This script needs to be invoked with a configuration file as its first argument tests fate sh path to fate_config A configuration file template with comments describing the individual configuration variables can be found at ‘doc fate_config sh template’ Create a configuration that suits your based on the configuration template The ‘slot’ configuration variable can be any string that is not yet but it is suggested that you name it adhering to the following pattern ‘ARCH OS COMPILER COMPILER VERSION’ The configuration file itself will be sourced in a shell therefore all shell features may be used This enables you to setup the environment as you need it for your build For your first test runs the ‘fate_recv’ variable should be empty or commented out This will run everything as normal except that it will omit the submission of the results to the server The following files should be present in $workdir as specified in the configuration it may help to try out the ‘ssh’ command with one or more ‘ v’ options You should get detailed output concerning your SSH configuration and the authentication process The only thing left is to automate the execution of the fate sh script and the synchronisation of the samples directory Uploading new samples to the fate suite *****************************************If you need a sample uploaded send a mail to samples request This is for developers who have an account on the fate suite server If you upload new please make sure they are as small as space on each network bandwidth and so on benefit from smaller test cases Also keep in mind older checkouts use existing sample that means in practice generally do not remove or overwrite files as it likely would break older checkouts or releases Also all needed samples for a commit should be ideally before the push If you need an account for frequently uploading samples or you wish to help others by doing that send a mail to ffmpeg devel rsync vauL Duo x
Definition: fate.txt:150
X
@ X
Definition: vf_addroi.c:26
s
#define s(width, name)
Definition: cbs_vp9.c:257
TAB_MVF
#define TAB_MVF(x, y)
Definition: hevc_mvs.c:203
pred
static const float pred[4]
Definition: siprdata.h:259
L
#define L(x)
Definition: vp56_arith.h:36
mv_mp_mode_mx
static int mv_mp_mode_mx(HEVCContext *s, int x, int y, int pred_flag_index, Mv *mv, int ref_idx_curr, int ref_idx)
Definition: hevc_mvs.c:529
ref
static int ref[MAX_W *MAX_W]
Definition: jpeg2000dwt.c:107
derive_temporal_colocated_mvs
static int derive_temporal_colocated_mvs(HEVCContext *s, MvField temp_col, int refIdxLx, Mv *mvLXCol, int X, int colPic, RefPicList *refPicList_col)
Definition: hevc_mvs.c:163
mv_mp_mode_mx_lt
static int mv_mp_mode_mx_lt(HEVCContext *s, int x, int y, int pred_flag_index, Mv *mv, int ref_idx_curr, int ref_idx)
Definition: hevc_mvs.c:545
ff_hevc_get_ref_list
RefPicList * ff_hevc_get_ref_list(HEVCContext *s, HEVCFrame *ref, int x0, int y0)
Definition: hevc_refs.c:57