This CL adds support for I410 buffers (444 10 bits) and modify vp9 and h264 for being able to convert input buffer to it when appropiate. Bug: webrtc:14818 Change-Id: I2fb3dc9d80c5338944c6df74dd6217a0454180d9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/290721 Reviewed-by: Harald Alvestrand <hta@webrtc.org> Reviewed-by: Sergey Silkin <ssilkin@webrtc.org> Reviewed-by: Erik Språng <sprang@webrtc.org> Reviewed-by: Ilya Nikolaevskiy <ilnik@webrtc.org> Reviewed-by: Åsa Persson <asapersson@webrtc.org> Commit-Queue: Ilya Nikolaevskiy <ilnik@webrtc.org> Cr-Commit-Position: refs/heads/main@{#39123}
116 lines
2.9 KiB
C++
116 lines
2.9 KiB
C++
/*
|
|
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#ifndef COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_
|
|
#define COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <functional>
|
|
|
|
#include "api/scoped_refptr.h"
|
|
#include "api/video/video_frame_buffer.h"
|
|
|
|
namespace webrtc {
|
|
|
|
rtc::scoped_refptr<I420BufferInterface> WrapI420Buffer(
|
|
int width,
|
|
int height,
|
|
const uint8_t* y_plane,
|
|
int y_stride,
|
|
const uint8_t* u_plane,
|
|
int u_stride,
|
|
const uint8_t* v_plane,
|
|
int v_stride,
|
|
std::function<void()> no_longer_used);
|
|
|
|
rtc::scoped_refptr<I422BufferInterface> WrapI422Buffer(
|
|
int width,
|
|
int height,
|
|
const uint8_t* y_plane,
|
|
int y_stride,
|
|
const uint8_t* u_plane,
|
|
int u_stride,
|
|
const uint8_t* v_plane,
|
|
int v_stride,
|
|
std::function<void()> no_longer_used);
|
|
|
|
rtc::scoped_refptr<I444BufferInterface> WrapI444Buffer(
|
|
int width,
|
|
int height,
|
|
const uint8_t* y_plane,
|
|
int y_stride,
|
|
const uint8_t* u_plane,
|
|
int u_stride,
|
|
const uint8_t* v_plane,
|
|
int v_stride,
|
|
std::function<void()> no_longer_used);
|
|
|
|
rtc::scoped_refptr<I420ABufferInterface> WrapI420ABuffer(
|
|
int width,
|
|
int height,
|
|
const uint8_t* y_plane,
|
|
int y_stride,
|
|
const uint8_t* u_plane,
|
|
int u_stride,
|
|
const uint8_t* v_plane,
|
|
int v_stride,
|
|
const uint8_t* a_plane,
|
|
int a_stride,
|
|
std::function<void()> no_longer_used);
|
|
|
|
rtc::scoped_refptr<PlanarYuvBuffer> WrapYuvBuffer(
|
|
VideoFrameBuffer::Type type,
|
|
int width,
|
|
int height,
|
|
const uint8_t* y_plane,
|
|
int y_stride,
|
|
const uint8_t* u_plane,
|
|
int u_stride,
|
|
const uint8_t* v_plane,
|
|
int v_stride,
|
|
std::function<void()> no_longer_used);
|
|
|
|
rtc::scoped_refptr<I010BufferInterface> WrapI010Buffer(
|
|
int width,
|
|
int height,
|
|
const uint16_t* y_plane,
|
|
int y_stride,
|
|
const uint16_t* u_plane,
|
|
int u_stride,
|
|
const uint16_t* v_plane,
|
|
int v_stride,
|
|
std::function<void()> no_longer_used);
|
|
|
|
rtc::scoped_refptr<I210BufferInterface> WrapI210Buffer(
|
|
int width,
|
|
int height,
|
|
const uint16_t* y_plane,
|
|
int y_stride,
|
|
const uint16_t* u_plane,
|
|
int u_stride,
|
|
const uint16_t* v_plane,
|
|
int v_stride,
|
|
std::function<void()> no_longer_used);
|
|
|
|
rtc::scoped_refptr<I410BufferInterface> WrapI410Buffer(
|
|
int width,
|
|
int height,
|
|
const uint16_t* y_plane,
|
|
int y_stride,
|
|
const uint16_t* u_plane,
|
|
int u_stride,
|
|
const uint16_t* v_plane,
|
|
int v_stride,
|
|
std::function<void()> no_longer_used);
|
|
} // namespace webrtc
|
|
|
|
#endif // COMMON_VIDEO_INCLUDE_VIDEO_FRAME_BUFFER_H_
|