Revert "AV1: change update freq and disable denoiser explicitly."
This reverts commit abf5701c378329115838f3405ff48d43d2502559. Reason for revert: Breaks downstream tests. Original change's description: > AV1: change update freq and disable denoiser explicitly. > > Change speed/thread settings for faster encoding. > > Change-Id: I74d93eac26ae8700a48c437fe235643810de1ca0 > Bug: None > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206480 > Reviewed-by: Marco Paniconi <marpan@webrtc.org> > Reviewed-by: Marco Paniconi <marpan@google.com> > Commit-Queue: Jerome Jiang <jianj@google.com> > Cr-Commit-Position: refs/heads/master@{#33208} TBR=jianj@google.com,marpan@google.com,marpan@webrtc.org Change-Id: I47b65e1c78ccb055238a44886dac87f8fc2f5330 No-Presubmit: true No-Tree-Checks: true No-Try: true Bug: None Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/206644 Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33213}
This commit is contained in:

committed by
Commit Bot

parent
ad8a00d25c
commit
fa5ad8c0b5
@ -54,11 +54,9 @@ constexpr float kMinimumFrameRate = 1.0;
|
||||
int GetCpuSpeed(int width, int height, int number_of_cores) {
|
||||
// For smaller resolutions, use lower speed setting (get some coding gain at
|
||||
// the cost of increased encoding complexity).
|
||||
if (number_of_cores > 4 && width * height < 320 * 180)
|
||||
if (number_of_cores > 2 && width * height <= 320 * 180)
|
||||
return 6;
|
||||
else if (width * height >= 1280 * 720)
|
||||
return 9;
|
||||
else if (width * height >= 640 * 480)
|
||||
return 8;
|
||||
else
|
||||
return 7;
|
||||
@ -285,13 +283,13 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings,
|
||||
<< " on control AV1E_SET_MAX_INTRA_BITRATE_PCT.";
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
}
|
||||
ret = aom_codec_control(&ctx_, AV1E_SET_COEFF_COST_UPD_FREQ, 3);
|
||||
ret = aom_codec_control(&ctx_, AV1E_SET_COEFF_COST_UPD_FREQ, 2);
|
||||
if (ret != AOM_CODEC_OK) {
|
||||
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
|
||||
<< " on control AV1E_SET_COEFF_COST_UPD_FREQ.";
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
}
|
||||
ret = aom_codec_control(&ctx_, AV1E_SET_MODE_COST_UPD_FREQ, 3);
|
||||
ret = aom_codec_control(&ctx_, AV1E_SET_MODE_COST_UPD_FREQ, 2);
|
||||
if (ret != AOM_CODEC_OK) {
|
||||
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
|
||||
<< " on control AV1E_SET_MODE_COST_UPD_FREQ.";
|
||||
@ -325,13 +323,6 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings,
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
}
|
||||
|
||||
ret = aom_codec_control(&ctx_, AV1E_SET_NOISE_SENSITIVITY, 0);
|
||||
if (ret != AOM_CODEC_OK) {
|
||||
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
|
||||
<< " on control AV1E_SET_NOISE_SENSITIVITY.";
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
}
|
||||
|
||||
ret = aom_codec_control(&ctx_, AV1E_SET_ENABLE_WARPED_MOTION, 0);
|
||||
if (ret != AOM_CODEC_OK) {
|
||||
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
|
||||
@ -361,7 +352,7 @@ int LibaomAv1Encoder::NumberOfThreads(int width,
|
||||
int number_of_cores) {
|
||||
// Keep the number of encoder threads equal to the possible number of column
|
||||
// tiles, which is (1, 2, 4, 8). See comments below for AV1E_SET_TILE_COLUMNS.
|
||||
if (width * height >= 960 * 540 && number_of_cores > 4) {
|
||||
if (width * height >= 1280 * 720 && number_of_cores > 4) {
|
||||
return 4;
|
||||
} else if (width * height >= 640 * 360 && number_of_cores > 2) {
|
||||
return 2;
|
||||
|
Reference in New Issue
Block a user