aboutsummaryrefslogtreecommitdiff
path: root/webrtc/common_video/libyuv/libyuv_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'webrtc/common_video/libyuv/libyuv_unittest.cc')
-rw-r--r--webrtc/common_video/libyuv/libyuv_unittest.cc34
1 files changed, 17 insertions, 17 deletions
diff --git a/webrtc/common_video/libyuv/libyuv_unittest.cc b/webrtc/common_video/libyuv/libyuv_unittest.cc
index b674b51b67..e7cf0759f6 100644
--- a/webrtc/common_video/libyuv/libyuv_unittest.cc
+++ b/webrtc/common_video/libyuv/libyuv_unittest.cc
@@ -97,7 +97,7 @@ TestLibYuv::TestLibYuv()
width_(352),
height_(288),
size_y_(width_ * height_),
- size_uv_(((width_ + 1 ) / 2) * ((height_ + 1) / 2)),
+ size_uv_(((width_ + 1) / 2) * ((height_ + 1) / 2)),
frame_length_(CalcBufferSize(kI420, 352, 288)) {
orig_buffer_.reset(new uint8_t[frame_length_]);
}
@@ -142,9 +142,9 @@ TEST_F(TestLibYuv, ConvertTest) {
double psnr = 0.0;
VideoFrame res_i420_frame;
- EXPECT_EQ(0,res_i420_frame.CreateEmptyFrame(width_, height_, width_,
- (width_ + 1) / 2,
- (width_ + 1) / 2));
+ EXPECT_EQ(0, res_i420_frame.CreateEmptyFrame(width_, height_, width_,
+ (width_ + 1) / 2,
+ (width_ + 1) / 2));
printf("\nConvert #%d I420 <-> I420 \n", j);
rtc::scoped_ptr<uint8_t[]> out_i420_buffer(new uint8_t[frame_length_]);
EXPECT_EQ(0, ConvertFromI420(orig_frame_, kI420, 0,
@@ -281,8 +281,8 @@ TEST_F(TestLibYuv, ConvertAlignedFrame) {
int stride_y = 0;
int stride_uv = 0;
Calc16ByteAlignedStride(width_, &stride_y, &stride_uv);
- EXPECT_EQ(0,res_i420_frame.CreateEmptyFrame(width_, height_,
- stride_y, stride_uv, stride_uv));
+ EXPECT_EQ(0, res_i420_frame.CreateEmptyFrame(width_, height_,
+ stride_y, stride_uv, stride_uv));
rtc::scoped_ptr<uint8_t[]> out_i420_buffer(new uint8_t[frame_length_]);
EXPECT_EQ(0, ConvertFromI420(orig_frame_, kI420, 0,
out_i420_buffer.get()));
@@ -303,27 +303,27 @@ TEST_F(TestLibYuv, RotateTest) {
VideoFrame rotated_res_i420_frame;
int rotated_width = height_;
int rotated_height = width_;
- int stride_y ;
+ int stride_y;
int stride_uv;
Calc16ByteAlignedStride(rotated_width, &stride_y, &stride_uv);
- EXPECT_EQ(0,rotated_res_i420_frame.CreateEmptyFrame(rotated_width,
- rotated_height,
- stride_y,
- stride_uv,
- stride_uv));
+ EXPECT_EQ(0, rotated_res_i420_frame.CreateEmptyFrame(rotated_width,
+ rotated_height,
+ stride_y,
+ stride_uv,
+ stride_uv));
EXPECT_EQ(0, ConvertToI420(kI420, orig_buffer_.get(), 0, 0, width_, height_,
0, kVideoRotation_90, &rotated_res_i420_frame));
EXPECT_EQ(0, ConvertToI420(kI420, orig_buffer_.get(), 0, 0, width_, height_,
0, kVideoRotation_270, &rotated_res_i420_frame));
- EXPECT_EQ(0,rotated_res_i420_frame.CreateEmptyFrame(width_, height_,
- width_, (width_ + 1) / 2,
- (width_ + 1) / 2));
+ EXPECT_EQ(0, rotated_res_i420_frame.CreateEmptyFrame(width_, height_,
+ width_, (width_ + 1) / 2,
+ (width_ + 1) / 2));
EXPECT_EQ(0, ConvertToI420(kI420, orig_buffer_.get(), 0, 0, width_, height_,
0, kVideoRotation_180, &rotated_res_i420_frame));
}
TEST_F(TestLibYuv, alignment) {
- int value = 0x3FF; // 1023
+ int value = 0x3FF; // 1023
EXPECT_EQ(0x400, AlignInt(value, 128)); // Low 7 bits are zero.
EXPECT_EQ(0x400, AlignInt(value, 64)); // Low 6 bits are zero.
EXPECT_EQ(0x400, AlignInt(value, 32)); // Low 5 bits are zero.
@@ -346,4 +346,4 @@ TEST_F(TestLibYuv, StrideAlignment) {
EXPECT_EQ(64, stride_uv);
}
-} // namespace
+} // namespace webrtc