From 7235dd0e2be933ff350d610cedaa50ffe29c9ce0 Mon Sep 17 00:00:00 2001 From: Johannes Kron Date: Wed, 26 Jun 2024 12:45:19 +0200 Subject: [PATCH] Add is_steady_state_refresh_frame_ to EncodedImage The field is_steady_state_refresh_frame_ can be used to determine if the encoded video frame is a repeated frame that should be considered for QP convergence detection. Bug: chromium:328598314 Change-Id: Iffba0f9f70af8b41b9bde25cf40b08b77dad8021 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355702 Reviewed-by: Philip Eliasson Commit-Queue: Johannes Kron Cr-Commit-Position: refs/heads/main@{#42550} --- api/video/encoded_image.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/api/video/encoded_image.h b/api/video/encoded_image.h index 3958c1672f..3d0dd90f28 100644 --- a/api/video/encoded_image.h +++ b/api/video/encoded_image.h @@ -200,6 +200,16 @@ class RTC_EXPORT EncodedImage { at_target_quality_ = at_target_quality; } + // Returns whether the frame that was encoded is a steady-state refresh frame + // intended to improve the visual quality. + bool IsSteadyStateRefreshFrame() const { + return is_steady_state_refresh_frame_; + } + + void SetIsSteadyStateRefreshFrame(bool refresh_frame) { + is_steady_state_refresh_frame_ = refresh_frame; + } + webrtc::VideoFrameType FrameType() const { return _frameType; } void SetFrameType(webrtc::VideoFrameType frame_type) { @@ -260,6 +270,9 @@ class RTC_EXPORT EncodedImage { bool retransmission_allowed_ = true; // True if the encoded image can be considered to be of target quality. bool at_target_quality_ = false; + // True if the frame that was encoded is a steady-state refresh frame intended + // to improve the visual quality. + bool is_steady_state_refresh_frame_ = false; }; } // namespace webrtc