Commit 7587a975 authored by clang-format's avatar clang-format Committed by James Zern

apply clang-format

Change-Id: If4c3e8a396d0fcb304f407b44e28cac3219f038c
parent 053bd263
...@@ -640,8 +640,9 @@ int main(int argc, const char **argv) { ...@@ -640,8 +640,9 @@ int main(int argc, const char **argv) {
// Allocate image buffer // Allocate image buffer
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VP9_HIGHBITDEPTH
if (!vpx_img_alloc(&raw, enc_cfg.g_input_bit_depth == 8 ? VPX_IMG_FMT_I420 if (!vpx_img_alloc(&raw,
: VPX_IMG_FMT_I42016, enc_cfg.g_input_bit_depth == 8 ? VPX_IMG_FMT_I420
: VPX_IMG_FMT_I42016,
enc_cfg.g_w, enc_cfg.g_h, 32)) { enc_cfg.g_w, enc_cfg.g_h, 32)) {
die("Failed to allocate image %dx%d\n", enc_cfg.g_w, enc_cfg.g_h); die("Failed to allocate image %dx%d\n", enc_cfg.g_w, enc_cfg.g_h);
} }
......
...@@ -128,8 +128,8 @@ class ByteAlignmentTest ...@@ -128,8 +128,8 @@ class ByteAlignmentTest
// TODO(fgalligan): Move the MD5 testing code into another class. // TODO(fgalligan): Move the MD5 testing code into another class.
void OpenMd5File(const std::string &md5_file_name_) { void OpenMd5File(const std::string &md5_file_name_) {
md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_); md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_);
ASSERT_TRUE(md5_file_ != NULL) << "MD5 file open failed. Filename: " ASSERT_TRUE(md5_file_ != NULL)
<< md5_file_name_; << "MD5 file open failed. Filename: " << md5_file_name_;
} }
void CheckMd5(const vpx_image_t &img) { void CheckMd5(const vpx_image_t &img) {
......
...@@ -91,8 +91,8 @@ class DatarateTestLarge ...@@ -91,8 +91,8 @@ class DatarateTestLarge
const bool key_frame = const bool key_frame =
(pkt->data.frame.flags & VPX_FRAME_IS_KEY) ? true : false; (pkt->data.frame.flags & VPX_FRAME_IS_KEY) ? true : false;
if (!key_frame) { if (!key_frame) {
ASSERT_GE(bits_in_buffer_model_, 0) << "Buffer Underrun at frame " ASSERT_GE(bits_in_buffer_model_, 0)
<< pkt->data.frame.pts; << "Buffer Underrun at frame " << pkt->data.frame.pts;
} }
const int64_t frame_size_in_bits = pkt->data.frame.sz * 8; const int64_t frame_size_in_bits = pkt->data.frame.sz * 8;
...@@ -585,8 +585,8 @@ class DatarateTestVP9Large ...@@ -585,8 +585,8 @@ class DatarateTestVP9Large
duration * timebase_ * cfg_.rc_target_bitrate * 1000); duration * timebase_ * cfg_.rc_target_bitrate * 1000);
// Buffer should not go negative. // Buffer should not go negative.
ASSERT_GE(bits_in_buffer_model_, 0) << "Buffer Underrun at frame " ASSERT_GE(bits_in_buffer_model_, 0)
<< pkt->data.frame.pts; << "Buffer Underrun at frame " << pkt->data.frame.pts;
const size_t frame_size_in_bits = pkt->data.frame.sz * 8; const size_t frame_size_in_bits = pkt->data.frame.sz * 8;
......
...@@ -542,8 +542,8 @@ class Trans16x16TestBase { ...@@ -542,8 +542,8 @@ class Trans16x16TestBase {
const uint32_t diff = dst[j] - src[j]; const uint32_t diff = dst[j] - src[j];
#endif // CONFIG_VP9_HIGHBITDEPTH #endif // CONFIG_VP9_HIGHBITDEPTH
const uint32_t error = diff * diff; const uint32_t error = diff * diff;
EXPECT_GE(1u, error) << "Error: 16x16 IDCT has error " << error EXPECT_GE(1u, error)
<< " at index " << j; << "Error: 16x16 IDCT has error " << error << " at index " << j;
} }
} }
} }
......
...@@ -53,13 +53,13 @@ void DecoderTest::HandlePeekResult(Decoder *const decoder, ...@@ -53,13 +53,13 @@ void DecoderTest::HandlePeekResult(Decoder *const decoder,
* pass it is not a keyframe, so we only expect VPX_CODEC_OK on the first * pass it is not a keyframe, so we only expect VPX_CODEC_OK on the first
* frame, which must be a keyframe. */ * frame, which must be a keyframe. */
if (video->frame_number() == 0) if (video->frame_number() == 0)
ASSERT_EQ(VPX_CODEC_OK, res_peek) << "Peek return failed: " ASSERT_EQ(VPX_CODEC_OK, res_peek)
<< vpx_codec_err_to_string(res_peek); << "Peek return failed: " << vpx_codec_err_to_string(res_peek);
} else { } else {
/* The Vp9 implementation of PeekStream returns an error only if the /* The Vp9 implementation of PeekStream returns an error only if the
* data passed to it isn't a valid Vp9 chunk. */ * data passed to it isn't a valid Vp9 chunk. */
ASSERT_EQ(VPX_CODEC_OK, res_peek) << "Peek return failed: " ASSERT_EQ(VPX_CODEC_OK, res_peek)
<< vpx_codec_err_to_string(res_peek); << "Peek return failed: " << vpx_codec_err_to_string(res_peek);
} }
} }
......
...@@ -220,8 +220,8 @@ class ExternalFrameBufferMD5Test ...@@ -220,8 +220,8 @@ class ExternalFrameBufferMD5Test
void OpenMD5File(const std::string &md5_file_name_) { void OpenMD5File(const std::string &md5_file_name_) {
md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_); md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_);
ASSERT_TRUE(md5_file_ != NULL) << "Md5 file open failed. Filename: " ASSERT_TRUE(md5_file_ != NULL)
<< md5_file_name_; << "Md5 file open failed. Filename: " << md5_file_name_;
} }
virtual void DecompressedFrameHook(const vpx_image_t &img, virtual void DecompressedFrameHook(const vpx_image_t &img,
......
...@@ -511,8 +511,8 @@ class FwdTrans8x8TestBase { ...@@ -511,8 +511,8 @@ class FwdTrans8x8TestBase {
const int diff = dst[j] - ref[j]; const int diff = dst[j] - ref[j];
#endif #endif
const uint32_t error = diff * diff; const uint32_t error = diff * diff;
EXPECT_EQ(0u, error) << "Error: 8x8 IDCT has error " << error EXPECT_EQ(0u, error)
<< " at index " << j; << "Error: 8x8 IDCT has error " << error << " at index " << j;
} }
} }
} }
......
...@@ -45,8 +45,8 @@ class InvalidFileTest : public ::libvpx_test::DecoderTest, ...@@ -45,8 +45,8 @@ class InvalidFileTest : public ::libvpx_test::DecoderTest,
void OpenResFile(const std::string &res_file_name_) { void OpenResFile(const std::string &res_file_name_) {
res_file_ = libvpx_test::OpenTestDataFile(res_file_name_); res_file_ = libvpx_test::OpenTestDataFile(res_file_name_);
ASSERT_TRUE(res_file_ != NULL) << "Result file open failed. Filename: " ASSERT_TRUE(res_file_ != NULL)
<< res_file_name_; << "Result file open failed. Filename: " << res_file_name_;
} }
virtual bool HandleDecodeResult( virtual bool HandleDecodeResult(
......
...@@ -47,8 +47,8 @@ class IVFVideoSource : public CompressedVideoSource { ...@@ -47,8 +47,8 @@ class IVFVideoSource : public CompressedVideoSource {
virtual void Begin() { virtual void Begin() {
input_file_ = OpenTestDataFile(file_name_); input_file_ = OpenTestDataFile(file_name_);
ASSERT_TRUE(input_file_ != NULL) << "Input file open failed. Filename: " ASSERT_TRUE(input_file_ != NULL)
<< file_name_; << "Input file open failed. Filename: " << file_name_;
// Read file header // Read file header
uint8_t file_hdr[kIvfFileHdrSize]; uint8_t file_hdr[kIvfFileHdrSize];
......
...@@ -135,8 +135,8 @@ TEST_P(KeyframeTest, TestAutoKeyframe) { ...@@ -135,8 +135,8 @@ TEST_P(KeyframeTest, TestAutoKeyframe) {
for (std::vector<vpx_codec_pts_t>::const_iterator iter = kf_pts_list_.begin(); for (std::vector<vpx_codec_pts_t>::const_iterator iter = kf_pts_list_.begin();
iter != kf_pts_list_.end(); ++iter) { iter != kf_pts_list_.end(); ++iter) {
if (deadline_ == VPX_DL_REALTIME && *iter > 0) if (deadline_ == VPX_DL_REALTIME && *iter > 0)
EXPECT_EQ(0, (*iter - 1) % 30) << "Unexpected keyframe at frame " EXPECT_EQ(0, (*iter - 1) % 30)
<< *iter; << "Unexpected keyframe at frame " << *iter;
else else
EXPECT_EQ(0, *iter % 30) << "Unexpected keyframe at frame " << *iter; EXPECT_EQ(0, *iter % 30) << "Unexpected keyframe at frame " << *iter;
} }
......
...@@ -107,10 +107,10 @@ TEST_P(MinMaxTest, CompareReferenceAndVaryStride) { ...@@ -107,10 +107,10 @@ TEST_P(MinMaxTest, CompareReferenceAndVaryStride) {
int min_ref, max_ref, min, max; int min_ref, max_ref, min, max;
reference_minmax(a, a_stride, b, b_stride, &min_ref, &max_ref); reference_minmax(a, a_stride, b, b_stride, &min_ref, &max_ref);
ASM_REGISTER_STATE_CHECK(mm_func_(a, a_stride, b, b_stride, &min, &max)); ASM_REGISTER_STATE_CHECK(mm_func_(a, a_stride, b, b_stride, &min, &max));
EXPECT_EQ(max_ref, max) << "when a_stride = " << a_stride EXPECT_EQ(max_ref, max)
<< " and b_stride = " << b_stride; << "when a_stride = " << a_stride << " and b_stride = " << b_stride;
EXPECT_EQ(min_ref, min) << "when a_stride = " << a_stride EXPECT_EQ(min_ref, min)
<< " and b_stride = " << b_stride; << "when a_stride = " << a_stride << " and b_stride = " << b_stride;
} }
} }
} }
......
...@@ -90,8 +90,8 @@ TEST_P(VpxPostProcDownAndAcrossMbRowTest, CheckFilterOutput) { ...@@ -90,8 +90,8 @@ TEST_P(VpxPostProcDownAndAcrossMbRowTest, CheckFilterOutput) {
uint8_t *pixel_ptr = dst_image.TopLeftPixel(); uint8_t *pixel_ptr = dst_image.TopLeftPixel();
for (int i = 0; i < block_height; ++i) { for (int i = 0; i < block_height; ++i) {
for (int j = 0; j < block_width; ++j) { for (int j = 0; j < block_width; ++j) {
ASSERT_EQ(kExpectedOutput[i], pixel_ptr[j]) << "at (" << i << ", " << j ASSERT_EQ(kExpectedOutput[i], pixel_ptr[j])
<< ")"; << "at (" << i << ", " << j << ")";
} }
pixel_ptr += dst_image.stride(); pixel_ptr += dst_image.stride();
} }
...@@ -182,8 +182,8 @@ class VpxMbPostProcAcrossIpTest ...@@ -182,8 +182,8 @@ class VpxMbPostProcAcrossIpTest
int rows, int cols, int src_pitch) { int rows, int cols, int src_pitch) {
for (int r = 0; r < rows; r++) { for (int r = 0; r < rows; r++) {
for (int c = 0; c < cols; c++) { for (int c = 0; c < cols; c++) {
ASSERT_EQ(expected_output[c], src_c[c]) << "at (" << r << ", " << c ASSERT_EQ(expected_output[c], src_c[c])
<< ")"; << "at (" << r << ", " << c << ")";
} }
src_c += src_pitch; src_c += src_pitch;
} }
...@@ -296,8 +296,8 @@ class VpxMbPostProcDownTest ...@@ -296,8 +296,8 @@ class VpxMbPostProcDownTest
int rows, int cols, int src_pitch) { int rows, int cols, int src_pitch) {
for (int r = 0; r < rows; r++) { for (int r = 0; r < rows; r++) {
for (int c = 0; c < cols; c++) { for (int c = 0; c < cols; c++) {
ASSERT_EQ(expected_output[r * rows + c], src_c[c]) << "at (" << r ASSERT_EQ(expected_output[r * rows + c], src_c[c])
<< ", " << c << ")"; << "at (" << r << ", " << c << ")";
} }
src_c += src_pitch; src_c += src_pitch;
} }
......
...@@ -113,8 +113,8 @@ class RegisterStateCheck { ...@@ -113,8 +113,8 @@ class RegisterStateCheck {
int64_t post_store[8]; int64_t post_store[8];
vpx_push_neon(post_store); vpx_push_neon(post_store);
for (int i = 0; i < 8; ++i) { for (int i = 0; i < 8; ++i) {
EXPECT_EQ(pre_store_[i], post_store[i]) << "d" << i + 8 EXPECT_EQ(pre_store_[i], post_store[i])
<< " has been modified"; << "d" << i + 8 << " has been modified";
} }
} }
......
...@@ -298,10 +298,10 @@ TEST_P(ResizeTest, TestExternalResizeWorks) { ...@@ -298,10 +298,10 @@ TEST_P(ResizeTest, TestExternalResizeWorks) {
unsigned int expected_h; unsigned int expected_h;
ScaleForFrameNumber(frame, kInitialWidth, kInitialHeight, &expected_w, ScaleForFrameNumber(frame, kInitialWidth, kInitialHeight, &expected_w,
&expected_h, 0); &expected_h, 0);
EXPECT_EQ(expected_w, info->w) << "Frame " << frame EXPECT_EQ(expected_w, info->w)
<< " had unexpected width"; << "Frame " << frame << " had unexpected width";
EXPECT_EQ(expected_h, info->h) << "Frame " << frame EXPECT_EQ(expected_h, info->h)
<< " had unexpected height"; << "Frame " << frame << " had unexpected height";
} }
} }
...@@ -513,10 +513,10 @@ TEST_P(ResizeRealtimeTest, TestExternalResizeWorks) { ...@@ -513,10 +513,10 @@ TEST_P(ResizeRealtimeTest, TestExternalResizeWorks) {
unsigned int expected_h; unsigned int expected_h;
ScaleForFrameNumber(frame, kInitialWidth, kInitialHeight, &expected_w, ScaleForFrameNumber(frame, kInitialWidth, kInitialHeight, &expected_w,
&expected_h, 1); &expected_h, 1);
EXPECT_EQ(expected_w, info->w) << "Frame " << frame EXPECT_EQ(expected_w, info->w)
<< " had unexpected width"; << "Frame " << frame << " had unexpected width";
EXPECT_EQ(expected_h, info->h) << "Frame " << frame EXPECT_EQ(expected_h, info->h)
<< " had unexpected height"; << "Frame " << frame << " had unexpected height";
EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames()); EXPECT_EQ(static_cast<unsigned int>(0), GetMismatchFrames());
} }
} }
......
...@@ -50,8 +50,8 @@ class TestVectorTest : public ::libvpx_test::DecoderTest, ...@@ -50,8 +50,8 @@ class TestVectorTest : public ::libvpx_test::DecoderTest,
void OpenMD5File(const std::string &md5_file_name_) { void OpenMD5File(const std::string &md5_file_name_) {
md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_); md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_);
ASSERT_TRUE(md5_file_ != NULL) << "Md5 file open failed. Filename: " ASSERT_TRUE(md5_file_ != NULL)
<< md5_file_name_; << "Md5 file open failed. Filename: " << md5_file_name_;
} }
virtual void DecompressedFrameHook(const vpx_image_t &img, virtual void DecompressedFrameHook(const vpx_image_t &img,
......
...@@ -85,8 +85,8 @@ class SkipLoopFilterTest { ...@@ -85,8 +85,8 @@ class SkipLoopFilterTest {
// TODO(fgalligan): Move the MD5 testing code into another class. // TODO(fgalligan): Move the MD5 testing code into another class.
void OpenMd5File(const std::string &md5_file_name) { void OpenMd5File(const std::string &md5_file_name) {
md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name); md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name);
ASSERT_TRUE(md5_file_ != NULL) << "MD5 file open failed. Filename: " ASSERT_TRUE(md5_file_ != NULL)
<< md5_file_name; << "MD5 file open failed. Filename: " << md5_file_name;
} }
// Reads the next line of the MD5 file. // Reads the next line of the MD5 file.
......
...@@ -187,8 +187,8 @@ void DecodeFiles(const FileList files[]) { ...@@ -187,8 +187,8 @@ void DecodeFiles(const FileList files[]) {
for (const FileList *iter = files; iter->name != NULL; ++iter) { for (const FileList *iter = files; iter->name != NULL; ++iter) {
SCOPED_TRACE(iter->name); SCOPED_TRACE(iter->name);
for (int t = 1; t <= 8; ++t) { for (int t = 1; t <= 8; ++t) {
EXPECT_EQ(iter->expected_md5, DecodeFile(iter->name, t)) << "threads = " EXPECT_EQ(iter->expected_md5, DecodeFile(iter->name, t))
<< t; << "threads = " << t;
} }
} }
} }
......
...@@ -40,8 +40,8 @@ class WebMVideoSource : public CompressedVideoSource { ...@@ -40,8 +40,8 @@ class WebMVideoSource : public CompressedVideoSource {
virtual void Begin() { virtual void Begin() {
vpx_ctx_->file = OpenTestDataFile(file_name_); vpx_ctx_->file = OpenTestDataFile(file_name_);
ASSERT_TRUE(vpx_ctx_->file != NULL) << "Input file open failed. Filename: " ASSERT_TRUE(vpx_ctx_->file != NULL)
<< file_name_; << "Input file open failed. Filename: " << file_name_;
ASSERT_EQ(file_is_webm(webm_ctx_, vpx_ctx_), 1) << "file is not WebM"; ASSERT_EQ(file_is_webm(webm_ctx_, vpx_ctx_), 1) << "file is not WebM";
......
...@@ -34,8 +34,8 @@ class Y4mVideoSource : public VideoSource { ...@@ -34,8 +34,8 @@ class Y4mVideoSource : public VideoSource {
virtual void OpenSource() { virtual void OpenSource() {
CloseSource(); CloseSource();
input_file_ = OpenTestDataFile(file_name_); input_file_ = OpenTestDataFile(file_name_);
ASSERT_TRUE(input_file_ != NULL) << "Input file open failed. Filename: " ASSERT_TRUE(input_file_ != NULL)
<< file_name_; << "Input file open failed. Filename: " << file_name_;
} }
virtual void ReadSourceToStart() { virtual void ReadSourceToStart() {
......
...@@ -43,8 +43,8 @@ class YUVVideoSource : public VideoSource { ...@@ -43,8 +43,8 @@ class YUVVideoSource : public VideoSource {
virtual void Begin() { virtual void Begin() {
if (input_file_) fclose(input_file_); if (input_file_) fclose(input_file_);
input_file_ = OpenTestDataFile(file_name_); input_file_ = OpenTestDataFile(file_name_);
ASSERT_TRUE(input_file_ != NULL) << "Input file open failed. Filename: " ASSERT_TRUE(input_file_ != NULL)
<< file_name_; << "Input file open failed. Filename: " << file_name_;
if (start_) { if (start_) {
fseek(input_file_, static_cast<unsigned>(raw_size_) * start_, SEEK_SET); fseek(input_file_, static_cast<unsigned>(raw_size_) * start_, SEEK_SET);
} }
......
...@@ -739,21 +739,24 @@ void vp8mt_alloc_temp_buffers(VP8D_COMP *pbi, int width, int prev_mb_rows) { ...@@ -739,21 +739,24 @@ void vp8mt_alloc_temp_buffers(VP8D_COMP *pbi, int width, int prev_mb_rows) {
/* Allocate memory for above_row buffers. */ /* Allocate memory for above_row buffers. */
CALLOC_ARRAY(pbi->mt_yabove_row, pc->mb_rows); CALLOC_ARRAY(pbi->mt_yabove_row, pc->mb_rows);
for (i = 0; i < pc->mb_rows; ++i) for (i = 0; i < pc->mb_rows; ++i)
CHECK_MEM_ERROR(pbi->mt_yabove_row[i], CHECK_MEM_ERROR(
vpx_memalign(16, sizeof(unsigned char) * pbi->mt_yabove_row[i],
(width + (VP8BORDERINPIXELS << 1)))); vpx_memalign(
16, sizeof(unsigned char) * (width + (VP8BORDERINPIXELS << 1))));
CALLOC_ARRAY(pbi->mt_uabove_row, pc->mb_rows); CALLOC_ARRAY(pbi->mt_uabove_row, pc->mb_rows);
for (i = 0; i < pc->mb_rows; ++i) for (i = 0; i < pc->mb_rows; ++i)
CHECK_MEM_ERROR(pbi->mt_uabove_row[i], CHECK_MEM_ERROR(
vpx_memalign(16, sizeof(unsigned char) * pbi->mt_uabove_row[i],
(uv_width + VP8BORDERINPIXELS))); vpx_memalign(16,
sizeof(unsigned char) * (uv_width + VP8BORDERINPIXELS)));
CALLOC_ARRAY(pbi->mt_vabove_row, pc->mb_rows); CALLOC_ARRAY(pbi->mt_vabove_row, pc->mb_rows);
for (i = 0; i < pc->mb_rows; ++i) for (i = 0; i < pc->mb_rows; ++i)
CHECK_MEM_ERROR(pbi->mt_vabove_row[i], CHECK_MEM_ERROR(
vpx_memalign(16, sizeof(unsigned char) * pbi->mt_vabove_row[i],
(uv_width + VP8BORDERINPIXELS))); vpx_memalign(16,
sizeof(unsigned char) * (uv_width + VP8BORDERINPIXELS)));
/* Allocate memory for left_col buffers. */ /* Allocate memory for left_col buffers. */
CALLOC_ARRAY(pbi->mt_yleft_col, pc->mb_rows); CALLOC_ARRAY(pbi->mt_yleft_col, pc->mb_rows);
......
...@@ -1273,8 +1273,9 @@ void vp8_init_second_pass(VP8_COMP *cpi) { ...@@ -1273,8 +1273,9 @@ void vp8_init_second_pass(VP8_COMP *cpi) {
* sum duration is not. Its calculated based on the actual durations of * sum duration is not. Its calculated based on the actual durations of
* all frames from the first pass. * all frames from the first pass.
*/ */
vp8_new_framerate(cpi, 10000000.0 * cpi->twopass.total_stats.count / vp8_new_framerate(cpi,
cpi->twopass.total_stats.duration); 10000000.0 * cpi->twopass.total_stats.count /
cpi->twopass.total_stats.duration);
cpi->output_framerate = cpi->framerate; cpi->output_framerate = cpi->framerate;
cpi->twopass.bits_left = (int64_t)(cpi->twopass.total_stats.duration * cpi->twopass.bits_left = (int64_t)(cpi->twopass.total_stats.duration *
......
...@@ -1612,8 +1612,9 @@ void vp9_loop_filter_data_reset( ...@@ -1612,8 +1612,9 @@ void vp9_loop_filter_data_reset(
void vp9_reset_lfm(VP9_COMMON *const cm) { void vp9_reset_lfm(VP9_COMMON *const cm) {
if (cm->lf.filter_level) { if (cm->lf.filter_level) {
memset(cm->lf.lfm, 0, ((cm->mi_rows + (MI_BLOCK_SIZE - 1)) >> 3) * memset(cm->lf.lfm, 0,
cm->lf.lfm_stride * sizeof(*cm->lf.lfm)); ((cm->mi_rows + (MI_BLOCK_SIZE - 1)) >> 3) * cm->lf.lfm_stride *
sizeof(*cm->lf.lfm));
} }
} }
......
...@@ -309,7 +309,7 @@ static INLINE void set_partition_probs(const VP9_COMMON *const cm, ...@@ -309,7 +309,7 @@ static INLINE void set_partition_probs(const VP9_COMMON *const cm,
xd->partition_probs = xd->partition_probs =
frame_is_intra_only(cm) frame_is_intra_only(cm)
? &vp9_kf_partition_probs[0] ? &vp9_kf_partition_probs[0]
: (const vpx_prob(*)[PARTITION_TYPES - 1])cm->fc->partition_prob; : (const vpx_prob(*)[PARTITION_TYPES - 1]) cm->fc->partition_prob;
} }
static INLINE void vp9_init_macroblockd(VP9_COMMON *cm, MACROBLOCKD *xd, static INLINE void vp9_init_macroblockd(VP9_COMMON *cm, MACROBLOCKD *xd,
......
...@@ -726,8 +726,9 @@ static void first_pass_stat_calc(VP9_COMP *cpi, FIRSTPASS_STATS *fps, ...@@ -726,8 +726,9 @@ static void first_pass_stat_calc(VP9_COMP *cpi, FIRSTPASS_STATS *fps,
// Exclude any image dead zone // Exclude any image dead zone
if (fp_acc_data->image_data_start_row > 0) { if (fp_acc_data->image_data_start_row > 0) {
fp_acc_data->intra_skip_count = fp_acc_data->intra_skip_count =
VPXMAX(0, fp_acc_data->intra_skip_count - VPXMAX(0,
(fp_acc_data->image_data_start_row * cm->mb_cols * 2)); fp_acc_data->intra_skip_count -
(fp_acc_data->image_data_start_row * cm->mb_cols * 2));
} }
fp_acc_data->intra_factor = fp_acc_data->intra_factor / (double)num_mbs; fp_acc_data->intra_factor = fp_acc_data->intra_factor / (double)num_mbs;
......
...@@ -1559,8 +1559,9 @@ void vp9_rc_get_one_pass_vbr_params(VP9_COMP *cpi) { ...@@ -1559,8 +1559,9 @@ void vp9_rc_get_one_pass_vbr_params(VP9_COMP *cpi) {
// Adjust boost and af_ratio based on avg_frame_low_motion, which varies // Adjust boost and af_ratio based on avg_frame_low_motion, which varies
// between 0 and 100 (stationary, 100% zero/small motion). // between 0 and 100 (stationary, 100% zero/small motion).
rc->gfu_boost = rc->gfu_boost =
VPXMAX(500, DEFAULT_GF_BOOST * (rc->avg_frame_low_motion << 1) / VPXMAX(500,
(rc->avg_frame_low_motion + 100)); DEFAULT_GF_BOOST * (rc->avg_frame_low_motion << 1) /
(rc->avg_frame_low_motion + 100));
rc->af_ratio_onepass_vbr = VPXMIN(15, VPXMAX(5, 3 * rc->gfu_boost / 400)); rc->af_ratio_onepass_vbr = VPXMIN(15, VPXMAX(5, 3 * rc->gfu_boost / 400));
} }
adjust_gfint_frame_constraint(cpi, rc->frames_to_key); adjust_gfint_frame_constraint(cpi, rc->frames_to_key);
......
...@@ -441,8 +441,8 @@ static const struct arg_enum_list color_space_enum[] = { ...@@ -441,8 +441,8 @@ static const struct arg_enum_list color_space_enum[] = {
}; };
static const arg_def_t input_color_space = static const arg_def_t input_color_space =
ARG_DEF_ENUM(NULL, "color-space", 1, "The color space of input content:", ARG_DEF_ENUM(NULL, "color-space", 1,
color_space_enum); "The color space of input content:", color_space_enum);
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VP9_HIGHBITDEPTH
static const struct arg_enum_list bitdepth_enum[] = { static const struct arg_enum_list bitdepth_enum[] = {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment