chromium/third_party/libgav1/src/src/buffer_pool.cc

// Copyright 2019 The libgav1 Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//      http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#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 {

// Copies the feature_enabled, feature_data, segment_id_pre_skip, and
// last_active_segment_id fields of Segmentation.
void CopySegmentationParameters(const Segmentation& from, Segmentation* to) {}

}  // namespace

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) {}

}  // namespace libgav1