Commit 210cb3d5 authored by cclepper's avatar cclepper
Browse files

changed Altivec defines


git-svn-id: https://pd-gem.svn.sourceforge.net/svnroot/pd-gem/trunk/Gem@678 49b2a0ca-c541-4d49-a7ef-d785e4371512
parent 71675225
......@@ -130,7 +130,7 @@ void pix_add :: processRGBA_Gray(imageStruct &image, imageStruct &right)
/////////////////////////////////////////////////////////
void pix_add :: processYUV_YUV(imageStruct &image, imageStruct &right)
{
#ifdef ALTIVEC
#ifdef __VEC__
processYUV_Altivec(image,right);
return;
#else
......@@ -161,7 +161,7 @@ return;
void pix_add :: processYUV_Altivec(imageStruct &image, imageStruct &right)
{
#ifdef ALTIVEC
#ifdef __VEC__
int h,w,width;
width = image.xsize/8;
//format is U Y V Y
......@@ -171,7 +171,7 @@ void pix_add :: processYUV_Altivec(imageStruct &image, imageStruct &right)
//unsigned int i;
short elements[8];
//vector signed char v;
vector short v;
vector signed short v;
}shortBuffer;
union
......
......@@ -135,7 +135,7 @@ void pix_background :: processGrayImage(imageStruct &image)
/////////////////////////////////////////////////////////
void pix_background :: processYUVImage(imageStruct &image)
{
#ifdef ALTIVEC
#ifdef __VEC__
processYUVImageAltivec(image);
return;
#else
......@@ -191,7 +191,7 @@ m_reset = 0;
/////////////////////////////////////////////////////////
void pix_background :: processYUVImageAltivec(imageStruct &image)
{
#ifdef ALTIVEC
#ifdef __VEC__
register int h,w,i,j,width;
int pixsize = image.xsize * image.ysize * image.csize;
h = image.ysize;
......
......@@ -167,7 +167,7 @@ delete saved;
saved = new unsigned int [m_blurSize];
}
#ifdef ALTIVEC
#ifdef __VEC__
processYUVAltivec(image);
return;
#else
......@@ -216,7 +216,7 @@ for (h=0; h<image.ysize-1; h++){
/////////////////////////////////////////////////////////
void pix_blur :: processYUVAltivec(imageStruct &image)
{
#ifdef ALTIVEC
#ifdef __VEC__
int h,w,width;
unsigned short rightGain,imageGain;
/*altivec code starts */
......
......@@ -89,7 +89,7 @@ void pix_chroma_key :: processRGBA_RGBA(imageStruct &image, imageStruct &right)
/////////////////////////////////////////////////////////
void pix_chroma_key :: processYUV_YUV(imageStruct &image, imageStruct &right)
{
#ifdef ALTIVEC
#ifdef __VEC__
processYUV_YUVAltivec(image, right);
return;
#else
......@@ -259,7 +259,7 @@ return;
/////////////////////////////////////////////////////////
void pix_chroma_key :: processYUV_YUVAltivec(imageStruct &image, imageStruct &right)
{
#ifdef ALTIVEC
#ifdef __VEC__
register int h,w,i,j,width;
h = image.ysize;
......
......@@ -74,7 +74,7 @@ void pix_compare :: processRGBA_RGBA(imageStruct &image, imageStruct &right)
/////////////////////////////////////////////////////////
void pix_compare :: processYUV_YUV(imageStruct &image, imageStruct &right)
{
#ifdef ALTIVEC
#ifdef __VEC__
processYUVAltivec(image,right);
return;
#else
......@@ -119,7 +119,7 @@ void pix_compare :: processYUV_YUV(imageStruct &image, imageStruct &right)
void pix_compare :: processYUVAltivec(imageStruct &image, imageStruct &right)
{
#ifdef ALTIVEC
#ifdef __VEC__
register int h,w,i,j,width;
h = image.ysize;
......
......@@ -308,7 +308,7 @@ void pix_convolve :: processYUVImage(imageStruct &image)
void pix_convolve :: calculate3x3YUV(imageStruct &image,imageStruct &tempImg)
{
#ifdef ALTIVEC
#ifdef __VEC__
calculate3x3YUVAltivec(image,tempImg);
return;
#else
......@@ -471,7 +471,7 @@ i=xsize+1;
//too many temps for all the registers - reuse some
void pix_convolve :: calculate3x3YUVAltivec(imageStruct &image,imageStruct &tempImg)
{
#ifdef ALTIVEC
#ifdef __VEC__
int h,w,width,i;
int xsize = (tempImg.xsize)*2;
......@@ -481,7 +481,7 @@ void pix_convolve :: calculate3x3YUVAltivec(imageStruct &image,imageStruct &temp
union
{
short elements[8];
vector short v;
vector signed short v;
}shortBuffer;
union
......@@ -655,7 +655,7 @@ void pix_convolve :: calculate3x3YUVAltivec(imageStruct &image,imageStruct &temp
yres = vec_packs(yhi,ylo);
//combine with the UV\
//combine with the UV
//vec_mergel + vec_mergeh Y and UV
hiImage = vec_mergeh(uvres,yres);
loImage = vec_mergel(uvres,yres);
......
......@@ -77,7 +77,7 @@ void pix_invert :: processGrayImage(imageStruct &image)
void pix_invert :: processYUVImage(imageStruct &image)
{
#ifdef ALTIVEC
#ifdef __VEC__
processYUVAltivec(image);
return;
#else
......@@ -107,7 +107,7 @@ void pix_invert :: processYUVImage(imageStruct &image)
/////////////////////////////////////////////////////////
void pix_invert :: processYUVAltivec(imageStruct &image)
{
#ifdef ALTIVEC
#ifdef __VEC__
int h,w,width;
//post("pix_invert: Altivec");
width = image.xsize/8;
......
......@@ -85,7 +85,7 @@ void pix_mix :: processRGBA_RGBA(imageStruct &image, imageStruct &right)
//
/////////////////////////////////////////////////////////
void pix_mix :: processYUV_YUV(imageStruct &image, imageStruct &right){
#ifdef ALTIVEC
#ifdef __VEC__
//post("altivec");
processYUVAltivec (image, right);
return;
......@@ -133,7 +133,7 @@ return;
//needs fixing for better IQ
void pix_mix :: processYUVAltivec (imageStruct &image, imageStruct &right)
{
#ifdef ALTIVEC
#ifdef __VEC__
long h,w, width;
/*altivec code starts */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment