Skip to content

Commit

Permalink
fix wrong AVIF chroma parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Oct 4, 2024
1 parent a47b217 commit 098da51
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions libheif/codecs/avif_boxes.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,13 +64,13 @@ class Box_av1C : public Box
//unsigned int (8)[] configOBUs;

heif_chroma get_heif_chroma() const {
if (chroma_subsampling_x==2 && chroma_subsampling_y==2) {
if (chroma_subsampling_x==1 && chroma_subsampling_y==1) {
return heif_chroma_420;
}
else if (chroma_subsampling_x==2 && chroma_subsampling_y==1) {
else if (chroma_subsampling_x==1 && chroma_subsampling_y==0) {
return heif_chroma_422;
}
else if (chroma_subsampling_x==1 && chroma_subsampling_y==1) {
else if (chroma_subsampling_x==0 && chroma_subsampling_y==0) {
return heif_chroma_444;
}
else {
Expand Down

0 comments on commit 098da51

Please sign in to comment.