FFmpeg  4.0
Macros | Functions
hevcpred_template.c File Reference
#include "libavutil/pixdesc.h"
#include "bit_depth_template.c"
#include "hevcpred.h"

Go to the source code of this file.

Macros

#define POS(x, y)   src[(x) + stride * (y)]
 
#define PU(x)   ((x) >> s->ps.sps->log2_min_pu_size)
 
#define MVF(x, y)   (s->ref->tab_mvf[(x) + (y) * min_pu_width])
 
#define MVF_PU(x, y)   MVF(PU(x0 + ((x) * (1 << hshift))), PU(y0 + ((y) * (1 << vshift))))
 
#define IS_INTRA(x, y)   (MVF_PU(x, y).pred_flag == PF_INTRA)
 
#define MIN_TB_ADDR_ZS(x, y)   s->ps.pps->min_tb_addr_zs[(y) * (s->ps.sps->tb_mask+2) + (x)]
 
#define EXTEND(ptr, val, len)
 
#define EXTEND_RIGHT_CIP(ptr, start, length)
 
#define EXTEND_LEFT_CIP(ptr, start, length)
 
#define EXTEND_UP_CIP(ptr, start, length)
 
#define EXTEND_DOWN_CIP(ptr, start, length)
 
#define INTRA_PRED(size)
 
#define PRED_PLANAR(size)
 

Functions

static av_always_inline void FUNC() intra_pred (HEVCContext *s, int x0, int y0, int log2_size, int c_idx)
 
static av_always_inline void FUNC() pred_planar (uint8_t *_src, const uint8_t *_top, const uint8_t *_left, ptrdiff_t stride, int trafo_size)
 
static void FUNC() pred_dc (uint8_t *_src, const uint8_t *_top, const uint8_t *_left, ptrdiff_t stride, int log2_size, int c_idx)
 
static av_always_inline void FUNC() pred_angular (uint8_t *_src, const uint8_t *_top, const uint8_t *_left, ptrdiff_t stride, int c_idx, int mode, int size)
 
static void FUNC() pred_angular_0 (uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int c_idx, int mode)
 
static void FUNC() pred_angular_1 (uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int c_idx, int mode)
 
static void FUNC() pred_angular_2 (uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int c_idx, int mode)
 
static void FUNC() pred_angular_3 (uint8_t *src, const uint8_t *top, const uint8_t *left, ptrdiff_t stride, int c_idx, int mode)
 

Macro Definition Documentation

◆ POS

#define POS (   x,
 
)    src[(x) + stride * (y)]

Definition at line 28 of file hevcpred_template.c.

Referenced by intra_pred(), pred_angular(), pred_dc(), and pred_planar().

◆ PU

#define PU (   x)    ((x) >> s->ps.sps->log2_min_pu_size)

Referenced by intra_pred().

◆ MVF

#define MVF (   x,
 
)    (s->ref->tab_mvf[(x) + (y) * min_pu_width])

Referenced by intra_pred().

◆ MVF_PU

#define MVF_PU (   x,
 
)    MVF(PU(x0 + ((x) * (1 << hshift))), PU(y0 + ((y) * (1 << vshift))))

◆ IS_INTRA

#define IS_INTRA (   x,
 
)    (MVF_PU(x, y).pred_flag == PF_INTRA)

◆ 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)]

Referenced by intra_pred().

◆ EXTEND

#define EXTEND (   ptr,
  val,
  len 
)
Value:
do { \
pixel4 pix = PIXEL_SPLAT_X4(val); \
for (i = 0; i < (len); i += 4) \
AV_WN4P(ptr + i, pix); \
} while (0)
const char const char void * val
Definition: avisynth_c.h:771
#define AV_WN4P
int len
#define PIXEL_SPLAT_X4(x)

Referenced by intra_pred().

◆ EXTEND_RIGHT_CIP

#define EXTEND_RIGHT_CIP (   ptr,
  start,
  length 
)
Value:
for (i = start; i < (start) + (length); i += 4) \
if (!IS_INTRA(i, -1)) \
AV_WN4P(&ptr[i], a); \
else \
a = PIXEL_SPLAT_X4(ptr[i+3])
#define AV_WN4P
#define IS_INTRA(x, y)
void INT64 start
Definition: avisynth_c.h:690
const char int length
Definition: avisynth_c.h:768
#define PIXEL_SPLAT_X4(x)

Referenced by intra_pred().

◆ EXTEND_LEFT_CIP

#define EXTEND_LEFT_CIP (   ptr,
  start,
  length 
)
Value:
for (i = start; i > (start) - (length); i--) \
if (!IS_INTRA(i - 1, -1)) \
ptr[i - 1] = ptr[i]
#define IS_INTRA(x, y)
void INT64 start
Definition: avisynth_c.h:690
const char int length
Definition: avisynth_c.h:768

