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

Unified Diff: media/base/simd/convert_rgb_to_yuv_c.cc

Issue 1534273002: Switch to standard integer types in media/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more Created 5 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 side-by-side diff with in-line comments
Download patch
Index: media/base/simd/convert_rgb_to_yuv_c.cc
diff --git a/media/base/simd/convert_rgb_to_yuv_c.cc b/media/base/simd/convert_rgb_to_yuv_c.cc
index 4917d37bf36b6bc8a21442251b0badef48f141e3..7444a6e12dbdaccf37999f79e722e4335e5d5416 100644
--- a/media/base/simd/convert_rgb_to_yuv_c.cc
+++ b/media/base/simd/convert_rgb_to_yuv_c.cc
@@ -15,10 +15,10 @@ static int clip_byte(int x) {
return x;
}
-void ConvertRGB32ToYUV_C(const uint8* rgbframe,
- uint8* yplane,
- uint8* uplane,
- uint8* vplane,
+void ConvertRGB32ToYUV_C(const uint8_t* rgbframe,
+ uint8_t* yplane,
+ uint8_t* uplane,
+ uint8_t* vplane,
int width,
int height,
int rgbstride,
@@ -37,7 +37,7 @@ void ConvertRGB32ToYUV_C(const uint8* rgbframe,
for (int i = 0; i < height; ++i) {
for (int j = 0; j < width; ++j) {
// Since the input pixel format is RGB32, there are 4 bytes per pixel.
- const uint8* pixel = rgbframe + 4 * j;
+ const uint8_t* pixel = rgbframe + 4 * j;
yplane[j] = clip_byte(((pixel[r] * 66 + pixel[g] * 129 +
pixel[b] * 25 + 128) >> 8) + 16);
if (i % 2 == 0 && j % 2 == 0) {
@@ -56,10 +56,10 @@ void ConvertRGB32ToYUV_C(const uint8* rgbframe,
}
}
-void ConvertRGB24ToYUV_C(const uint8* rgbframe,
- uint8* yplane,
- uint8* uplane,
- uint8* vplane,
+void ConvertRGB24ToYUV_C(const uint8_t* rgbframe,
+ uint8_t* yplane,
+ uint8_t* uplane,
+ uint8_t* vplane,
int width,
int height,
int rgbstride,
@@ -68,7 +68,7 @@ void ConvertRGB24ToYUV_C(const uint8* rgbframe,
for (int i = 0; i < height; ++i) {
for (int j = 0; j < width; ++j) {
// Since the input pixel format is RGB24, there are 3 bytes per pixel.
- const uint8* pixel = rgbframe + 3 * j;
+ const uint8_t* pixel = rgbframe + 3 * j;
yplane[j] = clip_byte(((pixel[2] * 66 + pixel[1] * 129 +
pixel[0] * 25 + 128) >> 8) + 16);
if (i % 2 == 0 && j % 2 == 0) {

Powered by Google App Engine
This is Rietveld 408576698