Skip to content
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

Take average of chroma samples when subsampling #522

Conversation

wantehchang
Copy link
Contributor

Taking the average is a form of low-pass filtering. It also puts the
subsampled chroma at the center of the 2x2 chroma block. Most
YCbCr-to-RGB conversion functions used in image decoding assume the
center chroma sample position.

A proof of concept for a fix for
#521.

Taking the average is a form of low-pass filtering. It also puts the
subsampled chroma at the center of the 2x2 chroma block. Most
YCbCr-to-RGB conversion functions used in image decoding assume the
center chroma sample position.

A proof of concept for a fix for
strukturag#521.
@farindk
Copy link
Contributor

farindk commented Jul 12, 2021

Thanks @wantehchang. I have implemented this now a bit differently to prevent having conditional branches and divisions by a variable number in the inner loop of the most frequent case. See #521.

@farindk farindk closed this Jul 12, 2021
@wantehchang wantehchang deleted the chroma-downsampling-low-pass-filtering branch March 27, 2022 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants