FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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(s, mc, dst, dst_ls, src, src_ls, tref, row, col, mv, px, py, pw, ph, bw, bh, w, h, i)
 
#define mc_chroma_dir(s, 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(s, mc, dst, dst_ls, src, src_ls, tref, row, col, mv, px, py, pw, ph, bw, bh, w, h, i)
 
#define mc_chroma_dir(s, 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 (VP9Context *s, 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 (AVCodecContext *avctx, ptrdiff_t y_off, ptrdiff_t uv_off, int bytesperpixel)
 
void ff_vp9_intra_recon_8bpp (AVCodecContext *avctx, ptrdiff_t y_off, ptrdiff_t uv_off)
 
void ff_vp9_intra_recon_16bpp (AVCodecContext *avctx, ptrdiff_t y_off, ptrdiff_t uv_off)
 
static av_always_inline void mc_luma_unscaled (VP9Context *s, 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 (VP9Context *s, 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 (VP9Context *s, 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 (VP9Context *s, 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 (AVCodecContext *avctx, int bytesperpixel)
 
void ff_vp9_inter_recon_8bpp (AVCodecContext *avctx)
 
void ff_vp9_inter_recon_16bpp (AVCodecContext *avctx)
 

Macro Definition Documentation

#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)
const char const char void * val
Definition: avisynth_c.h:771
int n
Definition: avisynth_c.h:684
#define AV_WN16A(p, v)
Definition: intreadwrite.h:539
int
if(ret< 0)
Definition: vf_mcdeint.c:282
static double c[64]
#define AV_RN16A(p)
Definition: intreadwrite.h:527
for(j=16;j >0;--j)

Referenced by check_intra_mode().

#define memset_val (   c,
  val,
  num 
)
Value:
do { \
if (bytesperpixel == 1) { \
memset((c), (val), (num)); \
} else { \
for (n = 0; n < (num); n++) { \
AV_WN16A(&(c)[n * 2], (val)); \
} \
} \
} while (0)
const char const char void * val
Definition: avisynth_c.h:771
int n
Definition: avisynth_c.h:684
#define AV_WN16A(p, v)
Definition: intreadwrite.h:539
int
if(ret< 0)
Definition: vf_mcdeint.c:282
static double c[64]
for(j=16;j >0;--j)

Referenced by check_intra_mode().

#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)
#define AV_COPY16(d, s)
Definition: intreadwrite.h:587
if(ret< 0)
Definition: vf_mcdeint.c:282
static double c[64]

Referenced by check_intra_mode().

#define assign_val (   c,
  i,
 
)
Value:
do { \
if (bytesperpixel == 1) { \
(c)[(i)] = (v); \
} else { \
AV_WN16A(&(c)[(i) * 2], (v)); \
} \
} while (0)
#define AV_WN16A(p, v)
Definition: intreadwrite.h:539
if(ret< 0)
Definition: vf_mcdeint.c:282
static double c[64]

Referenced by check_intra_mode().

#define mc_luma_dir (   s,
  mc,
  dst,
  dst_ls,
  src,
  src_ls,
  tref,
  row,
  col,
  mv,
  px,
  py,
  pw,
  ph,
  bw,
  bh,
  w,
  h,
 
)
Value:
mc_luma_unscaled(s, s->dsp.mc, dst, dst_ls, src, src_ls, tref, row, col, \
mv, bw, bh, w, h, bytesperpixel)
const char * s
Definition: avisynth_c.h:768
#define src
Definition: vp8dsp.c:254
static av_always_inline void mc_luma_unscaled(VP9Context *s, 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:297
static const int8_t mv[256][2]
Definition: 4xm.c:77

Definition at line 539 of file vp9recon.c.

Referenced by inter_pred().

#define mc_chroma_dir (   s,
  mc,
  dstu,
  dstv,
  dst_ls,
  srcu,
  srcu_ls,
  srcv,
  srcv_ls,
  tref,
  row,
  col,
  mv,
  px,
  py,
  pw,
  ph,
  bw,
  bh,
  w,
  h,
 
)
Value:
mc_chroma_unscaled(s, s->dsp.mc, dstu, dstv, dst_ls, srcu, srcu_ls, srcv, srcv_ls, tref, \
row, col, mv, bw, bh, w, h, bytesperpixel)
const char * s
Definition: avisynth_c.h:768
static av_always_inline void mc_chroma_unscaled(VP9Context *s, 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:332
static const int8_t mv[256][2]
Definition: 4xm.c:77

Definition at line 544 of file vp9recon.c.

Referenced by inter_pred().

#define SCALED   0

Definition at line 549 of file vp9recon.c.

#define FN (   x)    x##_8bpp

Definition at line 555 of file vp9recon.c.

#define BYTES_PER_PIXEL   1

Definition at line 556 of file vp9recon.c.

Referenced by inter_pred().

#define FN (   x)    x##_16bpp

Definition at line 555 of file vp9recon.c.

#define BYTES_PER_PIXEL   2

Definition at line 556 of file vp9recon.c.

#define scale_mv (   n,
  dim 
)    (((int64_t)(n) * scale[dim]) >> 14)
#define mc_luma_dir (   s,
  mc,
  dst,
  dst_ls,
  src,
  src_ls,
  tref,
  row,
  col,
  mv,
  px,
  py,
  pw,
  ph,
  bw,
  bh,
  w,
  h,
 
)
Value:
mc_luma_scaled(s, 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]])
const char * s
Definition: avisynth_c.h:768
const char * b
Definition: vf_curves.c:113
static av_always_inline void mc_luma_scaled(VP9Context *s, 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:403
#define src
Definition: vp8dsp.c:254
#define mc
static const int8_t mv[256][2]
Definition: 4xm.c:77

Definition at line 539 of file vp9recon.c.

#define mc_chroma_dir (   s,
  mc,
  dstu,
  dstv,
  dst_ls,
  srcu,
  srcu_ls,
  srcv,
  srcv_ls,
  tref,
  row,
  col,
  mv,
  px,
  py,
  pw,
  ph,
  bw,
  bh,
  w,
  h,
 
)
Value:
mc_chroma_scaled(s, 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]])
const char * s
Definition: avisynth_c.h:768
const char * b
Definition: vf_curves.c:113
#define mc
static const int8_t mv[256][2]
Definition: 4xm.c:77
static av_always_inline void mc_chroma_scaled(VP9Context *s, 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:460

Definition at line 544 of file vp9recon.c.

#define SCALED   1

Definition at line 549 of file vp9recon.c.

#define FN (   x)    x##_scaled_8bpp

Definition at line 555 of file vp9recon.c.

#define BYTES_PER_PIXEL   1

Definition at line 556 of file vp9recon.c.

#define FN (   x)    x##_scaled_16bpp

Definition at line 555 of file vp9recon.c.

#define BYTES_PER_PIXEL   2

Definition at line 556 of file vp9recon.c.

Function Documentation

static av_always_inline int check_intra_mode ( VP9Context s,
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().

static av_always_inline void intra_recon ( AVCodecContext avctx,
ptrdiff_t  y_off,
ptrdiff_t  uv_off,
int  bytesperpixel 
)
static

Definition at line 217 of file vp9recon.c.

Referenced by ff_vp9_intra_recon_16bpp(), and ff_vp9_intra_recon_8bpp().

void ff_vp9_intra_recon_8bpp ( AVCodecContext avctx,
ptrdiff_t  y_off,
ptrdiff_t  uv_off 
)

Definition at line 287 of file vp9recon.c.

Referenced by ff_vp9_decode_block().

void ff_vp9_intra_recon_16bpp ( AVCodecContext avctx,
ptrdiff_t  y_off,
ptrdiff_t  uv_off 
)

Definition at line 292 of file vp9recon.c.

Referenced by ff_vp9_decode_block().

static av_always_inline void mc_luma_unscaled ( VP9Context s,
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 297 of file vp9recon.c.

Referenced by mc_luma_scaled().

static av_always_inline void mc_chroma_unscaled ( VP9Context s,
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 332 of file vp9recon.c.

Referenced by mc_chroma_scaled().

static av_always_inline void mc_luma_scaled ( VP9Context s,
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 403 of file vp9recon.c.

static av_always_inline void mc_chroma_scaled ( VP9Context s,
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 460 of file vp9recon.c.

static av_always_inline void inter_recon ( AVCodecContext avctx,
int  bytesperpixel 
)
static

Definition at line 564 of file vp9recon.c.

Referenced by ff_vp9_inter_recon_16bpp(), and ff_vp9_inter_recon_8bpp().

void ff_vp9_inter_recon_8bpp ( AVCodecContext avctx)

Definition at line 631 of file vp9recon.c.

Referenced by ff_vp9_decode_block().

void ff_vp9_inter_recon_16bpp ( AVCodecContext avctx)

Definition at line 636 of file vp9recon.c.

Referenced by ff_vp9_decode_block().