
This leads me to the next question : Do you have also the last VirtualDub version, the 1.10.5-prerelease build 35560 ? This one also was avaible only on the forum.
Do you want it ?
So, if i remember properly, it's in the 1.2 that have been added two significant features, with the prefetch possibility.admin wrote:What does 1.2 bring to the table?
No, it's just a choice made by phaeron to do things that's way, if you're talking about the fact that the whole filter chain is impacted. You just have to know how it works.admin wrote:It seems that from what you say the current solution may still be somewhat deficient.
Code: Select all
const VDXFBitmap& pxsrc = *fa->mpSourceFrames[0];
Thanks for the clarification, but a reasonable decimate filter is going to want to decide based on the previous processing of a frame whether or not it should be decimated. So it still looks brain-dead to me. Please clarify matters if I am wrong about it.jpsdr wrote: Phaeron choose this way of doing things to optimize/reduce the process time. It's a waste of time to process a frame, if it has do be finaly discarded in the chain. Seeing like this, it makes perfect sense. 99.9999% of the time, there will be no unwanted effect.
Code: Select all
uint32 YOURFILTER::GetParams()
{
const VDXPixmapLayout& pxsrc = *fa->src.mpPixmapLayout;
VDXPixmapLayout& pxdst = *fa->dst.mpPixmapLayout;
int64_t frame_count_h,frame_count_l;
VDFraction fr(fa->dst.mFrameRateHi, fa->dst.mFrameRateLo);
fr *= VDFraction(1,4);
fa->dst.mFrameRateHi = fr.getHi();
fa->dst.mFrameRateLo = fr.getLo();
frame_count_h=fa->dst.mFrameCount/4;
frame_count_l=((fa->dst.mFrameCount%4)>=2) ? 1:0;
fa->dst.mFrameCount=frame_count_h+frame_count_l; <- Here, you'll tell how number of total frame you'll output, changing the value
return(FILTERPARAM_SUPPORTS_ALTFORMATS);
}
bool YOURFILTER::Prefetch2(sint64 frame, IVDXVideoPrefetcher *prefetcher)
{
prefetcher->PrefetchFrame(0,(frame << 2)+3 ,0); <- Here, you tell what input number frame you want for the oupout.
prefetcher->PrefetchFrame(0,(frame << 2)+2,0); <- Here, you tell that you'll want also the previous frame.
return(true);
}
... Well, you have the exemple i've described, as i said, you can request several previous/next frames when you process a frame (allowing to cover all the frames), so it's absolutely possible to do your decimate filter. For exemple, just by going by pack of m frames. I assume that in each m frames pack, you allways remove n frames. You're not realy totaly random, you're not for exemple removing no frames during 3*m frames, and suddenly removing 3*n frames in continous.admin wrote:Something like that.
I don't know how internaly VDub does things, so, no...admin wrote:Given what you said, I would have to ask if you are sure that VirtualDub will cache M frames, so that they need not be recalculated. Do you know the answer?