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

DSP utils. More...

#include "libavutil/imgutils.h"
#include "libavutil/internal.h"
#include "avcodec.h"
#include "copy_block.h"
#include "dct.h"
#include "dsputil.h"
#include "simple_idct.h"
#include "faandct.h"
#include "faanidct.h"
#include "imgconvert.h"
#include "mathops.h"
#include "mpegvideo.h"
#include "config.h"
#include "diracdsp.h"
#include "dsputil_template.c"

Go to the source code of this file.

Macros

#define BIT_DEPTH   9
 
#define BIT_DEPTH   10
 
#define BIT_DEPTH   12
 
#define BIT_DEPTH   14
 
#define BIT_DEPTH   8
 
#define pb_7f   (~0UL/255 * 0x7f)
 
#define pb_80   (~0UL/255 * 0x80)
 
#define avg2(a, b)   ((a+b+1)>>1)
 
#define avg4(a, b, c, d)   ((a+b+c+d+2)>>2)
 
#define QPEL_MC(r, OPNAME, RND, OP)
 
#define op_avg(a, b)   a = (((a)+cm[((b) + 16)>>5]+1)>>1)
 
#define op_avg_no_rnd(a, b)   a = (((a)+cm[((b) + 15)>>5])>>1)
 
#define op_put(a, b)   a = cm[((b) + 16)>>5]
 
#define op_put_no_rnd(a, b)   a = cm[((b) + 15)>>5]
 
#define put_qpel8_mc00_c   ff_put_pixels8x8_c
 
#define avg_qpel8_mc00_c   ff_avg_pixels8x8_c
 
#define put_qpel16_mc00_c   ff_put_pixels16x16_c
 
#define avg_qpel16_mc00_c   ff_avg_pixels16x16_c
 
#define put_no_rnd_qpel8_mc00_c   ff_put_pixels8x8_c
 
#define put_no_rnd_qpel16_mc00_c   ff_put_pixels16x16_8_c
 
#define B   0
 
#define G   1
 
#define R   2
 
#define A   3
 
#define BUTTERFLY2(o1, o2, i1, i2)
 
#define BUTTERFLY1(x, y)
 
#define BUTTERFLYA(x, y)   (FFABS((x)+(y)) + FFABS((x)-(y)))
 
#define VSAD_INTRA(size)
 
#define SQ(a)   ((a)*(a))
 
#define VSSE_INTRA(size)
 
#define WRAPPER8_16_SQ(name8, name16)
 
#define dspfunc(PFX, IDX, NUM)
 
#define SET_CMP_FUNC(name)
 
#define hpel_funcs(prefix, idx, num)
 
#define FUNC(f, depth)   f ## _ ## depth
 
#define FUNCC(f, depth)   f ## _ ## depth ## _c
 
#define BIT_DEPTH_FUNCS(depth, dct)
 

Functions

void ff_init_scantable (uint8_t *permutation, ScanTable *st, const uint8_t *src_scantable)
 
void ff_init_scantable_permutation (uint8_t *idct_permutation, int idct_permutation_type)
 
static int pix_sum_c (uint8_t *pix, int line_size)
 
static int pix_norm1_c (uint8_t *pix, int line_size)
 
static void bswap_buf (uint32_t *dst, const uint32_t *src, int w)
 
static void bswap16_buf (uint16_t *dst, const uint16_t *src, int len)
 
static int sse4_c (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int sse8_c (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int sse16_c (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static void diff_pixels_c (int16_t *av_restrict block, const uint8_t *s1, const uint8_t *s2, int stride)
 
static void put_pixels_clamped_c (const int16_t *block, uint8_t *av_restrict pixels, int line_size)
 
static void put_pixels_clamped4_c (const int16_t *block, uint8_t *av_restrict pixels, int line_size)
 
static void put_pixels_clamped2_c (const int16_t *block, uint8_t *av_restrict pixels, int line_size)
 
static void put_signed_pixels_clamped_c (const int16_t *block, uint8_t *av_restrict pixels, int line_size)
 
static void add_pixels8_c (uint8_t *av_restrict pixels, int16_t *block, int line_size)
 
static void add_pixels_clamped_c (const int16_t *block, uint8_t *av_restrict pixels, int line_size)
 
static void add_pixels_clamped4_c (const int16_t *block, uint8_t *av_restrict pixels, int line_size)
 
static void add_pixels_clamped2_c (const int16_t *block, uint8_t *av_restrict pixels, int line_size)
 
static int sum_abs_dctelem_c (int16_t *block)
 
static void fill_block16_c (uint8_t *block, uint8_t value, int line_size, int h)
 
static void fill_block8_c (uint8_t *block, uint8_t value, int line_size, int h)
 
static void gmc1_c (uint8_t *dst, uint8_t *src, int stride, int h, int x16, int y16, int rounder)
 
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)
 
static void put_tpel_pixels_mc00_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void put_tpel_pixels_mc10_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void put_tpel_pixels_mc20_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void put_tpel_pixels_mc01_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void put_tpel_pixels_mc11_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void put_tpel_pixels_mc12_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void put_tpel_pixels_mc02_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void put_tpel_pixels_mc21_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void put_tpel_pixels_mc22_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void avg_tpel_pixels_mc00_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void avg_tpel_pixels_mc10_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void avg_tpel_pixels_mc20_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void avg_tpel_pixels_mc01_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void avg_tpel_pixels_mc11_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void avg_tpel_pixels_mc12_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void avg_tpel_pixels_mc02_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void avg_tpel_pixels_mc21_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void avg_tpel_pixels_mc22_c (uint8_t *dst, const uint8_t *src, int stride, int width, int height)
 
static void wmv2_mspel8_h_lowpass (uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h)
 
static void wmv2_mspel8_v_lowpass (uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int w)
 
static void put_mspel8_mc10_c (uint8_t *dst, uint8_t *src, int stride)
 
static void put_mspel8_mc20_c (uint8_t *dst, uint8_t *src, int stride)
 
static void put_mspel8_mc30_c (uint8_t *dst, uint8_t *src, int stride)
 
static void put_mspel8_mc02_c (uint8_t *dst, uint8_t *src, int stride)
 
static void put_mspel8_mc12_c (uint8_t *dst, uint8_t *src, int stride)
 
static void put_mspel8_mc32_c (uint8_t *dst, uint8_t *src, int stride)
 
static void put_mspel8_mc22_c (uint8_t *dst, uint8_t *src, int stride)
 
static void h263_v_loop_filter_c (uint8_t *src, int stride, int qscale)
 
static void h263_h_loop_filter_c (uint8_t *src, int stride, int qscale)
 
static void h261_loop_filter_c (uint8_t *src, int stride)
 
static int pix_abs16_c (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int pix_abs16_x2_c (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int pix_abs16_y2_c (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int pix_abs16_xy2_c (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int pix_abs8_c (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int pix_abs8_x2_c (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int pix_abs8_y2_c (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int pix_abs8_xy2_c (void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h)
 
static int nsse16_c (void *v, uint8_t *s1, uint8_t *s2, int stride, int h)
 
static int nsse8_c (void *v, uint8_t *s1, uint8_t *s2, int stride, int h)
 
static int try_8x8basis_c (int16_t rem[64], int16_t weight[64], int16_t basis[64], int scale)
 
static void add_8x8basis_c (int16_t rem[64], int16_t basis[64], int scale)
 
static int zero_cmp (void *s, uint8_t *a, uint8_t *b, int stride, int h)
 
void ff_set_cmp (DSPContext *c, me_cmp_func *cmp, int type)
 
static void add_bytes_c (uint8_t *dst, uint8_t *src, int w)
 
static void diff_bytes_c (uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w)
 
static void add_hfyu_median_prediction_c (uint8_t *dst, const uint8_t *src1, const uint8_t *diff, int w, int *left, int *left_top)
 
static void sub_hfyu_median_prediction_c (uint8_t *dst, const uint8_t *src1, const uint8_t *src2, int w, int *left, int *left_top)
 
static int add_hfyu_left_prediction_c (uint8_t *dst, const uint8_t *src, int w, int acc)
 
static void add_hfyu_left_prediction_bgr32_c (uint8_t *dst, const uint8_t *src, int w, int *red, int *green, int *blue, int *alpha)
 
static int hadamard8_diff8x8_c (void *s, uint8_t *dst, uint8_t *src, int stride, int h)
 
static int hadamard8_intra8x8_c (void *s, uint8_t *src, uint8_t *dummy, int stride, int h)
 
static int dct_sad8x8_c (void *c, uint8_t *src1, uint8_t *src2, int stride, int h)
 
static int dct_max8x8_c (void *c, uint8_t *src1, uint8_t *src2, int stride, int h)
 
static int quant_psnr8x8_c (void *c, uint8_t *src1, uint8_t *src2, int stride, int h)
 
static int rd8x8_c (void *c, uint8_t *src1, uint8_t *src2, int stride, int h)
 
static int bit8x8_c (void *c, uint8_t *src1, uint8_t *src2, int stride, int h)
 
static int vsad16_c (void *c, uint8_t *s1, uint8_t *s2, int stride, int h)
 
static int vsse16_c (void *c, uint8_t *s1, uint8_t *s2, int stride, int h)
 
static int ssd_int8_vs_int16_c (const int8_t *pix1, const int16_t *pix2, int size)
 
static uint32_t clipf_c_one (uint32_t a, uint32_t mini, uint32_t maxi, uint32_t maxisign)
 
static void vector_clipf_c_opposite_sign (float *dst, const float *src, float *min, float *max, int len)
 
static void vector_clipf_c (float *dst, const float *src, float min, float max, int len)
 
static int32_t scalarproduct_int16_c (const int16_t *v1, const int16_t *v2, int order)
 
static int32_t scalarproduct_and_madd_int16_c (int16_t *v1, const int16_t *v2, const int16_t *v3, int order, int mul)
 
static void apply_window_int16_c (int16_t *output, const int16_t *input, const int16_t *window, unsigned int len)
 
static void vector_clip_int32_c (int32_t *dst, const int32_t *src, int32_t min, int32_t max, unsigned int len)
 
static void ff_jref_idct_put (uint8_t *dest, int line_size, int16_t *block)
 
static void ff_jref_idct_add (uint8_t *dest, int line_size, int16_t *block)
 
static void ff_jref_idct4_put (uint8_t *dest, int line_size, int16_t *block)
 
static void ff_jref_idct4_add (uint8_t *dest, int line_size, int16_t *block)
 
static void ff_jref_idct2_put (uint8_t *dest, int line_size, int16_t *block)
 
static void ff_jref_idct2_add (uint8_t *dest, int line_size, int16_t *block)
 
static void ff_jref_idct1_put (uint8_t *dest, int line_size, int16_t *block)
 
static void ff_jref_idct1_add (uint8_t *dest, int line_size, int16_t *block)
 
av_cold void ff_dsputil_static_init (void)
 
int ff_check_alignment (void)
 
av_cold void ff_dsputil_init (DSPContext *c, AVCodecContext *avctx)
 
av_cold void dsputil_init (DSPContext *c, AVCodecContext *avctx)
 

Variables

uint32_t ff_squareTbl [512] = {0, }
 
const uint8_t ff_zigzag248_direct [64]
 
uint16_t ff_inv_zigzag_direct16 [64]
 
const uint8_t ff_alternate_horizontal_scan [64]
 
const uint8_t ff_alternate_vertical_scan [64]
 
static const uint8_t simple_mmx_permutation [64]
 
static const uint8_t idct_sse2_row_perm [8] = {0, 4, 1, 5, 2, 6, 3, 7}
 

Detailed Description

DSP utils.

Definition in file dsputil.c.

Macro Definition Documentation

#define BIT_DEPTH   9

Definition at line 63 of file dsputil.c.

#define BIT_DEPTH   10

Definition at line 63 of file dsputil.c.

#define BIT_DEPTH   12

Definition at line 63 of file dsputil.c.

#define BIT_DEPTH   14

Definition at line 63 of file dsputil.c.

#define BIT_DEPTH   8

Definition at line 63 of file dsputil.c.

#define pb_7f   (~0UL/255 * 0x7f)

Definition at line 67 of file dsputil.c.

Referenced by add_bytes_c(), and diff_bytes_c().

#define pb_80   (~0UL/255 * 0x80)

Definition at line 68 of file dsputil.c.

Referenced by add_bytes_c(), and diff_bytes_c().

#define avg2 (   a,
  b 
)    ((a+b+1)>>1)

Definition at line 532 of file dsputil.c.

Referenced by pix_abs16_x2_c(), pix_abs16_y2_c(), pix_abs8_x2_c(), and pix_abs8_y2_c().

#define avg4 (   a,
  b,
  c,
 
)    ((a+b+c+d+2)>>2)

Definition at line 533 of file dsputil.c.

Referenced by pix_abs16_xy2_c(), and pix_abs8_xy2_c().

#define QPEL_MC (   r,
  OPNAME,
  RND,
  OP 
)

Definition at line 810 of file dsputil.c.

#define op_avg (   a,
  b 
)    a = (((a)+cm[((b) + 16)>>5]+1)>>1)

Definition at line 1286 of file dsputil.c.

#define op_avg_no_rnd (   a,
  b 
)    a = (((a)+cm[((b) + 15)>>5])>>1)

Definition at line 1287 of file dsputil.c.

#define op_put (   a,
  b 
)    a = cm[((b) + 16)>>5]

Definition at line 1288 of file dsputil.c.

#define op_put_no_rnd (   a,
  b 
)    a = cm[((b) + 15)>>5]

Definition at line 1289 of file dsputil.c.

#define put_qpel8_mc00_c   ff_put_pixels8x8_c

Definition at line 1300 of file dsputil.c.

#define avg_qpel8_mc00_c   ff_avg_pixels8x8_c

Definition at line 1301 of file dsputil.c.

#define put_qpel16_mc00_c   ff_put_pixels16x16_c

Definition at line 1302 of file dsputil.c.

#define avg_qpel16_mc00_c   ff_avg_pixels16x16_c

Definition at line 1303 of file dsputil.c.

#define put_no_rnd_qpel8_mc00_c   ff_put_pixels8x8_c

Definition at line 1304 of file dsputil.c.

#define put_no_rnd_qpel16_mc00_c   ff_put_pixels16x16_8_c

Definition at line 1305 of file dsputil.c.

#define B   0
#define G   1
#define R   2
#define A   3

Definition at line 1997 of file dsputil.c.

#define BUTTERFLY2 (   o1,
  o2,
  i1,
  i2 
)
Value:
o1= (i1)+(i2);\
o2= (i1)-(i2);

Definition at line 2029 of file dsputil.c.

Referenced by hadamard8_diff8x8_c(), and hadamard8_intra8x8_c().

#define BUTTERFLY1 (   x,
  y 
)
Value:
{\
int a,b;\
a= x;\
b= y;\
x= a+b;\
y= a-b;\
}

Definition at line 2033 of file dsputil.c.

Referenced by hadamard8_diff8x8_c(), and hadamard8_intra8x8_c().

#define BUTTERFLYA (   x,
  y 
)    (FFABS((x)+(y)) + FFABS((x)-(y)))

Definition at line 2042 of file dsputil.c.

Referenced by hadamard8_diff8x8_c(), and hadamard8_intra8x8_c().

#define VSAD_INTRA (   size)
Value:
static int vsad_intra##size##_c(/*MpegEncContext*/ void *c, uint8_t *s, uint8_t *dummy, int stride, int h){ \
int score=0; \
int x,y; \
for(y=1; y<h; y++){ \
for(x=0; x<size; x+=4){ \
score+= FFABS(s[x ] - s[x +stride]) + FFABS(s[x+1] - s[x+1+stride]) \
+FFABS(s[x+2] - s[x+2+stride]) + FFABS(s[x+3] - s[x+3+stride]); \
} \
s+= stride; \
} \
\
return score; \
}

Definition at line 2375 of file dsputil.c.

#define SQ (   a)    ((a)*(a))

Definition at line 2408 of file dsputil.c.

Referenced by vsse16_c().

#define VSSE_INTRA (   size)
Value:
static int vsse_intra##size##_c(/*MpegEncContext*/ void *c, uint8_t *s, uint8_t *dummy, int stride, int h){ \
int score=0; \
int x,y; \
for(y=1; y<h; y++){ \
for(x=0; x<size; x+=4){ \
score+= SQ(s[x ] - s[x +stride]) + SQ(s[x+1] - s[x+1+stride]) \
+SQ(s[x+2] - s[x+2+stride]) + SQ(s[x+3] - s[x+3+stride]); \
} \
s+= stride; \
} \
\
return score; \
}

Definition at line 2409 of file dsputil.c.

#define WRAPPER8_16_SQ (   name8,
  name16 
)
Value:
static int name16(void /*MpegEncContext*/ *s, uint8_t *dst, uint8_t *src, int stride, int h){\
int score=0;\
score +=name8(s, dst , src , stride, 8);\
score +=name8(s, dst+8 , src+8 , stride, 8);\
if(h==16){\
dst += 8*stride;\
src += 8*stride;\
score +=name8(s, dst , src , stride, 8);\
score +=name8(s, dst+8 , src+8 , stride, 8);\
}\
return score;\
}

Definition at line 2451 of file dsputil.c.

#define dspfunc (   PFX,
  IDX,
  NUM 
)
Value:
c->PFX ## _pixels_tab[IDX][ 0] = PFX ## NUM ## _mc00_c; \
c->PFX ## _pixels_tab[IDX][ 1] = PFX ## NUM ## _mc10_c; \
c->PFX ## _pixels_tab[IDX][ 2] = PFX ## NUM ## _mc20_c; \
c->PFX ## _pixels_tab[IDX][ 3] = PFX ## NUM ## _mc30_c; \
c->PFX ## _pixels_tab[IDX][ 4] = PFX ## NUM ## _mc01_c; \
c->PFX ## _pixels_tab[IDX][ 5] = PFX ## NUM ## _mc11_c; \
c->PFX ## _pixels_tab[IDX][ 6] = PFX ## NUM ## _mc21_c; \
c->PFX ## _pixels_tab[IDX][ 7] = PFX ## NUM ## _mc31_c; \
c->PFX ## _pixels_tab[IDX][ 8] = PFX ## NUM ## _mc02_c; \
c->PFX ## _pixels_tab[IDX][ 9] = PFX ## NUM ## _mc12_c; \
c->PFX ## _pixels_tab[IDX][10] = PFX ## NUM ## _mc22_c; \
c->PFX ## _pixels_tab[IDX][11] = PFX ## NUM ## _mc32_c; \
c->PFX ## _pixels_tab[IDX][12] = PFX ## NUM ## _mc03_c; \
c->PFX ## _pixels_tab[IDX][13] = PFX ## NUM ## _mc13_c; \
c->PFX ## _pixels_tab[IDX][14] = PFX ## NUM ## _mc23_c; \
c->PFX ## _pixels_tab[IDX][15] = PFX ## NUM ## _mc33_c
#define SET_CMP_FUNC (   name)
Value:
c->name[0]= name ## 16_c;\
c->name[1]= name ## 8x8_c;

Referenced by ff_dsputil_init().

#define hpel_funcs (   prefix,
  idx,
  num 
)
Value:
c->prefix ## _pixels_tab idx [0] = prefix ## _pixels ## num ## _8_c; \
c->prefix ## _pixels_tab idx [1] = prefix ## _pixels ## num ## _x2_8_c; \
c->prefix ## _pixels_tab idx [2] = prefix ## _pixels ## num ## _y2_8_c; \
c->prefix ## _pixels_tab idx [3] = prefix ## _pixels ## num ## _xy2_8_c

Referenced by ff_dsputil_init().

