Add support so requested resolution alignment also apply to scaled layers.
Bug: webrtc:11872
Change-Id: I7f904e2765330ee93270b66b0102ce57f336f9a0
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/181883
Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org>
Reviewed-by: Rasmus Brandt <brandtr@webrtc.org>
Commit-Queue: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32146}
diff --git a/api/video_codecs/video_encoder.h b/api/video_codecs/video_encoder.h
index 1ea19c6..d73c9f0 100644
--- a/api/video_codecs/video_encoder.h
+++ b/api/video_codecs/video_encoder.h
@@ -174,6 +174,15 @@
// requirements the encoder has on the incoming video frame buffers.
int requested_resolution_alignment;
+ // Same as above but if true, each simulcast layer should also be divisible
+ // by |requested_resolution_alignment|.
+ // Note that scale factors |scale_resolution_down_by| may be adjusted so a
+ // common multiple is not too large to avoid largely cropped frames and
+ // possibly with an aspect ratio far from the original.
+ // Warning: large values of scale_resolution_down_by could be changed
+ // considerably, especially if |requested_resolution_alignment| is large.
+ bool apply_alignment_to_all_simulcast_layers;
+
// If true, encoder supports working with a native handle (e.g. texture
// handle for hw codecs) rather than requiring a raw I420 buffer.
bool supports_native_handle;