AV1: Use AOM_USAGE_REALTIME when creating encoder
libaom is compiled with REALTIME_ONLY option. Soon it will be impossible to create encoder or request default config with usage other than AOM_USAGE_REALTIME. Fixing the wrapper to use proper usage parameter Bug: None Change-Id: I862741a724e4a8524f22ae79700b3da6517dbfb2 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/214100 Commit-Queue: Fyodor Kyslov <kyslov@google.com> Reviewed-by: Marco Paniconi <marpan@webrtc.org> Cr-Commit-Position: refs/heads/master@{#33624}
This commit is contained in:
committed by
Commit Bot
parent
18410aa438
commit
b454767f10
@ -41,7 +41,7 @@ namespace {
|
||||
|
||||
// Encoder configuration parameters
|
||||
constexpr int kQpMin = 10;
|
||||
constexpr int kUsageProfile = 1; // 0 = good quality; 1 = real-time.
|
||||
constexpr int kUsageProfile = AOM_USAGE_REALTIME;
|
||||
constexpr int kMinQindex = 145; // Min qindex threshold for QP scaling.
|
||||
constexpr int kMaxQindex = 205; // Max qindex threshold for QP scaling.
|
||||
constexpr int kBitDepth = 8;
|
||||
@ -195,7 +195,7 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings,
|
||||
|
||||
// Initialize encoder configuration structure with default values
|
||||
aom_codec_err_t ret =
|
||||
aom_codec_enc_config_default(aom_codec_av1_cx(), &cfg_, 0);
|
||||
aom_codec_enc_config_default(aom_codec_av1_cx(), &cfg_, kUsageProfile);
|
||||
if (ret != AOM_CODEC_OK) {
|
||||
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
|
||||
<< " on aom_codec_enc_config_default.";
|
||||
|
||||
Reference in New Issue
Block a user