#include "src/buffer_pool.h"
#include <cassert>
#include <cstring>
#include "src/utils/common.h"
#include "src/utils/constants.h"
#include "src/utils/logging.h"
namespace libgav1 {
namespace {
void CopySegmentationParameters(const Segmentation& from, Segmentation* to) { … }
}
RefCountedBuffer::RefCountedBuffer() = default;
RefCountedBuffer::~RefCountedBuffer() = default;
bool RefCountedBuffer::Realloc(int bitdepth, bool is_monochrome, int width,
int height, int subsampling_x, int subsampling_y,
int left_border, int right_border,
int top_border, int bottom_border) { … }
bool RefCountedBuffer::SetFrameDimensions(const ObuFrameHeader& frame_header) { … }
void RefCountedBuffer::SetGlobalMotions(
const std::array<GlobalMotion, kNumReferenceFrameTypes>& global_motions) { … }
void RefCountedBuffer::SetFrameContext(const SymbolDecoderContext& context) { … }
void RefCountedBuffer::GetSegmentationParameters(
Segmentation* segmentation) const { … }
void RefCountedBuffer::SetSegmentationParameters(
const Segmentation& segmentation) { … }
void RefCountedBuffer::SetBufferPool(BufferPool* pool) { … }
void RefCountedBuffer::ReturnToBufferPool(RefCountedBuffer* ptr) { … }
BufferPool::BufferPool(
FrameBufferSizeChangedCallback on_frame_buffer_size_changed,
GetFrameBufferCallback get_frame_buffer,
ReleaseFrameBufferCallback release_frame_buffer,
void* callback_private_data) { … }
BufferPool::~BufferPool() { … }
bool BufferPool::OnFrameBufferSizeChanged(int bitdepth,
Libgav1ImageFormat image_format,
int width, int height,
int left_border, int right_border,
int top_border, int bottom_border) { … }
RefCountedBufferPtr BufferPool::GetFreeBuffer() { … }
void BufferPool::Abort() { … }
void BufferPool::ReturnUnusedBuffer(RefCountedBuffer* buffer) { … }
}