Update aom to v1.0.0

Update aom to commit id d14c5bb4f336ef1842046089849dee4a301fbbf0.
This commit is contained in:
trav90 2018-10-19 21:52:15 -05:00 • committed by Roy Tam
commit 48f6d2e034
1087 changed files with 154333 additions and 265310 deletions

View file

@ -15,8 +15,8 @@
#include <cstdlib>
#include <new>
#include <string>
#include "../tools_common.h"
#include "../webmdec.h"
#include "common/tools_common.h"
#include "common/webmdec.h"
#include "test/video_source.h"
namespace libaom_test {
@ -27,8 +27,8 @@ class WebMVideoSource : public CompressedVideoSource {
public:
explicit WebMVideoSource(const std::string &file_name)
: file_name_(file_name), aom_ctx_(new AvxInputContext()),
webm_ctx_(new WebmInputContext()), buf_(NULL), buf_sz_(0), frame_(0),
end_of_file_(false) {}
webm_ctx_(new WebmInputContext()), buf_(NULL), buf_sz_(0), frame_sz_(0),
frame_number_(0), end_of_file_(false) {}
virtual ~WebMVideoSource() {
if (aom_ctx_->file != NULL) fclose(aom_ctx_->file);
@ -50,13 +50,13 @@ class WebMVideoSource : public CompressedVideoSource {
}
virtual void Next() {
++frame_;
++frame_number_;
FillFrame();
}
void FillFrame() {
ASSERT_TRUE(aom_ctx_->file != NULL);
const int status = webm_read_frame(webm_ctx_, &buf_, &buf_sz_);
const int status = webm_read_frame(webm_ctx_, &buf_, &frame_sz_, &buf_sz_);
ASSERT_GE(status, 0) << "webm_read_frame failed";
if (status == 1) {
end_of_file_ = true;
@ -66,9 +66,10 @@ class WebMVideoSource : public CompressedVideoSource {
void SeekToNextKeyFrame() {
ASSERT_TRUE(aom_ctx_->file != NULL);
do {
const int status = webm_read_frame(webm_ctx_, &buf_, &buf_sz_);
const int status =
webm_read_frame(webm_ctx_, &buf_, &frame_sz_, &buf_sz_);
ASSERT_GE(status, 0) << "webm_read_frame failed";
++frame_;
++frame_number_;
if (status == 1) {
end_of_file_ = true;
}
@ -76,16 +77,17 @@ class WebMVideoSource : public CompressedVideoSource {
}
virtual const uint8_t *cxdata() const { return end_of_file_ ? NULL : buf_; }
virtual size_t frame_size() const { return buf_sz_; }
virtual unsigned int frame_number() const { return frame_; }
virtual size_t frame_size() const { return frame_sz_; }
virtual unsigned int frame_number() const { return frame_number_; }
protected:
std::string file_name_;
AvxInputContext *aom_ctx_;
WebmInputContext *webm_ctx_;
uint8_t *buf_;
uint8_t *buf_; // Owned by webm_ctx_ and freed when webm_ctx_ is freed.
size_t buf_sz_;
unsigned int frame_;
size_t frame_sz_;
unsigned int frame_number_;
bool end_of_file_;
};