git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.3
[linux-2.6.git]
/
drivers
/
media
/
video
/
bttv-risc.c
diff --git
a/drivers/media/video/bttv-risc.c
b/drivers/media/video/bttv-risc.c
index
769c7e3
..
3731d2c
100644
(file)
--- a/
drivers/media/video/bttv-risc.c
+++ b/
drivers/media/video/bttv-risc.c
@@
-55,6
+55,8
@@
bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
instructions += 2;
if ((rc = btcx_riscmem_alloc(btv->c.pci,risc,instructions*8)) < 0)
return rc;
instructions += 2;
if ((rc = btcx_riscmem_alloc(btv->c.pci,risc,instructions*8)) < 0)
return rc;
+ dprintk("bttv%d: risc packed: bpl %d lines %d instr %d size %d ptr %p\n",
+ btv->c.nr, bpl, lines, instructions, risc->size, risc->cpu);
/* sync instruction */
rp = risc->cpu;
/* sync instruction */
rp = risc->cpu;
@@
-99,8
+101,10
@@
bttv_risc_packed(struct bttv *btv, struct btcx_riscmem *risc,
offset += todo;
}
offset += padding;
offset += todo;
}
offset += padding;
+ dprintk("bttv%d: risc packed: line %d ptr %p\n",
+ btv->c.nr, line, rp);
}
}
- dprintk("bttv%d: risc p
lanar
: %d sglist elems\n", btv->c.nr, (int)(sg-sglist));
+ dprintk("bttv%d: risc p
acked
: %d sglist elems\n", btv->c.nr, (int)(sg-sglist));
/* save pointer to jmp instruction address */
risc->jmp = rp;
/* save pointer to jmp instruction address */
risc->jmp = rp;
@@
-121,6
+125,7
@@
bttv_risc_planar(struct bttv *btv, struct btcx_riscmem *risc,
struct scatterlist *ysg;
struct scatterlist *usg;
struct scatterlist *vsg;
struct scatterlist *ysg;
struct scatterlist *usg;
struct scatterlist *vsg;
+ int topfield = (0 == yoffset);
int rc;
/* estimate risc mem: worst case is one write per page border +
int rc;
/* estimate risc mem: worst case is one write per page border +
@@
-145,11
+150,26
@@
bttv_risc_planar(struct bttv *btv, struct btcx_riscmem *risc,
(line >= (ylines - VCR_HACK_LINES)))
continue;
switch (vshift) {
(line >= (ylines - VCR_HACK_LINES)))
continue;
switch (vshift) {
- case 0: chroma = 1; break;
- case 1: chroma = !(line & 1); break;
- case 2: chroma = !(line & 3); break;
- default: chroma = 0;
+ case 0:
+ chroma = 1;
+ break;
+ case 1:
+ if (topfield)
+ chroma = (line & 1) == 0;
+ else
+ chroma = (line & 1) == 1;
+ break;
+ case 2:
+ if (topfield)
+ chroma = (line & 3) == 0;
+ else
+ chroma = (line & 3) == 2;
+ break;
+ default:
+ chroma = 0;
+ break;
}
}
+
for (todo = ybpl; todo > 0; todo -= ylen) {
/* go to next sg entry if needed */
while (yoffset && yoffset >= sg_dma_len(ysg)) {
for (todo = ybpl; todo > 0; todo -= ylen) {
/* go to next sg entry if needed */
while (yoffset && yoffset >= sg_dma_len(ysg)) {