OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <stdint.h> | 5 #include <stdint.h> |
6 | 6 |
7 #include "base/files/memory_mapped_file.h" | 7 #include "base/files/memory_mapped_file.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "media/base/test_data_util.h" | 9 #include "media/base/test_data_util.h" |
10 #include "media/filters/ivf_parser.h" | 10 #include "media/filters/ivf_parser.h" |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 const Vp9Segmentation& GetSegmentation() const { | 35 const Vp9Segmentation& GetSegmentation() const { |
36 return vp9_parser_.GetSegmentation(); | 36 return vp9_parser_.GetSegmentation(); |
37 } | 37 } |
38 | 38 |
39 const Vp9LoopFilter& GetLoopFilter() const { | 39 const Vp9LoopFilter& GetLoopFilter() const { |
40 return vp9_parser_.GetLoopFilter(); | 40 return vp9_parser_.GetLoopFilter(); |
41 } | 41 } |
42 | 42 |
43 IvfParser ivf_parser_; | 43 IvfParser ivf_parser_; |
44 scoped_ptr<base::MemoryMappedFile> stream_; | 44 std::unique_ptr<base::MemoryMappedFile> stream_; |
45 | 45 |
46 Vp9Parser vp9_parser_; | 46 Vp9Parser vp9_parser_; |
47 }; | 47 }; |
48 | 48 |
49 bool Vp9ParserTest::ParseNextFrame(Vp9FrameHeader* fhdr) { | 49 bool Vp9ParserTest::ParseNextFrame(Vp9FrameHeader* fhdr) { |
50 while (1) { | 50 while (1) { |
51 Vp9Parser::Result res = vp9_parser_.ParseNextFrame(fhdr); | 51 Vp9Parser::Result res = vp9_parser_.ParseNextFrame(fhdr); |
52 if (res == Vp9Parser::kEOStream) { | 52 if (res == Vp9Parser::kEOStream) { |
53 IvfFrameHeader ivf_frame_header; | 53 IvfFrameHeader ivf_frame_header; |
54 const uint8_t* ivf_payload; | 54 const uint8_t* ivf_payload; |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 EXPECT_EQ(1, fhdr.frame_refs[1]); | 152 EXPECT_EQ(1, fhdr.frame_refs[1]); |
153 EXPECT_EQ(2, fhdr.frame_refs[2]); | 153 EXPECT_EQ(2, fhdr.frame_refs[2]); |
154 EXPECT_TRUE(fhdr.allow_high_precision_mv); | 154 EXPECT_TRUE(fhdr.allow_high_precision_mv); |
155 EXPECT_EQ(Vp9InterpFilter::EIGHTTAP, fhdr.interp_filter); | 155 EXPECT_EQ(Vp9InterpFilter::EIGHTTAP, fhdr.interp_filter); |
156 | 156 |
157 EXPECT_EQ(48u, fhdr.first_partition_size); | 157 EXPECT_EQ(48u, fhdr.first_partition_size); |
158 EXPECT_EQ(11u, fhdr.uncompressed_header_size); | 158 EXPECT_EQ(11u, fhdr.uncompressed_header_size); |
159 } | 159 } |
160 | 160 |
161 } // namespace media | 161 } // namespace media |
OLD | NEW |