Walda
10th February 2003, 00:24
Hi,
I´m just finishing new version of very simple "smart" Logo - off plugin. ( Only because the Logo masters don´t have enough enthusiasm to convert their great RGB filters to YUY2 ot UV12).
The plugins is working ( for me good), but I´m not satisfied with the architecture of it.
The question is - how to store buffer with data, which are proccesed only once when loading the plugin, and when proccessing every frame it is only reading from this buffer. And how to free ( delete) memory for this buffer after encoding is done?
The storing data in some file and repeatedly reading of it for every frame seems to me slightly unhappy solution.
// Logo.cpp : Defines the entry point for the DLL application.
#include .....
unsigned char* smart = new unsigned char[255*255];
class Logo : public GenericVideoFilter
{
public:
Logo(PClip _child, int _fix, int _fiy, int _f_width, int _f_height, int _c, const char * _fileName, IScriptEnvironment* env) : GenericVideoFilter(_child), fix(_fix), fiy(_fiy), f_width(_f_width), f_height(_f_height), c(_c), fileName(_fileName)
{
here is smart proccessing
}
PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env);
};
PVideoFrame __stdcall Logo::GetFrame(int n, IScriptEnvironment* env) {
Here is only reading from smart
}
AVSValue ...
extern "C" ...
The second question - when using Avisynth with some plugin, there is varying of fps when encoding ( in my case between 2-8fps.) Is it normal??
Zdenek W.
I´m just finishing new version of very simple "smart" Logo - off plugin. ( Only because the Logo masters don´t have enough enthusiasm to convert their great RGB filters to YUY2 ot UV12).
The plugins is working ( for me good), but I´m not satisfied with the architecture of it.
The question is - how to store buffer with data, which are proccesed only once when loading the plugin, and when proccessing every frame it is only reading from this buffer. And how to free ( delete) memory for this buffer after encoding is done?
The storing data in some file and repeatedly reading of it for every frame seems to me slightly unhappy solution.
// Logo.cpp : Defines the entry point for the DLL application.
#include .....
unsigned char* smart = new unsigned char[255*255];
class Logo : public GenericVideoFilter
{
public:
Logo(PClip _child, int _fix, int _fiy, int _f_width, int _f_height, int _c, const char * _fileName, IScriptEnvironment* env) : GenericVideoFilter(_child), fix(_fix), fiy(_fiy), f_width(_f_width), f_height(_f_height), c(_c), fileName(_fileName)
{
here is smart proccessing
}
PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env);
};
PVideoFrame __stdcall Logo::GetFrame(int n, IScriptEnvironment* env) {
Here is only reading from smart
}
AVSValue ...
extern "C" ...
The second question - when using Avisynth with some plugin, there is varying of fps when encoding ( in my case between 2-8fps.) Is it normal??
Zdenek W.