Skip to content

Commit

Permalink
fix(svt): Don't clamp enc_mode to [0,8]
Browse files Browse the repository at this point in the history
SVT-AV1 added encoder modes 9-12 in v0.9. Because speed is still clamped
to max 8 it's not possible to use a faster preset.
  • Loading branch information
fdintino committed Nov 30, 2023
1 parent 380fb99 commit d3c6527
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/codec_svt.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,7 @@ static avifResult svtCodecEncodeImage(avifCodec * codec,
svt_config->tile_columns = tileColsLog2;
}
if (encoder->speed != AVIF_SPEED_DEFAULT) {
int speed = AVIF_CLAMP(encoder->speed, 0, 8);
svt_config->enc_mode = (int8_t)speed;
svt_config->enc_mode = (int8_t)encoder->speed;
}

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

0 comments on commit d3c6527

Please sign in to comment.