Comments (18)
Nevermind, I repro'd with the archlinux Docker image. I'll fix it.
from libavif.
I think this will fix it, give it a shot.
from libavif.
It did indeed fix it!
Looking forward to trying png input
from libavif.
When converting RGB->YUV->RGB (even 444), you can have a drift of up to one codepoint in a channel. If I run
avifenc -c aom --min 0 --max 0 -s 0 blue.png blue.avif
I see a max drift of 1, which is expected.
from libavif.
Understood, thanks for the clarification
from libavif.
This is finally in, and will be in the next release.
(feel free to play with it in the master branch)
from libavif.
The arch aur package fails to build
/aur-avif-git/src/libavif/apps/shared/avifpng.c:17:17: error: variable ‘rowPointers’ might be clobbered by ‘longjmp’ or ‘vfork’ [-Werror=clobbered]
17 | png_bytep * rowPointers = NULL;
Who is to fix this, should the maintainer change the building process or can libavif even solve this?
from libavif.
That's a weird one. I'm not a fan of libpng's choice to use setjmp(), but flow-wise, I think rowPointers is safe here. It is initialized to NULL before any longjmp is possible, and any call to longjmp eventually ends up at the cleanup label, which handles either state of rowPointers correctly.
Can you give me your compiler version? I'd like to repro the error here and see if I can come up with a proper solution in libavif.
from libavif.
The Internet (tm) suggests I can flag anything that might get jumped over as volatile as a hint to the optimizer to not do odd things with it. That might be enough. I want to see it fix the warning myself though.
from libavif.
Sorry you were too fast for me to respond on this one
Thank you for looking into it
from libavif.
Sorry to add something else to this
(gdb) backtrace
#0 0x00007ffff7530210 in ?? ()
#1 0x00007ffff7f14461 in ?? () from /usr/lib/libpng16.so.16
#2 0x00007ffff7f1fc48 in ?? () from /usr/lib/libpng16.so.16
#3 0x00007ffff7f293bf in ?? () from /usr/lib/libpng16.so.16
#4 0x00007ffff7f1cd79 in png_read_image () from /usr/lib/libpng16.so.16
#5 0x000055555555758c in ?? ()
#6 0x0000555555556488 in ?? ()
#7 0x00007ffff7d49023 in __libc_start_main () from /usr/lib/libc.so.6
#8 0x0000555555556e5e in ?? ()
I might look into this myself when I have time, but seems like something in libpng is not quite sorted correctly
from libavif.
Yuck, it is my fault. avif->height
isn't set yet. Fixing.
from libavif.
Okay, I reverted that change and put a new one in.
from libavif.
Yes, now it works, thank you!
from libavif.
As a note, I just fixed 16bpc PNG writing, my call to png_set_swap()
was being ignored. I'm going to push a new version/tag in a few minutes.
from libavif.
Something still seems odd about reading/writing png
avifenc --max 0 in.png out.avif
avifdec out.avif reconstructed.png
identify -verbose says amongst other differences
Blue:
min: 37 (0.145098)
max: 120 (0.470588)
mean: 80.5176 (0.315755)
Blue:
min: 36 (0.141176)
max: 121 (0.47451)
mean: 80.6096 (0.316116)
from libavif.
@utack I believe I may have done you a bit of a disservice by not being clearer in my response. I've recently had a discussion here which started from my quote above:
That reply should not only give you much more context about what I meant here, but also some hints as to avoid this issue in the future (with a more recent libavif / avifenc). Cheers!
from libavif.
Thank you @joedrago I have followed it!
I am not working with avif in a professional capacity so I was satisfied with your previous response, but understanding more of the technical details has certainly taught me more.
from libavif.
Related Issues (20)
- ci-windows failure "unknown file: error: SEH exception with code 0xc000001d thrown in the test body" HOT 4
- Sample HDR AVIF decoded to JPG shows incorrect colors HOT 8
- How to build a dynamic library that statically links all dependencies? HOT 1
- Ignore and skip FullBoxes with an unrecognized version
- How to build the.A use of iOS platform? HOT 2
- Make libyuv package-friendly dependency HOT 2
- Roll YCgCo-R out HOT 1
- Add Homebrew install instructions and avifdec/avifenc examples to README HOT 6
- autoconf etc. HOT 1
- avifImageRGBToYUV should set color space to default values HOT 2
- Findrav1e.cmake ignores library dependencies listed in the generated pkgconfig file HOT 5
- [Function Request] avifenc supports svt and rav1e encoder options key-value HOT 2
- MSYS/MinGW32: Linking error, undefined references to Nt file functions HOT 2
- Noticeable color shift HOT 6
- Does CVE-2024-1580 affect libavif with dav1d decoder? HOT 1
- Static build issues on MSYS2 HOT 4
- sharpyuv conversion failed HOT 2
- libavif.a should not be a combined archive library HOT 5
- Not able to build static build on amazon linux 2023 HOT 9
- GIF encodes with wrong frame rate HOT 14
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libavif.