FFmpeg  4.3
Macros | Functions
vp9recon.c File Reference
#include "libavutil/avassert.h"
#include "avcodec.h"
#include "internal.h"
#include "videodsp.h"
#include "vp9data.h"
#include "vp9dec.h"
#include "vp9_mc_template.c"

Go to the source code of this file.

Macros

#define memset_bpp(c, i1, v, i2, num)
 
#define memset_val(c, val, num)
 
#define assign_bpp(c, i1, v, i2)
 
#define assign_val(c, i, v)
 
#define mc_luma_dir(td, mc, dst, dst_ls, src, src_ls, tref, row, col, mv, px, py, pw, ph, bw, bh, w, h, i)
 
#define mc_chroma_dir(td, mc, dstu, dstv, dst_ls, srcu, srcu_ls, srcv, srcv_ls, tref, row, col, mv, px, py, pw, ph, bw, bh, w, h, i)
 
#define SCALED   0
 
#define FN(x)   x##_8bpp
 
#define BYTES_PER_PIXEL   1
 
#define FN(x)   x##_16bpp
 
#define BYTES_PER_PIXEL   2
 
#define scale_mv(n, dim)   (((int64_t)(n) * scale[dim]) >> 14)
 
#define mc_luma_dir(td, mc, dst, dst_ls, src, src_ls, tref, row, col, mv, px, py, pw, ph, bw, bh, w, h, i)
 
#define mc_chroma_dir(td, mc, dstu, dstv, dst_ls, srcu, srcu_ls, srcv, srcv_ls, tref, row, col, mv, px, py, pw, ph, bw, bh, w, h, i)
 
#define SCALED   1
 
#define FN(x)   x##_scaled_8bpp
 
#define BYTES_PER_PIXEL   1
 
#define FN(x)   x##_scaled_16bpp
 
#define BYTES_PER_PIXEL   2
 

Functions

static av_always_inline int check_intra_mode (VP9TileData *td, int mode, uint8_t **a, uint8_t *dst_edge, ptrdiff_t stride_edge, uint8_t *dst_inner, ptrdiff_t stride_inner, uint8_t *l, int col, int x, int w, int row, int y, enum TxfmMode tx, int p, int ss_h, int ss_v, int bytesperpixel)
 
static av_always_inline void intra_recon (VP9TileData *td, ptrdiff_t y_off, ptrdiff_t uv_off, int bytesperpixel)
 
void ff_vp9_intra_recon_8bpp (VP9TileData *td, ptrdiff_t y_off, ptrdiff_t uv_off)
 
void ff_vp9_intra_recon_16bpp (VP9TileData *td, ptrdiff_t y_off, ptrdiff_t uv_off)
 
static av_always_inline void mc_luma_unscaled (VP9TileData *td, vp9_mc_func(*mc)[2], uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *ref, ptrdiff_t ref_stride, ThreadFrame *ref_frame, ptrdiff_t y, ptrdiff_t x, const VP56mv *mv, int bw, int bh, int w, int h, int bytesperpixel)
 
static av_always_inline void mc_chroma_unscaled (VP9TileData *td, vp9_mc_func(*mc)[2], uint8_t *dst_u, uint8_t *dst_v, ptrdiff_t dst_stride, const uint8_t *ref_u, ptrdiff_t src_stride_u, const uint8_t *ref_v, ptrdiff_t src_stride_v, ThreadFrame *ref_frame, ptrdiff_t y, ptrdiff_t x, const VP56mv *mv, int bw, int bh, int w, int h, int bytesperpixel)
 
static av_always_inline void mc_luma_scaled (VP9TileData *td, vp9_scaled_mc_func smc, vp9_mc_func(*mc)[2], uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *ref, ptrdiff_t ref_stride, ThreadFrame *ref_frame, ptrdiff_t y, ptrdiff_t x, const VP56mv *in_mv, int px, int py, int pw, int ph, int bw, int bh, int w, int h, int bytesperpixel, const uint16_t *scale, const uint8_t *step)
 
static av_always_inline void mc_chroma_scaled (VP9TileData *td, vp9_scaled_mc_func smc, vp9_mc_func(*mc)[2], uint8_t *dst_u, uint8_t *dst_v, ptrdiff_t dst_stride, const uint8_t *ref_u, ptrdiff_t src_stride_u, const uint8_t *ref_v, ptrdiff_t src_stride_v, ThreadFrame *ref_frame, ptrdiff_t y, ptrdiff_t x, const VP56mv *in_mv, int px, int py, int pw, int ph, int bw, int bh, int w, int h, int bytesperpixel, const uint16_t *scale, const uint8_t *step)
 
static av_always_inline void inter_recon (VP9TileData *td, int bytesperpixel)
 
void ff_vp9_inter_recon_8bpp (VP9TileData *td)
 
void ff_vp9_inter_recon_16bpp (VP9TileData *td)
 

Macro Definition Documentation

◆ memset_bpp

#define memset_bpp (   c,
  i1,
  v,
  i2,
  num 
)
Value:
do { \
if (bytesperpixel == 1) { \
memset(&(c)[(i1)], (v)[(i2)], (num)); \
} else { \
int n, val = AV_RN16A(&(v)[(i2) * 2]); \
for (n = 0; n < (num); n++) { \
AV_WN16A(&(c)[((i1) + n) * 2], val); \
} \
} \
} while (0)

◆ memset_val

#define memset_val (   c,
  val,
  num 
)
Value:
do { \
if (bytesperpixel == 1) { \
memset((c), (val), (num)); \
} else { \
int n; \
for (n = 0; n < (num); n++) { \
AV_WN16A(&(c)[n * 2], (val)); \
} \
} \
} while (0)

◆ assign_bpp

#define assign_bpp (   c,
  i1,
  v,
  i2 
)
Value:
do { \
if (bytesperpixel == 1) { \
(c)[(i1)] = (v)[(i2)]; \
} else { \
AV_COPY16(&(c)[(i1) * 2], &(v)[(i2) * 2]); \
} \
} while (0)

◆ assign_val

#define assign_val (   c,
  i,
 
)
Value:
do { \
if (bytesperpixel == 1) { \
(c)[(i)] = (v); \
} else { \
AV_WN16A(&(c)[(i) * 2], (v)); \
} \
} while (0)

◆ mc_luma_dir [1/2]

#define mc_luma_dir (   td,
  mc,
  dst,
  dst_ls,
  src,
  src_ls,
  tref,
  row,
  col,
  mv,
  px,
  py,
  pw,
  ph,
  bw,
  bh,
  w,
  h,
  i 
)
Value:
mc_luma_unscaled(td, s->dsp.mc, dst, dst_ls, src, src_ls, tref, row, col, \
mv, bw, bh, w, h, bytesperpixel)

Definition at line 544 of file vp9recon.c.

◆ mc_chroma_dir [1/2]

#define mc_chroma_dir (   td,
  mc,
  dstu,
  dstv,
  dst_ls,
  srcu,
  srcu_ls,
  srcv,
  srcv_ls,
  tref,
  row,
  col,
  mv,
  px,
  py,
  pw,
  ph,
  bw,
  bh,
  w,
  h,
  i 
)
Value:
mc_chroma_unscaled(td, s->dsp.mc, dstu, dstv, dst_ls, srcu, srcu_ls, srcv, srcv_ls, tref, \
row, col, mv, bw, bh, w, h, bytesperpixel)

Definition at line 549 of file vp9recon.c.

◆ SCALED [1/2]

#define SCALED   0

Definition at line 554 of file vp9recon.c.

◆ FN [1/4]

#define FN (   x)    x##_8bpp

Definition at line 560 of file vp9recon.c.

◆ BYTES_PER_PIXEL [1/4]

#define BYTES_PER_PIXEL   1

Definition at line 561 of file vp9recon.c.

◆ FN [2/4]

#define FN (   x)    x##_16bpp

Definition at line 560 of file vp9recon.c.

◆ BYTES_PER_PIXEL [2/4]

#define BYTES_PER_PIXEL   2

Definition at line 561 of file vp9recon.c.

◆ scale_mv

#define scale_mv (   n,
  dim 
)    (((int64_t)(n) * scale[dim]) >> 14)

◆ mc_luma_dir [2/2]

#define mc_luma_dir (   td,
  mc,
  dst,
  dst_ls,
  src,
  src_ls,
  tref,
  row,
  col,
  mv,
  px,
  py,
  pw,
  ph,
  bw,
  bh,
  w,
  h,
  i 
)
Value:
mc_luma_scaled(td, s->dsp.s##mc, s->dsp.mc, dst, dst_ls, src, src_ls, tref, row, col, \
mv, px, py, pw, ph, bw, bh, w, h, bytesperpixel, \
s->mvscale[b->ref[i]], s->mvstep[b->ref[i]])

Definition at line 544 of file vp9recon.c.

◆ mc_chroma_dir [2/2]

