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 support for all profiles of SVT-AV1 #2422

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ The changes are relative to the previous release, unless the baseline is specifi
is true.
* Write an empty HandlerBox name field instead of "libavif" (saves 7 bytes).
* Update svt.cmd/svt.sh/LocalSvt.cmake: v2.2.1
* In avif.h, changed "AVIF_SPEED_FASTEST" value to 13 from 10.

## [1.1.1] - 2024-07-30

Expand Down
1 change: 1 addition & 0 deletions apps/avifenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ static void syntaxLong(void)
printf(" -s,--speed S : Encoder speed (%d-%d, slowest-fastest, 'default' or 'd' for codec internal defaults. default speed: 6)\n",
AVIF_SPEED_SLOWEST,
AVIF_SPEED_FASTEST);
printf(" libaom range 0-9 & rav1e range 0-10\n");
printf("\n");
printf("Advanced options:\n");
printf(" -j,--jobs J : Number of jobs (worker threads). Use \"all\" to potentially use as many cores as possible (default: all)\n");
Expand Down
4 changes: 3 additions & 1 deletion include/avif/avif.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,9 @@ typedef int avifBool;

#define AVIF_SPEED_DEFAULT -1
#define AVIF_SPEED_SLOWEST 0
#define AVIF_SPEED_FASTEST 10

// Libaom and Rav1e fastest speed setting is 10, while SVT-AV1 fastest profile is 13.
#define AVIF_SPEED_FASTEST 13
y-guyon marked this conversation as resolved.
Show resolved Hide resolved

// This value is used to indicate that an animated AVIF file has to be repeated infinitely.
#define AVIF_REPETITION_COUNT_INFINITE -1
Expand Down
4 changes: 2 additions & 2 deletions src/codec_svt.c
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
}
if (encoder->speed != AVIF_SPEED_DEFAULT) {
#if SVT_AV1_CHECK_VERSION(0, 9, 0)
svt_config->enc_mode = (int8_t)encoder->speed;
int speed = AVIF_CLAMP(encoder->speed, 0, AVIF_SPEED_FASTEST);
#else
int speed = AVIF_CLAMP(encoder->speed, 0, 8);
svt_config->enc_mode = (int8_t)speed;
#endif
svt_config->enc_mode = (int8_t)speed;
}

if (color_format == EB_YUV422 || image->depth > 10) {
Expand Down
Loading