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

Unified Diff: media/base/yuv_convert.cc

Issue 9320025: Introducing a helper wrapper for YUV-to-RGB convertion and/or scaling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make VC++ happy, take two. Created 8 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/base/decoder_vp8.h » ('j') | remoting/base/util.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/yuv_convert.cc
diff --git a/media/base/yuv_convert.cc b/media/base/yuv_convert.cc
index 8d5073bfc2bc25d4fe47181e82ff0cc085985b55..ed9bed4cc87e0c9a5bfba43171b3aa606fcdfd9b 100644
--- a/media/base/yuv_convert.cc
+++ b/media/base/yuv_convert.cc
@@ -335,8 +335,9 @@ void ScaleYUVToRGB32WithRect(const uint8* y_buf,
// Determine the parts of the Y, U and V buffers to interpolate.
int source_y_left = source_left >> kFractionBits;
- int source_y_right = (source_right >> kFractionBits) + 2;
- DCHECK(source_y_right <= source_width);
+ int source_y_right = std::min(
+ (source_right >> kFractionBits) + 2,
+ source_width + 1);
Wez 2012/02/03 22:40:35 Not sure why this needed to change?
alexeypa (please no reviews) 2012/02/03 23:29:35 Because I hit this DCHECK on a legitimate call (Yu
int source_uv_left = source_y_left / 2;
int source_uv_right = std::min(
« no previous file with comments | « no previous file | remoting/base/decoder_vp8.h » ('j') | remoting/base/util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698