OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 <string> | 5 #include <string> |
6 | 6 |
7 // This has to be included first. | 7 // This has to be included first. |
8 // See http://code.google.com/p/googletest/issues/detail?id=371 | 8 // See http://code.google.com/p/googletest/issues/detail?id=371 |
9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
10 | 10 |
11 #include "base/bind.h" | 11 #include "base/bind.h" |
12 #include "base/command_line.h" | 12 #include "base/command_line.h" |
13 #include "base/file_util.h" | 13 #include "base/file_util.h" |
14 #include "base/logging.h" | 14 #include "base/logging.h" |
15 #include "content/common/gpu/media/vaapi_h264_decoder.h" | 15 #include "content/common/gpu/media/vaapi_h264_decoder.h" |
16 #include "media/base/video_decoder_config.h" | 16 #include "media/base/video_decoder_config.h" |
17 #include "third_party/libyuv/include/libyuv.h" | 17 #include "third_party/libyuv/include/libyuv/convert_from.h" |
18 | 18 |
19 // This program is run like this: | 19 // This program is run like this: |
20 // DISPLAY=:0 ./vaapi_h264_decoder_unittest --input_file input.h264 | 20 // DISPLAY=:0 ./vaapi_h264_decoder_unittest --input_file input.h264 |
21 // [--output_file output.i420] [--md5sum expected_md5_hex] | 21 // [--output_file output.i420] [--md5sum expected_md5_hex] |
22 // | 22 // |
23 // The input is read from input.h264. The output is written to output.i420 if it | 23 // The input is read from input.h264. The output is written to output.i420 if it |
24 // is given. It also verifies the MD5 sum of the decoded I420 data if the | 24 // is given. It also verifies the MD5 sum of the decoded I420 data if the |
25 // expected MD5 sum is given. | 25 // expected MD5 sum is given. |
26 | 26 |
27 namespace content { | 27 namespace content { |
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 content::g_md5sum = it->second; | 376 content::g_md5sum = it->second; |
377 continue; | 377 continue; |
378 } | 378 } |
379 if (it->first == "v" || it->first == "vmodule") | 379 if (it->first == "v" || it->first == "vmodule") |
380 continue; | 380 continue; |
381 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; | 381 LOG(FATAL) << "Unexpected switch: " << it->first << ":" << it->second; |
382 } | 382 } |
383 | 383 |
384 return RUN_ALL_TESTS(); | 384 return RUN_ALL_TESTS(); |
385 } | 385 } |
OLD | NEW |