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
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions apps/avifdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static void syntax(void)
printf(" -h,--help : Show syntax help\n");
printf(" -V,--version : Show the version number\n");
printf(" -j,--jobs J : Number of jobs (worker threads). Use \"all\" to potentially use as many cores as possible (default: all)\n");
printf(" -c,--codec C : AV1 codec to use (choose from versions list below)\n");
printf(" -c,--codec C : Codec to use (choose from versions list below)\n");
printf(" -d,--depth D : Output depth [8,16]. (PNG only; For y4m, depth is retained, and JPEG is always 8bpc)\n");
printf(" -q,--quality Q : Output quality [0-100]. (JPEG only, default: %d)\n", DEFAULT_JPEG_QUALITY);
printf(" --png-compress L : Set PNG compression level (PNG only; 0-9, 0=none, 9=max). Defaults to libpng's builtin default.\n");
Expand Down Expand Up @@ -124,7 +124,7 @@ int main(int argc, char * argv[])
} else {
const char * codecName = avifCodecName(codecChoice, AVIF_CODEC_FLAG_CAN_DECODE);
if (codecName == NULL) {
fprintf(stderr, "ERROR: AV1 Codec cannot decode: %s\n", arg);
fprintf(stderr, "ERROR: Codec cannot decode: %s\n", arg);
return 1;
}
}
Expand Down Expand Up @@ -304,7 +304,7 @@ int main(int argc, char * argv[])
}
}

printf("Decoding with AV1 codec '%s' (%d worker thread%s), please wait...\n",
printf("Decoding with codec '%s' (%d worker thread%s), please wait...\n",
avifCodecName(codecChoice, AVIF_CODEC_FLAG_CAN_DECODE),
jobs,
(jobs == 1) ? "" : "s");
Expand Down
13 changes: 6 additions & 7 deletions apps/avifenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,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 : codec to use (choose from versions list below)\n");
printf(" --exif FILENAME : Provide an Exif metadata payload to be associated with the primary item (implies --ignore-exif)\n");
printf(" --xmp FILENAME : Provide an XMP metadata payload to be associated with the primary item (implies --ignore-xmp)\n");
printf(" --icc FILENAME : Provide an ICC profile payload to be associated with the primary item (implies --ignore-icc)\n");
Expand Down Expand Up @@ -785,7 +785,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 frame size 65536.\n", *cellSize, dimensionStr);
return AVIF_FALSE;
}

Expand Down Expand Up @@ -1192,7 +1192,7 @@ static avifBool avifEncodeImagesFixedQuality(const avifSettings * settings,
}
#endif

printf("Encoding with AV1 codec '%s' speed [%s], color quality [%d (%s)], alpha quality [%d (%s)]%s, %s, %d worker thread(s), please wait...\n",
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,
Expand All @@ -1202,7 +1202,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);


if (settings->progressive) {
// If the color quality is less than 10, the main() function overrides
// --progressive and sets settings->autoProgressive to false.
Expand Down Expand Up @@ -1822,7 +1821,7 @@ int main(int argc, char * argv[])
} 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: Codec cannot encode: %s\n", arg);
goto cleanup;
}
}
Expand Down Expand Up @@ -2525,8 +2524,8 @@ int main(int argc, char * argv[])
}

printf("Encoded successfully.\n");
printf(" * Color AV1 total size: %" AVIF_FMT_ZU " bytes\n", byteSizes.colorSizeBytes);
printf(" * Alpha AV1 total size: %" AVIF_FMT_ZU " bytes\n", byteSizes.alphaSizeBytes);
printf(" * Color total size: %" AVIF_FMT_ZU " bytes\n", byteSizes.colorSizeBytes);
printf(" * Alpha 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);
}
Expand Down
Loading