#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "third_party/blink/renderer/modules/webcodecs/video_frame_layout.h"
#include <stdint.h>
#include <vector>
#include "base/numerics/checked_math.h"
#include "media/base/limits.h"
#include "media/base/video_frame.h"
#include "media/base/video_types.h"
#include "third_party/blink/renderer/bindings/modules/v8/v8_plane_layout.h"
#include "third_party/blink/renderer/modules/webcodecs/video_frame_rect_util.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/wtf/wtf_size_t.h"
#include "ui/gfx/geometry/rect.h"
#include "ui/gfx/geometry/size.h"
namespace blink {
VideoFrameLayout::VideoFrameLayout() : … { … }
VideoFrameLayout::VideoFrameLayout(media::VideoPixelFormat format,
const gfx::Size& coded_size,
ExceptionState& exception_state)
: … { … }
VideoFrameLayout::VideoFrameLayout(
media::VideoPixelFormat format,
const gfx::Size& coded_size,
const HeapVector<Member<PlaneLayout>>& layout,
ExceptionState& exception_state)
: … { … }
media::VideoFrameLayout VideoFrameLayout::ToMediaLayout() { … }
uint32_t VideoFrameLayout::Size() const { … }
media::VideoPixelFormat VideoFrameLayout::Format() const { … }
wtf_size_t VideoFrameLayout::NumPlanes() const { … }
uint32_t VideoFrameLayout::Offset(wtf_size_t i) const { … }
uint32_t VideoFrameLayout::Stride(wtf_size_t i) const { … }
}