Ejemplo n.º 1
0
static void _initlists() {
 int _i; static int _first = 1;
  if (!_first) return;
   _t_ninf = makevector(301*sizeof(double));
   _t__znexp = makevector(301*sizeof(double));
   _t_pinf = makevector(301*sizeof(double));
   _t__zpexp = makevector(301*sizeof(double));
_first = 0;
}
Ejemplo n.º 2
0
static void _initlists(){
 double _x; double* _p = &_x;
 int _i; static int _first = 1;
  if (!_first) return;
 _slist1[0] = &(X) - _p;  _dlist1[0] = &(DX) - _p;
   _t_Xinf = makevector(3001*sizeof(double));
   _t_Xtau = makevector(3001*sizeof(double));
_first = 0;
}
static void _initlists(){
 double _x; double* _p = &_x;
 int _i; static int _first = 1;
  if (!_first) return;
 _slist1[0] = &(m) - _p;  _dlist1[0] = &(Dm) - _p;
 _slist1[1] = &(h) - _p;  _dlist1[1] = &(Dh) - _p;
   _t_minf = makevector(2001*sizeof(double));
   _t_mtau = makevector(2001*sizeof(double));
   _t_hinf = makevector(2001*sizeof(double));
   _t_htau = makevector(2001*sizeof(double));
_first = 0;
}
Ejemplo n.º 4
0
	Binary::Binary(BinaryComputePlane *_computeplane, PClip _child, PClip _secondclip, AVSValue _chroma, IScriptEnvironment *env)
	: SupportFilter(_child, env), secondclip(_secondclip), 
	computeplane(*_computeplane),
	computechroma(  *(decipherchromaargument(_chroma, makevector(_child,_secondclip), *_computeplane) ) )
	{
		if(_secondclip->GetVideoInfo().width != vi.width)
			env->ThrowError("LimitedSupport binary filter: widths do not match.");
		if(_secondclip->GetVideoInfo().height != vi.height)
			env->ThrowError("LimitedSupport binary filter: heights do not match.");
	}
Ejemplo n.º 5
0
op_makevec()
  {
  int n, depth;
  unsigned char *ptr, **array;
  depth = popint();
  array = malloc((depth+1)*sizeof(unsigned char *));   /* null terminated array */
  for (n=0; n < depth; n++) array[depth-n-1] = pop(0);
  array[depth] = (unsigned char *) 0;
  ptr = makevector(array, type_vector, subtype_general);
  for (n=0; n < depth; n++) free(array[n]);
  free(array);
  push(ptr);
  }
Ejemplo n.º 6
0
	PVideoFrame __stdcall Unary::GetFrame(int n, IScriptEnvironment *env)
	{
		PVideoFrame result = env->NewVideoFrame(vi);
		const PVideoFrame first = child->GetFrame(n, env);
		vector<const PVideoFrame> source = makevector(first);

		//This treatment of chroma is not the correct design... the problem is that 
		//AVISynth imposes a restriction on how frames can be requested efficiently
		// -- so total planar separation is not possible.

		computeplane(result, first, PLANAR_Y);
		//note that as chroma may come from an external source, frame number is needed
		computechroma(result, source, n, PLANAR_U, env);
		computechroma(result, source, n, PLANAR_V, env);

		return result;
	}
Ejemplo n.º 7
0
op_makeveclu()
  {
  int n, depth,
      upper,
      lower;
  unsigned char *ptr, **array;

  upper = popint();
  lower = popint();
  depth = upper - lower + 1;
  array = malloc((depth+1)*sizeof(unsigned char *));   /* null terminated array */
  for (n=0; n < depth; n++)
	array[depth-n-1] = pop(0);

  array[depth] = (unsigned char *) 0;
  ptr = makevector(array, type_vector, subtype_general);
  /* set uppper and lower bounds */

  for (n=0; n < depth; n++)
	free(array[n]);

  free(array);
  push(ptr);
  }
Ejemplo n.º 8
0
	Unary::Unary(UnaryComputePlane *_computeplane, PClip _child, AVSValue _chroma, IScriptEnvironment *env)
	: SupportFilter(_child, env), 
	computeplane(*_computeplane),
	computechroma(  *(decipherchromaargument(_chroma, makevector(_child), *_computeplane) ) )
	{
	}