Add support for screen content
Bug: webrtc:13929 Change-Id: Ie5463aadcd255bd7c63d4e529030ef85145fd08c Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/257960 Reviewed-by: Marco Paniconi <marpan@google.com> Reviewed-by: Marco Paniconi <marpan@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Commit-Queue: Jerome Jiang <jianj@google.com> Cr-Commit-Position: refs/heads/main@{#36451}
This commit is contained in:
committed by
WebRTC LUCI CQ
parent
33d31fbc48
commit
a78c949772
@ -298,6 +298,27 @@ int LibaomAv1Encoder::InitEncode(const VideoCodec* codec_settings,
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
}
|
||||
|
||||
if (codec_settings->mode == VideoCodecMode::kScreensharing) {
|
||||
ret = aom_codec_control(&ctx_, AV1E_SET_TUNE_CONTENT, AOM_CONTENT_SCREEN);
|
||||
if (ret != AOM_CODEC_OK) {
|
||||
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
|
||||
<< " on control AV1E_SET_TUNE_CONTENT.";
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
}
|
||||
ret = aom_codec_control(&ctx_, AV1E_SET_ENABLE_PALETTE, 1);
|
||||
if (ret != AOM_CODEC_OK) {
|
||||
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
|
||||
<< " on control AV1E_SET_ENABLE_PALETTE.";
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
}
|
||||
ret = aom_codec_control(&ctx_, AV1E_SET_ENABLE_INTRABC, 0);
|
||||
if (ret != AOM_CODEC_OK) {
|
||||
RTC_LOG(LS_WARNING) << "LibaomAv1Encoder::EncodeInit returned " << ret
|
||||
<< " on control AV1E_SET_ENABLE_INTRABC.";
|
||||
return WEBRTC_VIDEO_CODEC_ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
if (cfg_.g_threads == 4 && cfg_.g_w == 640 &&
|
||||
(cfg_.g_h == 360 || cfg_.g_h == 480)) {
|
||||
ret = aom_codec_control(&ctx_, AV1E_SET_TILE_ROWS,
|
||||
|
||||
Reference in New Issue
Block a user