Commit 4f46a3e0 authored by fbarchard@google.com's avatar fbarchard@google.com

remove 1 tab from each row of histograms in libyuvTest.TestFullYUV and libyuvTest.TestScaleFullYUV.

BUG=none
TESTED=libyuvTest.TestScaleFullYUV
R=tpsiaki@google.com

Review URL: https://webrtc-codereview.appspot.com/47799004

git-svn-id: http://libyuv.googlecode.com/svn/trunk@1345 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent d41fbf40
......@@ -435,44 +435,27 @@ TEST_F(libyuvTest, TestGreyYUV) {
}
}
TEST_F(libyuvTest, TestFullYUV) {
void PrintHistogram(int rh[256], int gh[256], int bh[256]) {
int i;
int rh[256] = { 0, }, gh[256] = { 0, }, bh[256] = { 0, };
for (int u = 0; u < 256; ++u) {
for (int v = 0; v < 256; ++v) {
for (int y2 = 0; y2 < 256; ++y2) {
int r0, g0, b0, r1, g1, b1;
int y = RANDOM256(y2);
YUVToRGBReference(y, u, v, &r0, &g0, &b0);
YUVToRGB(y, u, v, &r1, &g1, &b1);
EXPECT_NEAR(r0, r1, ERROR_R);
EXPECT_NEAR(g0, g1, ERROR_G);
EXPECT_NEAR(b0, b1, ERROR_B);
++rh[r1 - r0 + 128];
++gh[g1 - g0 + 128];
++bh[b1 - b0 + 128];
}
}
}
printf("hist\t");
printf("hist");
for (i = 0; i < 256; ++i) {
if (rh[i] || gh[i] || bh[i]) {
printf("\t%8d", i - 128);
}
}
printf("\nred\t");
printf("\nred");
for (i = 0; i < 256; ++i) {
if (rh[i] || gh[i] || bh[i]) {
printf("\t%8d", rh[i]);
}
}
printf("\ngreen\t");
printf("\ngreen");
for (i = 0; i < 256; ++i) {
if (rh[i] || gh[i] || bh[i]) {
printf("\t%8d", gh[i]);
}
}
printf("\nblue\t");
printf("\nblue");
for (i = 0; i < 256; ++i) {
if (rh[i] || gh[i] || bh[i]) {
printf("\t%8d", bh[i]);
......@@ -481,8 +464,28 @@ TEST_F(libyuvTest, TestFullYUV) {
printf("\n");
}
TEST_F(libyuvTest, TestFullYUV) {
int rh[256] = { 0, }, gh[256] = { 0, }, bh[256] = { 0, };
for (int u = 0; u < 256; ++u) {
for (int v = 0; v < 256; ++v) {
for (int y2 = 0; y2 < 256; ++y2) {
int r0, g0, b0, r1, g1, b1;
int y = RANDOM256(y2);
YUVToRGBReference(y, u, v, &r0, &g0, &b0);
YUVToRGB(y, u, v, &r1, &g1, &b1);
EXPECT_NEAR(r0, r1, ERROR_R);
EXPECT_NEAR(g0, g1, ERROR_G);
EXPECT_NEAR(b0, b1, ERROR_B);
++rh[r1 - r0 + 128];
++gh[g1 - g0 + 128];
++bh[b1 - b0 + 128];
}
}
}
PrintHistogram(rh, gh, bh);
}
TEST_F(libyuvTest, TestFullYUVJ) {
int i;
int rh[256] = { 0, }, gh[256] = { 0, }, bh[256] = { 0, };
for (int u = 0; u < 256; ++u) {
for (int v = 0; v < 256; ++v) {
......@@ -500,31 +503,7 @@ TEST_F(libyuvTest, TestFullYUVJ) {
}
}
}
printf("hist\t");
for (i = 0; i < 256; ++i) {
if (rh[i] || gh[i] || bh[i]) {
printf("\t%8d", i - 128);
}
}
printf("\nred\t");
for (i = 0; i < 256; ++i) {
if (rh[i] || gh[i] || bh[i]) {
printf("\t%8d", rh[i]);
}
}
printf("\ngreen\t");
for (i = 0; i < 256; ++i) {
if (rh[i] || gh[i] || bh[i]) {
printf("\t%8d", gh[i]);
}
}
printf("\nblue\t");
for (i = 0; i < 256; ++i) {
if (rh[i] || gh[i] || bh[i]) {
printf("\t%8d", bh[i]);
}
}
printf("\n");
PrintHistogram(rh, gh, bh);
}
TEST_F(libyuvTest, TestGreyYUVJ) {
......
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