Skip to content

Commit

Permalink
Base1xModel: Fix weird chroma subsampling handling
Browse files Browse the repository at this point in the history
I don't remember why I did this, but it would cause the chroma to be returned as 410 or something.

This conditional chain has been removed entirely, as it doesn't serve much purpose and was probably an artefact from some old 'fake RGB' testing I was doing.
  • Loading branch information
LightArrowsEXE committed Nov 9, 2024
1 parent 9a9e9ce commit 5f8d37f
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions lvsfunc/models/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,22 +103,6 @@ def _scale_based_on_planes(self, clip: vs.VideoNode) -> vs.VideoNode:
res_kwargs = dict(matrix_in=self._matrix)
res_kwargs |= dict(format=vs.RGB48 if self._fp16 else vs.RGBS)

if self._planes == [1, 2]:
# TODO: test all of these
if clip.format.subsampling_w == 1:
res_kwargs |= dict(width=clip.width // 2)
elif clip.format.subsampling_w == 2:
res_kwargs |= dict(width=clip.width // 4)
elif clip.format.subsampling_w == 4:
res_kwargs |= dict(width=clip.width // 8)

if clip.format.subsampling_h == 1:
res_kwargs |= dict(height=clip.height // 2)
elif clip.format.subsampling_h == 2:
res_kwargs |= dict(height=clip.height // 4)
elif clip.format.subsampling_h == 4:
res_kwargs |= dict(height=clip.height // 8)

return Point.resample(clip, **res_kwargs)

def _apply_model(self, proc_clip: vs.VideoNode, ref: vs.VideoNode | None = None) -> vs.VideoNode:
Expand Down

0 comments on commit 5f8d37f

Please sign in to comment.