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

Fix downsampling on odd sized frames #2055

Closed
tdaede opened this issue Jan 10, 2020 · 0 comments · Fixed by #2095
Closed

Fix downsampling on odd sized frames #2055

tdaede opened this issue Jan 10, 2020 · 0 comments · Fixed by #2095
Labels
bug easy Can be done in less than 4 hours of work by an experienced codec engineer.
Projects

Comments

@tdaede
Copy link
Collaborator

tdaede commented Jan 10, 2020

Currently, hres and qres are 1/2 and 1/4 the width of the full res frame, rounded down. They should really be rounded up.

@lu-zero lu-zero added bug easy Can be done in less than 4 hours of work by an experienced codec engineer. labels Jan 11, 2020
vibhoothi added a commit to vibhoothi/rav1e that referenced this issue Jan 17, 2020
Currently the hres and qres are talking half(1/2) and one-fourth(1/4) of the
width and hight which is rounded down, when we have odd sized frame this becomes
a problem so to solve that we are rounding one up for both width and height.

Earlier: src.cfg.width / 2
Now    : (src.cfg.width + 1) / 2,

Fixes xiph#2055
vibhoothi added a commit to vibhoothi/rav1e that referenced this issue Jan 17, 2020
Currently, the hres and qres are talking half(1/2) and one-fourth(1/4) of the
width and height which is rounded down, when we have an odd sized frame this
becomes a problem so to solve that we are rounding one up for both width and
height.

Earlier: src.cfg.width / 2
Now    : (src.cfg.width + 1) / 2,

Fixes xiph#2055
vibhoothi added a commit to vibhoothi/rav1e that referenced this issue Feb 5, 2020
Currently, the hres and qres are talking half(1/2) and one-fourth(1/4) of the
width and height which is rounded down, when we have an odd sized frame this
becomes a problem so to solve that we are rounding one up for both width and
height.

Earlier: src.cfg.width / 2
Now    : (src.cfg.width + 1) / 2,

Fixes xiph#2055
@takehirokj takehirokj added this to Done in Release 0.3 via automation Feb 6, 2020
takehirokj pushed a commit that referenced this issue Feb 6, 2020
* frame: plane: Fix Downsampling of odd sized frames

Currently, the hres and qres are talking half(1/2) and one-fourth(1/4) of the
width and height which is rounded down, when we have an odd sized frame this
becomes a problem so to solve that we are rounding one up for both width and
height.

Earlier: src.cfg.width / 2
Now    : (src.cfg.width + 1) / 2,

Fixes #2055

* frame: plane: Introduce new test case for down_sampling

Here we have modified the test case since we are considering odd heights,
the exceptional case is where the right or bottom padding are zero causing
additional pixels to be read from the next row or past the end of the data

Co-authored-by: David Michael Barr <b@rr-dav.id.au>

* benches: plane: Introduce new bench with odd frames

Co-authored-by: David Michael Barr <b@rr-dav.id.au>
barrbrain added a commit to barrbrain/rav1e that referenced this issue Oct 5, 2022
* frame: plane: Fix Downsampling of odd sized frames

Currently, the hres and qres are talking half(1/2) and one-fourth(1/4) of the
width and height which is rounded down, when we have an odd sized frame this
becomes a problem so to solve that we are rounding one up for both width and
height.

Earlier: src.cfg.width / 2
Now    : (src.cfg.width + 1) / 2,

Fixes xiph#2055

* frame: plane: Introduce new test case for down_sampling

Here we have modified the test case since we are considering odd heights,
the exceptional case is where the right or bottom padding are zero causing
additional pixels to be read from the next row or past the end of the data

Co-authored-by: David Michael Barr <b@rr-dav.id.au>

* benches: plane: Introduce new bench with odd frames

Co-authored-by: David Michael Barr <b@rr-dav.id.au>
barrbrain added a commit to barrbrain/rav1e that referenced this issue Oct 5, 2022
* frame: plane: Fix Downsampling of odd sized frames

Currently, the hres and qres are talking half(1/2) and one-fourth(1/4) of the
width and height which is rounded down, when we have an odd sized frame this
becomes a problem so to solve that we are rounding one up for both width and
height.

Earlier: src.cfg.width / 2
Now    : (src.cfg.width + 1) / 2,

Fixes xiph#2055

* frame: plane: Introduce new test case for down_sampling

Here we have modified the test case since we are considering odd heights,
the exceptional case is where the right or bottom padding are zero causing
additional pixels to be read from the next row or past the end of the data

Co-authored-by: David Michael Barr <b@rr-dav.id.au>

* benches: plane: Introduce new bench with odd frames

Co-authored-by: David Michael Barr <b@rr-dav.id.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug easy Can be done in less than 4 hours of work by an experienced codec engineer.
Projects
No open projects
Release 0.3
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants