Revision 8dbe5856 libavcodec/dsputil.h

View differences:

libavcodec/dsputil.h
53 53
void ff_fdct_mmx2(DCTELEM *block);
54 54
void ff_fdct_sse2(DCTELEM *block);
55 55

  
56
void ff_h264_idct8_add_c(uint8_t *dst, DCTELEM *block, int stride);
57
void ff_h264_idct_add_c(uint8_t *dst, DCTELEM *block, int stride);
58
void ff_h264_idct8_dc_add_c(uint8_t *dst, DCTELEM *block, int stride);
59
void ff_h264_idct_dc_add_c(uint8_t *dst, DCTELEM *block, int stride);
60
void ff_h264_lowres_idct_add_c(uint8_t *dst, int stride, DCTELEM *block);
61
void ff_h264_lowres_idct_put_c(uint8_t *dst, int stride, DCTELEM *block);
62
void ff_h264_idct_add16_c(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]);
63
void ff_h264_idct_add16intra_c(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]);
64
void ff_h264_idct8_add4_c(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]);
65
void ff_h264_idct_add8_c(uint8_t **dest, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]);
66

  
67
void ff_h264_chroma_dc_dequant_idct_c(DCTELEM *block, int qmul);
68
void ff_h264_luma_dc_dequant_idct_c(DCTELEM *output, DCTELEM *input, int qmul);
56
#define H264_IDCT(depth) \
57
void ff_h264_idct8_add_ ## depth ## _c(uint8_t *dst, DCTELEM *block, int stride);\
58
void ff_h264_idct_add_ ## depth ## _c(uint8_t *dst, DCTELEM *block, int stride);\
59
void ff_h264_idct8_dc_add_ ## depth ## _c(uint8_t *dst, DCTELEM *block, int stride);\
60
void ff_h264_idct_dc_add_ ## depth ## _c(uint8_t *dst, DCTELEM *block, int stride);\
61
void ff_h264_lowres_idct_add_ ## depth ## _c(uint8_t *dst, int stride, DCTELEM *block);\
62
void ff_h264_lowres_idct_put_ ## depth ## _c(uint8_t *dst, int stride, DCTELEM *block);\
63
void ff_h264_idct_add16_ ## depth ## _c(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]);\
64
void ff_h264_idct_add16intra_ ## depth ## _c(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]);\
65
void ff_h264_idct8_add4_ ## depth ## _c(uint8_t *dst, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]);\
66
void ff_h264_idct_add8_ ## depth ## _c(uint8_t **dest, const int *blockoffset, DCTELEM *block, int stride, const uint8_t nnzc[6*8]);\
67
void ff_h264_luma_dc_dequant_idct_ ## depth ## _c(DCTELEM *output, DCTELEM *input, int qmul);\
68
void ff_h264_chroma_dc_dequant_idct_ ## depth ## _c(DCTELEM *block, int qmul);
69

  
70
H264_IDCT( 8)
71
H264_IDCT( 9)
72
H264_IDCT(10)
73

  
69 74
void ff_svq3_luma_dc_dequant_idct_c(DCTELEM *output, DCTELEM *input, int qp);
70 75
void ff_svq3_add_idct_c(uint8_t *dst, DCTELEM *block, int stride, int qp, int dc);
71 76

  
......
82 87
extern uint32_t ff_squareTbl[512];
83 88
extern uint8_t ff_cropTbl[256 + 2 * MAX_NEG_CROP];
84 89

  
85
void ff_put_pixels8x8_c(uint8_t *dst, uint8_t *src, int stride);
86
void ff_avg_pixels8x8_c(uint8_t *dst, uint8_t *src, int stride);
87
void ff_put_pixels16x16_c(uint8_t *dst, uint8_t *src, int stride);
88
void ff_avg_pixels16x16_c(uint8_t *dst, uint8_t *src, int stride);
90
#define PUTAVG_PIXELS(depth)\
91
void ff_put_pixels8x8_ ## depth ## _c(uint8_t *dst, uint8_t *src, int stride);\
92
void ff_avg_pixels8x8_ ## depth ## _c(uint8_t *dst, uint8_t *src, int stride);\
93
void ff_put_pixels16x16_ ## depth ## _c(uint8_t *dst, uint8_t *src, int stride);\
94
void ff_avg_pixels16x16_ ## depth ## _c(uint8_t *dst, uint8_t *src, int stride);
95

  
96
PUTAVG_PIXELS( 8)
97
PUTAVG_PIXELS( 9)
98
PUTAVG_PIXELS(10)
99

  
100
#define ff_put_pixels8x8_c ff_put_pixels8x8_8_c
101
#define ff_avg_pixels8x8_c ff_avg_pixels8x8_8_c
102
#define ff_put_pixels16x16_c ff_put_pixels16x16_8_c
103
#define ff_avg_pixels16x16_c ff_avg_pixels16x16_8_c
89 104

  
90 105
/* VP3 DSP functions */
91 106
void ff_vp3_idct_c(DCTELEM *block/* align 16*/);
......
195 210

  
196 211
void ff_init_scantable(uint8_t *, ScanTable *st, const uint8_t *src_scantable);
197 212

  
198
void ff_emulated_edge_mc(uint8_t *buf, const uint8_t *src, int linesize,
199
                         int block_w, int block_h,
213
#define EMULATED_EDGE(depth) \
214
void ff_emulated_edge_mc_ ## depth (uint8_t *buf, const uint8_t *src, int linesize,\
215
                         int block_w, int block_h,\
200 216
                         int src_x, int src_y, int w, int h);
201 217

  
218
EMULATED_EDGE(8)
219
EMULATED_EDGE(9)
220
EMULATED_EDGE(10)
221

  
222
#define ff_emulated_edge_mc ff_emulated_edge_mc_8
223

  
202 224
void ff_add_pixels_clamped_c(const DCTELEM *block, uint8_t *dest, int linesize);
203 225
void ff_put_pixels_clamped_c(const DCTELEM *block, uint8_t *dest, int linesize);
204 226
void ff_put_signed_pixels_clamped_c(const DCTELEM *block, uint8_t *dest, int linesize);
......
570 592
void ff_set_cmp(DSPContext* c, me_cmp_func *cmp, int type);
571 593

  
572 594
#define         BYTE_VEC32(c)   ((c)*0x01010101UL)
595
#define         BYTE_VEC64(c)   ((c)*0x0001000100010001UL)
573 596

  
574 597
static inline uint32_t rnd_avg32(uint32_t a, uint32_t b)
575 598
{
......
581 604
    return (a & b) + (((a ^ b) & ~BYTE_VEC32(0x01)) >> 1);
582 605
}
583 606

  
607
static inline uint64_t rnd_avg64(uint64_t a, uint64_t b)
608
{
609
    return (a | b) - (((a ^ b) & ~BYTE_VEC64(0x01)) >> 1);
610
}
611

  
612
static inline uint64_t no_rnd_avg64(uint64_t a, uint64_t b)
613
{
614
    return (a & b) + (((a ^ b) & ~BYTE_VEC64(0x01)) >> 1);
615
}
616

  
584 617
static inline int get_penalty_factor(int lambda, int lambda2, int type){
585 618
    switch(type&0xFF){
586 619
    default:

Also available in: Unified diff