OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 * | 9 * |
10 */ | 10 */ |
(...skipping 30 matching lines...) Expand all Loading... |
41 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; | 41 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; |
42 | 42 |
43 int SetRates(uint32_t new_bitrate_kbit, uint32_t frame_rate) override; | 43 int SetRates(uint32_t new_bitrate_kbit, uint32_t frame_rate) override; |
44 | 44 |
45 void OnDroppedFrame() override {} | 45 void OnDroppedFrame() override {} |
46 | 46 |
47 private: | 47 private: |
48 // Determine number of encoder threads to use. | 48 // Determine number of encoder threads to use. |
49 int NumberOfThreads(int width, int height, int number_of_cores); | 49 int NumberOfThreads(int width, int height, int number_of_cores); |
50 | 50 |
| 51 // Set the cpu_speed setting for encoder based on resolution and/or platform. |
| 52 int SetCpuSpeed(int width, int height); |
| 53 |
51 // Call encoder initialize function and set control settings. | 54 // Call encoder initialize function and set control settings. |
52 int InitAndSetControlSettings(const VideoCodec* inst); | 55 int InitAndSetControlSettings(const VideoCodec* inst); |
53 | 56 |
54 void PopulateCodecSpecific(CodecSpecificInfo* codec_specific, | 57 void PopulateCodecSpecific(CodecSpecificInfo* codec_specific, |
55 const vpx_codec_cx_pkt& pkt, | 58 const vpx_codec_cx_pkt& pkt, |
56 uint32_t timestamp); | 59 uint32_t timestamp); |
57 | 60 |
58 int GetEncodedPartitions(const VideoFrame& input_image); | 61 int GetEncodedPartitions(const VideoFrame& input_image); |
59 | 62 |
60 // Determine maximum target for Intra frames | 63 // Determine maximum target for Intra frames |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
106 Vp9FrameBufferPool frame_buffer_pool_; | 109 Vp9FrameBufferPool frame_buffer_pool_; |
107 DecodedImageCallback* decode_complete_callback_; | 110 DecodedImageCallback* decode_complete_callback_; |
108 bool inited_; | 111 bool inited_; |
109 vpx_codec_ctx_t* decoder_; | 112 vpx_codec_ctx_t* decoder_; |
110 VideoCodec codec_; | 113 VideoCodec codec_; |
111 bool key_frame_required_; | 114 bool key_frame_required_; |
112 }; | 115 }; |
113 } // namespace webrtc | 116 } // namespace webrtc |
114 | 117 |
115 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_IMPL_H_ | 118 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_IMPL_H_ |
OLD | NEW |