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

Side by Side Diff: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc

Issue 2534683002: RTC_[D]CHECK_op: Remove superfluous casts (Closed)
Patch Set: test Created 4 years 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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 UpdateCodecFrameSize(input_image->width(), input_image->height()); 690 UpdateCodecFrameSize(input_image->width(), input_image->height());
691 if (ret < 0) 691 if (ret < 0)
692 return ret; 692 return ret;
693 } 693 }
694 } 694 }
695 695
696 // Since we are extracting raw pointers from |input_image| to 696 // Since we are extracting raw pointers from |input_image| to
697 // |raw_images_[0]|, the resolution of these frames must match. Note that 697 // |raw_images_[0]|, the resolution of these frames must match. Note that
698 // |input_image| might be scaled from |frame|. In that case, the resolution of 698 // |input_image| might be scaled from |frame|. In that case, the resolution of
699 // |raw_images_[0]| should have been updated in UpdateCodecFrameSize. 699 // |raw_images_[0]| should have been updated in UpdateCodecFrameSize.
700 RTC_DCHECK_EQ(input_image->width(), static_cast<int>(raw_images_[0].d_w)); 700 RTC_DCHECK_EQ(input_image->width(), raw_images_[0].d_w);
701 RTC_DCHECK_EQ(input_image->height(), static_cast<int>(raw_images_[0].d_h)); 701 RTC_DCHECK_EQ(input_image->height(), raw_images_[0].d_h);
702 702
703 // Image in vpx_image_t format. 703 // Image in vpx_image_t format.
704 // Input image is const. VP8's raw image is not defined as const. 704 // Input image is const. VP8's raw image is not defined as const.
705 raw_images_[0].planes[VPX_PLANE_Y] = 705 raw_images_[0].planes[VPX_PLANE_Y] =
706 const_cast<uint8_t*>(input_image->DataY()); 706 const_cast<uint8_t*>(input_image->DataY());
707 raw_images_[0].planes[VPX_PLANE_U] = 707 raw_images_[0].planes[VPX_PLANE_U] =
708 const_cast<uint8_t*>(input_image->DataU()); 708 const_cast<uint8_t*>(input_image->DataU());
709 raw_images_[0].planes[VPX_PLANE_V] = 709 raw_images_[0].planes[VPX_PLANE_V] =
710 const_cast<uint8_t*>(input_image->DataV()); 710 const_cast<uint8_t*>(input_image->DataV());
711 711
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after
1308 return -1; 1308 return -1;
1309 } 1309 }
1310 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != 1310 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) !=
1311 VPX_CODEC_OK) { 1311 VPX_CODEC_OK) {
1312 return -1; 1312 return -1;
1313 } 1313 }
1314 return 0; 1314 return 0;
1315 } 1315 }
1316 1316
1317 } // namespace webrtc 1317 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698