From 0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 03:47:29 +0200 Subject: Adding upstream version 115.8.0esr. Signed-off-by: Daniel Baumann --- third_party/libwebrtc/test/frame_utils.h | 51 ++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 third_party/libwebrtc/test/frame_utils.h (limited to 'third_party/libwebrtc/test/frame_utils.h') diff --git a/third_party/libwebrtc/test/frame_utils.h b/third_party/libwebrtc/test/frame_utils.h new file mode 100644 index 0000000000..1f2b381afb --- /dev/null +++ b/third_party/libwebrtc/test/frame_utils.h @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2013 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 TEST_FRAME_UTILS_H_ +#define TEST_FRAME_UTILS_H_ + +#include + +#include "api/scoped_refptr.h" +#include "api/video/nv12_buffer.h" + +namespace webrtc { +class I420Buffer; +class VideoFrame; +class VideoFrameBuffer; +namespace test { + +bool EqualPlane(const uint8_t* data1, + const uint8_t* data2, + int stride1, + int stride2, + int width, + int height); + +static inline bool EqualPlane(const uint8_t* data1, + const uint8_t* data2, + int stride, + int width, + int height) { + return EqualPlane(data1, data2, stride, stride, width, height); +} + +bool FramesEqual(const webrtc::VideoFrame& f1, const webrtc::VideoFrame& f2); + +bool FrameBufsEqual(const rtc::scoped_refptr& f1, + const rtc::scoped_refptr& f2); + +rtc::scoped_refptr ReadI420Buffer(int width, int height, FILE*); + +rtc::scoped_refptr ReadNV12Buffer(int width, int height, FILE*); + +} // namespace test +} // namespace webrtc + +#endif // TEST_FRAME_UTILS_H_ -- cgit v1.2.3