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

staging/easycap: rename variable s32 to tmp

1. naming variable s32 is confusing since it is also
a type name.
2. use s32 instead of __s32, the later is for user space
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b737f3b8
...@@ -1797,13 +1797,13 @@ int ...@@ -1797,13 +1797,13 @@ int
redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more,
__u8 mask, __u8 margin, bool isuy) __u8 mask, __u8 margin, bool isuy)
{ {
static __s32 ay[256], bu[256], rv[256], gu[256], gv[256]; static s32 ay[256], bu[256], rv[256], gu[256], gv[256];
__u8 *pcache; __u8 *pcache;
__u8 r, g, b, y, u, v, c, *p2, *p3, *pz, *pr; __u8 r, g, b, y, u, v, c, *p2, *p3, *pz, *pr;
int bytesperpixel; int bytesperpixel;
bool byteswaporder, decimatepixel, last; bool byteswaporder, decimatepixel, last;
int j, rump; int j, rump;
__s32 s32; s32 tmp;
if (much % 2) { if (much % 2) {
SAM("MISTAKE: much is odd\n"); SAM("MISTAKE: much is odd\n");
...@@ -1816,14 +1816,14 @@ decimatepixel = peasycap->decimatepixel; ...@@ -1816,14 +1816,14 @@ decimatepixel = peasycap->decimatepixel;
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
if (!bu[255]) { if (!bu[255]) {
for (j = 0; j < 112; j++) { for (j = 0; j < 112; j++) {
s32 = (0xFF00 & (453 * j)) >> 8; tmp = (0xFF00 & (453 * j)) >> 8;
bu[j + 128] = s32; bu[127 - j] = -s32; bu[j + 128] = tmp; bu[127 - j] = -tmp;
s32 = (0xFF00 & (359 * j)) >> 8; tmp = (0xFF00 & (359 * j)) >> 8;
rv[j + 128] = s32; rv[127 - j] = -s32; rv[j + 128] = tmp; rv[127 - j] = -tmp;
s32 = (0xFF00 & (88 * j)) >> 8; tmp = (0xFF00 & (88 * j)) >> 8;
gu[j + 128] = s32; gu[127 - j] = -s32; gu[j + 128] = tmp; gu[127 - j] = -tmp;
s32 = (0xFF00 & (183 * j)) >> 8; tmp = (0xFF00 & (183 * j)) >> 8;
gv[j + 128] = s32; gv[127 - j] = -s32; gv[j + 128] = tmp; gv[127 - j] = -tmp;
} }
for (j = 0; j < 16; j++) { for (j = 0; j < 16; j++) {
bu[j] = bu[16]; rv[j] = rv[16]; bu[j] = bu[16]; rv[j] = rv[16];
...@@ -1973,15 +1973,15 @@ case 3: ...@@ -1973,15 +1973,15 @@ case 3:
u = *(p2 + 1); u = *(p2 + 1);
} }
s32 = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < s32) ? 255 : ((0 > s32) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] - gu[(int)u] - gv[(int)v]; tmp = ay[(int)y] - gu[(int)u] - gv[(int)v];
g = (255 < s32) ? 255 : ((0 > s32) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < s32) ? 255 : ((0 > s32) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2046,15 +2046,15 @@ case 3: ...@@ -2046,15 +2046,15 @@ case 3:
u = *(p2 + 1); u = *(p2 + 1);
} }
s32 = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < s32) ? 255 : ((0 > s32) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] - gu[(int)u] - gv[(int)v]; tmp = ay[(int)y] - gu[(int)u] - gv[(int)v];
g = (255 < s32) ? 255 : ((0 > s32) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < s32) ? 255 : ((0 > s32) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2121,16 +2121,16 @@ case 3: ...@@ -2121,16 +2121,16 @@ case 3:
} }
if (true == isuy) { if (true == isuy) {
s32 = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < s32) ? 255 : ((0 > s32) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] - gu[(int)u] - tmp = ay[(int)y] - gu[(int)u] -
gv[(int)v]; gv[(int)v];
g = (255 < s32) ? 255 : ((0 > s32) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < s32) ? 255 : ((0 > s32) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2197,16 +2197,16 @@ case 3: ...@@ -2197,16 +2197,16 @@ case 3:
if (true == isuy) { if (true == isuy) {
s32 = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < s32) ? 255 : ((0 > s32) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] - gu[(int)u] - tmp = ay[(int)y] - gu[(int)u] -
gv[(int)v]; gv[(int)v];
g = (255 < s32) ? 255 : ((0 > s32) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < s32) ? 255 : ((0 > s32) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2278,15 +2278,15 @@ case 4: ...@@ -2278,15 +2278,15 @@ case 4:
u = *(p2 + 1); u = *(p2 + 1);
} }
s32 = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < s32) ? 255 : ((0 > s32) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] - gu[(int)u] - gv[(int)v]; tmp = ay[(int)y] - gu[(int)u] - gv[(int)v];
g = (255 < s32) ? 255 : ((0 > s32) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < s32) ? 255 : ((0 > s32) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2360,15 +2360,15 @@ case 4: ...@@ -2360,15 +2360,15 @@ case 4:
u = *(p2 + 1); u = *(p2 + 1);
} }
s32 = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < s32) ? 255 : ((0 > s32) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] - gu[(int)u] - gv[(int)v]; tmp = ay[(int)y] - gu[(int)u] - gv[(int)v];
g = (255 < s32) ? 255 : ((0 > s32) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < s32) ? 255 : ((0 > s32) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2446,16 +2446,16 @@ case 4: ...@@ -2446,16 +2446,16 @@ case 4:
if (true == isuy) { if (true == isuy) {
s32 = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < s32) ? 255 : ((0 > s32) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] - gu[(int)u] - tmp = ay[(int)y] - gu[(int)u] -
gv[(int)v]; gv[(int)v];
g = (255 < s32) ? 255 : ((0 > s32) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < s32) ? 255 : ((0 > s32) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -2531,16 +2531,16 @@ case 4: ...@@ -2531,16 +2531,16 @@ case 4:
} }
if (true == isuy) { if (true == isuy) {
s32 = ay[(int)y] + rv[(int)v]; tmp = ay[(int)y] + rv[(int)v];
r = (255 < s32) ? 255 : ((0 > s32) ? r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] - gu[(int)u] - tmp = ay[(int)y] - gu[(int)u] -
gv[(int)v]; gv[(int)v];
g = (255 < s32) ? 255 : ((0 > s32) ? g = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
s32 = ay[(int)y] + bu[(int)u]; tmp = ay[(int)y] + bu[(int)u];
b = (255 < s32) ? 255 : ((0 > s32) ? b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (__u8)s32); 0 : (__u8)tmp);
if ((true == last) && rump) { if ((true == last) && rump) {
pcache = &peasycap->cache[0]; pcache = &peasycap->cache[0];
...@@ -3172,7 +3172,7 @@ int okepn[8]; ...@@ -3172,7 +3172,7 @@ int okepn[8];
int okmps[8]; int okmps[8];
int maxpacketsize; int maxpacketsize;
__u16 mask; __u16 mask;
__s32 value; s32 value;
struct easycap_format *peasycap_format; struct easycap_format *peasycap_format;
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/ /*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#ifdef EASYCAP_IS_VIDEODEV_CLIENT #ifdef EASYCAP_IS_VIDEODEV_CLIENT
......
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