Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc

Issue 2765243002: Delete RawVideoType enum, use the VideoType enum instead. (Closed)
Patch Set: Define constant webrtc::kI420, for backwards compatibility. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc ('k') | webrtc/test/frame_generator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 277
278 num_spatial_layers_ = inst->VP9().numberOfSpatialLayers; 278 num_spatial_layers_ = inst->VP9().numberOfSpatialLayers;
279 num_temporal_layers_ = inst->VP9().numberOfTemporalLayers; 279 num_temporal_layers_ = inst->VP9().numberOfTemporalLayers;
280 if (num_temporal_layers_ == 0) 280 if (num_temporal_layers_ == 0)
281 num_temporal_layers_ = 1; 281 num_temporal_layers_ = 1;
282 282
283 // Allocate memory for encoded image 283 // Allocate memory for encoded image
284 if (encoded_image_._buffer != NULL) { 284 if (encoded_image_._buffer != NULL) {
285 delete[] encoded_image_._buffer; 285 delete[] encoded_image_._buffer;
286 } 286 }
287 encoded_image_._size = CalcBufferSize(kI420, codec_.width, codec_.height); 287 encoded_image_._size =
288 CalcBufferSize(VideoType::kI420, codec_.width, codec_.height);
288 encoded_image_._buffer = new uint8_t[encoded_image_._size]; 289 encoded_image_._buffer = new uint8_t[encoded_image_._size];
289 encoded_image_._completeFrame = true; 290 encoded_image_._completeFrame = true;
290 // Creating a wrapper to the image - setting image data to NULL. Actual 291 // Creating a wrapper to the image - setting image data to NULL. Actual
291 // pointer will be set in encode. Setting align to 1, as it is meaningless 292 // pointer will be set in encode. Setting align to 1, as it is meaningless
292 // (actual memory is not allocated). 293 // (actual memory is not allocated).
293 raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height, 1, 294 raw_ = vpx_img_wrap(NULL, VPX_IMG_FMT_I420, codec_.width, codec_.height, 1,
294 NULL); 295 NULL);
295 // Populate encoder configuration with default values. 296 // Populate encoder configuration with default values.
296 if (vpx_codec_enc_config_default(vpx_codec_vp9_cx(), config_, 0)) { 297 if (vpx_codec_enc_config_default(vpx_codec_vp9_cx(), config_, 0)) {
297 return WEBRTC_VIDEO_CODEC_ERROR; 298 return WEBRTC_VIDEO_CODEC_ERROR;
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after
1008 frame_buffer_pool_.ClearPool(); 1009 frame_buffer_pool_.ClearPool();
1009 inited_ = false; 1010 inited_ = false;
1010 return WEBRTC_VIDEO_CODEC_OK; 1011 return WEBRTC_VIDEO_CODEC_OK;
1011 } 1012 }
1012 1013
1013 const char* VP9DecoderImpl::ImplementationName() const { 1014 const char* VP9DecoderImpl::ImplementationName() const {
1014 return "libvpx"; 1015 return "libvpx";
1015 } 1016 }
1016 1017
1017 } // namespace webrtc 1018 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc ('k') | webrtc/test/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698