#define mc_chroma_dir (   td,
  mc,
  dstu,
  dstv,
  dst_ls,
  srcu,
  srcu_ls,
  srcv,
  srcv_ls,
  tref,
  row,
  col,
  mv,
  px,
  py,
  pw,
  ph,
  bw,
  bh,
  w,
  h,
  i 
)
Value:
mc_chroma_scaled(td, s->dsp.s##mc, s->dsp.mc, dstu, dstv, dst_ls, srcu, srcu_ls, srcv, srcv_ls, tref, \
row, col, mv, px, py, pw, ph, bw, bh, w, h, bytesperpixel, \
s->mvscale[b->ref[i]], s->mvstep[b->ref[i]])

Definition at line 549 of file vp9recon.c.

◆ SCALED [2/2]

#define SCALED   1

Definition at line 554 of file vp9recon.c.

◆ FN [3/4]

#define FN (   x)    x##_scaled_8bpp

Definition at line 560 of file vp9recon.c.

◆ BYTES_PER_PIXEL [3/4]

#define BYTES_PER_PIXEL   1

Definition at line 561 of file vp9recon.c.

◆ FN [4/4]

#define FN (   x)    x##_scaled_16bpp

Definition at line 560 of file vp9recon.c.

◆ BYTES_PER_PIXEL [4/4]

#define BYTES_PER_PIXEL   2

Definition at line 561 of file vp9recon.c.

Function Documentation

◆ check_intra_mode()

static av_always_inline int check_intra_mode ( VP9TileData td,
int  mode,
uint8_t **  a,
uint8_t dst_edge,
ptrdiff_t  stride_edge,
uint8_t dst_inner,
ptrdiff_t  stride_inner,
uint8_t l,
int  col,
int  x,
int  w,
int  row,
int  y,
enum TxfmMode  tx,
int  p,
int  ss_h,
int  ss_v,
int  bytesperpixel 
)
static

Definition at line 32 of file vp9recon.c.

Referenced by intra_recon().

◆ intra_recon()

static av_always_inline void intra_recon ( VP9TileData td,
ptrdiff_t  y_off,
ptrdiff_t  uv_off,
int  bytesperpixel 
)
static

Definition at line 218 of file vp9recon.c.

Referenced by ff_vp9_intra_recon_16bpp(), and ff_vp9_intra_recon_8bpp().

◆ ff_vp9_intra_recon_8bpp()

void ff_vp9_intra_recon_8bpp ( VP9TileData td,
ptrdiff_t  y_off,
ptrdiff_t  uv_off 
)

Definition at line 288 of file vp9recon.c.

Referenced by ff_vp9_decode_block().

◆ ff_vp9_intra_recon_16bpp()

void ff_vp9_intra_recon_16bpp ( VP9TileData td,
ptrdiff_t  y_off,
ptrdiff_t  uv_off 
)

Definition at line 293 of file vp9recon.c.

Referenced by ff_vp9_decode_block().

◆ mc_luma_unscaled()

static av_always_inline void mc_luma_unscaled ( VP9TileData td,
vp9_mc_func(*)  mc[2],
uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t ref,
ptrdiff_t  ref_stride,
ThreadFrame ref_frame,
ptrdiff_t  y,
ptrdiff_t  x,
const VP56mv mv,
int  bw,
int  bh,
int  w,
int  h,
int  bytesperpixel 
)
static

Definition at line 298 of file vp9recon.c.

Referenced by mc_luma_scaled().

◆ mc_chroma_unscaled()

static av_always_inline void mc_chroma_unscaled ( VP9TileData td,
vp9_mc_func(*)  mc[2],
uint8_t dst_u,
uint8_t dst_v,
ptrdiff_t  dst_stride,
const uint8_t ref_u,
ptrdiff_t  src_stride_u,
const uint8_t ref_v,
ptrdiff_t  src_stride_v,
ThreadFrame ref_frame,
ptrdiff_t  y,
ptrdiff_t  x,
const VP56mv mv,
int  bw,
int  bh,
int  w,
int  h,
int  bytesperpixel 
)
static

Definition at line 334 of file vp9recon.c.

Referenced by mc_chroma_scaled().

◆ mc_luma_scaled()

static av_always_inline void mc_luma_scaled ( VP9TileData td,
vp9_scaled_mc_func  smc,
vp9_mc_func(*)  mc[2],
uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t ref,
ptrdiff_t  ref_stride,
ThreadFrame ref_frame,
ptrdiff_t  y,
ptrdiff_t  x,
const VP56mv in_mv,
int  px,
int  py,
int  pw,
int  ph,
int  bw,
int  bh,
int  w,
int  h,
int  bytesperpixel,
const uint16_t *  scale,
const uint8_t step 
)
static

