Skip to content

Commit

Permalink
Treat non-subsampled XYZ tristimulus as RGB color family.
Browse files Browse the repository at this point in the history
It better conveys that they are matrix-able primaries.
  • Loading branch information
JustinTArthur committed Nov 16, 2024
1 parent 5768ab1 commit 529d3bb
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/videosource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@ static int GetColorFamily(const AVPixFmtDescriptor *Desc) {
return 1;
else if (Desc->flags & AV_PIX_FMT_FLAG_RGB)
return 2;
else if (
Desc->flags & AV_PIX_FMT_FLAG_XYZ
&& Desc->log2_chroma_h == 0
&& Desc->log2_chroma_w == 0
)
return 2;
else
return 3;
}
Expand Down

0 comments on commit 529d3bb

Please sign in to comment.