| 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 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 244 } | 244 } |
| 245 if (inst->width < 1 || inst->height < 1) { | 245 if (inst->width < 1 || inst->height < 1) { |
| 246 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; | 246 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; |
| 247 } | 247 } |
| 248 if (number_of_cores < 1) { | 248 if (number_of_cores < 1) { |
| 249 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; | 249 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; |
| 250 } | 250 } |
| 251 if (inst->VP9().numberOfTemporalLayers > 3) { | 251 if (inst->VP9().numberOfTemporalLayers > 3) { |
| 252 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; | 252 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; |
| 253 } | 253 } |
| 254 // libvpx currently supports only one or two spatial layers. | 254 // libvpx probably does not support more than 3 spatial layers. |
| 255 if (inst->VP9().numberOfSpatialLayers > 2) { | 255 if (inst->VP9().numberOfSpatialLayers > 3) { |
| 256 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; | 256 return WEBRTC_VIDEO_CODEC_ERR_PARAMETER; |
| 257 } | 257 } |
| 258 | 258 |
| 259 int ret_val = Release(); | 259 int ret_val = Release(); |
| 260 if (ret_val < 0) { | 260 if (ret_val < 0) { |
| 261 return ret_val; | 261 return ret_val; |
| 262 } | 262 } |
| 263 if (encoder_ == NULL) { | 263 if (encoder_ == NULL) { |
| 264 encoder_ = new vpx_codec_ctx_t; | 264 encoder_ = new vpx_codec_ctx_t; |
| 265 // Only randomize pid/tl0 the first time the encoder is initialized | 265 // Only randomize pid/tl0 the first time the encoder is initialized |
| (...skipping 731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 997 frame_buffer_pool_.ClearPool(); | 997 frame_buffer_pool_.ClearPool(); |
| 998 inited_ = false; | 998 inited_ = false; |
| 999 return WEBRTC_VIDEO_CODEC_OK; | 999 return WEBRTC_VIDEO_CODEC_OK; |
| 1000 } | 1000 } |
| 1001 | 1001 |
| 1002 const char* VP9DecoderImpl::ImplementationName() const { | 1002 const char* VP9DecoderImpl::ImplementationName() const { |
| 1003 return "libvpx"; | 1003 return "libvpx"; |
| 1004 } | 1004 } |
| 1005 | 1005 |
| 1006 } // namespace webrtc | 1006 } // namespace webrtc |
| OLD | NEW |