Open dubhater opened 3 years ago
Thanks, all is true of course. The second one became
const VideoInfo vi2 = !useclip2 ? child->GetVideoInfo() : clip2->GetVideoInfo();
PVideoFrame dst = env->NewVideoFrame(vi2);
setBlack(dst, vi2);
if (retFrames <= -305)
{
if (retFrames <= -306 && se)
env->ThrowError("TDecimate: mode 3 finished (early termination)!");
sprintf(buf, "Mode 3: Last Actual Frame = %d", lastFrame);
Draw(dst, 2, 1, buf, vi2);
}
Are you porting?
Yes.
I suppose without yuy2 and using frame properties. Lucky vapoursynthers. :)
Indeed.
And thank you for all your hard work making the code portable.
Once in a life :)
I noticed a few more things.
It should be vi2 instead of vi in these two places, because clip2 is allowed to have different resolution and colorspace/bit depth: https://github.com/pinterf/TIVTC/blob/af18f2caf0661112a9e95e6effa78dd74c57d765/src/TIVTC/TDecimate.cpp#L349 https://github.com/pinterf/TIVTC/blob/af18f2caf0661112a9e95e6effa78dd74c57d765/src/TIVTC/TDecimate.cpp#L748-L755 (vi comes from child, vi2 comes from clip2.)
GetRowSize returns the width in bytes, but dispatch_blend expects the width in pixels: https://github.com/pinterf/TIVTC/blob/af18f2caf0661112a9e95e6effa78dd74c57d765/src/TIVTC/TDecimate.cpp#L2185
blurFrame expects cpuFlags, not opt: https://github.com/pinterf/TIVTC/blob/a3d1354b177846c4599280df3cfb86b8566cb1cc/src/TIVTC/TDecimate.cpp#L1105-L1107