Commit abb46c8c authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

staging/easycap: add first level indentation to easycap_testcard.c

Add the first level indentation to easycap_testcard.c with astyle -t8.
No chackpatch warnings were created

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 980aebdd
...@@ -32,73 +32,75 @@ ...@@ -32,73 +32,75 @@
void void
easycap_testcard(struct easycap *peasycap, int field) easycap_testcard(struct easycap *peasycap, int field)
{ {
int total; int total;
int y, u, v, r, g, b; int y, u, v, r, g, b;
unsigned char uyvy[4]; unsigned char uyvy[4];
int i1, line, k, m, n, more, much, barwidth, barheight; int i1, line, k, m, n, more, much, barwidth, barheight;
unsigned char bfbar[TESTCARD_BYTESPERLINE / 8], *p1, *p2; unsigned char bfbar[TESTCARD_BYTESPERLINE / 8], *p1, *p2;
struct data_buffer *pfield_buffer; struct data_buffer *pfield_buffer;
if (NULL == peasycap) { if (NULL == peasycap) {
SAY("ERROR: peasycap is NULL\n"); SAY("ERROR: peasycap is NULL\n");
return; return;
} }
JOM(8, "%i=field\n", field); JOM(8, "%i=field\n", field);
switch (peasycap->width) { switch (peasycap->width) {
case 720: case 720:
case 360: { case 360: {
barwidth = (2 * 720) / 8; barwidth = (2 * 720) / 8;
break; break;
} }
case 704: case 704:
case 352: { case 352: {
barwidth = (2 * 704) / 8; barwidth = (2 * 704) / 8;
break; break;
} }
case 640: case 640:
case 320: { case 320: {
barwidth = (2 * 640) / 8; barwidth = (2 * 640) / 8;
break; break;
} }
default: { default: {
SAM("ERROR: cannot set barwidth\n"); SAM("ERROR: cannot set barwidth\n");
return; return;
} }
} }
if (TESTCARD_BYTESPERLINE < barwidth) { if (TESTCARD_BYTESPERLINE < barwidth) {
SAM("ERROR: barwidth is too large\n"); SAM("ERROR: barwidth is too large\n");
return; return;
} }
switch (peasycap->height) { switch (peasycap->height) {
case 576: case 576:
case 288: { case 288: {
barheight = 576; barheight = 576;
break; break;
} }
case 480: case 480:
case 240: { case 240: {
barheight = 480; barheight = 480;
break; break;
} }
default: { default: {
SAM("ERROR: cannot set barheight\n"); SAM("ERROR: cannot set barheight\n");
return; return;
} }
} }
total = 0; total = 0;
k = field; k = field;
m = 0; m = 0;
n = 0; n = 0;
for (line = 0; line < (barheight / 2); line++) { for (line = 0; line < (barheight / 2); line++) {
for (i1 = 0; i1 < 8; i1++) { for (i1 = 0; i1 < 8; i1++) {
r = (i1 * 256)/8; r = (i1 * 256)/8;
g = (i1 * 256)/8; g = (i1 * 256)/8;
b = (i1 * 256)/8; b = (i1 * 256)/8;
y = 299*r/1000 + 587*g/1000 + 114*b/1000 ; y = 299*r/1000 + 587*g/1000 + 114*b/1000 ;
u = -147*r/1000 - 289*g/1000 + 436*b/1000 ; u = u + 128; u = -147*r/1000 - 289*g/1000 + 436*b/1000 ;
v = 615*r/1000 - 515*g/1000 - 100*b/1000 ; v = v + 128; u = u + 128;
v = 615*r/1000 - 515*g/1000 - 100*b/1000 ;
v = v + 128;
uyvy[0] = 0xFF & u ; uyvy[0] = 0xFF & u ;
uyvy[1] = 0xFF & y ; uyvy[1] = 0xFF & y ;
...@@ -123,7 +125,8 @@ for (line = 0; line < (barheight / 2); line++) { ...@@ -123,7 +125,8 @@ for (line = 0; line < (barheight / 2); line++) {
return; return;
} }
if (PAGE_SIZE < n) { if (PAGE_SIZE < n) {
SAM("ERROR: bad n reached\n"); return; SAM("ERROR: bad n reached\n");
return;
} }
if (0 > more) { if (0 > more) {
...@@ -147,6 +150,6 @@ for (line = 0; line < (barheight / 2); line++) { ...@@ -147,6 +150,6 @@ for (line = 0; line < (barheight / 2); line++) {
} }
} }
} }
} }
return; return;
} }
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