blob: 3f754a3021b67ff1b8db7a2fbf5e9d92c1f7c02b [file] [log] [blame]
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "media/gpu/media_gpu_export.h"
#include "ui/gfx/geometry/size.h"
namespace media {
// Helper functions for VideoEncodeAccelerator implementations in GPU process.
// Calculate the bitstream buffer size for VideoEncodeAccelerator.
// |size|: the resolution of video stream
// |bitrate|: the bit rate in bps
// |framerate|: the frame rate in fps
MEDIA_GPU_EXPORT size_t GetEncodeBitstreamBufferSize(const gfx::Size& size,
uint32_t bitrate,
uint32_t framerate);
// Get the maximum bitstream buffer size for VideoEncodeAccelerator.
MEDIA_GPU_EXPORT size_t GetEncodeBitstreamBufferSize();
} // namespace media