Definition at line 406 of file vp9recon.c.

◆ mc_chroma_scaled()

static av_always_inline void mc_chroma_scaled ( VP9TileData td,
vp9_scaled_mc_func  smc,
vp9_mc_func(*)  mc[2],
uint8_t dst_u,
uint8_t dst_v,
ptrdiff_t  dst_stride,
const uint8_t ref_u,
ptrdiff_t  src_stride_u,
const uint8_t ref_v,
ptrdiff_t  src_stride_v,
ThreadFrame ref_frame,
ptrdiff_t  y,
ptrdiff_t  x,
const VP56mv in_mv,
int  px,
int  py,
int  pw,
int  ph,
int  bw,
int  bh,
int  w,
int  h,
int  bytesperpixel,
const uint16_t *  scale,
const uint8_t step 
)
static

Definition at line 464 of file vp9recon.c.

◆ inter_recon()

static av_always_inline void inter_recon ( VP9TileData td,
int  bytesperpixel 
)
static

Definition at line 569 of file vp9recon.c.

Referenced by ff_vp9_inter_recon_16bpp(), and ff_vp9_inter_recon_8bpp().

◆ ff_vp9_inter_recon_8bpp()

void ff_vp9_inter_recon_8bpp ( VP9TileData td)

Definition at line 646 of file vp9recon.c.

Referenced by ff_vp9_decode_block().

◆ ff_vp9_inter_recon_16bpp()

void ff_vp9_inter_recon_16bpp ( VP9TileData td)

Definition at line 651 of file vp9recon.c.

Referenced by ff_vp9_decode_block().

td
#define td
Definition: regdef.h:70
mv
static const int8_t mv[256][2]
Definition: 4xm.c:77
b
#define b
Definition: input.c:41
val
static double val(void *priv, double ch)
Definition: aeval.c:76
s
#define s(width, name)
Definition: cbs_vp9.c:257
mc_chroma_scaled
static av_always_inline void mc_chroma_scaled(VP9TileData *td, vp9_scaled_mc_func smc, vp9_mc_func(*mc)[2], uint8_t *dst_u, uint8_t *dst_v, ptrdiff_t dst_stride, const uint8_t *ref_u, ptrdiff_t src_stride_u, const uint8_t *ref_v, ptrdiff_t src_stride_v, ThreadFrame *ref_frame, ptrdiff_t y, ptrdiff_t x, const VP56mv *in_mv, int px, int py, int pw, int ph, int bw, int bh, int w, int h, int bytesperpixel, const uint16_t *scale, const uint8_t *step)
Definition: vp9recon.c:464
src
#define src
Definition: vp8dsp.c:254
c
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
mc_luma_unscaled
static av_always_inline void mc_luma_unscaled(VP9TileData *td, vp9_mc_func(*mc)[2], uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *ref, ptrdiff_t ref_stride, ThreadFrame *ref_frame, ptrdiff_t y, ptrdiff_t x, const VP56mv *mv, int bw, int bh, int w, int h, int bytesperpixel)
Definition: vp9recon.c:298
mc_chroma_unscaled
static av_always_inline void mc_chroma_unscaled(VP9TileData *td, vp9_mc_func(*mc)[2], uint8_t *dst_u, uint8_t *dst_v, ptrdiff_t dst_stride, const uint8_t *ref_u, ptrdiff_t src_stride_u, const uint8_t *ref_v, ptrdiff_t src_stride_v, ThreadFrame *ref_frame, ptrdiff_t y, ptrdiff_t x, const VP56mv *mv, int bw, int bh, int w, int h, int bytesperpixel)
Definition: vp9recon.c:334
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:269
mc_luma_scaled
static av_always_inline void mc_luma_scaled(VP9TileData *td, vp9_scaled_mc_func smc, vp9_mc_func(*mc)[2], uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *ref, ptrdiff_t ref_stride, ThreadFrame *ref_frame, ptrdiff_t y, ptrdiff_t x, const VP56mv *in_mv, int px, int py, int pw, int ph, int bw, int bh, int w, int h, int bytesperpixel, const uint16_t *scale, const uint8_t *step)
Definition: vp9recon.c:406
w
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 ug o o w
Definition: fate.txt:150
AV_RN16A
#define AV_RN16A(p)
Definition: intreadwrite.h:522
h
h
Definition: vp9dsp_template.c:2038
mc
#define mc
Definition: vf_colormatrix.c:102