Skip to content

TonemapCommand::Run: Use image consistently#3283

Open
wantehchang wants to merge 1 commit into
AOMediaCodec:mainfrom
wantehchang:use-image-local-var
Open

TonemapCommand::Run: Use image consistently#3283
wantehchang wants to merge 1 commit into
AOMediaCodec:mainfrom
wantehchang:use-image-local-var

Conversation

@wantehchang

Copy link
Copy Markdown
Member

Once the local variable image is declared and initialized to decoder->image, use image intead of decoder->image consistently.

Once the local variable `image` is declared and initialized to
decoder->image, use `image` intead of `decoder->image` consistently.
@wantehchang wantehchang marked this pull request as ready for review June 27, 2026 00:04
@wantehchang wantehchang requested a review from maryla-uc June 27, 2026 00:04
}

avifImage* image = decoder->image;
avifImage* const image = decoder->image;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Adding this const makes it easier to prove that image is equal to decoder->image after this point.

avifDiagnostics diag;
result = avifImageApplyGainMap(
decoder->image, image->gainMap, arg_headroom_, cicp.color_primaries,
image, image->gainMap, arg_headroom_, cicp.color_primaries,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I noticed this issue while reviewing your PR #3281. Please feel free to incorporate these changes into your PR, and I can abandon this PR.

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.

1 participant