1
/* altivec_motion.h, this file is part of the
2
* AltiVec optimized library for MJPEG tools MPEG-1/2 Video Encoder
3
* Copyright (C) 2002 James Klicman <james@klicman.org>
5
* This library is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
#include "../motionsearch.h"
23
#include "altivec_conf.h"
26
#define ALTIVEC_TEST_MOTION /* {{{ */ \
27
( ( defined(ALTIVEC_BENCHMARK) || defined(ALTIVEC_VERIFY) ) && \
28
( ALTIVEC_TEST_FUNCTION(build_sub44_mests) || \
29
ALTIVEC_TEST_FUNCTION(build_sub22_mests) || \
30
ALTIVEC_TEST_FUNCTION(find_best_one_pel) || \
31
ALTIVEC_TEST_FUNCTION(sub_mean_reduction) || \
32
ALTIVEC_TEST_FUNCTION(sad_00) || \
33
ALTIVEC_TEST_FUNCTION(sad_01) || \
34
ALTIVEC_TEST_FUNCTION(sad_10) || \
35
ALTIVEC_TEST_FUNCTION(sad_11) || \
36
ALTIVEC_TEST_FUNCTION(bsad) || \
37
ALTIVEC_TEST_FUNCTION(sumsq) || \
38
ALTIVEC_TEST_FUNCTION(sumsq_sub22) || \
39
ALTIVEC_TEST_FUNCTION(bsumsq) || \
40
ALTIVEC_TEST_FUNCTION(bsumsq_sub22) || \
41
ALTIVEC_TEST_FUNCTION(subsample_image) || \
42
ALTIVEC_TEST_FUNCTION(variance) ) ) \
50
void enable_altivec_motion(void);
52
ALTIVEC_FUNCTION(build_sub44_mests, int,
54
me_result_set *sub44set,
55
int ilow, int jlow, int ihigh, int jhigh,
58
uint8_t *s44org, uint8_t *s44blk,
59
int qrowstride, int qh,
63
ALTIVEC_FUNCTION(build_sub22_mests, int,
65
me_result_set *sub44set,
66
me_result_set *sub22set,
67
int i0, int j0, int ihigh, int jhigh,
69
uint8_t *s22org, uint8_t *s22blk,
70
int frowstride, int fh,
74
ALTIVEC_FUNCTION(find_best_one_pel, void,
76
me_result_set *sub22set,
77
uint8_t *org, uint8_t *blk,
81
me_result_s *best_so_far
84
ALTIVEC_FUNCTION(sub_mean_reduction, void,
85
(me_result_set *matchset, int times, int *minweight_res));
87
ALTIVEC_FUNCTION(sad_00,int,
88
(uint8_t *blk1, uint8_t *blk2, int rowstride, int h, int distlim));
90
ALTIVEC_FUNCTION(sad_01, int,
91
(uint8_t *blk1, uint8_t *blk2, int rowstride, int h));
93
ALTIVEC_FUNCTION(sad_10, int,
94
(uint8_t *blk1, uint8_t *blk2, int rowstride, int h));
96
ALTIVEC_FUNCTION(sad_11, int,
97
(uint8_t *blk1, uint8_t *blk2, int rowstride, int h));
99
ALTIVEC_FUNCTION(bsad, int,
100
(uint8_t *pf, uint8_t *pb, uint8_t *p2, int rowstride,
101
int hxf, int hyf, int hxb, int hyb, int h));
104
ALTIVEC_FUNCTION(sumsq, int,
105
(uint8_t *blk1, uint8_t *blk2, int rowstride, int hx, int hy, int h));
107
ALTIVEC_FUNCTION(sumsq_sub22, int,
108
(uint8_t *blk1, uint8_t *blk2, int rowstride, int h));
111
ALTIVEC_FUNCTION(bsumsq, int,
112
(uint8_t *pf, uint8_t *pb, uint8_t *p2, int rowstride,
113
int hxf, int hyf, int hxb, int hyb, int h));
115
ALTIVEC_FUNCTION(bsumsq_sub22, int,
116
(uint8_t *blk1f, uint8_t *blk1b, uint8_t *blk2, int rowstride, int h));
119
ALTIVEC_FUNCTION(subsample_image, void,
120
(uint8_t *image, int rowstride,
121
uint8_t *sub22_image, uint8_t *sub44_image));
123
ALTIVEC_FUNCTION(variance, void,
124
(uint8_t *p, int size, int rowstride,
125
unsigned int *p_var, unsigned int *p_mean));