Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se |
|
|
#2002 | Link |
|
.
![]() Join Date: Oct 2001
Location: Germany
Posts: 7,862
|
Code:
ClearAutoloadDirs()
LoadPlugin("I:\INNOIN~1\64bit\Avisynth\AVISYN~1\LSMASHSource.dll")
LoadPlugin("I:\INNOIN~1\64bit\Avisynth\AVISYN~1\MosquitoNR.dll")
LWLibavVideoSource("G:\TESTCL~1\test.avi",cache=false,dr=true,format="YUV420P8", prefer_hw=0)
propclearall()
MosquitoNR()
ConvertToRGB32(matrix="Rec601")
return last
-> no change |
|
|
|
|
|
#2003 | Link |
|
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,384
|
Ok, so I've tried to test a bit:
Code:
ColorBars(848, 480, pixel_type="YV12") MosquitoNR() ConverttoRGB(matrix="Rec601") So I tried with a real video, an XDCAM-50 file and it works too: Code:
FFVideoSource("\\mibctvan000.avid.mi.bc.sky.it\Ingest\MEDIA\temp\Test9_UCN_manual_QC_SubITA_DolbyE_DolbyE_PCM_PCM.mxf")
propClearAll()
MosquitoNR()
ConverttoRGB(matrix="Rec601")
Code:
LWLibavVideoSource("\\mibctvan000.avid.mi.bc.sky.it\Ingest\MEDIA\temp\Test9_UCN_manual_QC_SubITA_DolbyE_DolbyE_PCM_PCM.mxf")
propClearAll()
MosquitoNR()
ConverttoRGB(matrix="Rec601")
![]() and even your exact same command line: ![]() Avisynth 3.7.2 Stable x64 Windows 11 x64 Out of curiosity, are you using this build of MosquitoNR? Link |
|
|
|
|
|
#2005 | Link | |
|
Registered User
Join Date: Jan 2014
Posts: 2,535
|
Quote:
In the avsViewer::avsViewer there is an initialization of AVSValue m_res in that initialization list. Here: https://github.com/Selur/avsViewer/b...Viewer.cpp#L28 But the global variable const AVS_Linkage *AVS_linkage which is needed as a bridge to fill/initialize an AVSValue does not exist yet. I'd try to remove m_res from the initialization list. Otherwise your code seems to be correct: toLocal8Bit is providing a safe null-terminated buffer; I guess 'm_env' exists just fine, so GetAVSLinkage should work as well. |
|
|
|
|
|
|
#2006 | Link |
|
.
![]() Join Date: Oct 2001
Location: Germany
Posts: 7,862
|
Sadly, removing m_res from the initialization list doesn't help.
The strange thing is that if the .avs script doesn't include any "ConvertTo..." calls the loading of the script works fine, but then it crashes when I call ConvertToRGB32. :/ When I use: Code:
bool avsViewer::invokeFunction(const QString& name)
{
try {
std::cout << "invoking " << qPrintable(name) << std::endl;
const char* function = name.toLocal8Bit();
if (!m_env->FunctionExists(function)) {
m_env->ThrowError(name.toLocal8Bit() + " does not exist!");
}
m_res = m_env->Invoke(function, AVSValue(&m_res, 1)); // invoking the function
std::cerr << "invoked " << qPrintable(name) << std::endl;
return true;
} catch (AvisynthError err) { //catch AvisynthErrors
std::cerr << "Avisynth error " << qPrintable(m_currentInput) << ": " << std::endl << err.msg << std::endl;
} catch (...) { //catch the rest
std::cerr << "Unknown C++ exception" << std::endl;
}
return false;
}
Code:
Initializing the avisynth script environment,.. loaded avisynth dll,..(I:/workspace/avsViewer/release/AviSynth.dll) loaded CreateScriptEnvironment definition from dll,.. Importing c:\Users\Selur\Desktop\test.avs Color: YV12, Resolution: 640x352, Frame rate: 25 fps, Length: 429 frames, PRO Current color space: YV12 invoking ConvertToRGB32 Code:
m_res = m_env->Invoke(function, AVSValue(&m_res, 1)); // invoking the function ![]() Cu Selur |
|
|
|
|
|
#2007 | Link |
|
Registered User
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
|
I'm not in the right mind at the moment but:
Code:
m_res = m_env->Invoke(function, AVSValue(&m_res, 1)); // invoking the function /I'mNotAProgrammer |
|
|
|
|
|
#2009 | Link |
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,823
|
We should probably pop all this out into its own thread. But for now, I can confirm that
Code:
temp = env->Invoke("colorbars", 1280); // how do you invoke a filter with no parameters?
temp = env->Invoke("converttoyv12", AVSValue(&temp, 1));
temp = env->Invoke("mosquitonr", AVSValue(&temp, 1));
temp = env->Invoke("converttorgb32", AVSValue(&temp, 1));
Yet putting ConvertToRGB32 directly in a script after MosquitoNR works fine. Very strange. |
|
|
|
|
|
#2010 | Link | |
|
Registered User
Join Date: Mar 2012
Location: Texas
Posts: 1,676
|
For x64 it would have to be with the Intel compiler since the source contains assembly.
On a side note, for anyone with the means to do it. The following plugins were all compiled with the Intel compiler as well. Downside is that they are compiled for the 2.5 interface and may be problematic as stated here: https://github.com/AviSynth/AviSynthPlus/issues/272 Quote:
A 2.6 interface update for these plugins would be appreciated .
|
|
|
|
|
|
|
#2011 | Link | |||
|
.
![]() Join Date: Oct 2001
Location: Germany
Posts: 7,862
|
Quote:
![]() Quote:
Quote:
![]() Cu Selur |
|||
|
|
|
|
|
#2012 | Link |
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,823
|
I'm trying to build 3.7.2 from source with MSVC 2019. I download the source, use "Open a local folder" and it imports everything fine. I then go to Manage Configurations... which gives me a GUI to make changes to CMakeSettings.json. I take out the default Debug build and replace it with x64-Release, and I change the Configuration type to Release.
When I try to build, I get a number of unresolved externals: ![]() The funny thing is I can do the exact same thing on my work computer, and it works fine. But not at home. Does anyone know what's wrong with my setup? Am I missing some required part of MSVC? Edit: I CAN successfully build an x64-Debug version. But not Release. Last edited by wonkey_monkey; 21st March 2022 at 19:07. |
|
|
|
|
|
#2013 | Link | |
|
Formerly davidh*****
![]() Join Date: Jan 2004
Posts: 2,823
|
Quote:
What worked for me was putting ConvertToRGB32 in a script and then running the script with AVSMeter64. If I try to load the script in my viewer - which invokes ConvertToRGB32 a further time, regardless of what type the script produces - it crashes. |
|
|
|
|
|
|
#2015 | Link | |
|
Registered User
Join Date: Jan 2014
Posts: 2,535
|
Quote:
I'm using CMakeGUI and using it to generate the .sln solution for all projects and dlls in Avisynth+. https://avisynthplus.readthedocs.io/...from-cmake-gui Then I open the generated sln and can use both debug and release build from Visual Studio IDE. |
|
|
|
|
|
|
#2016 | Link |
|
Registered User
Join Date: Feb 2016
Location: Nonsense land
Posts: 339
|
Might be unrelated, but when I used invoke with vinverse, when passing directly the value in the invoke call I got the float converted to int for no reason, then I declared first the array and then I set the value of each index individually and the problem was gone, give it a shot, you got nothing to lose after all...
3 nights without sleeping
|
|
|
|
|
|
#2020 | Link |
|
Registered User
Join Date: Nov 2009
Posts: 2,375
|
I wonder if frame props are broken? I expect frame properties assigned to frame 0 be retrieved outside a runtime environment.
Code:
ScriptClip( function[] () {
SelectEvery(1,-current_frame)
AverageLuma() > 98 ? propSet("_TestFP", 4) : propSet("_TestFP", 1)
SelectEvery(1, current_frame)
subtitle(string(AverageLuma()),align=8,y=100)
} )
subtitle(string(propGetInt("_TestFP")),align=8)
__________________
i7-4790K@Stock::GTX 1070] AviSynth+ filters and mods on GitHub + Discussion thread |
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|