#define FUNC (   f,
  depth 
)    f ## _ ## depth
#define FUNCC (   f,
  depth 
)    f ## _ ## depth ## _c
#define BIT_DEPTH_FUNCS (   depth,
  dct 
)
Value:
c->get_pixels = FUNCC(get_pixels ## dct , depth);\
c->draw_edges = FUNCC(draw_edges , depth);\
c->clear_block = FUNCC(clear_block ## dct , depth);\
c->clear_blocks = FUNCC(clear_blocks ## dct , depth);\

Referenced by ff_dsputil_init().

Function Documentation

void ff_init_scantable ( uint8_t permutation,
ScanTable st,
const uint8_t src_scantable 
)
void ff_init_scantable_permutation ( uint8_t idct_permutation,
int  idct_permutation_type 
)
static int pix_sum_c ( uint8_t pix,
int  line_size 
)
static

Definition at line 178 of file dsputil.c.

Referenced by ff_dsputil_init().

static int pix_norm1_c ( uint8_t pix,
int  line_size 
)
static

Definition at line 200 of file dsputil.c.

Referenced by ff_dsputil_init().

static void bswap_buf ( uint32_t *  dst,
const uint32_t *  src,
int  w 
)
static

Definition at line 248 of file dsputil.c.

Referenced by ff_dsputil_init().

static void bswap16_buf ( uint16_t *  dst,
const uint16_t *  src,
int  len 
)
static

Definition at line 266 of file dsputil.c.

Referenced by ff_dsputil_init().

static int sse4_c ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 272 of file dsputil.c.

Referenced by ff_dsputil_init().

static int sse8_c ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 289 of file dsputil.c.

Referenced by ff_dsputil_init().

static int sse16_c ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 310 of file dsputil.c.

Referenced by ff_dsputil_init().

static void diff_pixels_c ( int16_t *av_restrict  block,
const uint8_t s1,
const uint8_t s2,
int  stride 
)
static

Definition at line 340 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_pixels_clamped_c ( const int16_t *  block,
uint8_t *av_restrict  pixels,
int  line_size 
)
static

Definition at line 360 of file dsputil.c.

Referenced by ff_dsputil_init(), and ff_jref_idct_put().

static void put_pixels_clamped4_c ( const int16_t *  block,
uint8_t *av_restrict  pixels,
int  line_size 
)
static

Definition at line 381 of file dsputil.c.

Referenced by ff_jref_idct4_put().

static void put_pixels_clamped2_c ( const int16_t *  block,
uint8_t *av_restrict  pixels,
int  line_size 
)
static

Definition at line 398 of file dsputil.c.

Referenced by ff_jref_idct2_put().

static void put_signed_pixels_clamped_c ( const int16_t *  block,
uint8_t *av_restrict  pixels,
int  line_size 
)
static

Definition at line 413 of file dsputil.c.

Referenced by ff_dsputil_init().

static void add_pixels8_c ( uint8_t *av_restrict  pixels,
int16_t *  block,
int  line_size 
)
static

Definition at line 434 of file dsputil.c.

Referenced by ff_dsputil_init().

static void add_pixels_clamped_c ( const int16_t *  block,
uint8_t *av_restrict  pixels,
int  line_size 
)
static

Definition at line 454 of file dsputil.c.

Referenced by ff_dsputil_init(), and ff_jref_idct_add().

static void add_pixels_clamped4_c ( const int16_t *  block,
uint8_t *av_restrict  pixels,
int  line_size 
)
static

Definition at line 474 of file dsputil.c.

Referenced by ff_jref_idct4_add().

static void add_pixels_clamped2_c ( const int16_t *  block,
uint8_t *av_restrict  pixels,
int  line_size 
)
static

Definition at line 490 of file dsputil.c.

Referenced by ff_jref_idct2_add().

static int sum_abs_dctelem_c ( int16_t *  block)
static

Definition at line 504 of file dsputil.c.

Referenced by ff_dsputil_init().

static void fill_block16_c ( uint8_t block,
uint8_t  value,
int  line_size,
int  h 
)
static

Definition at line 512 of file dsputil.c.

Referenced by ff_dsputil_init().

static void fill_block8_c ( uint8_t block,
uint8_t  value,
int  line_size,
int  h 
)
static

Definition at line 522 of file dsputil.c.

Referenced by ff_dsputil_init().

static void gmc1_c ( uint8_t dst,
uint8_t src,
int  stride,
int  h,
int  x16,
int  y16,
int  rounder 
)
static

Definition at line 535 of file dsputil.c.

Referenced by ff_dsputil_init(), and ff_dsputil_init_align().

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().

static void put_tpel_pixels_mc00_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 616 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_tpel_pixels_mc10_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 625 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_tpel_pixels_mc20_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 636 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_tpel_pixels_mc01_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 647 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_tpel_pixels_mc11_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 658 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_tpel_pixels_mc12_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 669 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_tpel_pixels_mc02_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 680 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_tpel_pixels_mc21_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 691 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_tpel_pixels_mc22_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 702 of file dsputil.c.

Referenced by ff_dsputil_init().

static void avg_tpel_pixels_mc00_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 713 of file dsputil.c.

Referenced by ff_dsputil_init().

static void avg_tpel_pixels_mc10_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 722 of file dsputil.c.

Referenced by ff_dsputil_init().

static void avg_tpel_pixels_mc20_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 733 of file dsputil.c.

Referenced by ff_dsputil_init().

static void avg_tpel_pixels_mc01_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 744 of file dsputil.c.

Referenced by ff_dsputil_init().

static void avg_tpel_pixels_mc11_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 755 of file dsputil.c.

Referenced by ff_dsputil_init().

static void avg_tpel_pixels_mc12_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 766 of file dsputil.c.

Referenced by ff_dsputil_init().

static void avg_tpel_pixels_mc02_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 777 of file dsputil.c.

Referenced by ff_dsputil_init().

static void avg_tpel_pixels_mc21_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 788 of file dsputil.c.

Referenced by ff_dsputil_init().

static void avg_tpel_pixels_mc22_c ( uint8_t dst,
const uint8_t src,
int  stride,
int  width,
int  height 
)
inlinestatic

Definition at line 799 of file dsputil.c.

Referenced by ff_dsputil_init().

static void wmv2_mspel8_h_lowpass ( uint8_t dst,
uint8_t src,
int  dstStride,
int  srcStride,
int  h 
)
static
static void wmv2_mspel8_v_lowpass ( uint8_t dst,
uint8_t src,
int  dstStride,
int  srcStride,
int  w 
)
static
static void put_mspel8_mc10_c ( uint8_t dst,
uint8_t src,
int  stride 
)
static

Definition at line 1414 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_mspel8_mc20_c ( uint8_t dst,
uint8_t src,
int  stride 
)
static

Definition at line 1420 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_mspel8_mc30_c ( uint8_t dst,
uint8_t src,
int  stride 
)
static

Definition at line 1424 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_mspel8_mc02_c ( uint8_t dst,
uint8_t src,
int  stride 
)
static

Definition at line 1430 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_mspel8_mc12_c ( uint8_t dst,
uint8_t src,
int  stride 
)
static

Definition at line 1434 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_mspel8_mc32_c ( uint8_t dst,
uint8_t src,
int  stride 
)
static

Definition at line 1443 of file dsputil.c.

Referenced by ff_dsputil_init().

static void put_mspel8_mc22_c ( uint8_t dst,
uint8_t src,
int  stride 
)
static

Definition at line 1452 of file dsputil.c.

Referenced by ff_dsputil_init().

static void h263_v_loop_filter_c ( uint8_t src,
int  stride,
int  qscale 
)
static

Definition at line 1458 of file dsputil.c.

Referenced by ff_dsputil_init().

static void h263_h_loop_filter_c ( uint8_t src,
int  stride,
int  qscale 
)
static

Definition at line 1495 of file dsputil.c.

Referenced by ff_dsputil_init().

static void h261_loop_filter_c ( uint8_t src,
int  stride 
)
static

Definition at line 1532 of file dsputil.c.

Referenced by ff_dsputil_init().

static int pix_abs16_c ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
inlinestatic

Definition at line 1559 of file dsputil.c.

Referenced by ff_dsputil_init().

static int pix_abs16_x2_c ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 1587 of file dsputil.c.

Referenced by ff_dsputil_init().

static int pix_abs16_y2_c ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 1615 of file dsputil.c.

Referenced by ff_dsputil_init().

static int pix_abs16_xy2_c ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 1645 of file dsputil.c.

Referenced by ff_dsputil_init().

static int pix_abs8_c ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
inlinestatic

Definition at line 1675 of file dsputil.c.

Referenced by ff_dsputil_init().

static int pix_abs8_x2_c ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 1695 of file dsputil.c.

Referenced by ff_dsputil_init().

static int pix_abs8_y2_c ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 1715 of file dsputil.c.

Referenced by ff_dsputil_init().

static int pix_abs8_xy2_c ( void v,
uint8_t pix1,
uint8_t pix2,
int  line_size,
int  h 
)
static

Definition at line 1737 of file dsputil.c.

Referenced by ff_dsputil_init().

static int nsse16_c ( void v,
uint8_t s1,
uint8_t s2,
int  stride,
int  h 
)
static

Definition at line 1759 of file dsputil.c.

Referenced by ff_dsputil_init().

static int nsse8_c ( void v,
uint8_t s1,
uint8_t s2,
int  stride,
int  h 
)
static

Definition at line 1785 of file dsputil.c.

Referenced by ff_dsputil_init().

static int try_8x8basis_c ( int16_t  rem[64],
int16_t  weight[64],
int16_t  basis[64],
int  scale 
)
static

Definition at line 1811 of file dsputil.c.

Referenced by ff_dsputil_init().

static void add_8x8basis_c ( int16_t  rem[64],
int16_t  basis[64],
int  scale 
)
static

Definition at line 1826 of file dsputil.c.

Referenced by ff_dsputil_init().

static int zero_cmp ( void s,
uint8_t a,
uint8_t b,
int  stride,
int  h 
)
static

Definition at line 1834 of file dsputil.c.

Referenced by ff_set_cmp().

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().

static void add_bytes_c ( uint8_t dst,
uint8_t src,
int  w 
)
static

Definition at line 1898 of file dsputil.c.

Referenced by ff_dsputil_init().

static void diff_bytes_c ( uint8_t dst,
const uint8_t src1,
const uint8_t src2,
int  w 
)
static

Definition at line 1909 of file dsputil.c.

Referenced by ff_dsputil_init().

static void add_hfyu_median_prediction_c ( uint8_t dst,
const uint8_t src1,
const uint8_t diff,
int  w,
int *  left,
int *  left_top 
)
static

Definition at line 1934 of file dsputil.c.

Referenced by ff_dsputil_init().

static void sub_hfyu_median_prediction_c ( uint8_t dst,
const uint8_t src1,
const uint8_t src2,
int  w,
int *  left,
int *  left_top 
)
static

Definition at line 1951 of file dsputil.c.

Referenced by ff_dsputil_init().

static int add_hfyu_left_prediction_c ( uint8_t dst,
const uint8_t src,
int  w,
int  acc 
)
static

Definition at line 1969 of file dsputil.c.

Referenced by ff_dsputil_init().

static void add_hfyu_left_prediction_bgr32_c ( uint8_t dst,
const uint8_t src,
int  w,
int *  red,
int *  green,
int *  blue,
int *  alpha 
)
static

Definition at line 1999 of file dsputil.c.

Referenced by ff_dsputil_init().

static int hadamard8_diff8x8_c ( void s,
uint8_t dst,
uint8_t src,
int  stride,
int  h 
)
static

Definition at line 2044 of file dsputil.c.

static int hadamard8_intra8x8_c ( void s,
uint8_t src,
uint8_t dummy,
int  stride,
int  h 
)
static

Definition at line 2089 of file dsputil.c.

Referenced by ff_dsputil_init().

static int dct_sad8x8_c ( void c,
uint8_t src1,
uint8_t src2,
int  stride,
int  h 
)
static

Definition at line 2137 of file dsputil.c.

static int dct_max8x8_c ( void c,
uint8_t src1,
uint8_t src2,
int  stride,
int  h 
)
static

Definition at line 2201 of file dsputil.c.

static int quant_psnr8x8_c ( void c,
uint8_t src1,
uint8_t src2,
int  stride,
int  h 
)
static

Definition at line 2217 of file dsputil.c.

static int rd8x8_c ( void c,
uint8_t src1,
uint8_t src2,
int  stride,
int  h 
)
static

Definition at line 2240 of file dsputil.c.

static int bit8x8_c ( void c,
uint8_t src1,
uint8_t src2,
int  stride,
int  h 
)
static

Definition at line 2316 of file dsputil.c.

static int vsad16_c ( void c,
uint8_t s1,
uint8_t s2,
int  stride,
int  h 
)
static

Definition at line 2393 of file dsputil.c.

Referenced by ff_dsputil_init().

static int vsse16_c ( void c,
uint8_t s1,
uint8_t s2,
int  stride,
int  h 
)
static

Definition at line 2427 of file dsputil.c.

Referenced by ff_dsputil_init().

static int ssd_int8_vs_int16_c ( const int8_t *  pix1,
const int16_t *  pix2,
int  size 
)
static

Definition at line 2442 of file dsputil.c.

Referenced by ff_dsputil_init().

static uint32_t clipf_c_one ( uint32_t  a,
uint32_t  mini,
uint32_t  maxi,
uint32_t  maxisign 
)
inlinestatic

Definition at line 2476 of file dsputil.c.

Referenced by vector_clipf_c_opposite_sign().

static void vector_clipf_c_opposite_sign ( float *  dst,
const float *  src,
float *  min,
float *  max,
int  len 
)
static

Definition at line 2485 of file dsputil.c.

Referenced by vector_clipf_c().

static void vector_clipf_c ( float *  dst,
const float *  src,
float  min,
float  max,
int  len 
)
static

Definition at line 2503 of file dsputil.c.

Referenced by ff_dsputil_init().

static int32_t scalarproduct_int16_c ( const int16_t *  v1,
const int16_t *  v2,
int  order 
)
static

Definition at line 2521 of file dsputil.c.

Referenced by ff_dsputil_init().

static int32_t scalarproduct_and_madd_int16_c ( int16_t *  v1,
const int16_t *  v2,
const int16_t *  v3,
int  order,
int  mul 
)
static

Definition at line 2531 of file dsputil.c.

Referenced by ff_dsputil_init().

static void apply_window_int16_c ( int16_t *  output,
const int16_t *  input,
const int16_t *  window,
unsigned int  len 
)
static

Definition at line 2541 of file dsputil.c.

Referenced by ff_dsputil_init().

static void vector_clip_int32_c ( int32_t dst,
const int32_t src,
int32_t  min,
int32_t  max,
unsigned int  len 
)
static

Definition at line 2554 of file dsputil.c.

Referenced by ff_dsputil_init().

static void ff_jref_idct_put ( uint8_t dest,
int  line_size,
int16_t *  block 
)
static

Definition at line 2570 of file dsputil.c.

Referenced by ff_dsputil_init().

static void ff_jref_idct_add ( uint8_t dest,
int  line_size,
int16_t *  block 
)
static

Definition at line 2575 of file dsputil.c.

Referenced by ff_dsputil_init().

static void ff_jref_idct4_put ( uint8_t dest,
int  line_size,
int16_t *  block 
)
static

Definition at line 2581 of file dsputil.c.

Referenced by ff_dsputil_init().

static void ff_jref_idct4_add ( uint8_t dest,
int  line_size,
int16_t *  block 
)
static

Definition at line 2586 of file dsputil.c.

Referenced by ff_dsputil_init().

static void ff_jref_idct2_put ( uint8_t dest,
int  line_size,
int16_t *  block 
)
static

Definition at line 2592 of file dsputil.c.

Referenced by ff_dsputil_init().

static void ff_jref_idct2_add ( uint8_t dest,
int  line_size,
int16_t *  block 
)
static

Definition at line 2597 of file dsputil.c.

Referenced by ff_dsputil_init().

static void ff_jref_idct1_put ( uint8_t dest,
int  line_size,
int16_t *  block 
)
static

Definition at line 2603 of file dsputil.c.

Referenced by ff_dsputil_init().

static void ff_jref_idct1_add ( uint8_t dest,
int  line_size,
int16_t *  block 
)
static

Definition at line 2607 of file dsputil.c.

Referenced by ff_dsputil_init().

av_cold void ff_dsputil_static_init ( void  )

Definition at line 2613 of file dsputil.c.

Referenced by avcodec_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().

av_cold void ff_dsputil_init ( DSPContext c,
AVCodecContext avctx 
)
av_cold void dsputil_init ( DSPContext c,
AVCodecContext avctx 
)

Definition at line 2937 of file dsputil.c.

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

Variable Documentation

uint32_t ff_squareTbl[512] = {0, }

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_zigzag248_direct[64]
Initial value:
= {
0, 8, 1, 9, 16, 24, 2, 10,
17, 25, 32, 40, 48, 56, 33, 41,
18, 26, 3, 11, 4, 12, 19, 27,
34, 42, 49, 57, 50, 58, 35, 43,
20, 28, 5, 13, 6, 14, 21, 29,
36, 44, 51, 59, 52, 60, 37, 45,
22, 30, 7, 15, 23, 31, 38, 46,
53, 61, 54, 62, 39, 47, 55, 63,
}

Definition at line 72 of file dsputil.c.

Referenced by dv_init_enc_block(), and ff_dvvideo_init().

uint16_t ff_inv_zigzag_direct16[64]

Definition at line 84 of file dsputil.c.

Referenced by dct_quantize_TMPL(), and ff_dsputil_static_init().

const uint8_t ff_alternate_horizontal_scan[64]
Initial value:
= {
0, 1, 2, 3, 8, 9, 16, 17,
10, 11, 4, 5, 6, 7, 15, 14,
13, 12, 19, 18, 24, 25, 32, 33,
26, 27, 20, 21, 22, 23, 28, 29,
30, 31, 34, 35, 40, 41, 48, 49,
42, 43, 36, 37, 38, 39, 44, 45,
46, 47, 50, 51, 56, 57, 58, 59,
52, 53, 54, 55, 60, 61, 62, 63,
}

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]
Initial value:
= {
0, 8, 16, 24, 1, 9, 2, 10,
17, 25, 32, 40, 48, 56, 57, 49,
41, 33, 26, 18, 3, 11, 4, 12,
19, 27, 34, 42, 50, 58, 35, 43,
51, 59, 20, 28, 5, 13, 6, 14,
21, 29, 36, 44, 52, 60, 37, 45,
53, 61, 22, 30, 7, 15, 23, 31,
38, 46, 54, 62, 39, 47, 55, 63,
}

Definition at line 97 of file dsputil.c.

Referenced by decode_vop_header(), ff_dct_common_init(), and mpeg_decode_picture_coding_extension().

const uint8_t simple_mmx_permutation[64]
static
Initial value:
={
0x00, 0x08, 0x04, 0x09, 0x01, 0x0C, 0x05, 0x0D,
0x10, 0x18, 0x14, 0x19, 0x11, 0x1C, 0x15, 0x1D,
0x20, 0x28, 0x24, 0x29, 0x21, 0x2C, 0x25, 0x2D,
0x12, 0x1A, 0x16, 0x1B, 0x13, 0x1E, 0x17, 0x1F,
0x02, 0x0A, 0x06, 0x0B, 0x03, 0x0E, 0x07, 0x0F,
0x30, 0x38, 0x34, 0x39, 0x31, 0x3C, 0x35, 0x3D,
0x22, 0x2A, 0x26, 0x2B, 0x23, 0x2E, 0x27, 0x2F,
0x32, 0x3A, 0x36, 0x3B, 0x33, 0x3E, 0x37, 0x3F,
}

Definition at line 109 of file dsputil.c.

Referenced by ff_init_scantable_permutation().

const uint8_t idct_sse2_row_perm[8] = {0, 4, 1, 5, 2, 6, 3, 7}
static

Definition at line 120 of file dsputil.c.

Referenced by ff_init_scantable_permutation().