av1: add a few controls to wrapper
this will speed up realtime encoding. Change-Id: I39d42f3c195d2f520f04f7357e72b0903905ea81 Bug: None Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/176383 Reviewed-by: Marco Paniconi <marpan@webrtc.org> Commit-Queue: Jerome Jiang <jianj@google.com> Cr-Commit-Position: refs/heads/master@{#31431}
This commit is contained in:
@ -254,6 +254,24 @@ 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, 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, 2);
|
||||
if (ret != AOM_CODEC_OK) {
|
||||
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
|
||||
<< " on control AV1E_SET_MODE_COST_UPD_FREQ.";
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
}
|
||||
ret = aom_codec_control(&ctx_, AV1E_SET_MV_COST_UPD_FREQ, 3);
|
||||
if (ret != AOM_CODEC_OK) {
|
||||
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
|
||||
<< " on control AV1E_SET_MV_COST_UPD_FREQ.";
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
}
|
||||
|
||||
return WEBRTC_VIDEO_CODEC_OK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user