View Single Post
Old 30th August 2015, 10:13   #5  |  Link
jpsdr
Registered User
 
Join Date: Oct 2002
Location: France
Posts: 2,316
In my case, colorspace change, so using NewVideoFrame is obviously the correct way.
In case you eventualy don't need to create a new frame, i assume somthing like this would be the correct way :
Code:
PVideoFrame __stdcall AutoYUY2::GetFrame(int n, IScriptEnvironment* env) 
{
	PVideoFrame frame = child->GetFrame(n,env);
	const uint8_t *src = frame->GetReadPtr(PLANAR_Y);
           env->MakeWritable(&frame);
           uint8_t *dst=frame->GetWritePtr(PLANAR_Y);
Is this the only way, and it always works the same way (creates a new memory and duplicate), or is there also a way to work the same than VDub pluggin, having finaly src and dst the same (avoiding the time and ressources to allocate new memory and transfer data) and somthing like the FILTERPARAM_SWAP_BUFFERS of VDub pluggin is also avaible on avisynth ?

Last edited by jpsdr; 30th August 2015 at 10:15.
jpsdr is offline   Reply With Quote