Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 250227
b: refs/heads/master
c: 5998343
h: refs/heads/master
i:
  250225: b66eea3
  250223: 3e8da4f
v: v3
  • Loading branch information
Ondrej Zary authored and Mauro Carvalho Chehab committed May 20, 2011
1 parent cebda9c commit a96c42c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 93 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 240d57bb8238d6998644c7f696c27076956ff653
refs/heads/master: 59983439c09f0d319cd288d27c0f70cf8764e09a
92 changes: 0 additions & 92 deletions trunk/drivers/media/video/usbvision/usbvision-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ static unsigned int core_debug;
module_param(core_debug, int, 0644);
MODULE_PARM_DESC(core_debug, "enable debug messages [core]");

static unsigned int force_testpattern;
module_param(force_testpattern, int, 0644);
MODULE_PARM_DESC(force_testpattern, "enable test pattern display [core]");

static int adjust_compression = 1; /* Set the compression to be adaptive */
module_param(adjust_compression, int, 0444);
MODULE_PARM_DESC(adjust_compression, " Set the ADPCM compression for the device. Default: 1 (On)");
Expand Down Expand Up @@ -387,90 +383,6 @@ void usbvision_scratch_free(struct usb_usbvision *usbvision)
usbvision->scratch = NULL;
}

/*
* usbvision_testpattern()
*
* Procedure forms a test pattern (yellow grid on blue background).
*
* Parameters:
* fullframe: if TRUE then entire frame is filled, otherwise the procedure
* continues from the current scanline.
* pmode 0: fill the frame with solid blue color (like on VCR or TV)
* 1: Draw a colored grid
*
*/
static void usbvision_testpattern(struct usb_usbvision *usbvision,
int fullframe, int pmode)
{
static const char proc[] = "usbvision_testpattern";
struct usbvision_frame *frame;
unsigned char *f;
int num_cell = 0;
int scan_length = 0;
static int num_pass;

if (usbvision == NULL) {
printk(KERN_ERR "%s: usbvision == NULL\n", proc);
return;
}
if (usbvision->cur_frame == NULL) {
printk(KERN_ERR "%s: usbvision->cur_frame is NULL.\n", proc);
return;
}

/* Grab the current frame */
frame = usbvision->cur_frame;

/* Optionally start at the beginning */
if (fullframe) {
frame->curline = 0;
frame->scanlength = 0;
}

/* Form every scan line */
for (; frame->curline < frame->frmheight; frame->curline++) {
int i;

f = frame->data + (usbvision->curwidth * 3 * frame->curline);
for (i = 0; i < usbvision->curwidth; i++) {
unsigned char cb = 0x80;
unsigned char cg = 0;
unsigned char cr = 0;

if (pmode == 1) {
if (frame->curline % 32 == 0)
cb = 0, cg = cr = 0xFF;
else if (i % 32 == 0) {
if (frame->curline % 32 == 1)
num_cell++;
cb = 0, cg = cr = 0xFF;
} else {
cb =
((num_cell * 7) +
num_pass) & 0xFF;
cg =
((num_cell * 5) +
num_pass * 2) & 0xFF;
cr =
((num_cell * 3) +
num_pass * 3) & 0xFF;
}
} else {
/* Just the blue screen */
}

*f++ = cb;
*f++ = cg;
*f++ = cr;
scan_length += 3;
}
}

frame->grabstate = frame_state_done;
frame->scanlength += scan_length;
++num_pass;
}

/*
* usbvision_decompress_alloc()
*
Expand Down Expand Up @@ -571,10 +483,6 @@ static enum parse_state usbvision_find_header(struct usb_usbvision *usbvision)
frame->scanstate = scan_state_lines;
frame->curline = 0;

if (force_testpattern) {
usbvision_testpattern(usbvision, 1, 1);
return parse_state_next_frame;
}
return parse_state_continue;
}

Expand Down

0 comments on commit a96c42c

Please sign in to comment.