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

avifenc: Allow large images to be encoded #2272

Merged

Conversation

wantehchang
Copy link
Collaborator

Pass UINT32_MAX as the imageSizeLimit argument to avifReadImage().

Bug: #2271

@wantehchang wantehchang requested a review from y-guyon July 16, 2024 00:03
Copy link
Collaborator Author

@wantehchang wantehchang left a comment

Choose a reason for hiding this comment

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

Yannis: Please review this pull request carefully. I remember you added the imageSizeLimit parameter to avifReadImage() to avoid out-of-memory errors in fuzzing tests. Also, avifReadImage() passes that parameter to avifJPEGRead() as the sizeLimit parameter, which is also used to limit the size of Exif and XMP metadata. So I don't fully understand the implications of this pull request.

Copy link
Collaborator

@y-guyon y-guyon left a comment

Choose a reason for hiding this comment

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

I think this change is fine. Metadata >256MB makes little sense but this is not worth adding a parameter to avifReadImage().

apps/avifenc.c Show resolved Hide resolved
Copy link
Collaborator Author

@wantehchang wantehchang left a comment

Choose a reason for hiding this comment

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

Thanks for the review. I also added a changelog entry. PTAL.

apps/avifenc.c Show resolved Hide resolved
@wantehchang wantehchang force-pushed the avifenc-input-image-size-limit branch from 43f599f to 7e994f7 Compare July 30, 2024 20:02
@wantehchang wantehchang merged commit a701174 into AOMediaCodec:main Jul 30, 2024
14 checks passed
@wantehchang wantehchang deleted the avifenc-input-image-size-limit branch July 30, 2024 20:51
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.

2 participants