mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-25 01:47:31 +09:00
Update aom to v1.0.0
Update aom to commit id d14c5bb4f336ef1842046089849dee4a301fbbf0.
This commit is contained in:
parent
bb61121b44
commit
48f6d2e034
1087 changed files with 154333 additions and 265310 deletions
11
third_party/aom/test/ivf_video_source.h
vendored
11
third_party/aom/test/ivf_video_source.h
vendored
|
|
@ -10,14 +10,17 @@
|
|||
*/
|
||||
#ifndef TEST_IVF_VIDEO_SOURCE_H_
|
||||
#define TEST_IVF_VIDEO_SOURCE_H_
|
||||
|
||||
#include <cstdio>
|
||||
#include <cstdlib>
|
||||
#include <new>
|
||||
#include <string>
|
||||
|
||||
#include "aom_ports/sanitizer.h"
|
||||
#include "test/video_source.h"
|
||||
|
||||
namespace libaom_test {
|
||||
const unsigned int kCodeBufferSize = 256 * 1024;
|
||||
const unsigned int kCodeBufferSize = 256 * 1024 * 1024;
|
||||
const unsigned int kIvfFileHdrSize = 32;
|
||||
const unsigned int kIvfFrameHdrSize = 12;
|
||||
|
||||
|
|
@ -41,9 +44,10 @@ class IVFVideoSource : public CompressedVideoSource {
|
|||
|
||||
virtual void Init() {
|
||||
// Allocate a buffer for read in the compressed video frame.
|
||||
compressed_frame_buf_ = new uint8_t[libaom_test::kCodeBufferSize];
|
||||
compressed_frame_buf_ = new uint8_t[kCodeBufferSize];
|
||||
ASSERT_TRUE(compressed_frame_buf_ != NULL)
|
||||
<< "Allocate frame buffer failed";
|
||||
ASAN_POISON_MEMORY_REGION(compressed_frame_buf_, kCodeBufferSize);
|
||||
}
|
||||
|
||||
virtual void Begin() {
|
||||
|
|
@ -81,9 +85,12 @@ class IVFVideoSource : public CompressedVideoSource {
|
|||
frame_sz_ = MemGetLe32(frame_hdr);
|
||||
ASSERT_LE(frame_sz_, kCodeBufferSize)
|
||||
<< "Frame is too big for allocated code buffer";
|
||||
ASAN_UNPOISON_MEMORY_REGION(compressed_frame_buf_, kCodeBufferSize);
|
||||
ASSERT_EQ(frame_sz_,
|
||||
fread(compressed_frame_buf_, 1, frame_sz_, input_file_))
|
||||
<< "Failed to read complete frame";
|
||||
ASAN_POISON_MEMORY_REGION(compressed_frame_buf_ + frame_sz_,
|
||||
kCodeBufferSize - frame_sz_);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue