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) ...@@ -130,7 +130,7 @@ void pix_add :: processRGBA_Gray(imageStruct &image, imageStruct &right)
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
void pix_add :: processYUV_YUV(imageStruct &image, imageStruct &right) void pix_add :: processYUV_YUV(imageStruct &image, imageStruct &right)
{ {
#ifdef ALTIVEC #ifdef __VEC__
processYUV_Altivec(image,right); processYUV_Altivec(image,right);
return; return;
#else #else
...@@ -161,7 +161,7 @@ return; ...@@ -161,7 +161,7 @@ return;
void pix_add :: processYUV_Altivec(imageStruct &image, imageStruct &right) void pix_add :: processYUV_Altivec(imageStruct &image, imageStruct &right)
{ {
#ifdef ALTIVEC #ifdef __VEC__
int h,w,width; int h,w,width;
width = image.xsize/8; width = image.xsize/8;
//format is U Y V Y //format is U Y V Y
...@@ -171,7 +171,7 @@ void pix_add :: processYUV_Altivec(imageStruct &image, imageStruct &right) ...@@ -171,7 +171,7 @@ void pix_add :: processYUV_Altivec(imageStruct &image, imageStruct &right)
//unsigned int i; //unsigned int i;
short elements[8]; short elements[8];
//vector signed char v; //vector signed char v;
vector short v; vector signed short v;
}shortBuffer; }shortBuffer;
union union
......
...@@ -135,7 +135,7 @@ void pix_background :: processGrayImage(imageStruct &image) ...@@ -135,7 +135,7 @@ void pix_background :: processGrayImage(imageStruct &image)
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
void pix_background :: processYUVImage(imageStruct &image) void pix_background :: processYUVImage(imageStruct &image)
{ {
#ifdef ALTIVEC #ifdef __VEC__
processYUVImageAltivec(image); processYUVImageAltivec(image);
return; return;
#else #else
...@@ -191,7 +191,7 @@ m_reset = 0; ...@@ -191,7 +191,7 @@ m_reset = 0;
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
void pix_background :: processYUVImageAltivec(imageStruct &image) void pix_background :: processYUVImageAltivec(imageStruct &image)
{ {
#ifdef ALTIVEC #ifdef __VEC__
register int h,w,i,j,width; register int h,w,i,j,width;
int pixsize = image.xsize * image.ysize * image.csize; int pixsize = image.xsize * image.ysize * image.csize;
h = image.ysize; h = image.ysize;
......
...@@ -167,7 +167,7 @@ delete saved; ...@@ -167,7 +167,7 @@ delete saved;
saved = new unsigned int [m_blurSize]; saved = new unsigned int [m_blurSize];
} }
#ifdef ALTIVEC #ifdef __VEC__
processYUVAltivec(image); processYUVAltivec(image);
return; return;
#else #else
...@@ -216,7 +216,7 @@ for (h=0; h<image.ysize-1; h++){ ...@@ -216,7 +216,7 @@ for (h=0; h<image.ysize-1; h++){
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
void pix_blur :: processYUVAltivec(imageStruct &image) void pix_blur :: processYUVAltivec(imageStruct &image)
{ {
#ifdef ALTIVEC #ifdef __VEC__
int h,w,width; int h,w,width;
unsigned short rightGain,imageGain; unsigned short rightGain,imageGain;
/*altivec code starts */ /*altivec code starts */
......
...@@ -89,7 +89,7 @@ void pix_chroma_key :: processRGBA_RGBA(imageStruct &image, imageStruct &right) ...@@ -89,7 +89,7 @@ void pix_chroma_key :: processRGBA_RGBA(imageStruct &image, imageStruct &right)
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
void pix_chroma_key :: processYUV_YUV(imageStruct &image, imageStruct &right) void pix_chroma_key :: processYUV_YUV(imageStruct &image, imageStruct &right)
{ {
#ifdef ALTIVEC #ifdef __VEC__
processYUV_YUVAltivec(image, right); processYUV_YUVAltivec(image, right);
return; return;
#else #else
...@@ -259,7 +259,7 @@ return; ...@@ -259,7 +259,7 @@ return;
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
void pix_chroma_key :: processYUV_YUVAltivec(imageStruct &image, imageStruct &right) void pix_chroma_key :: processYUV_YUVAltivec(imageStruct &image, imageStruct &right)
{ {
#ifdef ALTIVEC #ifdef __VEC__
register int h,w,i,j,width; register int h,w,i,j,width;
h = image.ysize; h = image.ysize;
......
...@@ -74,7 +74,7 @@ void pix_compare :: processRGBA_RGBA(imageStruct &image, imageStruct &right) ...@@ -74,7 +74,7 @@ void pix_compare :: processRGBA_RGBA(imageStruct &image, imageStruct &right)
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
void pix_compare :: processYUV_YUV(imageStruct &image, imageStruct &right) void pix_compare :: processYUV_YUV(imageStruct &image, imageStruct &right)
{ {
#ifdef ALTIVEC #ifdef __VEC__
processYUVAltivec(image,right); processYUVAltivec(image,right);
return; return;
#else #else
...@@ -119,7 +119,7 @@ void pix_compare :: processYUV_YUV(imageStruct &image, imageStruct &right) ...@@ -119,7 +119,7 @@ void pix_compare :: processYUV_YUV(imageStruct &image, imageStruct &right)
void pix_compare :: processYUVAltivec(imageStruct &image, imageStruct &right) void pix_compare :: processYUVAltivec(imageStruct &image, imageStruct &right)
{ {
#ifdef ALTIVEC #ifdef __VEC__
register int h,w,i,j,width; register int h,w,i,j,width;
h = image.ysize; h = image.ysize;
......
...@@ -308,7 +308,7 @@ void pix_convolve :: processYUVImage(imageStruct &image) ...@@ -308,7 +308,7 @@ void pix_convolve :: processYUVImage(imageStruct &image)
void pix_convolve :: calculate3x3YUV(imageStruct &image,imageStruct &tempImg) void pix_convolve :: calculate3x3YUV(imageStruct &image,imageStruct &tempImg)
{ {
#ifdef ALTIVEC #ifdef __VEC__
calculate3x3YUVAltivec(image,tempImg); calculate3x3YUVAltivec(image,tempImg);
return; return;
#else #else
...@@ -471,7 +471,7 @@ i=xsize+1; ...@@ -471,7 +471,7 @@ i=xsize+1;
//too many temps for all the registers - reuse some //too many temps for all the registers - reuse some
void pix_convolve :: calculate3x3YUVAltivec(imageStruct &image,imageStruct &tempImg) void pix_convolve :: calculate3x3YUVAltivec(imageStruct &image,imageStruct &tempImg)
{ {
#ifdef ALTIVEC #ifdef __VEC__
int h,w,width,i; int h,w,width,i;
int xsize = (tempImg.xsize)*2; int xsize = (tempImg.xsize)*2;
...@@ -481,7 +481,7 @@ void pix_convolve :: calculate3x3YUVAltivec(imageStruct &image,imageStruct &temp ...@@ -481,7 +481,7 @@ void pix_convolve :: calculate3x3YUVAltivec(imageStruct &image,imageStruct &temp
union union
{ {
short elements[8]; short elements[8];
vector short v; vector signed short v;
}shortBuffer; }shortBuffer;
union union
...@@ -655,7 +655,7 @@ void pix_convolve :: calculate3x3YUVAltivec(imageStruct &image,imageStruct &temp ...@@ -655,7 +655,7 @@ void pix_convolve :: calculate3x3YUVAltivec(imageStruct &image,imageStruct &temp
yres = vec_packs(yhi,ylo); yres = vec_packs(yhi,ylo);
//combine with the UV\ //combine with the UV
//vec_mergel + vec_mergeh Y and UV //vec_mergel + vec_mergeh Y and UV
hiImage = vec_mergeh(uvres,yres); hiImage = vec_mergeh(uvres,yres);
loImage = vec_mergel(uvres,yres); loImage = vec_mergel(uvres,yres);
......
...@@ -77,7 +77,7 @@ void pix_invert :: processGrayImage(imageStruct &image) ...@@ -77,7 +77,7 @@ void pix_invert :: processGrayImage(imageStruct &image)
void pix_invert :: processYUVImage(imageStruct &image) void pix_invert :: processYUVImage(imageStruct &image)
{ {
#ifdef ALTIVEC #ifdef __VEC__
processYUVAltivec(image); processYUVAltivec(image);
return; return;
#else #else
...@@ -107,7 +107,7 @@ void pix_invert :: processYUVImage(imageStruct &image) ...@@ -107,7 +107,7 @@ void pix_invert :: processYUVImage(imageStruct &image)
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
void pix_invert :: processYUVAltivec(imageStruct &image) void pix_invert :: processYUVAltivec(imageStruct &image)
{ {
#ifdef ALTIVEC #ifdef __VEC__
int h,w,width; int h,w,width;
//post("pix_invert: Altivec"); //post("pix_invert: Altivec");
width = image.xsize/8; width = image.xsize/8;
......
...@@ -85,7 +85,7 @@ void pix_mix :: processRGBA_RGBA(imageStruct &image, imageStruct &right) ...@@ -85,7 +85,7 @@ void pix_mix :: processRGBA_RGBA(imageStruct &image, imageStruct &right)
// //
///////////////////////////////////////////////////////// /////////////////////////////////////////////////////////
void pix_mix :: processYUV_YUV(imageStruct &image, imageStruct &right){ void pix_mix :: processYUV_YUV(imageStruct &image, imageStruct &right){
#ifdef ALTIVEC #ifdef __VEC__
//post("altivec"); //post("altivec");
processYUVAltivec (image, right); processYUVAltivec (image, right);
return; return;
...@@ -133,7 +133,7 @@ return; ...@@ -133,7 +133,7 @@ return;
//needs fixing for better IQ //needs fixing for better IQ
void pix_mix :: processYUVAltivec (imageStruct &image, imageStruct &right) void pix_mix :: processYUVAltivec (imageStruct &image, imageStruct &right)
{ {
#ifdef ALTIVEC #ifdef __VEC__
long h,w, width; long h,w, width;
/*altivec code starts */ /*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