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

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

Issue 1935443002: Revert of Delete webrtc::VideoFrame methods buffer and stride. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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) 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 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 RTC_DCHECK_EQ(input_image.height(), static_cast<int>(raw_->d_h)); 493 RTC_DCHECK_EQ(input_image.height(), static_cast<int>(raw_->d_h));
494 494
495 // Set input image for use in the callback. 495 // Set input image for use in the callback.
496 // This was necessary since you need some information from input_image. 496 // This was necessary since you need some information from input_image.
497 // You can save only the necessary information (such as timestamp) instead of 497 // You can save only the necessary information (such as timestamp) instead of
498 // doing this. 498 // doing this.
499 input_image_ = &input_image; 499 input_image_ = &input_image;
500 500
501 // Image in vpx_image_t format. 501 // Image in vpx_image_t format.
502 // Input image is const. VPX's raw image is not defined as const. 502 // Input image is const. VPX's raw image is not defined as const.
503 raw_->planes[VPX_PLANE_Y] = 503 raw_->planes[VPX_PLANE_Y] = const_cast<uint8_t*>(input_image.buffer(kYPlane));
504 const_cast<uint8_t*>(input_image.video_frame_buffer()->DataY()); 504 raw_->planes[VPX_PLANE_U] = const_cast<uint8_t*>(input_image.buffer(kUPlane));
505 raw_->planes[VPX_PLANE_U] = 505 raw_->planes[VPX_PLANE_V] = const_cast<uint8_t*>(input_image.buffer(kVPlane));
506 const_cast<uint8_t*>(input_image.video_frame_buffer()->DataU()); 506 raw_->stride[VPX_PLANE_Y] = input_image.stride(kYPlane);
507 raw_->planes[VPX_PLANE_V] = 507 raw_->stride[VPX_PLANE_U] = input_image.stride(kUPlane);
508 const_cast<uint8_t*>(input_image.video_frame_buffer()->DataV()); 508 raw_->stride[VPX_PLANE_V] = input_image.stride(kVPlane);
509 raw_->stride[VPX_PLANE_Y] = input_image.video_frame_buffer()->StrideY();
510 raw_->stride[VPX_PLANE_U] = input_image.video_frame_buffer()->StrideU();
511 raw_->stride[VPX_PLANE_V] = input_image.video_frame_buffer()->StrideV();
512 509
513 vpx_enc_frame_flags_t flags = 0; 510 vpx_enc_frame_flags_t flags = 0;
514 bool send_keyframe = (frame_type == kVideoFrameKey); 511 bool send_keyframe = (frame_type == kVideoFrameKey);
515 if (send_keyframe) { 512 if (send_keyframe) {
516 // Key frame request from caller. 513 // Key frame request from caller.
517 flags = VPX_EFLAG_FORCE_KF; 514 flags = VPX_EFLAG_FORCE_KF;
518 } 515 }
519 516
520 if (is_flexible_mode_) { 517 if (is_flexible_mode_) {
521 SuperFrameRefSettings settings; 518 SuperFrameRefSettings settings;
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after
983 frame_buffer_pool_.ClearPool(); 980 frame_buffer_pool_.ClearPool();
984 inited_ = false; 981 inited_ = false;
985 return WEBRTC_VIDEO_CODEC_OK; 982 return WEBRTC_VIDEO_CODEC_OK;
986 } 983 }
987 984
988 const char* VP9DecoderImpl::ImplementationName() const { 985 const char* VP9DecoderImpl::ImplementationName() const {
989 return "libvpx"; 986 return "libvpx";
990 } 987 }
991 988
992 } // namespace webrtc 989 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc ('k') | webrtc/modules/video_processing/content_analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698