Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some bugs, probably #24

Open
dubhater opened this issue Mar 12, 2021 · 5 comments
Open

Some bugs, probably #24

dubhater opened this issue Mar 12, 2021 · 5 comments

Comments

@dubhater
Copy link

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:

blendFrames(frame1, frame2, dst, a1, vi, env);

PVideoFrame dst = env->NewVideoFrame(vi);
setBlack(dst, vi);
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, vi);

(vi comes from child, vi2 comes from clip2.)


GetRowSize returns the width in bytes, but dispatch_blend expects the width in pixels:

width = src1->GetRowSize(plane);


blurFrame expects cpuFlags, not opt:

TIVTC/src/TIVTC/TDecimate.cpp

Lines 1105 to 1107 in a3d1354

blurFrame(prevt, prev, 2, chroma, env, vit, opt);
blurFrame(nextt, next, 2, chroma, env, vit, opt);

@pinterf
Copy link
Owner

pinterf commented Mar 12, 2021

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?

@dubhater
Copy link
Author

Yes.

@pinterf
Copy link
Owner

pinterf commented Mar 13, 2021

I suppose without yuy2 and using frame properties. Lucky vapoursynthers. :)

@dubhater
Copy link
Author

Indeed.

And thank you for all your hard work making the code portable.

@pinterf
Copy link
Owner

pinterf commented Mar 13, 2021

Once in a life :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants