Add Vp8FrameConfig::IntraFrame()

Simple function to check if the frame described by Vp8FrameConfig
will be an intra frame.

Bug: None
Change-Id: I0ba0476762a152e1be3711352024fc6e1bd35f12
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/133560
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#27709}
This commit is contained in:
Elad Alon
2019-04-23 13:03:18 +02:00
committed by Commit Bot
parent 30a276b5d7
commit 38ac7bf0ab

View File

@ -47,6 +47,12 @@ struct Vp8FrameConfig {
bool Updates(Buffer buffer) const;
bool IntraFrame() const {
// Intra frames do not reference any buffers, and update all buffers.
return last_buffer_flags == kUpdate && golden_buffer_flags == kUpdate &&
arf_buffer_flags == kUpdate;
}
bool drop_frame;
BufferFlags last_buffer_flags;
BufferFlags golden_buffer_flags;