| 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 */ |
| 11 | 11 |
| 12 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_IMPL_H_ | 12 #ifndef WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_VP9_IMPL_H_ |
| 13 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_IMPL_H_ | 13 #define WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_VP9_IMPL_H_ |
| 14 |
| 15 #include <vector> |
| 14 | 16 |
| 15 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h" | 17 #include "webrtc/modules/video_coding/codecs/vp9/include/vp9.h" |
| 16 #include "webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h" | 18 #include "webrtc/modules/video_coding/codecs/vp9/vp9_frame_buffer_pool.h" |
| 17 | 19 |
| 18 #include "vpx/svc_context.h" | 20 #include "vpx/svc_context.h" |
| 19 #include "vpx/vpx_decoder.h" | 21 #include "vpx/vpx_decoder.h" |
| 20 #include "vpx/vpx_encoder.h" | 22 #include "vpx/vpx_encoder.h" |
| 21 | 23 |
| 22 namespace webrtc { | 24 namespace webrtc { |
| 23 | 25 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 122 |
| 121 // Used for flexible mode. | 123 // Used for flexible mode. |
| 122 bool is_flexible_mode_; | 124 bool is_flexible_mode_; |
| 123 int64_t buffer_updated_at_frame_[kNumVp9Buffers]; | 125 int64_t buffer_updated_at_frame_[kNumVp9Buffers]; |
| 124 int64_t frames_encoded_; | 126 int64_t frames_encoded_; |
| 125 uint8_t num_ref_pics_[kMaxVp9NumberOfSpatialLayers]; | 127 uint8_t num_ref_pics_[kMaxVp9NumberOfSpatialLayers]; |
| 126 uint8_t p_diff_[kMaxVp9NumberOfSpatialLayers][kMaxVp9RefPics]; | 128 uint8_t p_diff_[kMaxVp9NumberOfSpatialLayers][kMaxVp9RefPics]; |
| 127 rtc::scoped_ptr<ScreenshareLayersVP9> spatial_layer_; | 129 rtc::scoped_ptr<ScreenshareLayersVP9> spatial_layer_; |
| 128 }; | 130 }; |
| 129 | 131 |
| 130 | |
| 131 class VP9DecoderImpl : public VP9Decoder { | 132 class VP9DecoderImpl : public VP9Decoder { |
| 132 public: | 133 public: |
| 133 VP9DecoderImpl(); | 134 VP9DecoderImpl(); |
| 134 | 135 |
| 135 virtual ~VP9DecoderImpl(); | 136 virtual ~VP9DecoderImpl(); |
| 136 | 137 |
| 137 int InitDecode(const VideoCodec* inst, int number_of_cores) override; | 138 int InitDecode(const VideoCodec* inst, int number_of_cores) override; |
| 138 | 139 |
| 139 int Decode(const EncodedImage& input_image, | 140 int Decode(const EncodedImage& input_image, |
| 140 bool missing_frames, | 141 bool missing_frames, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 154 // Memory pool used to share buffers between libvpx and webrtc. | 155 // Memory pool used to share buffers between libvpx and webrtc. |
| 155 Vp9FrameBufferPool frame_buffer_pool_; | 156 Vp9FrameBufferPool frame_buffer_pool_; |
| 156 DecodedImageCallback* decode_complete_callback_; | 157 DecodedImageCallback* decode_complete_callback_; |
| 157 bool inited_; | 158 bool inited_; |
| 158 vpx_codec_ctx_t* decoder_; | 159 vpx_codec_ctx_t* decoder_; |
| 159 VideoCodec codec_; | 160 VideoCodec codec_; |
| 160 bool key_frame_required_; | 161 bool key_frame_required_; |
| 161 }; | 162 }; |
| 162 } // namespace webrtc | 163 } // namespace webrtc |
| 163 | 164 |
| 164 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_IMPL_H_ | 165 #endif // WEBRTC_MODULES_VIDEO_CODING_CODECS_VP9_VP9_IMPL_H_ |
| OLD | NEW |