JOM(8, "SAA register 0x%02X changed "
"from 0x%02X to 0x%02X\n", reg, itwas, isnow);
}
- if (true == resubmit)
+ if (resubmit)
submit_video_urbs(peasycap);
return 0;
}
peasycap->offerfields = true;
else
peasycap->offerfields = false;
- if (true == peasycap->decimatepixel)
+ if (peasycap->decimatepixel)
multiplier = 2;
else
multiplier = 1;
int mute;
JOM(8, "user requests mute %i\n", v4l2_control.value);
- if (true == v4l2_control.value)
+ if (v4l2_control.value)
mute = 1;
else
mute = 0;
v4l2_frmsizeenum.type = (u32) V4L2_FRMSIZE_TYPE_DISCRETE;
- if (true == peasycap->ntsc) {
+ if (peasycap->ntsc) {
switch (index) {
case 0: {
v4l2_frmsizeenum.discrete.width = 640;
if (peasycap->fps)
denominator = peasycap->fps;
else {
- if (true == peasycap->ntsc)
+ if (peasycap->ntsc)
denominator = 30;
else
denominator = 25;
v4l2_buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
v4l2_buffer.bytesused = peasycap->frame_buffer_used;
v4l2_buffer.flags = V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_DONE;
- if (true == peasycap->offerfields)
+ if (peasycap->offerfields)
v4l2_buffer.field = V4L2_FIELD_BOTTOM;
else
v4l2_buffer.field = V4L2_FIELD_NONE;
pv4l2_streamparm->parm.capture.timeperframe.
denominator = peasycap->fps;
} else {
- if (true == peasycap->ntsc) {
+ if (peasycap->ntsc) {
pv4l2_streamparm->parm.capture.timeperframe.
denominator = 30;
} else {
rate = ready_saa(peasycap->pusb_device);
if (0 > rate) {
JOM(8, "not ready to capture after %i ms ...\n", PATIENCE);
- if (true == peasycap->ntsc) {
+ if (peasycap->ntsc) {
JOM(8, "... trying PAL ...\n"); ntsc = false;
} else {
JOM(8, "... trying NTSC ...\n"); ntsc = true;
SAM("ERROR: start_100() rc = %i\n", rc);
return -EFAULT;
}
- if (true == resubmit)
+ if (resubmit)
submit_video_urbs(peasycap);
peasycap->video_isoc_sequence = VIDEO_ISOC_BUFFER_MANY - 1;
peasycap->field_buffer[peasycap->field_read][0].input,
peasycap->field_read, peasycap->frame_fill);
JOM(8, "===== %i=bytesperpixel\n", peasycap->bytesperpixel);
- if (true == peasycap->offerfields)
+ if (peasycap->offerfields)
JOM(8, "===== offerfields\n");
/*---------------------------------------------------------------------------*/
SAM("MISTAKE: %i=bytesperpixel\n", bytesperpixel);
return -EFAULT;
}
- if (true == decimatepixel)
+ if (decimatepixel)
multiplier = 2;
else
multiplier = 1;
pad = peasycap->frame_buffer[kad][0].pgo; rad = PAGE_SIZE;
odd = !!(peasycap->field_buffer[kex][0].kount);
- if ((true == odd) && (false == decimatepixel)) {
+ if (odd && (false == decimatepixel)) {
JOM(8, "initial skipping %4i bytes p.%4i\n",
w3/multiplier, mad);
pad += (w3 / multiplier); rad -= (w3 / multiplier);
}
if (rump)
caches++;
- if (true == badinput) {
+ if (badinput) {
JOM(8, "ERROR: 0x%02X=->field_buffer"
"[%i][%i].input, "
"0x%02X=(0x08|->input)\n",
if (rump)
caches++;
- if (true == badinput) {
+ if (badinput) {
JOM(8, "ERROR: 0x%02X=->field_buffer"
"[%i][%i].input, "
"0x%02X=(0x08|->input)\n",
JOM(8, "===== field2frame(): %i bytes --> %i bytes (incl skip)\n", c2, c3);
JOM(8, "===== field2frame(): %i=mad %i=rad\n", mad, rad);
- if (true == odd)
+ if (odd)
JOM(8, "+++++ field2frame(): frame buffer %i is full\n", kad);
if (peasycap->field_read == peasycap->field_fill)
p2 = (u8 *)pex; pz = p2 + much; pr = p3 + more; last = false;
p2++;
- if (true == isuy)
+ if (isuy)
u = *(p2 - 1);
else
v = *(p2 - 1);
else
last = false;
y = *p2;
- if ((true == last) && (0x0C & mask)) {
+ if (last && (0x0C & mask)) {
if (0x04 & mask) {
- if (true == isuy)
+ if (isuy)
v = margin;
else
u = margin;
if (0x08 & mask)
;
} else {
- if (true == isuy)
+ if (isuy)
v = *(p2 + 1);
else
u = *(p2 + 1);
b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (u8)tmp);
- if ((true == last) && rump) {
+ if (last && rump) {
pcache = &peasycap->cache[0];
switch (bytesperpixel - rump) {
case 1: {
*(p3 + 2) = b;
}
p2 += 2;
- if (true == isuy)
+ if (isuy)
isuy = false;
else
isuy = true;
else
last = false;
y = *p2;
- if ((true == last) && (0x0C & mask)) {
+ if (last && (0x0C & mask)) {
if (0x04 & mask) {
- if (true == isuy)
+ if (isuy)
v = margin;
else
u = margin;
if (0x08 & mask)
;
} else {
- if (true == isuy)
+ if (isuy)
v = *(p2 + 1);
else
u = *(p2 + 1);
b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (u8)tmp);
- if ((true == last) && rump) {
+ if (last && rump) {
pcache = &peasycap->cache[0];
switch (bytesperpixel - rump) {
case 1: {
*(p3 + 2) = r;
}
p2 += 2;
- if (true == isuy)
+ if (isuy)
isuy = false;
else
isuy = true;
else
last = false;
y = *p2;
- if ((true == last) && (0x0C & mask)) {
+ if (last && (0x0C & mask)) {
if (0x04 & mask) {
- if (true == isuy)
+ if (isuy)
v = margin;
else
u = margin;
if (0x08 & mask)
;
} else {
- if (true == isuy)
+ if (isuy)
v = *(p2 + 1);
else
u = *(p2 + 1);
}
- if (true == isuy) {
+ if (isuy) {
tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (u8)tmp);
b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (u8)tmp);
- if ((true == last) && rump) {
+ if (last && rump) {
pcache = &peasycap->cache[0];
switch (bytesperpixel - rump) {
case 1: {
else
last = false;
y = *p2;
- if ((true == last) && (0x0C & mask)) {
+ if (last && (0x0C & mask)) {
if (0x04 & mask) {
- if (true == isuy)
+ if (isuy)
v = margin;
else
u = margin;
if (0x08 & mask)
;
} else {
- if (true == isuy)
+ if (isuy)
v = *(p2 + 1);
else
u = *(p2 + 1);
}
- if (true == isuy) {
+ if (isuy) {
tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ?
b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (u8)tmp);
- if ((true == last) && rump) {
+ if (last && rump) {
pcache = &peasycap->cache[0];
switch (bytesperpixel - rump) {
case 1: {
else
last = false;
y = *p2;
- if ((true == last) && (0x0C & mask)) {
+ if (last && (0x0C & mask)) {
if (0x04 & mask) {
- if (true == isuy)
+ if (isuy)
v = margin;
else
u = margin;
if (0x08 & mask)
;
} else {
- if (true == isuy)
+ if (isuy)
v = *(p2 + 1);
else
u = *(p2 + 1);
b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (u8)tmp);
- if ((true == last) && rump) {
+ if (last && rump) {
pcache = &peasycap->cache[0];
switch (bytesperpixel - rump) {
case 1: {
*(p3 + 3) = 0;
}
p2 += 2;
- if (true == isuy)
+ if (isuy)
isuy = false;
else
isuy = true;
else
last = false;
y = *p2;
- if ((true == last) && (0x0C & mask)) {
+ if (last && (0x0C & mask)) {
if (0x04 & mask) {
- if (true == isuy)
+ if (isuy)
v = margin;
else
u = margin;
if (0x08 & mask)
;
} else {
- if (true == isuy)
+ if (isuy)
v = *(p2 + 1);
else
u = *(p2 + 1);
b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (u8)tmp);
- if ((true == last) && rump) {
+ if (last && rump) {
pcache = &peasycap->cache[0];
switch (bytesperpixel - rump) {
case 1: {
*(p3 + 3) = 0;
}
p2 += 2;
- if (true == isuy)
+ if (isuy)
isuy = false;
else
isuy = true;
else
last = false;
y = *p2;
- if ((true == last) && (0x0C & mask)) {
+ if (last && (0x0C & mask)) {
if (0x04 & mask) {
- if (true == isuy)
+ if (isuy)
v = margin;
else
u = margin;
if (0x08 & mask)
;
} else {
- if (true == isuy)
+ if (isuy)
v = *(p2 + 1);
else
u = *(p2 + 1);
}
- if (true == isuy) {
+ if (isuy) {
tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ?
b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (u8)tmp);
- if ((true == last) && rump) {
+ if (last && rump) {
pcache = &peasycap->cache[0];
switch (bytesperpixel - rump) {
case 1: {
else
last = false;
y = *p2;
- if ((true == last) && (0x0C & mask)) {
+ if (last && (0x0C & mask)) {
if (0x04 & mask) {
- if (true == isuy)
+ if (isuy)
v = margin;
else
u = margin;
if (0x08 & mask)
;
} else {
- if (true == isuy)
+ if (isuy)
v = *(p2 + 1);
else
u = *(p2 + 1);
}
- if (true == isuy) {
+ if (isuy) {
tmp = ay[(int)y] + rv[(int)v];
r = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (u8)tmp);
b = (255 < tmp) ? 255 : ((0 > tmp) ?
0 : (u8)tmp);
- if ((true == last) && rump) {
+ if (last && rump) {
pcache = &peasycap->cache[0];
switch (bytesperpixel - rump) {
case 1: {
JOM(8, "SNDCTL_DSP_GETCAPS\n");
#ifdef UPSAMPLE
- if (true == peasycap->microphone)
+ if (peasycap->microphone)
caps = 0x04400000;
else
caps = 0x04400000;
#else
- if (true == peasycap->microphone)
+ if (peasycap->microphone)
caps = 0x02400000;
else
caps = 0x04400000;
JOM(8, "........... %i=incoming\n", incoming);
#ifdef UPSAMPLE
- if (true == peasycap->microphone)
+ if (peasycap->microphone)
outgoing = AFMT_S16_LE;
else
outgoing = AFMT_S16_LE;
#else
- if (true == peasycap->microphone)
+ if (peasycap->microphone)
outgoing = AFMT_S16_LE;
else
outgoing = AFMT_S16_LE;
JOM(8, "........... %i=incoming\n", incoming);
#ifdef UPSAMPLE
- if (true == peasycap->microphone)
+ if (peasycap->microphone)
incoming = 1;
else
incoming = 1;
#else
- if (true == peasycap->microphone)
+ if (peasycap->microphone)
incoming = 0;
else
incoming = 1;
JOM(8, "........... %i=incoming\n", incoming);
#ifdef UPSAMPLE
- if (true == peasycap->microphone)
+ if (peasycap->microphone)
incoming = 32000;
else
incoming = 48000;
#else
- if (true == peasycap->microphone)
+ if (peasycap->microphone)
incoming = 8000;
else
incoming = 48000;