Skip to content

Commit

Permalink
fix encode caching bug pt 2
Browse files Browse the repository at this point in the history
  • Loading branch information
TNTwise committed Sep 14, 2024
1 parent 63fcb01 commit 79de512
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/src/RenderVideo.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,11 +173,13 @@ def renderInterpolate(self):
self.transitionFrame = -1 # if there is no transition queue, set it to -1
self.frame0 = self.readQueue.get()
self.setup_frame0 = self.frameSetupFunction(self.frame0)

if self.backend != "ncnn":
self.interpolate(self.setup_frame0, self.setup_frame0, 0) # hack to remove weird warped frame when caching encode
for frameNum in range(self.totalInputFrames - 1):
frame1 = self.readQueue.get()
if frame1 is None:
break

setup_frame1 = self.frameSetupFunction(frame1)
if frameNum != self.transitionFrame:
for n in range(self.ceilInterpolateFactor):
Expand Down

0 comments on commit 79de512

Please sign in to comment.