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

Refactor read.c with avifTileGroup #1291

Merged
merged 6 commits into from
Mar 23, 2023

Conversation

y-guyon
Copy link
Collaborator

@y-guyon y-guyon commented Feb 22, 2023

Add avifImageCopySamples().
Add AVIF_CHECKRES().
Add AVIF_ENCODER_NO_CHANGE.
Refactor write.c.

This should be easier to add more items besides primary color and auxiliary alpha in the future, such as in #1215.

src/write.c Outdated Show resolved Hide resolved
@y-guyon y-guyon requested review from jzern and wantehchang February 23, 2023 09:41
@wantehchang
Copy link
Collaborator

Yannis: I will review this pull request tomorrow. Sorry about the delay.

src/read.c Outdated Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
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 am still reviewing this pull request. This pull request contains some independent changes. It would be good to break it into smaller pull requests for easier code review. I don't want to make you do extra work, so I will only describe the independent pieces that I have identified.

I suggest we start with these two:

  1. The AVIF_CHECKRES macro in internal.h.
  2. The changes to write.c.

You can put these two in one pull request. I first publish my comments on these two.

include/avif/internal.h Outdated Show resolved Hide resolved
src/write.c Outdated Show resolved Hide resolved
src/write.c Outdated Show resolved Hide resolved
src/write.c Outdated Show resolved Hide resolved
src/write.c Outdated Show resolved Hide resolved
src/write.c Outdated Show resolved Hide resolved
@y-guyon
Copy link
Collaborator Author

y-guyon commented Feb 28, 2023

I suggest we start with these two:

  1. The AVIF_CHECKRES macro in internal.h.
  2. The changes to write.c.

You can put these two in one pull request. I first publish my comments on these two.

Done in #1294.

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: The next independent part of this pull request is avifImageCopySamples() and the code that uses it. It would be good to split this part to a separate pull request.

Here are my comments on this part.

include/avif/internal.h Outdated Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
src/scale.c Outdated Show resolved Hide resolved
src/scale.c Outdated Show resolved Hide resolved
src/scale.c Outdated Show resolved Hide resolved
src/scale.c Outdated Show resolved Hide resolved
@y-guyon
Copy link
Collaborator Author

y-guyon commented Mar 2, 2023

Yannis: The next independent part of this pull request is avifImageCopySamples() and the code that uses it. It would be good to split this part to a separate pull request.

Here are my comments on this part.

Done in #1300.

@y-guyon y-guyon force-pushed the bit_depth_extension_refactoring branch from c96d900 to a9e6c1b Compare March 8, 2023 13:42
@y-guyon y-guyon force-pushed the bit_depth_extension_refactoring branch from a9e6c1b to 725c8be Compare March 8, 2023 13:49
@y-guyon y-guyon requested a review from wantehchang March 8, 2023 14:25
src/read.c Outdated Show resolved Hide resolved
src/read.c Show resolved Hide resolved
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: This looks good. I suggest some changes. The naming changes you can consider and decide if you want to accept them.

src/read.c Outdated Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
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.

LGTM. I checked the code carefully this time.

src/read.c Outdated Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
src/read.c Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
src/read.c Outdated Show resolved Hide resolved
src/read.c Show resolved Hide resolved
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.

LGTM!

src/read.c Outdated Show resolved Hide resolved
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.

LGTM. There is a find-and-replace error. Please correct that and merge this pull request. Thank you.

src/read.c Outdated Show resolved Hide resolved
@wantehchang
Copy link
Collaborator

Yannis: Are you planning to merge this pull request?

@y-guyon
Copy link
Collaborator Author

y-guyon commented Mar 23, 2023

Yannis: Are you planning to merge this pull request?

Yes, sorry about that. I thought I already merged it.

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.

LGTM.

@y-guyon y-guyon merged commit 129a590 into AOMediaCodec:main Mar 23, 2023
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.

3 participants