Commit b3b80a18 authored by hbono@chromium.org's avatar hbono@chromium.org

Fix possible typos.

This change just fixes a possible typo in RGB->YUV conversion formulae. (If I recall correctly, 'v = 112 * r - 94 * g - 18 * b' as written in <http://en.wikipedia.org/wiki/YUV>.) (I noticed this issue when I implement RGB->YUV conversion in YASM.)

BUG=none
TEST=none
Review URL: http://codereview.chromium.org/7519024

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96756 0039d316-1c4b-4281-b951-d872f2087c98
parent 0a044e80
......@@ -35,7 +35,7 @@ void ConvertRGB32ToYUV_C(const uint8* rgbframe,
uplane[j / 2] = clip_byte(((pixel[2] * -38 + pixel[1] * -74 +
pixel[0] * 112 + 128) >> 8) + 128);
vplane[j / 2] = clip_byte(((pixel[2] * 112 + pixel[1] * -94 +
pixel[1] * -18 + 128) >> 8) + 128);
pixel[0] * -18 + 128) >> 8) + 128);
}
}
......@@ -67,7 +67,7 @@ void ConvertRGB24ToYUV_C(const uint8* rgbframe,
uplane[j / 2] = clip_byte(((pixel[2] * -38 + pixel[1] * -74 +
pixel[0] * 112 + 128) >> 8) + 128);
vplane[j / 2] = clip_byte(((pixel[2] * 112 + pixel[1] * -94 +
pixel[1] * -18 + 128) >> 8) + 128);
pixel[0] * -18 + 128) >> 8) + 128);
}
}
......
......@@ -302,7 +302,7 @@ TEST(YUVConvertTest, RGB24ToYUV) {
uint32 rgb_hash = DJB2Hash(yuv_converted_bytes.get(), kYUV12Size,
kDJB2HashSeed);
EXPECT_EQ(1802801079u, rgb_hash);
EXPECT_EQ(320824432u, rgb_hash);
}
TEST(YUVConvertTest, YUY2ToYUV) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment