aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dsputil.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-12-30 16:07:57 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-12-30 16:07:57 +0000
commitbb198e198abc42753274edc376fdd15543694315 (patch)
treee263990eeb4624e54be714b7a494b7511d5dc13f /libavcodec/dsputil.h
parentb846b231b353048693ef457285a23b0c21fc577f (diff)
downloadffmpeg-bb198e198abc42753274edc376fdd15543694315.tar.gz
interlaced motion estimation
interlaced mpeg2 encoding P & B frames rate distored interlaced mb decission alternate scantable support 4mv encoding fixes (thats also why the regression tests change) passing height to most dsp functions interlaced mpeg4 encoding (no direct mode MBs yet) various related cleanups disabled old motion estimaton algorithms (log, full, ...) they will either be fixed or removed Originally committed as revision 2638 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dsputil.h')
-rw-r--r--libavcodec/dsputil.h61
1 files changed, 33 insertions, 28 deletions
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index 79b6c59c70..0bd85e19ec 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -110,9 +110,7 @@ static void a(uint8_t *block, const uint8_t *pixels, int line_size, int h){\
/* motion estimation */
-typedef int (*op_pixels_abs_func)(uint8_t *blk1/*align width (8 or 16)*/, uint8_t *blk2/*align 1*/, int line_size)/* __attribute__ ((const))*/;
-
-typedef int (*me_cmp_func)(void /*MpegEncContext*/ *s, uint8_t *blk1/*align width (8 or 16)*/, uint8_t *blk2/*align 1*/, int line_size)/* __attribute__ ((const))*/;
+typedef int (*me_cmp_func)(void /*MpegEncContext*/ *s, uint8_t *blk1/*align width (8 or 16)*/, uint8_t *blk2/*align 1*/, int line_size, int h)/* __attribute__ ((const))*/;
/**
@@ -136,19 +134,21 @@ typedef struct DSPContext {
void (*clear_blocks)(DCTELEM *blocks/*align 16*/);
int (*pix_sum)(uint8_t * pix, int line_size);
int (*pix_norm1)(uint8_t * pix, 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];
- me_cmp_func bit[2];
- me_cmp_func rd[2];
+// 16x16 8x8 4x4 2x2 16x8 8x4 4x2 8x16 4x8 2x4
+
+ me_cmp_func sad[4]; /* identical to pix_absAxA except additional void * */
+ me_cmp_func sse[4];
+ me_cmp_func hadamard8_diff[4];
+ me_cmp_func dct_sad[4];
+ me_cmp_func quant_psnr[4];
+ me_cmp_func bit[4];
+ me_cmp_func rd[4];
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];
+ me_cmp_func me_pre_cmp[5];
+ me_cmp_func me_cmp[5];
+ me_cmp_func me_sub_cmp[5];
+ me_cmp_func mb_cmp[5];
/* maybe create an array for 16/8/4/2 functions */
/**
@@ -226,14 +226,7 @@ typedef struct DSPContext {
qpel_mc_func put_h264_qpel_pixels_tab[3][16];
qpel_mc_func avg_h264_qpel_pixels_tab[3][16];
- op_pixels_abs_func pix_abs16x16;
- op_pixels_abs_func pix_abs16x16_x2;
- op_pixels_abs_func pix_abs16x16_y2;
- op_pixels_abs_func pix_abs16x16_xy2;
- op_pixels_abs_func pix_abs8x8;
- op_pixels_abs_func pix_abs8x8_x2;
- op_pixels_abs_func pix_abs8x8_y2;
- op_pixels_abs_func pix_abs8x8_xy2;
+ me_cmp_func pix_abs[2][4];
/* huffyuv specific */
void (*add_bytes)(uint8_t *dst/*align 16*/, uint8_t *src/*align 16*/, int w);
@@ -484,12 +477,24 @@ 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);\
+#define WARPER8_16(name8, name16)\
+static int name16(void /*MpegEncContext*/ *s, uint8_t *dst, uint8_t *src, int stride, int h){\
+ return name8(s, dst , src , stride, h)\
+ +name8(s, dst+8 , src+8 , stride, h);\
+}
+
+#define WARPER8_16_SQ(name8, name16)\
+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;\
}
#ifndef HAVE_LRINTF