Use AV1E_SET_AUTO_TILES
Delegate control over number of times to encoder using AV1E_SET_AUTO_TILES that was added in https://aomedia-review.googlesource.com/c/aom/+/191102. Bug: webrtc:351644568 Change-Id: I87ed11734e907c7f6c6508ac7389c84ececf5b21 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/361140 Commit-Queue: Sergey Silkin <ssilkin@webrtc.org> Reviewed-by: Marco Paniconi <marpan@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42903}
This commit is contained in:
parent
a4cf34def1
commit
0b4b5b0ae8
@ -307,21 +307,7 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings,
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_PALETTE, 0);
|
||||
}
|
||||
|
||||
if (cfg_.g_threads == 8) {
|
||||
// Values passed to AV1E_SET_TILE_ROWS and AV1E_SET_TILE_COLUMNS are log2()
|
||||
// based.
|
||||
// Use 4 tile columns x 2 tile rows for 8 threads.
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_ROWS, 1);
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_COLUMNS, 2);
|
||||
} else if (cfg_.g_threads == 4) {
|
||||
// Use 2 tile columns x 2 tile rows for 4 threads.
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_ROWS, 1);
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_COLUMNS, 1);
|
||||
} else {
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_TILE_COLUMNS,
|
||||
static_cast<int>(log2(cfg_.g_threads)));
|
||||
}
|
||||
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_AUTO_TILES, 1);
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ROW_MT, 1);
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_ENABLE_OBMC, 0);
|
||||
SET_ENCODER_PARAM_OR_RETURN_ERROR(AV1E_SET_NOISE_SENSITIVITY, 0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user