📄 sad_altivec.c
字号:
/*
Copyright (C) 2002 Benjamin Herrenschmidt <benh@kernel.crashing.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
$Id: sad_altivec.c,v 1.1 2005/07/21 09:08:51 klschoef Exp $
$Source: /cvsroot/vitooki/vitooki/3rdparty/wince/xvidcore-1.0.0-rc1/src/motion/ppc_asm/sad_altivec.c,v $
$Date: 2005/07/21 09:08:51 $
$Author: klschoef $
*/
#define G_REG
#ifdef G_REG
register vector unsigned char perm0 asm("%v29");
register vector unsigned char perm1 asm("%v30");
register vector unsigned int zerovec asm("%v31");
#endif
#include <stdio.h>
#undef DEBUG
static const vector unsigned char perms[2] = {
(vector unsigned char) ( /* Used when cur is aligned */
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17),
(vector unsigned char) ( /* Used when cur is unaligned */
0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f),
};
#ifdef G_REG
void
sadInit_altivec(void)
{
perm0 = perms[0];
perm1 = perms[1];
zerovec = (vector unsigned int) (0);
}
static inline const vector
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -