Skip to content

Commit

Permalink
Assume BT.709 for UHD video
Browse files Browse the repository at this point in the history
  • Loading branch information
shssoichiro committed Oct 6, 2024
1 parent fd5890c commit 1309033
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions vstools/enums/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,7 @@ def from_res(cls, frame: vs.VideoNode | vs.VideoFrame) -> Matrix:

return Matrix.SMPTE170M

if width <= 2048 and height <= 1556:
return Matrix.BT709

return Matrix.BT2020NCL
return Matrix.BT709

@classmethod
def from_video(
Expand Down Expand Up @@ -829,10 +826,7 @@ def from_res(cls, frame: vs.VideoNode | vs.VideoFrame) -> Primaries:

return Primaries.SMPTE170M

if width <= 2048 and height <= 1556:
return Primaries.BT709

return Primaries.BT2020
return Primaries.BT709

@classmethod
def from_video(
Expand Down

0 comments on commit 1309033

Please sign in to comment.