Referenced by intra_pred().

◆ EXTEND_UP_CIP

#define EXTEND_UP_CIP (   ptr,
  start,
  length 
)
Value:
for (i = (start); i > (start) - (length); i -= 4) \
if (!IS_INTRA(-1, i - 3)) \
AV_WN4P(&ptr[i - 3], a); \
else \
a = PIXEL_SPLAT_X4(ptr[i - 3])
#define AV_WN4P
#define IS_INTRA(x, y)
void INT64 start
Definition: avisynth_c.h:690
const char int length
Definition: avisynth_c.h:768
#define PIXEL_SPLAT_X4(x)

Referenced by intra_pred().

◆ EXTEND_DOWN_CIP

#define EXTEND_DOWN_CIP (   ptr,
  start,
  length 
)
Value:
for (i = start; i < (start) + (length); i += 4) \
if (!IS_INTRA(-1, i)) \
AV_WN4P(&ptr[i], a); \
else \
a = PIXEL_SPLAT_X4(ptr[i + 3])
#define AV_WN4P
#define IS_INTRA(x, y)
void INT64 start
Definition: avisynth_c.h:690
const char int length
Definition: avisynth_c.h:768
#define PIXEL_SPLAT_X4(x)

Referenced by intra_pred().

◆ INTRA_PRED

#define INTRA_PRED (   size)
Value:
static void FUNC(intra_pred_ ## size)(HEVCContext *s, int x0, int y0, int c_idx) \
{ \
FUNC(intra_pred)(s, x0, y0, size, c_idx); \
}
const char * s
Definition: avisynth_c.h:768
int size
#define FUNC(a)
static av_always_inline void FUNC() intra_pred(HEVCContext *s, int x0, int y0, int log2_size, int c_idx)

Definition at line 347 of file hevcpred_template.c.

◆ PRED_PLANAR

#define PRED_PLANAR (   size)
Value:
static void FUNC(pred_planar_ ## size)(uint8_t *src, const uint8_t *top, \
const uint8_t *left, ptrdiff_t stride) \
{ \
FUNC(pred_planar)(src, top, left, stride, size + 2); \
}
int size
#define src
Definition: vp8dsp.c:254
int stride
Definition: mace.c:144
uint8_t
#define FUNC(a)
static av_always_inline void FUNC() pred_planar(uint8_t *_src, const uint8_t *_top, const uint8_t *_left, ptrdiff_t stride, int trafo_size)

Definition at line 375 of file hevcpred_template.c.

Function Documentation

◆ intra_pred()

static av_always_inline void FUNC() intra_pred ( HEVCContext s,
int  x0,
int  y0,
int  log2_size,
int  c_idx 
)
static

Definition at line 30 of file hevcpred_template.c.

◆ pred_planar()

static av_always_inline void FUNC() pred_planar ( uint8_t _src,
const uint8_t _top,
const uint8_t _left,
ptrdiff_t  stride,
int  trafo_size 
)
static

Definition at line 360 of file hevcpred_template.c.

◆ pred_dc()

static void FUNC() pred_dc ( uint8_t _src,
const uint8_t _top,
const uint8_t _left,
ptrdiff_t  stride,
int  log2_size,
int  c_idx 
)
static

Definition at line 389 of file hevcpred_template.c.

Referenced by ff_h263_encode_mb(), ff_h263_pred_acdc(), and ff_h263_pred_dc().

◆ pred_angular()

static av_always_inline void FUNC() pred_angular ( uint8_t _src,
const uint8_t _top,
const uint8_t _left,
ptrdiff_t  stride,
int  c_idx,
int  mode,
int  size 
)
static

◆ pred_angular_0()

static void FUNC() pred_angular_0 ( uint8_t src,
const uint8_t top,
const uint8_t left,
ptrdiff_t  stride,
int  c_idx,
int  mode 
)
static

Definition at line 513 of file hevcpred_template.c.

◆ pred_angular_1()

static void FUNC() pred_angular_1 ( uint8_t src,
const uint8_t top,
const uint8_t left,
ptrdiff_t  stride,
int  c_idx,
int  mode 
)
static

Definition at line 520 of file hevcpred_template.c.

◆ pred_angular_2()

static void FUNC() pred_angular_2 ( uint8_t src,
const uint8_t top,
const uint8_t left,
ptrdiff_t  stride,
int  c_idx,
int  mode 
)
static

Definition at line 527 of file hevcpred_template.c.

◆ pred_angular_3()

static void FUNC() pred_angular_3 ( uint8_t src,
const uint8_t top,
const uint8_t left,
ptrdiff_t  stride,
int  c_idx,
int  mode 
)
static

Definition at line 534 of file hevcpred_template.c.