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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/vp8_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
OLDNEW
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 10
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
361 } 361 }
362 for (int i = 0; i < number_of_streams; ++i) { 362 for (int i = 0; i < number_of_streams; ++i) {
363 // Random start, 16 bits is enough. 363 // Random start, 16 bits is enough.
364 picture_id_[i] = static_cast<uint16_t>(rand()) & 0x7FFF; // NOLINT 364 picture_id_[i] = static_cast<uint16_t>(rand()) & 0x7FFF; // NOLINT
365 last_key_frame_picture_id_[i] = -1; 365 last_key_frame_picture_id_[i] = -1;
366 // allocate memory for encoded image 366 // allocate memory for encoded image
367 if (encoded_images_[i]._buffer != NULL) { 367 if (encoded_images_[i]._buffer != NULL) {
368 delete[] encoded_images_[i]._buffer; 368 delete[] encoded_images_[i]._buffer;
369 } 369 }
370 encoded_images_[i]._size = 370 encoded_images_[i]._size =
371 CalcBufferSize(kI420, codec_.width, codec_.height); 371 CalcBufferSize(VideoType::kI420, codec_.width, codec_.height);
372 encoded_images_[i]._buffer = new uint8_t[encoded_images_[i]._size]; 372 encoded_images_[i]._buffer = new uint8_t[encoded_images_[i]._size];
373 encoded_images_[i]._completeFrame = true; 373 encoded_images_[i]._completeFrame = true;
374 } 374 }
375 // populate encoder configuration with default values 375 // populate encoder configuration with default values
376 if (vpx_codec_enc_config_default(vpx_codec_vp8_cx(), &configurations_[0], 376 if (vpx_codec_enc_config_default(vpx_codec_vp8_cx(), &configurations_[0],
377 0)) { 377 0)) {
378 return WEBRTC_VIDEO_CODEC_ERROR; 378 return WEBRTC_VIDEO_CODEC_ERROR;
379 } 379 }
380 // setting the time base of the codec 380 // setting the time base of the codec
381 configurations_[0].g_timebase.num = 1; 381 configurations_[0].g_timebase.num = 1;
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1152 buffer_pool_.Release(); 1152 buffer_pool_.Release();
1153 inited_ = false; 1153 inited_ = false;
1154 return WEBRTC_VIDEO_CODEC_OK; 1154 return WEBRTC_VIDEO_CODEC_OK;
1155 } 1155 }
1156 1156
1157 const char* VP8DecoderImpl::ImplementationName() const { 1157 const char* VP8DecoderImpl::ImplementationName() const {
1158 return "libvpx"; 1158 return "libvpx";
1159 } 1159 }
1160 1160
1161 } // namespace webrtc 1161 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/test/vp8_impl_unittest.cc ('k') | webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698