fenomeno83
1st December 2010, 11:26
I have problem to compile to 64bit with visual studio!
I use this:
PVideoFrame FilteringAvisynth::EqualizeAvs(string src)
{
PVideoFrame pf=NULL;
try
{
//load plugin to equalize source image
env->Invoke("LoadPlugin", "AGC.dll");
//read image from path invoking ImageReader avisynth internal filter
AVSValue input = env->Invoke("ImageReader", src.c_str());
//convert into YV12 (next filter need this color space) invoking ConvertToYV12 avisynth internal filter
input = env->Invoke("ConvertToYV12", input);
//equalize image invoking HDRACC avisynth external filter from AGC.dll
input = env->Invoke("HDRAGC", input);
//convert into RGB invoking ConvertToRGB avisynth internal filter
input = env->Invoke("ConvertToRGB", input);
//adjust rgb image
AVSValue par3[4] = {input,1.0,1.04,1.0};
input = env->Invoke("RGBAdjust", AVSValue(par3,4));
//write image (will write after GetFrame method) in a temp file invoking ImageWriter avisynth internal filter and return it in a PClip invoking AsClip method
//will be write in format (src + "000000.jpg")
AVSValue par7[5] = {input,src.c_str(),0,0,"jpg"};
PClip clip = env->Invoke("ImageWriter", AVSValue(par7,5)).AsClip();
//extract the first frame from PClip, that represents equalized RGB image, using GetFrame method
pf = clip->GetFrame(0,env);
}
catch (AvisynthError err)
{
printf("%s\n", err.msg);
}
return pf;
}[/I]
So before I changed in avisynth.h
void* operator new(unsigned size);
in
void* operator new(size_t size);
because I had errors..
but at last I have these errors:
error LNK2001: unresolved external symbol "class IScriptEnvironment * __cdecl CreateScriptEnvironment(int)" (?CreateScriptEnvironment@@YAPEAVIScriptEnvironment@@H@Z)
ps: I put avisynth.dll devil.dll(taken from windows\syswow64 directory) and agc.dll in working directory
I include avisynth.h
I link avisynth.lib, but have link errors when compile in x64 (with same included directories in win32 mode it works!)
Help me please
Thanks
I use this:
PVideoFrame FilteringAvisynth::EqualizeAvs(string src)
{
PVideoFrame pf=NULL;
try
{
//load plugin to equalize source image
env->Invoke("LoadPlugin", "AGC.dll");
//read image from path invoking ImageReader avisynth internal filter
AVSValue input = env->Invoke("ImageReader", src.c_str());
//convert into YV12 (next filter need this color space) invoking ConvertToYV12 avisynth internal filter
input = env->Invoke("ConvertToYV12", input);
//equalize image invoking HDRACC avisynth external filter from AGC.dll
input = env->Invoke("HDRAGC", input);
//convert into RGB invoking ConvertToRGB avisynth internal filter
input = env->Invoke("ConvertToRGB", input);
//adjust rgb image
AVSValue par3[4] = {input,1.0,1.04,1.0};
input = env->Invoke("RGBAdjust", AVSValue(par3,4));
//write image (will write after GetFrame method) in a temp file invoking ImageWriter avisynth internal filter and return it in a PClip invoking AsClip method
//will be write in format (src + "000000.jpg")
AVSValue par7[5] = {input,src.c_str(),0,0,"jpg"};
PClip clip = env->Invoke("ImageWriter", AVSValue(par7,5)).AsClip();
//extract the first frame from PClip, that represents equalized RGB image, using GetFrame method
pf = clip->GetFrame(0,env);
}
catch (AvisynthError err)
{
printf("%s\n", err.msg);
}
return pf;
}[/I]
So before I changed in avisynth.h
void* operator new(unsigned size);
in
void* operator new(size_t size);
because I had errors..
but at last I have these errors:
error LNK2001: unresolved external symbol "class IScriptEnvironment * __cdecl CreateScriptEnvironment(int)" (?CreateScriptEnvironment@@YAPEAVIScriptEnvironment@@H@Z)
ps: I put avisynth.dll devil.dll(taken from windows\syswow64 directory) and agc.dll in working directory
I include avisynth.h
I link avisynth.lib, but have link errors when compile in x64 (with same included directories in win32 mode it works!)
Help me please
Thanks