pinterf / TIVTC

TIVTC and TDeint
57 stars 9 forks source link

Some bugs, probably #24

Open dubhater opened 3 years ago

dubhater commented 3 years ago

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

pinterf commented 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?

dubhater commented 3 years ago

Yes.

pinterf commented 3 years ago

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

dubhater commented 3 years ago

Indeed.

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

pinterf commented 3 years ago

Once in a life :)