using namespace HDK_Sample;
{
PRM_Name(
"boostval",
"Overexposure Boost"),
};
#define FADE_LINEAR 0
#define FADE_SQUARE 1
#define FADE_ROOT 2
{
};
{
&wipeRange),
&wipeRange),
&boostRange),
&blurRange),
&fadeMenu),
};
{
"Wipe A",
"Wipe B",
0
};
{
}
COP2_MultiInputWipe::COP2_MultiInputWipe(
OP_Network *parent,
{
}
COP2_MultiInputWipe::~COP2_MultiInputWipe()
{
}
namespace HDK_Sample {
{
public:
};
}
int xres, int , int , int )
{
int fademode;
float blur;
float boost;
fademode =
evalInt(
"fademode", 0, t);
{
}
{
}
}
void
{
bool init = false;
int ix1, ix2, iy1, iy2;
x1 = 0;
y1 = 0;
{
{
if(!init)
{
x1 = ix1;
y1 = iy1;
x2 = ix2;
y2 = iy2;
init = true;
}
else
{
if(ix1 < x1) x1 = ix1;
if(ix2 > x2) x2 = ix2;
if(iy1 < y1) y1 = iy1;
if(iy2 > y2) y2 = iy2;
}
}
}
{
x1 -= brad;
y1 -= brad;
x2 += brad;
y2 += brad;
}
}
void
{
{
needed_areas);
return;
}
{
needed_areas);
if(area)
}
{
needed_areas);
if(area)
}
}
int
int, float t,
int xstart, int ystart)
{
if(inputseq)
{
if(inputplane)
{
int xres,yres;
int ixres, iyres;
inputseq->
getRes(ixres,iyres);
ixres == xres && iyres == yres &&
{
return 1;
}
}
}
return 0;
}
void
float t, int xstart, int ystart,
int block,
bool *
mask,
bool *blocked)
{
bool iblocked = false;
{
ystart, block, &iblocked, mask);
}
{
ystart, block, &iblocked, mask);
}
if(!tiles && iblocked && blocked)
*blocked = true;
}
{
int arad, brad;
bool init = false;
fpplane.setScoped(1);
{
if(aregion)
{
boostAndBlur(tilelist, aregion, data->
myFaderA,
init = true;
}
}
{
if(bregion)
{
boostAndBlur(tilelist, bregion, data->
myFaderB,
init = true;
}
}
if(!init)
}
void
float fade, float boost, int rad, float blur,
{
float vedge;
float sum, hsum;
float *dest = NULL;
bool alloced = false;
const float iblur = fade / ((1.0f + blur) * (1.0
f + blur));
const float edge = 1.0f - (rad - blur * 0.5f);
stride = w + rad * 2;
{
{
if(src)
for(y=0; y<(h+rad*2) * stride; y++)
*src++ += boost;
}
}
if(!add)
{
alloced = true;
}
{
if(add)
{
alloced = true;
}
else
{
memset(dest, 0, sizeof(float)*w*h);
}
for(idx=0, y=0; y<
h; y++)
{
for(x=0; x<
w; x++, idx++)
{
sum = 0.0f;
for(i=-rad; i<=rad; i++)
{
vedge = (i == -rad || i == rad) ? edge : 1.0
f;
hsum = scan[-rad] * edge;
if(rad)
hsum += scan[rad] * edge;
for(j=-rad+1; j<rad; j++)
hsum += scan[j];
sum += hsum * vedge;
}
dest[idx] += sum * iblur;
}
}
}
if(alloced)
delete [] dest;
}
void
{
"HDK Multi Input Wipe",
2,
2,
0,
}