summaryrefslogtreecommitdiff
path: root/src/libffmpeg/libavcodec/dsputil.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libffmpeg/libavcodec/dsputil.h')
-rw-r--r--src/libffmpeg/libavcodec/dsputil.h38
1 files changed, 28 insertions, 10 deletions
diff --git a/src/libffmpeg/libavcodec/dsputil.h b/src/libffmpeg/libavcodec/dsputil.h
index d52b0419c..f34a8f078 100644
--- a/src/libffmpeg/libavcodec/dsputil.h
+++ b/src/libffmpeg/libavcodec/dsputil.h
@@ -84,13 +84,10 @@ static void a(uint8_t *block, const uint8_t *pixels, int line_size, int h){\
/* motion estimation */
-typedef int (*op_pixels_abs_func)(UINT8 *blk1/*align width (8 or 16)*/, UINT8 *blk2/*align 1*/, int line_size);
-/*
-int pix_abs16x16_c(UINT8 *blk1, UINT8 *blk2, int lx);
-int pix_abs16x16_x2_c(UINT8 *blk1, UINT8 *blk2, int lx);
-int pix_abs16x16_y2_c(UINT8 *blk1, UINT8 *blk2, int lx);
-int pix_abs16x16_xy2_c(UINT8 *blk1, UINT8 *blk2, int lx);
-*/
+typedef int (*op_pixels_abs_func)(UINT8 *blk1/*align width (8 or 16)*/, UINT8 *blk2/*align 1*/, int line_size)/* __attribute__ ((const))*/;
+
+typedef int (*me_cmp_func)(void /*MpegEncContext*/ *s, UINT8 *blk1/*align width (8 or 16)*/, UINT8 *blk2/*align 1*/, int line_size)/* __attribute__ ((const))*/;
+
typedef struct DSPContext {
/* pixel ops : interface with DCT */
void (*get_pixels)(DCTELEM *block/*align 16*/, const UINT8 *pixels/*align 8*/, int line_size);
@@ -103,7 +100,17 @@ typedef struct DSPContext {
void (*clear_blocks)(DCTELEM *blocks/*align 16*/);
int (*pix_sum)(UINT8 * pix, int line_size);
int (*pix_norm1)(UINT8 * pix, int line_size);
- int (*pix_norm)(UINT8 * pix1, UINT8 * pix2, int line_size);
+ me_cmp_func sad[2]; /* identical to pix_absAxA except additional void * */
+ me_cmp_func sse[2];
+ me_cmp_func hadamard8_diff[2];
+ me_cmp_func dct_sad[2];
+ me_cmp_func quant_psnr[2];
+ int (*hadamard8_abs )(uint8_t *src, int stride, int mean);
+
+ me_cmp_func me_pre_cmp[11];
+ me_cmp_func me_cmp[11];
+ me_cmp_func me_sub_cmp[11];
+ me_cmp_func mb_cmp[11];
/* maybe create an array for 16/8 functions */
op_pixels_func put_pixels_tab[2][4];
@@ -114,6 +121,7 @@ typedef struct DSPContext {
qpel_mc_func avg_qpel_pixels_tab[2][16];
qpel_mc_func put_no_rnd_qpel_pixels_tab[2][16];
qpel_mc_func avg_no_rnd_qpel_pixels_tab[2][16];
+ qpel_mc_func put_mspel_pixels_tab[8];
op_pixels_abs_func pix_abs16x16;
op_pixels_abs_func pix_abs16x16_x2;
@@ -125,9 +133,8 @@ typedef struct DSPContext {
op_pixels_abs_func pix_abs8x8_xy2;
/* huffyuv specific */
- //FIXME note: alignment isnt guranteed currently but could be if needed
void (*add_bytes)(uint8_t *dst/*align 16*/, uint8_t *src/*align 16*/, int w);
- void (*diff_bytes)(uint8_t *dst/*align 16*/, uint8_t *src1/*align 16*/, uint8_t *src2/*align 16*/,int w);
+ void (*diff_bytes)(uint8_t *dst/*align 16*/, uint8_t *src1/*align 16*/, uint8_t *src2/*align 1*/,int w);
} DSPContext;
void dsputil_init(DSPContext* p, unsigned mask);
@@ -165,6 +172,7 @@ static inline void emms(void)
}
#endif
+
#define emms_c() \
{\
if (mm_flags & MM_MMX)\
@@ -266,6 +274,8 @@ int fft_init(FFTContext *s, int nbits, int inverse);
void fft_permute(FFTContext *s, FFTComplex *z);
void fft_calc_c(FFTContext *s, FFTComplex *z);
void fft_calc_sse(FFTContext *s, FFTComplex *z);
+void fft_calc_altivec(FFTContext *s, FFTComplex *z);
+
static inline void fft_calc(FFTContext *s, FFTComplex *z)
{
s->fft_calc(s, z);
@@ -290,6 +300,14 @@ void ff_mdct_calc(MDCTContext *s, FFTSample *out,
const FFTSample *input, FFTSample *tmp);
void ff_mdct_end(MDCTContext *s);
+#define WARPER88_1616(name8, name16)\
+static int name16(void /*MpegEncContext*/ *s, uint8_t *dst, uint8_t *src, int stride){\
+ return name8(s, dst , src , stride)\
+ +name8(s, dst+8 , src+8 , stride)\
+ +name8(s, dst +8*stride, src +8*stride, stride)\
+ +name8(s, dst+8+8*stride, src+8+8*stride, stride);\
+}
+
#ifndef HAVE_LRINTF
/* XXX: add ISOC specific test to avoid specific BSD testing. */
/* better than nothing implementation. */