OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "media/base/video_frame.h" | 5 #include "media/base/video_frame.h" |
6 #include "remoting/base/codec_test.h" | 6 #include "remoting/base/codec_test.h" |
7 #include "remoting/base/decoder_vp8.h" | 7 #include "remoting/base/decoder_vp8.h" |
8 #include "remoting/base/encoder_vp8.h" | 8 #include "remoting/base/encoder_vp8.h" |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
11 namespace remoting { | 11 namespace remoting { |
12 | 12 |
13 TEST(DecoderVp8Test, EncodeAndDecode) { | 13 TEST(DecoderVp8Test, EncodeAndDecode) { |
14 EncoderVp8 encoder; | 14 EncoderVp8 encoder; |
15 DecoderVp8 decoder; | 15 DecoderVp8 decoder; |
16 TestEncoderDecoder(&encoder, &decoder, false); | 16 TestEncoderDecoder(&encoder, &decoder, false); |
17 } | 17 } |
18 | 18 |
| 19 // Check that encoding and decoding a particular frame doesn't change the |
| 20 // frame too much. The frame used is a gradient, which does not contain sharp |
| 21 // transitions, so encoding lossiness should not be too high. |
| 22 TEST(DecoderVp8Test, Gradient) { |
| 23 EncoderVp8 encoder; |
| 24 DecoderVp8 decoder; |
| 25 TestEncoderDecoderGradient(&encoder, &decoder, 0.03, 0.01); |
| 26 } |
| 27 |
19 } // namespace remoting | 28 } // namespace remoting |
OLD | NEW |