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

Add custom codec callback in avifEncoder #2381

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

y-guyon
Copy link
Collaborator

@y-guyon y-guyon commented Aug 9, 2024

No description provided.

Copy link
Collaborator

@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: I only took a cursory look at this pull request. The commit message has the subject line "Add custom codec callback in avifEncoder". That is confusing, because these callbacks do not seem to provide access to a custom AV1 codec. Should we change "custom codec" to "custom encode data"?

int tileColsLog2,
int quantizer,
avifBool disableLaggedOutput,
avifAddImageFlags addImageFlags);
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will become part of the public API, so we need to make it easy to extend. One way to do that is to collect the indivisual parameters (tileRowsLog2, ..., disableLaggedOutput) into a parameter structure that is extensible. (There are several ways to define an extensible structure.)

@y-guyon
Copy link
Collaborator Author

y-guyon commented Sep 17, 2024

Yannis: I only took a cursory look at this pull request.

Thank you. This PR is a proof-of-concept to kickstart a discussion, not a request to merge code.

The commit message has the subject line "Add custom codec callback in avifEncoder". That is confusing, because these callbacks do not seem to provide access to a custom AV1 codec.

I did not mention AV1. This could be used for any kind of coded samples (AV2?) but to be compliant with the AVIF specification it would have to be AV1 samples indeed.

Should we change "custom codec" to "custom encode data"?

To me the piece of software that generates encoded data is a codec, so "custom codec callback" is accurate. Whether that is used to feed already compressed samples or to actually encode pixels on the spot, it is opaque to the libavif API.

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