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

Pad input frames in C API and binaries #2826

Merged
merged 2 commits into from
Oct 10, 2021
Merged

Conversation

barrbrain
Copy link
Collaborator

@barrbrain barrbrain commented Oct 7, 2021

Fixes #2823.

  • Document the padding issue in the Rust API.
  • Assume input frame is padded in residual calculation.
  • Fix chroma residual crop for odd dimensions.

Small regressions in frame-level metrics are balanced by a large improvement in uniformity of error distribution near the boundary. At the extreme, we see a 19.3% reduction in relative error. Over the 8 pixel wide region at the boundary, we see an average reduction of 5.3%.

PSNR Y PSNR Cb PSNR Cr CIEDE2000 SSIM MS-SSIM PSNR-HVS Y PSNR-HVS Cb PSNR-HVS Cr PSNR-HVS VMAF VMAF-NEG
0.0646 -0.0875 -0.1428 -0.0024 0.1555 0.1904 0.1049 0.1927 -0.0311 0.1071 0.1522 0.1444

Simple_MSE_edge_dist

Simple_MSE_edge_change

@barrbrain
Copy link
Collaborator Author

AWCY results at speed 5 on objective-1-fast are more encouraging:

PSNR Y PSNR Cb PSNR Cr CIEDE2000 SSIM MS-SSIM PSNR-HVS Y PSNR-HVS Cb PSNR-HVS Cr PSNR-HVS VMAF VMAF-NEG
-0.0241 -0.0949 -0.1844 -0.0700 0.1164 0.1265 -0.0187 0.0020 -0.0707 -0.0159 0.0142 0.0073

@barrbrain barrbrain force-pushed the issue-2823 branch 3 times, most recently from e45908b to 7ee42b2 Compare October 8, 2021 07:58
@tdaede
Copy link
Collaborator

tdaede commented Oct 8, 2021

I'm convinced mainly by the objective-1-fast results that this is the current best approach.

Copy link
Collaborator

@lu-zero lu-zero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks good to me, you might add in the assert a mention on why it is failing thought.

but it can be done later.

src/capi.rs Outdated Show resolved Hide resolved
@barrbrain barrbrain marked this pull request as draft October 9, 2021 17:06
@barrbrain barrbrain force-pushed the issue-2823 branch 3 times, most recently from 5b183a2 to fd242e7 Compare October 10, 2021 08:56
@barrbrain barrbrain marked this pull request as ready for review October 10, 2021 09:14
Document the padding issue in the Rust API.
Assume input frame is padded in residual calculation.
Fix chroma residual crop for odd dimensions.

AWCY results for subset1 at default speed:

PSNR Y | PSNR Cb | PSNR Cr | CIEDE2000 |   SSIM | MS-SSIM
0.0646 | -0.0875 | -0.1428 |   -0.0024 | 0.1555 |  0.1904

PSNR-HVS Y | PSNR-HVS Cb | PSNR-HVS Cr | PSNR-HVS |   VMAF | VMAF-NEG
    0.1049 |      0.1927 |     -0.0311 |   0.1071 | 0.1522 |   0.1444

Small regressions in frame-level metrics are balanced by a large
improvement in uniformity of error distribution near the boundary.
At the extreme edge, we see a 19.3% reduction in relative error.
Over the 8 pixel wide region at the boundary, we see an average
reduction of 5.3%.

Results at speed 5 on objective-1-fast are more encouraging:

 PSNR Y | PSNR Cb | PSNR Cr | CIEDE2000 |   SSIM | MS-SSIM
-0.0241 | -0.0949 | -0.1844 |   -0.0700 | 0.1164 |  0.1265

PSNR-HVS Y | PSNR-HVS Cb | PSNR-HVS Cr | PSNR-HVS |   VMAF | VMAF-NEG
   -0.0187 |      0.0020 |     -0.0707 |  -0.0159 | 0.0142 |   0.0073
Copy link
Collaborator

@lu-zero lu-zero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great :)

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.

Boundary behavior worst-case
3 participants