Commit 1197d673 authored by James Zern's avatar James Zern Committed by Gerrit Code Review
Browse files

Merge "tests: silence a few type related warnings"

Showing with 4 additions and 3 deletions
......@@ -47,7 +47,8 @@ class IVFVideoSource : public CompressedVideoSource {
virtual void Init() {
// Allocate a buffer for read in the compressed video frame.
compressed_frame_buf_ = new uint8_t[libvpx_test::kCodeBufferSize];
ASSERT_TRUE(compressed_frame_buf_) << "Allocate frame buffer failed";
ASSERT_TRUE(compressed_frame_buf_ != NULL)
<< "Allocate frame buffer failed";
}
virtual void Begin() {
......
......@@ -61,7 +61,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] = 0xa5a5;
src_diff[c] = static_cast<int16_t>(0xa5a5);
}
src_diff += kDiffPredStride;
}
......
......@@ -37,7 +37,7 @@ static double compute_psnr(const vpx_image_t *img1,
img2->planes[VPX_PLANE_Y][i * img2->stride[VPX_PLANE_Y] + j];
sqrerr += d * d;
}
double mse = sqrerr / (width_y * height_y);
double mse = static_cast<double>(sqrerr) / (width_y * height_y);
double psnr = 100.0;
if (mse > 0.0) {
psnr = 10 * log10(255.0 * 255.0 / mse);
......
Supports Markdown
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