diff options
-rw-r--r-- | test/i420_video_source.h | 2 | ||||
-rw-r--r-- | test/subtract_test.cc | 2 | ||||
-rw-r--r-- | test/test_vector_test.cc | 2 | ||||
-rw-r--r-- | test/vp8_boolcoder_test.cc | 2 | ||||
-rw-r--r-- | vp9/encoder/vp9_onyx_if.c | 7 |
5 files changed, 11 insertions, 4 deletions
diff --git a/test/i420_video_source.h b/test/i420_video_source.h index 2bf2a0334..c3315f9ce 100644 --- a/test/i420_video_source.h +++ b/test/i420_video_source.h @@ -52,7 +52,7 @@ class I420VideoSource : public VideoSource { ASSERT_TRUE(input_file_ != NULL) << "Input file open failed. Filename: " << file_name_; if (start_) { - fseek(input_file_, raw_sz_ * start_, SEEK_SET); + fseek(input_file_, static_cast<unsigned>(raw_sz_) * start_, SEEK_SET); } frame_ = start_; diff --git a/test/subtract_test.cc b/test/subtract_test.cc index 3211c5c8a..9e242a246 100644 --- a/test/subtract_test.cc +++ b/test/subtract_test.cc @@ -59,7 +59,7 @@ TEST_P(SubtractBlockTest, SimpleSubtract) { int16_t *src_diff = be.src_diff; for (int r = 0; r < kBlockHeight; ++r) { for (int c = 0; c < kBlockWidth; ++c) { - src_diff[c] = static_cast<int16_t>(0xa5a5); + src_diff[c] = static_cast<int16_t>(0xa5a5u); } src_diff += kDiffPredStride; } diff --git a/test/test_vector_test.cc b/test/test_vector_test.cc index 4adf9af91..53b7636b6 100644 --- a/test/test_vector_test.cc +++ b/test/test_vector_test.cc @@ -35,7 +35,7 @@ class TestVectorTest : public ::libvpx_test::DecoderTest, void OpenMD5File(const std::string& md5_file_name_) { md5_file_ = libvpx_test::OpenTestDataFile(md5_file_name_); - ASSERT_TRUE(md5_file_) << "Md5 file open failed. Filename: " + ASSERT_TRUE(md5_file_ != NULL) << "Md5 file open failed. Filename: " << md5_file_name_; } diff --git a/test/vp8_boolcoder_test.cc b/test/vp8_boolcoder_test.cc index fa7ee6e8c..7c6c60148 100644 --- a/test/vp8_boolcoder_test.cc +++ b/test/vp8_boolcoder_test.cc @@ -43,7 +43,7 @@ void encrypt_buffer(uint8_t *buffer, int size) { void test_decrypt_cb(void *decrypt_state, const uint8_t *input, uint8_t *output, int count) { - int offset = input - reinterpret_cast<uint8_t *>(decrypt_state); + const size_t offset = input - reinterpret_cast<uint8_t*>(decrypt_state); for (int i = 0; i < count; i++) { output[i] = input[i] ^ secret_key[(offset + i) & 15]; } diff --git a/vp9/encoder/vp9_onyx_if.c b/vp9/encoder/vp9_onyx_if.c index 23fd2f919..6bc88ec44 100644 --- a/vp9/encoder/vp9_onyx_if.c +++ b/vp9/encoder/vp9_onyx_if.c @@ -3330,6 +3330,7 @@ int vp9_receive_raw_frame(VP9_PTR ptr, unsigned int frame_flags, YV12_BUFFER_CONFIG *sd, int64_t time_stamp, int64_t end_time) { VP9_COMP *cpi = (VP9_COMP *) ptr; + VP9_COMMON *cm = &cpi->common; struct vpx_usec_timer timer; int res = 0; const int subsampling_x = sd->uv_width < sd->y_width; @@ -3343,6 +3344,12 @@ int vp9_receive_raw_frame(VP9_PTR ptr, unsigned int frame_flags, vpx_usec_timer_mark(&timer); cpi->time_receive_data += vpx_usec_timer_elapsed(&timer); + if (cm->version == 0 && (subsampling_x != 1 || subsampling_y != 1)) { + vpx_internal_error(&cm->error, VPX_CODEC_INVALID_PARAM, + "Non-4:2:0 color space requires profile >= 1"); + res = -1; + } + return res; } |