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

Animation is not compressed losslessly with YCgCo-Re #2547

Open
y-guyon opened this issue Jan 3, 2025 · 4 comments
Open

Animation is not compressed losslessly with YCgCo-Re #2547

y-guyon opened this issue Jan 3, 2025 · 4 comments

Comments

@y-guyon
Copy link
Collaborator

y-guyon commented Jan 3, 2025

Reproduction instructions (0.png 1.png 2.png 3.png 4.png are in five_frames_of_okfestival2014_ascent_of_mrs_graham.zip and were taken from okfestival2014_ascent_of_mrs_graham.gif):

git clone https://github.com/AOMediaCodec/libavif.git
cd libavif
git checkout 5eaa316da9b101d5fdfe6939738670ef5610e9d5
cmake -S . -B build -DAVIF_BUILD_APPS=ON -DAVIF_CODEC_AOM=LOCAL -DAVIF_ENABLE_EXPERIMENTAL_YCGCO_R=ON -DAVIF_LIBYUV=LOCAL
cmake --build build --parallel
build/avifenc --speed 6 --lossless --cicp 2/2/16 0.png 1.png 2.png 3.png 4.png anim.avif
build/avifdec anim.avif --index 2 2.dec.png

2.dec.png differs from 2.png (I used ImageMagick):

compare 2.png 2.dec.png 2.diff.png  # Shows two red dots near the hot-air balloon.

For example, the pixel located at 24,312 goes from RGB #efd3cb to #eed1c9.

Notes

  • The issue appeared with other images.
  • The issue disappeared when encoding only 0.png 1.png 2.png 3.png.
  • The issue appeared at speeds 0,1,2,3,4,5,6.
  • The issue did not appear at speeds 7,8,9. This makes me think of an issue in aom.
  • Changing the codec at encoding was not possible because only aom supports encoding 4:4:4 lossless samples.
  • Changing the codec at decoding did not fix the issue.
@y-guyon
Copy link
Collaborator Author

y-guyon commented Jan 3, 2025

Compiler is GNU 14.2.0.

@y-guyon
Copy link
Collaborator Author

y-guyon commented Jan 3, 2025

avifenc --help shows

Version: 1.1.1 (aom [enc/dec]:v3.11.0)
libyuv : available (1887)

@y-guyon
Copy link
Collaborator Author

y-guyon commented Jan 3, 2025

Filed an issue at https://aomedia.issues.chromium.org/387472912

@y-guyon
Copy link
Collaborator Author

y-guyon commented Jan 3, 2025

Same issue with aom 3.10.0, 3.9.1 and 3.8.3.

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

No branches or pull requests

1 participant