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 "media/cast/sender/external_video_encoder.h" | 5 #include "media/cast/sender/external_video_encoder.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/debug/crash_logging.h" | 10 #include "base/debug/crash_logging.h" |
11 #include "base/debug/dump_without_crashing.h" | 11 #include "base/debug/dump_without_crashing.h" |
12 #include "base/format_macros.h" | 12 #include "base/format_macros.h" |
13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "base/macros.h" |
14 #include "base/memory/scoped_vector.h" | 15 #include "base/memory/scoped_vector.h" |
15 #include "base/memory/shared_memory.h" | 16 #include "base/memory/shared_memory.h" |
16 #include "base/message_loop/message_loop.h" | 17 #include "base/message_loop/message_loop.h" |
17 #include "base/metrics/histogram.h" | 18 #include "base/metrics/histogram.h" |
18 #include "base/strings/stringprintf.h" | 19 #include "base/strings/stringprintf.h" |
| 20 #include "build/build_config.h" |
19 #include "media/base/video_frame.h" | 21 #include "media/base/video_frame.h" |
20 #include "media/base/video_types.h" | 22 #include "media/base/video_types.h" |
21 #include "media/base/video_util.h" | 23 #include "media/base/video_util.h" |
22 #include "media/cast/cast_config.h" | 24 #include "media/cast/cast_config.h" |
23 #include "media/cast/cast_defines.h" | 25 #include "media/cast/cast_defines.h" |
24 #include "media/cast/logging/logging_defines.h" | 26 #include "media/cast/logging/logging_defines.h" |
25 #include "media/cast/net/cast_transport_config.h" | 27 #include "media/cast/net/cast_transport_config.h" |
26 #include "media/cast/sender/vp8_quantizer_parser.h" | 28 #include "media/cast/sender/vp8_quantizer_parser.h" |
27 #include "media/filters/h264_parser.h" | 29 #include "media/filters/h264_parser.h" |
28 | 30 |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
785 const double kEntropyAtMaxQuantizer = 7.5; | 787 const double kEntropyAtMaxQuantizer = 7.5; |
786 const double slope = | 788 const double slope = |
787 (MAX_VP8_QUANTIZER - MIN_VP8_QUANTIZER) / kEntropyAtMaxQuantizer; | 789 (MAX_VP8_QUANTIZER - MIN_VP8_QUANTIZER) / kEntropyAtMaxQuantizer; |
788 const double quantizer = std::min<double>( | 790 const double quantizer = std::min<double>( |
789 MAX_VP8_QUANTIZER, MIN_VP8_QUANTIZER + slope * shannon_entropy); | 791 MAX_VP8_QUANTIZER, MIN_VP8_QUANTIZER + slope * shannon_entropy); |
790 return quantizer; | 792 return quantizer; |
791 } | 793 } |
792 | 794 |
793 } // namespace cast | 795 } // namespace cast |
794 } // namespace media | 796 } // namespace media |
OLD | NEW |