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

Gray line at the bottom of the frame #2817

Closed
kornelski opened this issue Sep 24, 2021 · 6 comments · Fixed by #2822
Closed

Gray line at the bottom of the frame #2817

kornelski opened this issue Sep 24, 2021 · 6 comments · Fixed by #2822
Assignees
Labels
Projects

Comments

@kornelski
Copy link
Contributor

Describe the bug
Encoding adds an artifact at the bottom edge of the image

Screenshot 2021-09-24 at 17 50 53

To Reproduce
Encode this image:
example

Expected behavior
Pixels on the left side of the last line should all be white.

Required Information
Rust 1.55. x86-64 macOS 11.6. NASM version 2.15.05 compiled on Aug 29 2020. rav1e 0.5.0-beta.2

@barrbrain
Copy link
Collaborator

I was able to reproduce the issue with the default configuration of rav1e binary. Inspecting the output in AOM Analyzer, we see that the artifact is contained within a 32x64 block that straddles the lower boundary. Will need to look deeper to identify why the distortion occurs in this case. It is also notable that the frame dimensions are not multiples of 8.

issue-2817

@tdaede
Copy link
Collaborator

tdaede commented Sep 30, 2021

Not necessarily related but it's also interesting how bad the decision is in terms of distortion. The ringing is pretty severe.

@KyleSiefring
Copy link
Collaborator

Is distortion being measured in transform domain during partitioning? That might be what is giving bad results.

@KyleSiefring
Copy link
Collaborator

Is distortion being measured in transform domain during partitioning? That might be what is giving bad results.

    let use_tx_domain_distortion =
      config.tune == Tune::Psnr && config.speed_settings.tx_domain_distortion;

Doesn't look like it is.

barrbrain added a commit to barrbrain/rav1e that referenced this issue Sep 30, 2021
@barrbrain
Copy link
Collaborator

It looks like the underlying cause is that our distortion measurement at the boundary expects input frames to be padded.

tdaede added a commit to tdaede/rav1e that referenced this issue Oct 1, 2021
This avoids a spatial discontinuity (and correspondingly large
DCT coefficients) when there is a large DC error in the prediction.

Fixes xiph#2817

https://beta.arewecompressedyet.com/?job=master-2021-10-01_064210-48149f18&job=pad_extend-2021-10-01_064216-b67291a2
tdaede added a commit to tdaede/rav1e that referenced this issue Oct 2, 2021
This avoids a spatial discontinuity (and correspondingly large
DCT coefficients) when there is a large DC error in the prediction.

Fixes xiph#2817

https://beta.arewecompressedyet.com/?job=master-2021-10-01_064210-48149f18&job=pad_extend-2021-10-01_064216-b67291a2
tdaede added a commit to tdaede/rav1e that referenced this issue Oct 2, 2021
tdaede added a commit to tdaede/rav1e that referenced this issue Oct 2, 2021
tdaede added a commit to tdaede/rav1e that referenced this issue Oct 2, 2021
barrbrain pushed a commit to barrbrain/rav1e that referenced this issue Oct 4, 2021
@barrbrain barrbrain added this to In progress in Release 0.5 Oct 5, 2021
@tdaede
Copy link
Collaborator

tdaede commented Oct 5, 2021

We've merged a fix that fixes the image in this issue.

I've also managed to construct a worst case image that isn't fixed even by the merged fix, I've filed issue #2823 for it. This one isn't really a logic error like our merged fix, but is just a natural result of our edge conditions. The best solution I have so far to fix #2823 also causes metrics losses in non-worst-case pictures, so it's unclear if it's an overall improvement. Let me know if you see any actual real-world pictures that still cause artifacts.

@barrbrain barrbrain moved this from In progress to Done in Release 0.5 Oct 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Release 0.5
  
Done
4 participants