-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update a comment in avifImageYUVAnyToRGBAnySlow() #1487
Update a comment in avifImageYUVAnyToRGBAnySlow() #1487
Conversation
The following comment in avifImageYUVAnyToRGBAnySlow() // Monochrome: ... (identity mode is irrelevant) added in commit ca2c34d, was written when avifReformatMode had only two values (the default mode and identity mode). Now avifReformatMode has 3 values (or 5 if AVIF_ENABLE_EXPERIMENTAL_YCGCO_R is defined). Instead of enumerating all the non-default modes in the comment, just change "identity mode" to "state->mode".
@@ -763,7 +763,7 @@ static avifResult avifImageYUVAnyToRGBAnySlow(const avifImage * image, | |||
G = Y - ((2 * ((kr * (1 - kr) * Cr) + (kb * (1 - kb) * Cb))) / kg); | |||
} | |||
} else { | |||
// Monochrome: just populate all channels with luma (identity mode is irrelevant) | |||
// Monochrome: just populate all channels with luma (state->mode is irrelevant) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively we could say "reformat mode is irrelevant". I use "state->mode" because the if (hasColor)
code above (lines 735-764) uses different formulas depending on state->mode
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the comment you have now is fine.
@@ -763,7 +763,7 @@ static avifResult avifImageYUVAnyToRGBAnySlow(const avifImage * image, | |||
G = Y - ((2 * ((kr * (1 - kr) * Cr) + (kb * (1 - kb) * Cb))) / kg); | |||
} | |||
} else { | |||
// Monochrome: just populate all channels with luma (identity mode is irrelevant) | |||
// Monochrome: just populate all channels with luma (state->mode is irrelevant) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think the comment you have now is fine.
The following comment in avifImageYUVAnyToRGBAnySlow()
// Monochrome: ... (identity mode is irrelevant)
added in commit ca2c34d, was written when avifReformatMode had only two values (the default mode and identity mode). Now avifReformatMode has 3 values (or 5 if AVIF_ENABLE_EXPERIMENTAL_YCGCO_R is defined). Instead of enumerating all the non-default modes in the comment, just change "identity mode" to "state->mode".