Page 1 of 1

TSt so slow?

PostPosted: Thu Aug 10, 2017 9:08 pm
by Chad Capeland
Code: Select all
{
   Tools = ordered() {
      TimeStretcher1_1 = TimeStretcher {
         CtrlWZoom = false,
         Inputs = {
            SourceTime = Input {
               SourceOp = "TimeStretcher1_1SourceTime",
               Source = "Value",
            },
            InterpolateBetweenFrames = Input { Value = 0, },
            Input = Input {
               SourceOp = "Background1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1595, 280.5 } },
      },
      TimeStretcher1_1SourceTime = BezierSpline {
         SplineColor = { Red = 233, Green = 217, Blue = 243 },
         NameSet = true,
         KeyFrames = {
            [0] = { 0, RH = { 0.333333333333333, 0.333333333333333 }, Flags = { Linear = true, Loop = true, Pingpong = true } },
            [1] = { 1, LH = { 0.666666666666667, 0.666666666666667 }, Flags = { Linear = true, Loop = true, Pingpong = true } }
         }
      },
      TimeStretcher2_1 = TimeStretcher {
         CtrlWZoom = false,
         Inputs = {
            SourceTime = Input {
               Value = 1,
               Expression = "time%2",
            },
            InterpolateBetweenFrames = Input { Value = 0, },
            Input = Input {
               SourceOp = "Background1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1595, 346.5 } },
      },
      Background1_1 = Background {
         CtrlWZoom = false,
         Inputs = {
            Width = Input { Value = 4096, },
            Height = Input { Value = 4096, },
            Depth = Input { Value = 4, },
            Type = Input { Value = FuID { "Corner" }, },
            TopLeftRed = Input { Value = 0.053, },
            TopLeftGreen = Input { Value = 1, },
            TopRightRed = Input { Value = 0.51, },
            TopRightGreen = Input { Value = 1, },
            BottomLeftGreen = Input { Value = 1, },
            BottomLeftBlue = Input { Value = 0.56, },
            BottomRightRed = Input { Value = 1, },
            BottomRightBlue = Input { Value = 0.52, },
         },
         ViewInfo = OperatorInfo { Pos = { 1485, 313.5 } },
      },
      Blur1 = Blur {
         CtrlWZoom = false,
         Inputs = {
            UseOpenCL = Input { Value = 0, },
            Filter = Input { Value = FuID { "Multi-box" }, },
            XBlurSize = Input {
               SourceOp = "Blur1BlurSize",
               Source = "Value",
            },
            Passes = Input { Value = 2, },
            Input = Input {
               SourceOp = "Background1_1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1595, 412.5 } },
      },
      Blur1BlurSize = BezierSpline {
         SplineColor = { Red = 18, Green = 240, Blue = 11 },
         KeyFrames = {
            [0] = { 0.5, RH = { 0.333333333333333, 0.483333333333333 }, Flags = { Linear = true, Loop = true, Pingpong = true } },
            [1] = { 0.45, LH = { 0.666666666666667, 0.466666666666667 }, Flags = { Linear = true, Loop = true, Pingpong = true } }
         }
      }
   }
}


Why are the TSt's so slow? They should, after the first 2 frames, run at whatever your monitor refresh rate is. I would think they would just create duplicate cache entries, but even without that, they should be faster. Heck, a small radius multibox Blur runs faster.

Re: TSt so slow?

PostPosted: Thu Aug 10, 2017 9:13 pm
by Chad Capeland
Ok, now this is getting weird...

Code: Select all
{
   Tools = ordered() {
      Background2 = Background {
         CtrlWZoom = false,
         NameSet = true,
         Inputs = {
            Width = Input { Value = 4096, },
            Height = Input { Value = 4096, },
            Depth = Input { Value = 4, },
            Type = Input { Value = FuID { "Corner" }, },
            TopLeftRed = Input { Value = 0.053, },
            TopLeftGreen = Input { Value = 1, },
            TopRightRed = Input { Value = 0.51, },
            TopRightGreen = Input { Value = 1, },
            BottomLeftGreen = Input { Value = 1, },
            BottomLeftBlue = Input { Value = 0.56, },
            BottomRightRed = Input { Value = 1, },
            BottomRightBlue = Input { Value = 0.52, },
            Gradient = Input {
               Value = Gradient {
                  Colors = {
                     [0] = { 0, 0, 0, 1 },
                     [1] = { 1, 1, 1, 1 }
                  }
               },
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1375, 313.5 } },
      },
      ChangeDepth1 = ChangeDepth {
         CtrlWZoom = false,
         Inputs = {
            Depth = Input { Value = 1, },
            Input = Input {
               SourceOp = "Background2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1485, 412.5 } },
      },
      Blur1 = Blur {
         CtrlWZoom = false,
         Inputs = {
            UseOpenCL = Input { Value = 0, },
            Filter = Input { Value = FuID { "Multi-box" }, },
            XBlurSize = Input {
               SourceOp = "Blur1BlurSize",
               Source = "Value",
            },
            Passes = Input { Value = 2, },
            Input = Input {
               SourceOp = "ChangeDepth1",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1595, 412.5 } },
      },
      Blur1BlurSize = BezierSpline {
         SplineColor = { Red = 18, Green = 240, Blue = 11 },
         NameSet = true,
         KeyFrames = {
            [0] = { 0.5, RH = { 0.333333333333333, 0.483333333333333 }, Flags = { Linear = true, Loop = true, Pingpong = true } },
            [1] = { 0.45, LH = { 0.666666666666667, 0.466666666666667 }, Flags = { Linear = true, Loop = true, Pingpong = true } }
         }
      },
      Blur1_1 = Blur {
         CtrlWZoom = false,
         Inputs = {
            UseOpenCL = Input { Value = 0, },
            Filter = Input { Value = FuID { "Multi-box" }, },
            XBlurSize = Input {
               SourceOp = "Blur1_1BlurSize",
               Source = "Value",
            },
            Passes = Input { Value = 2, },
            Input = Input {
               SourceOp = "Background2",
               Source = "Output",
            },
         },
         ViewInfo = OperatorInfo { Pos = { 1595, 313.5 } },
      },
      Blur1_1BlurSize = BezierSpline {
         SplineColor = { Red = 18, Green = 240, Blue = 11 },
         NameSet = true,
         KeyFrames = {
            [0] = { 0.5, RH = { 0.333333333333333, 0.483333333333333 }, Flags = { Linear = true, Loop = true, Pingpong = true } },
            [1] = { 0.45, LH = { 0.666666666666667, 0.466666666666667 }, Flags = { Linear = true, Loop = true, Pingpong = true } }
         }
      }
   }
}


The int8 Blur is significantly slower than the float32 one. Both Fusion 8.2 and 9.0.

Re: TSt so slow?

PostPosted: Mon Aug 14, 2017 2:39 am
by Chad Capeland
A simple Fuse in the form of...

Code: Select all
function Process(req)
   local time = InTime:GetValue(req).Value
   time = math.floor(time+.5)
   local out = In:GetSource(time, req:GetFlags())
   Out:Set(req, out)
end


... runs about 20x faster for the setting in the original post.

So TSt (and TSp) is indeed very slow, but Fuses are pretty cool. :)

Re: TSt so slow?

PostPosted: Mon Aug 14, 2017 10:26 am
by Lucjan Hirszmajer
I am not sure if time stretcher is calculating frame (not using cache) even if set to hold.
Had this issue with Fusion 7.7, not sure how it's done now.

Had no chance to check your comp, just my experience from using it.