FFmpeg
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Typedefs | Functions | Variables
dsputil.h File Reference

DSP utils. More...

#include "libavutil/intreadwrite.h"
#include "avcodec.h"

Go to the source code of this file.

Data Structures

struct  ScanTable
 Scantable. More...
 
struct  DSPContext
 DSPContext. More...
 

Macros

#define MAX_NEG_CROP   1024
 
#define PUTAVG_PIXELS(depth)
 
#define ff_put_pixels8x8_c   ff_put_pixels8x8_8_c
 
#define ff_avg_pixels8x8_c   ff_avg_pixels8x8_8_c
 
#define ff_put_pixels16x16_c   ff_put_pixels16x16_8_c
 
#define ff_avg_pixels16x16_c   ff_avg_pixels16x16_8_c
 
#define DEF_OLD_QPEL(name)
 
#define CALL_2X_PIXELS(a, b, n)
 
#define FF_NO_IDCT_PERM   1
 
#define FF_LIBMPEG2_IDCT_PERM   2
 
#define FF_SIMPLE_IDCT_PERM   3
 
#define FF_TRANSPOSE_IDCT_PERM   4
 
#define FF_PARTTRANS_IDCT_PERM   5
 
#define FF_SSE2_IDCT_PERM   6
 
#define BASIS_SHIFT   16
 
#define RECON_SHIFT   6
 
#define EDGE_WIDTH   16
 
#define EDGE_TOP   1
 
#define EDGE_BOTTOM   2
 

Typedefs

typedef void(* op_pixels_func )(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)
 
typedef void(* tpel_mc_func )(uint8_t *block, const uint8_t *pixels, int line_size, int w, int h)
 
typedef void(* qpel_mc_func )(uint8_t *dst, uint8_t *src, int stride)
 
typedef void(* op_fill_func )(uint8_t *block, uint8_t value, int line_size, int h)
 
typedef int(* me_cmp_func )(void *s, uint8_t *blk1, uint8_t *blk2, int line_size, int h)
 

Functions

void ff_put_rv40_qpel16_mc33_c (uint8_t *dst, uint8_t *src, int stride)
 
void ff_avg_rv40_qpel16_mc33_c (uint8_t *dst, uint8_t *src, int stride)
 
void ff_put_rv40_qpel8_mc33_c (uint8_t *dst, uint8_t *src, int stride)
 
void ff_avg_rv40_qpel8_mc33_c (uint8_t *dst, uint8_t *src, int stride)
 
void ff_gmc_c (uint8_t *dst, uint8_t *src, int stride, int h, int ox, int oy, int dxx, int dxy, int dyx, int dyy, int shift, int r, int width, int height)
 
void ff_init_scantable (uint8_t *, ScanTable *st, const uint8_t *src_scantable)
 
void ff_init_scantable_permutation (uint8_t *idct_permutation, int idct_permutation_type)
 
void ff_dsputil_static_init (void)
 
void ff_dsputil_init (DSPContext *p, AVCodecContext *avctx)
 
attribute_deprecated void dsputil_init (DSPContext *c, AVCodecContext *avctx)
 
int ff_check_alignment (void)
 
void ff_set_cmp (DSPContext *c, me_cmp_func *cmp, int type)
 
void ff_dsputil_init_alpha (DSPContext *c, AVCodecContext *avctx)
 
void ff_dsputil_init_arm (DSPContext *c, AVCodecContext *avctx)
 
void ff_dsputil_init_bfin (DSPContext *c, AVCodecContext *avctx)
 
void ff_dsputil_init_mmx (DSPContext *c, AVCodecContext *avctx)
 
void ff_dsputil_init_ppc (DSPContext *c, AVCodecContext *avctx)
 
void ff_dsputil_init_sh4 (DSPContext *c, AVCodecContext *avctx)
 
void ff_dsputil_init_vis (DSPContext *c, AVCodecContext *avctx)
 
void ff_dsputil_init_dwt (DSPContext *c)
 

Variables

const uint8_t ff_alternate_horizontal_scan [64]
 
const uint8_t ff_alternate_vertical_scan [64]
 
const uint8_t ff_zigzag_direct [64]
 
const uint8_t ff_zigzag248_direct [64]
 
uint32_t ff_squareTbl [512]
 
const uint8_t ff_cropTbl [256+2 *MAX_NEG_CROP]
 

Detailed Description

DSP utils.

note, many functions in here may use MMX which trashes the FPU state, it is absolutely necessary to call emms_c() between dsp & float/double code

Definition in file dsputil.h.

Macro Definition Documentation

#define MAX_NEG_CROP   1024
#define PUTAVG_PIXELS (   depth)
Value:
void ff_put_pixels8x8_ ## depth ## _c(uint8_t *dst, uint8_t *src, int stride);\
void ff_avg_pixels8x8_ ## depth ## _c(uint8_t *dst, uint8_t *src, int stride);\
void ff_put_pixels16x16_ ## depth ## _c(uint8_t *dst, uint8_t *src, int stride);\
void ff_avg_pixels16x16_ ## depth ## _c(uint8_t *dst, uint8_t *src, int stride);

Definition at line 52 of file dsputil.h.

#define ff_put_pixels8x8_c   ff_put_pixels8x8_8_c

Definition at line 64 of file dsputil.h.

Referenced by ff_dsputil_init().

#define ff_avg_pixels8x8_c   ff_avg_pixels8x8_8_c

Definition at line 65 of file dsputil.h.

#define ff_put_pixels16x16_c   ff_put_pixels16x16_8_c

Definition at line 66 of file dsputil.h.

#define ff_avg_pixels16x16_c   ff_avg_pixels16x16_8_c

Definition at line 67 of file dsputil.h.

#define DEF_OLD_QPEL (   name)
Value:
void ff_put_ ## name (uint8_t *dst/*align width (8 or 16)*/, uint8_t *src/*align 1*/, int stride);\
void ff_put_no_rnd_ ## name (uint8_t *dst/*align width (8 or 16)*/, uint8_t *src/*align 1*/, int stride);\
void ff_avg_ ## name (uint8_t *dst/*align width (8 or 16)*/, uint8_t *src/*align 1*/, int stride);

Definition at line 100 of file dsputil.h.

#define CALL_2X_PIXELS (   a,
  b,
 
)
Value:
static void a(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h){\
b(block , pixels , line_size, h);\
b(block+n, pixels+n, line_size, h);\
}

Definition at line 118 of file dsputil.h.

#define FF_NO_IDCT_PERM   1
#define FF_LIBMPEG2_IDCT_PERM   2
#define FF_SIMPLE_IDCT_PERM   3
#define FF_TRANSPOSE_IDCT_PERM   4
#define FF_PARTTRANS_IDCT_PERM   5
#define FF_SSE2_IDCT_PERM   6
#define BASIS_SHIFT   16
#define RECON_SHIFT   6
#define EDGE_WIDTH   16
#define EDGE_TOP   1
#define EDGE_BOTTOM   2

Typedef Documentation

typedef void(* op_pixels_func)(uint8_t *block, const uint8_t *pixels, ptrdiff_t line_size, int h)

Definition at line 94 of file dsputil.h.

typedef void(* tpel_mc_func)(uint8_t *block, const uint8_t *pixels, int line_size, int w, int h)

Definition at line 95 of file dsputil.h.

typedef void(* qpel_mc_func)(uint8_t *dst, uint8_t *src, int stride)

Definition at line 96 of file dsputil.h.

typedef void(* op_fill_func)(uint8_t *block, uint8_t value, int line_size, int h)

Definition at line 98 of file dsputil.h.

typedef int(* me_cmp_func)(void *s, uint8_t *blk1, uint8_t *blk2, int line_size, int h)

Definition at line 127 of file dsputil.h.

Function Documentation

void ff_put_rv40_qpel16_mc33_c ( uint8_t dst,
uint8_t src,
int  stride 
)

Referenced by ff_rv40dsp_init().

void ff_avg_rv40_qpel16_mc33_c ( uint8_t dst,
uint8_t src,
int  stride 
)

Referenced by ff_rv40dsp_init().

void ff_put_rv40_qpel8_mc33_c ( uint8_t dst,
uint8_t src,
int  stride 
)

Referenced by ff_rv40dsp_init().

void ff_avg_rv40_qpel8_mc33_c ( uint8_t dst,
uint8_t src,
int  stride 
)

Referenced by ff_rv40dsp_init().

void ff_gmc_c ( uint8_t dst,
uint8_t src,
int  stride,
int  h,
int  ox,
int  oy,
int  dxx,
int  dxy,
int  dyx,
int  dyy,
int  shift,
int  r,
int  width,
int  height 
)

Definition at line 558 of file dsputil.c.

Referenced by ff_dsputil_init().

void ff_init_scantable ( uint8_t ,
ScanTable st,
const uint8_t src_scantable 
)
void ff_init_scantable_permutation ( uint8_t idct_permutation,
int  idct_permutation_type 
)
void ff_dsputil_static_init ( void  )

Definition at line 2613 of file dsputil.c.

Referenced by avcodec_init().

void ff_dsputil_init ( DSPContext p,
AVCodecContext avctx 
)
attribute_deprecated void dsputil_init ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 2937 of file dsputil.c.

Referenced by config_input(), config_props(), and init().

int ff_check_alignment ( void  )

Definition at line 2624 of file dsputil.c.

Referenced by encode_thread(), estimate_motion_thread(), ff_dsputil_init(), and mb_var_thread().

void ff_set_cmp ( DSPContext c,
me_cmp_func cmp,
int  type 
)

Definition at line 1838 of file dsputil.c.

Referenced by encode_init(), ff_dvvideo_init(), ff_init_me(), and ff_MPV_encode_init().

void ff_dsputil_init_alpha ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 272 of file dsputil_alpha.c.

Referenced by ff_dsputil_init().

void ff_dsputil_init_arm ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 77 of file dsputil_init_arm.c.

Referenced by ff_dsputil_init().

void ff_dsputil_init_bfin ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 199 of file dsputil_bfin.c.

Referenced by ff_dsputil_init().

void ff_dsputil_init_mmx ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 1827 of file dsputil_mmx.c.

Referenced by ff_dsputil_init().

void ff_dsputil_init_ppc ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 140 of file dsputil_ppc.c.

Referenced by ff_dsputil_init().

void ff_dsputil_init_sh4 ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 93 of file dsputil_sh4.c.

Referenced by ff_dsputil_init().

void ff_dsputil_init_vis ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 3498 of file dsputil_vis.c.

Referenced by ff_dsputil_init().

void ff_dsputil_init_dwt ( DSPContext c)

Definition at line 847 of file snow_dwt.c.

Referenced by ff_dsputil_init().

Variable Documentation

const uint8_t ff_alternate_horizontal_scan[64]

Definition at line 86 of file dsputil.c.

Referenced by decode_vop_header(), and ff_dct_common_init().

const uint8_t ff_alternate_vertical_scan[64]
const uint8_t ff_zigzag_direct[64]
const uint8_t ff_zigzag248_direct[64]

Definition at line 72 of file dsputil.c.

Referenced by dv_init_enc_block(), and ff_dvvideo_init().

uint32_t ff_squareTbl[512]

Definition at line 45 of file dsputil.c.

Referenced by ff_dsputil_static_init(), pix_norm1(), pix_norm1_c(), sse(), sse16_c(), sse4_c(), and sse8_c().

const uint8_t ff_cropTbl[256+2 *MAX_NEG_CROP]

Definition at line 93 of file mathtables.c.