Comments (10)
@novomesk: maybe this is a stack overflow? Could you try increasing the thread stack size where you call avifEncoderWrite()
from save_layer()
to see if that helps?
from libavif.
I think Ben's guess is great. That looks like a particularly deep/heavy stack.
Answering from a libavif perspective, the speed choice between 8-10 (say) are basically identical codepaths for libavif's codec_aom implementation, so a crash in libaom here (but only with speed==10) is unlikely to be specific to libavif guts. We're just passing through a different value into the codec control.
from libavif.
I tried to increase stack 4 times using following code before calling avifEncoderWrite but it doesn't help.
Old Stack size: 8376320
New Stack size: 33505280
pthread_attr_t tattr;
size_t stack_size;
int ret;
ret = pthread_getattr_np ( pthread_self(), &tattr );
if ( ret == 0 )
{
ret = pthread_attr_getstacksize ( &tattr, &stack_size );
printf ( "Old Stack size: %ld\n", stack_size );
ret = pthread_attr_setstacksize ( &tattr, 4*stack_size );
ret = pthread_attr_getstacksize ( &tattr, &stack_size );
printf ( "New Stack size: %ld\n", stack_size );
}
Do you have some other ideas?
from libavif.
I am attaching a small C program to demonstrate crash.
I shared the crash demo in https://bugs.chromium.org/p/aomedia/issues/detail?id=2584
from libavif.
I can repro with your example as well, and it doesn't seem to be image size related; I can set the image to 256x256 and still get a crash. I'll see if I'm sending libaom something odd here, but it is starting to just feel like a libaom bug at this point.
from libavif.
Upon further digging, it appears to be related to AOM_USAGE_REALTIME. If I avoid that, libaom will handle any size. I'll shoot them an email and see what's going on.
from libavif.
I can repro this without libavif being involved.
aomenc 256.y4m --cpu-used=8 --usage=1 -o 256.ivf
I'm still in discussions with the libaom people.
from libavif.
https://bugs.chromium.org/p/aomedia/issues/detail?id=2587
from libavif.
It looks like libaom have found the bug and have a tentative fix. I'll have to see what to do about getting an updated tag pushed that includes this fix.
from libavif.
Alright, this has been worked around in the new version v0.5.6
. libaom has a proper fix for this, but aren't planning to make a new tagged release for another month or two, so we've worked out a clamp on libaom's cpu-used when encoding >8bpc images for now.
I'm tracking the re-enabling of this speed in another github issue here:
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 6
- 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.