Skip to content

Commit

Permalink
Merge pull request #7 from yumetodo/speedup/allocate_outside
Browse files Browse the repository at this point in the history
This is Good.
but did you mix up your benchmark values above?
  • Loading branch information
MaverickTse authored Oct 30, 2016
2 parents 98e7aa1 + d74a3b8 commit bf26f10
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions SigColorFastAviUtl/sigcolorfastaviutl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ BOOL func_proc_con(FILTER *fp, FILTER_PROC_INFO *fpip) // This is the main image
if (prevIsYC_Con)
{
/* Scan Y channel data */
int fh = fpip->h;
const int fh = fpip->h;

#pragma loop( hint_parallel(0) )
#pragma loop( ivdep )
Expand All @@ -212,17 +212,17 @@ BOOL func_proc_con(FILTER *fp, FILTER_PROC_INFO *fpip) // This is the main image
}
else //RGB mode
{
int fh = fpip->h;
int fw = fpip->w;
const int fh = fpip->h;
const int fw = fpip->w;
#pragma loop( hint_parallel(0) )
#pragma loop( ivdep )
for (int r = 0; r < fh; r++)
{
PIXEL* rgb = new PIXEL;
#pragma loop( no_vector )
for (int c = 0; c < fw; c++)
{
PIXEL_YC* px = fpip->ycp_edit + r* fpip->max_w + c;
PIXEL* rgb= new PIXEL;
fp->exfunc->yc2rgb(rgb, px, 1);
// transform each channel is needed
//PIXEL t_rgb{ 0 };
Expand All @@ -243,8 +243,8 @@ BOOL func_proc_con(FILTER *fp, FILTER_PROC_INFO *fpip) // This is the main image
}
// convert back
fp->exfunc->rgb2yc(px, rgb, 1);
delete rgb;
}
delete rgb;
}
}
#ifdef USECLOCK
Expand Down Expand Up @@ -449,7 +449,7 @@ BOOL func_proc_sd(FILTER *fp, FILTER_PROC_INFO *fpip) // This is the main image
if (prevIsYC_SD)
{
/* Scan Y channel data */
int fh = fpip->h;
const int fh = fpip->h;

#pragma loop( hint_parallel(0) )
#pragma loop( ivdep )
Expand All @@ -465,17 +465,17 @@ BOOL func_proc_sd(FILTER *fp, FILTER_PROC_INFO *fpip) // This is the main image
}
else //RGB mode
{
int fh = fpip->h;
int fw = fpip->w;
const int fh = fpip->h;
const int fw = fpip->w;
#pragma loop( hint_parallel(0) )
#pragma loop( ivdep )
for (int r = 0; r < fh; r++)
{
PIXEL* rgb = new PIXEL;
#pragma loop( no_vector )
for (int c = 0; c < fw; c++)
{
PIXEL_YC* px = fpip->ycp_edit + r* fpip->max_w + c;
PIXEL* rgb = new PIXEL;
fp->exfunc->yc2rgb(rgb, px, 1);
// transform each channel is needed
//PIXEL t_rgb{ 0 };
Expand All @@ -496,8 +496,8 @@ BOOL func_proc_sd(FILTER *fp, FILTER_PROC_INFO *fpip) // This is the main image
}
// convert back
fp->exfunc->rgb2yc(px, rgb, 1);
delete rgb;
}
delete rgb;
}
}
#ifdef USECLOCK
Expand Down

0 comments on commit bf26f10

Please sign in to comment.