| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 * WEBRTC VP8 wrapper interface | 10 * WEBRTC VP8 wrapper interface |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; | 56 int SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; |
| 57 | 57 |
| 58 int SetRateAllocation(const BitrateAllocation& bitrate, | 58 int SetRateAllocation(const BitrateAllocation& bitrate, |
| 59 uint32_t new_framerate) override; | 59 uint32_t new_framerate) override; |
| 60 | 60 |
| 61 ScalingSettings GetScalingSettings() const override; | 61 ScalingSettings GetScalingSettings() const override; |
| 62 | 62 |
| 63 const char* ImplementationName() const override; | 63 const char* ImplementationName() const override; |
| 64 | 64 |
| 65 static vpx_enc_frame_flags_t EncodeFlags(TemporalReferences references); | 65 static vpx_enc_frame_flags_t EncodeFlags( |
| 66 TemporalLayers::FrameConfig references); |
| 66 | 67 |
| 67 private: | 68 private: |
| 68 void SetupTemporalLayers(int num_streams, | 69 void SetupTemporalLayers(int num_streams, |
| 69 int num_temporal_layers, | 70 int num_temporal_layers, |
| 70 const VideoCodec& codec); | 71 const VideoCodec& codec); |
| 71 | 72 |
| 72 // Set the cpu_speed setting for encoder based on resolution and/or platform. | 73 // Set the cpu_speed setting for encoder based on resolution and/or platform. |
| 73 int SetCpuSpeed(int width, int height); | 74 int SetCpuSpeed(int width, int height); |
| 74 | 75 |
| 75 // Determine number of encoder threads to use. | 76 // Determine number of encoder threads to use. |
| 76 int NumberOfThreads(int width, int height, int number_of_cores); | 77 int NumberOfThreads(int width, int height, int number_of_cores); |
| 77 | 78 |
| 78 // Call encoder initialize function and set control settings. | 79 // Call encoder initialize function and set control settings. |
| 79 int InitAndSetControlSettings(); | 80 int InitAndSetControlSettings(); |
| 80 | 81 |
| 81 void PopulateCodecSpecific(CodecSpecificInfo* codec_specific, | 82 void PopulateCodecSpecific(CodecSpecificInfo* codec_specific, |
| 83 TemporalLayers::FrameConfig tl_config, |
| 82 const vpx_codec_cx_pkt& pkt, | 84 const vpx_codec_cx_pkt& pkt, |
| 83 int stream_idx, | 85 int stream_idx, |
| 84 uint32_t timestamp); | 86 uint32_t timestamp); |
| 85 | 87 |
| 86 int GetEncodedPartitions(const VideoFrame& input_image); | 88 int GetEncodedPartitions(const TemporalLayers::FrameConfig tl_configs[], |
| 89 const VideoFrame& input_image); |
| 87 | 90 |
| 88 // Set the stream state for stream |stream_idx|. | 91 // Set the stream state for stream |stream_idx|. |
| 89 void SetStreamState(bool send_stream, int stream_idx); | 92 void SetStreamState(bool send_stream, int stream_idx); |
| 90 | 93 |
| 91 uint32_t MaxIntraTarget(uint32_t optimal_buffer_size); | 94 uint32_t MaxIntraTarget(uint32_t optimal_buffer_size); |
| 92 | 95 |
| 93 const bool use_gf_boost_; | 96 const bool use_gf_boost_; |
| 94 | 97 |
| 95 EncodedImageCallback* encoded_complete_callback_; | 98 EncodedImageCallback* encoded_complete_callback_; |
| 96 VideoCodec codec_; | 99 VideoCodec codec_; |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 145 bool inited_; | 148 bool inited_; |
| 146 vpx_codec_ctx_t* decoder_; | 149 vpx_codec_ctx_t* decoder_; |
| 147 int propagation_cnt_; | 150 int propagation_cnt_; |
| 148 int last_frame_width_; | 151 int last_frame_width_; |
| 149 int last_frame_height_; | 152 int last_frame_height_; |
| 150 bool key_frame_required_; | 153 bool key_frame_required_; |
| 151 }; | 154 }; |
| 152 } // namespace webrtc | 155 } // namespace webrtc |
| 153 | 156 |
| 154 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ | 157 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP8_VP8_IMPL_H_ |
| OLD | NEW |