#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "media/gpu/vp9_svc_layers.h"
#include "base/logging.h"
namespace media {
namespace {
constexpr static size_t kMaxNumUsedRefFramesEachSpatialLayer = …;
static_assert …;
constexpr static size_t kMaxNumUsedReferenceFrames = …;
static_assert …;
enum FrameFlags : uint8_t { … };
struct FrameConfig { … };
FrameConfig GetFrameConfig(size_t num_temporal_layers, size_t frame_num) { … }
}
VP9SVCLayers::Config::Config(
const std::vector<gfx::Size>& spatial_layer_resolutions,
size_t begin_active_layer,
size_t end_active_layer,
size_t num_temporal_layers,
SVCInterLayerPredMode inter_layer_pred)
: … { … }
VP9SVCLayers::Config::~Config() = default;
VP9SVCLayers::Config::Config(const Config&) = default;
VP9SVCLayers::PictureParam::PictureParam() = default;
VP9SVCLayers::PictureParam::~PictureParam() = default;
VP9SVCLayers::PictureParam::PictureParam(const PictureParam&) = default;
VP9SVCLayers::VP9SVCLayers(const Config& config) : … { … }
void VP9SVCLayers::Reset() { … }
void VP9SVCLayers::PostEncode(uint8_t refresh_frame_flags) { … }
bool VP9SVCLayers::IsKeyFrame() const { … }
void VP9SVCLayers::GetPictureParamAndMetadata(PictureParam& picture_param,
Vp9Metadata& metadata) const { … }
void VP9SVCLayers::FillMetadataForFirstFrame(
Vp9Metadata& metadata,
bool& key_frame,
uint8_t& refresh_frame_flags,
std::vector<uint8_t>& reference_frame_indices) const { … }
void VP9SVCLayers::FillMetadataForNonFirstFrame(
Vp9Metadata& metadata,
uint8_t& refresh_frame_flags,
std::vector<uint8_t>& reference_frame_indices) const { … }
}