| OLD | NEW | 
|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <inttypes.h> | 5 #include <inttypes.h> | 
| 6 #include <stddef.h> | 6 #include <stddef.h> | 
| 7 #include <stdint.h> | 7 #include <stdint.h> | 
| 8 #include <algorithm> | 8 #include <algorithm> | 
| 9 #include <queue> | 9 #include <queue> | 
| 10 #include <string> | 10 #include <string> | 
| (...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 663 void VideoFrameQualityValidator::Initialize(const gfx::Size& coded_size, | 663 void VideoFrameQualityValidator::Initialize(const gfx::Size& coded_size, | 
| 664                                             const gfx::Rect& visible_size) { | 664                                             const gfx::Rect& visible_size) { | 
| 665   media::FFmpegGlue::InitializeFFmpeg(); | 665   media::FFmpegGlue::InitializeFFmpeg(); | 
| 666 | 666 | 
| 667   gfx::Size natural_size(visible_size.size()); | 667   gfx::Size natural_size(visible_size.size()); | 
| 668   // The default output format of ffmpeg video decoder is YV12. | 668   // The default output format of ffmpeg video decoder is YV12. | 
| 669   media::VideoDecoderConfig config; | 669   media::VideoDecoderConfig config; | 
| 670   if (IsVP8(profile_)) | 670   if (IsVP8(profile_)) | 
| 671     config.Initialize(media::kCodecVP8, media::VP8PROFILE_ANY, kInputFormat, | 671     config.Initialize(media::kCodecVP8, media::VP8PROFILE_ANY, kInputFormat, | 
| 672                       media::COLOR_SPACE_UNSPECIFIED, coded_size, visible_size, | 672                       media::COLOR_SPACE_UNSPECIFIED, coded_size, visible_size, | 
| 673                       natural_size, media::EmptyExtraData(), | 673                       natural_size, media::EmptyExtraData(), false); | 
| 674                       media::Unencrypted()); |  | 
| 675   else if (IsH264(profile_)) | 674   else if (IsH264(profile_)) | 
| 676     config.Initialize(media::kCodecH264, media::H264PROFILE_MAIN, kInputFormat, | 675     config.Initialize(media::kCodecH264, media::H264PROFILE_MAIN, kInputFormat, | 
| 677                       media::COLOR_SPACE_UNSPECIFIED, coded_size, visible_size, | 676                       media::COLOR_SPACE_UNSPECIFIED, coded_size, visible_size, | 
| 678                       natural_size, media::EmptyExtraData(), | 677                       natural_size, media::EmptyExtraData(), false); | 
| 679                       media::Unencrypted()); |  | 
| 680   else | 678   else | 
| 681     LOG_ASSERT(0) << "Invalid profile " << profile_; | 679     LOG_ASSERT(0) << "Invalid profile " << profile_; | 
| 682 | 680 | 
| 683   decoder_->Initialize( | 681   decoder_->Initialize( | 
| 684       config, false, nullptr, | 682       config, false, nullptr, | 
| 685       base::Bind(&VideoFrameQualityValidator::InitializeCB, | 683       base::Bind(&VideoFrameQualityValidator::InitializeCB, | 
| 686                  base::Unretained(this)), | 684                  base::Unretained(this)), | 
| 687       base::Bind(&VideoFrameQualityValidator::VerifyOutputFrame, | 685       base::Bind(&VideoFrameQualityValidator::VerifyOutputFrame, | 
| 688                  base::Unretained(this))); | 686                  base::Unretained(this))); | 
| 689 } | 687 } | 
| (...skipping 1095 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1785 | 1783 | 
| 1786   content::g_env = | 1784   content::g_env = | 
| 1787       reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( | 1785       reinterpret_cast<content::VideoEncodeAcceleratorTestEnvironment*>( | 
| 1788           testing::AddGlobalTestEnvironment( | 1786           testing::AddGlobalTestEnvironment( | 
| 1789               new content::VideoEncodeAcceleratorTestEnvironment( | 1787               new content::VideoEncodeAcceleratorTestEnvironment( | 
| 1790                   std::move(test_stream_data), log_path, run_at_fps, | 1788                   std::move(test_stream_data), log_path, run_at_fps, | 
| 1791                   needs_encode_latency, verify_all_output))); | 1789                   needs_encode_latency, verify_all_output))); | 
| 1792 | 1790 | 
| 1793   return RUN_ALL_TESTS(); | 1791   return RUN_ALL_TESTS(); | 
| 1794 } | 1792 } | 
| OLD | NEW | 
|---|