From 8db06593900915f6628224c09dba9243b8b510d0 Mon Sep 17 00:00:00 2001 From: LightArrowsEXE Date: Thu, 10 Oct 2024 19:26:03 +0200 Subject: [PATCH] ChromaLocation.from_res: Always return LEFT The decision to always return LEFT is simple: Every regular format expects LEFT. The only exception is UHD, but only if that has HDR. SDR streams are explicitly tagged as being LEFT in rips we've checked. As we've decided with Matrix.from_res, the onus should be on the user to ensure their UHD sources are properly tagged. --- vstools/enums/generic.py | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/vstools/enums/generic.py b/vstools/enums/generic.py index 7530b51..aa453c2 100644 --- a/vstools/enums/generic.py +++ b/vstools/enums/generic.py @@ -48,16 +48,6 @@ def from_res(cls, frame: vs.VideoNode | vs.VideoFrame) -> ChromaLocation: :return: ChromaLocation object. """ - from .color import Matrix, Primaries, Transfer - - matrix, transfer, primaries = Matrix(frame), Transfer(frame), Primaries(frame) - - if ( - primaries == Primaries.BT2020 - or matrix in (Matrix.BT2020CL, Matrix.BT2020NCL) - or transfer in (Transfer.BT2020_10, Transfer.BT2020_12) - ): - return ChromaLocation.TOP_LEFT return ChromaLocation.LEFT