| 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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 raw_(NULL), | 74 raw_(NULL), |
| 75 input_image_(NULL), | 75 input_image_(NULL), |
| 76 tl0_pic_idx_(0), | 76 tl0_pic_idx_(0), |
| 77 frames_since_kf_(0), | 77 frames_since_kf_(0), |
| 78 num_temporal_layers_(0), | 78 num_temporal_layers_(0), |
| 79 num_spatial_layers_(0), | 79 num_spatial_layers_(0), |
| 80 frames_encoded_(0), | 80 frames_encoded_(0), |
| 81 // Use two spatial when screensharing with flexible mode. | 81 // Use two spatial when screensharing with flexible mode. |
| 82 spatial_layer_(new ScreenshareLayersVP9(2)) { | 82 spatial_layer_(new ScreenshareLayersVP9(2)) { |
| 83 memset(&codec_, 0, sizeof(codec_)); | 83 memset(&codec_, 0, sizeof(codec_)); |
| 84 memset(&svc_internal_.svc_params, 0, sizeof(vpx_svc_extra_cfg_t)); |
| 84 uint32_t seed = rtc::Time32(); | 85 uint32_t seed = rtc::Time32(); |
| 85 srand(seed); | 86 srand(seed); |
| 86 } | 87 } |
| 87 | 88 |
| 88 VP9EncoderImpl::~VP9EncoderImpl() { | 89 VP9EncoderImpl::~VP9EncoderImpl() { |
| 89 Release(); | 90 Release(); |
| 90 } | 91 } |
| 91 | 92 |
| 92 int VP9EncoderImpl::Release() { | 93 int VP9EncoderImpl::Release() { |
| 93 if (encoded_image_._buffer != NULL) { | 94 if (encoded_image_._buffer != NULL) { |
| (...skipping 897 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 991 frame_buffer_pool_.ClearPool(); | 992 frame_buffer_pool_.ClearPool(); |
| 992 inited_ = false; | 993 inited_ = false; |
| 993 return WEBRTC_VIDEO_CODEC_OK; | 994 return WEBRTC_VIDEO_CODEC_OK; |
| 994 } | 995 } |
| 995 | 996 |
| 996 const char* VP9DecoderImpl::ImplementationName() const { | 997 const char* VP9DecoderImpl::ImplementationName() const { |
| 997 return "libvpx"; | 998 return "libvpx"; |
| 998 } | 999 } |
| 999 | 1000 |
| 1000 } // namespace webrtc | 1001 } // namespace webrtc |
| OLD | NEW |