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

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

Issue 1542013004: Switch to standard integer types in media/, take 2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more stddef 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
« no previous file with comments | « media/base/simd/convert_rgb_to_yuv.h ('k') | media/base/simd/convert_rgb_to_yuv_sse2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a43e431846b9b0c566433857097376debce95b69 100644
--- a/media/base/simd/convert_rgb_to_yuv_c.cc
+++ b/media/base/simd/convert_rgb_to_yuv_c.cc
@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
+#include <stdint.h>
+
+#include "build/build_config.h"
#include "media/base/simd/convert_rgb_to_yuv.h"
namespace media {
@@ -15,10 +18,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 +40,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 +59,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 +71,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) {
« no previous file with comments | « media/base/simd/convert_rgb_to_yuv.h ('k') | media/base/simd/convert_rgb_to_yuv_sse2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698