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

Changing AVM codec description #1726

Merged
merged 3 commits into from
Jan 11, 2024
Merged

Changing AVM codec description #1726

merged 3 commits into from
Jan 11, 2024

Conversation

Jamaika1
Copy link
Contributor

@Jamaika1 Jamaika1 commented Nov 5, 2023

No description provided.

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.

Thank you for your contribution.

These changes should also be made in avifdec.

apps/avifenc.c Outdated
@@ -235,7 +235,7 @@ static void syntaxLong(void)
printf(" -g,--grid MxN : Encode a single-image grid AVIF with M cols & N rows. Either supply MxN identical W/H/D images, or a single\n");
printf(" image that can be evenly split into the MxN grid and follow AVIF grid image restrictions. The grid will adopt\n");
printf(" the color profile of the first image supplied.\n");
printf(" -c,--codec C : AV1 codec to use (choose from versions list below)\n");
printf(" -c,--codec C : AV1/AV2 codec to use (choose from versions list below)\n");
Copy link
Collaborator

Choose a reason for hiding this comment

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

AVIF_CODEC_AVM is an experimental feature, so I would avoid mentioning AV2 if AVIF_CODEC_AVM is OFF.

Suggestion:

printf(" -c,--codec C       : codec to use (choose from versions list below)\n");

apps/avifenc.c Outdated
@@ -790,7 +790,7 @@ static avifBool avifGetBestCellSize(const char * dimensionStr, uint32_t numPixel

// The maximum AV1 frame size is 65536 pixels inclusive.
if (*cellSize > 65536) {
fprintf(stderr, "ERROR: Cell size %u is bigger %s than the maximum AV1 frame size 65536.\n", *cellSize, dimensionStr);
fprintf(stderr, "ERROR: Cell size %u is bigger %s than the maximum AV1/AV2 frame size 65536.\n", *cellSize, dimensionStr);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggestion:

fprintf(stderr, "ERROR: Cell size %u is bigger %s than the maximum codec frame size 65536.\n", *cellSize, dimensionStr);

@@ -1207,7 +1213,6 @@ static avifBool avifEncodeImagesFixedQuality(const avifSettings * settings,
gainMapStr,
encoder->autoTiling ? "automatic tiling" : manualTilingStr,
settings->jobs);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggestion:

    printf("Encoding with codec '%s' speed [%s], color quality [%d (%s)], alpha quality [%d (%s)]%s, %s, %d worker thread(s), please wait...\n",
           codecName ? codecName : "none",
           speedStr,
           encoder->quality,
           qualityString(encoder->quality),
           encoder->qualityAlpha,
           qualityString(encoder->qualityAlpha),
           gainMapStr,
           encoder->autoTiling ? "automatic tiling" : manualTilingStr,
           settings->jobs);

apps/avifenc.c Outdated
@@ -1827,7 +1832,7 @@ MAIN()
} else {
const char * codecName = avifCodecName(settings.codecChoice, AVIF_CODEC_FLAG_CAN_ENCODE);
if (codecName == NULL) {
fprintf(stderr, "ERROR: AV1 Codec cannot encode: %s\n", arg);
fprintf(stderr, "ERROR: AV1/AV2 Codec cannot encode: %s\n", arg);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggestion:

fprintf(stderr, "ERROR: Codec %s is unrecognized, unavailable or can only decode\n", arg);

apps/avifenc.c Outdated
Comment on lines 2521 to 2531
if (settings.codecChoice == AVIF_CODEC_CHOICE_AOM) {
printf(" * Color AV1 total size: %" AVIF_FMT_ZU " bytes\n", byteSizes.colorSizeBytes);
printf(" * Alpha AV1 total size: %" AVIF_FMT_ZU " bytes\n", byteSizes.alphaSizeBytes);
if (byteSizes.gainMapSizeBytes > 0) {
printf(" * Gain Map AV1 total size: %" AVIF_FMT_ZU " bytes\n", byteSizes.gainMapSizeBytes);
}
}
if (settings.codecChoice == AVIF_CODEC_CHOICE_AVM) {
printf(" * Color AV2 total size: %" AVIF_FMT_ZU " bytes\n", byteSizes.colorSizeBytes);
printf(" * Alpha AV2 total size: %" AVIF_FMT_ZU " bytes\n", byteSizes.alphaSizeBytes);
if (byteSizes.gainMapSizeBytes > 0) {
printf(" * Gain Map AV2 total size: %" AVIF_FMT_ZU " bytes\n", byteSizes.gainMapSizeBytes);
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggestion:

    printf(" * Coded color total size: %" AVIF_FMT_ZU " bytes\n", byteSizes.colorSizeBytes);
    printf(" * Coded alpha total size: %" AVIF_FMT_ZU " bytes\n", byteSizes.alphaSizeBytes);
    if (byteSizes.gainMapSizeBytes > 0) {
        printf(" * Coded gain map total size: %" AVIF_FMT_ZU " bytes\n", byteSizes.gainMapSizeBytes);
    }

@vrabaud
Copy link
Collaborator

vrabaud commented Dec 14, 2023

Hi, can you please rebase and take the comments into account. Thx

@y-guyon
Copy link
Collaborator

y-guyon commented Jan 11, 2024

Thank you for rebasing. There was no notification so we forgot to check this pull request afterwards.

I rebased it myself again.

@y-guyon y-guyon merged commit 2a82d94 into AOMediaCodec:main Jan 11, 2024
16 of 19 checks passed
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