Skip to content

Commit

Permalink
Always process LinearLight in float32
Browse files Browse the repository at this point in the history
  • Loading branch information
Setsugennoao committed Nov 5, 2023
1 parent 92faa41 commit fce6cef
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion vskernels/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ def linear(self) -> vs.VideoNode:

if self.ll._wclip.format.color_family is vs.YUV:
wclip = self.ll._kernel.resample(wclip, vs.RGBS, None, self.ll._matrix)
else:
wclip = depth(wclip, 32)

if self.ll.linear:
wclip = Point.scale_function(wclip, transfer_in=self.ll._curve, transfer=Transfer.LINEAR)
Expand Down Expand Up @@ -186,7 +188,7 @@ def __enter__(self) -> LinearLightProcessing:
self._wclip = depth(self.clip, 32) if self.sigmoid else self.clip
self._curve = Transfer.from_video(self.clip)
self._matrix = Matrix.from_transfer(self._curve)
self._kernel = Catrom.from_param(self.kernel)
self._kernel = Catrom.ensure_obj(self.kernel)

self._exited = False

Expand Down

0 comments on commit fce6cef

Please sign in to comment.