summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--linux/Documentation/video4linux/cx2341x/fw-decoder-regs.txt12
-rw-r--r--linux/Documentation/video4linux/cx2341x/fw-osd-api.txt12
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-driver.c4
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-driver.h1
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-yuv.c9
5 files changed, 25 insertions, 13 deletions
diff --git a/linux/Documentation/video4linux/cx2341x/fw-decoder-regs.txt b/linux/Documentation/video4linux/cx2341x/fw-decoder-regs.txt
index db2366c63..cf52c8f20 100644
--- a/linux/Documentation/video4linux/cx2341x/fw-decoder-regs.txt
+++ b/linux/Documentation/video4linux/cx2341x/fw-decoder-regs.txt
@@ -624,11 +624,11 @@ out what values are bad when it hangs.
2A00
bits 0:2
osd colour mode
+ 000 = 8 bit indexed
001 = 16 bit (565)
010 = 15 bit (555)
011 = 12 bit (444)
100 = 32 bit (8888)
- 101 = 8 bit indexed
bits 4:5
osd display bpp
@@ -676,9 +676,11 @@ out what values are bad when it hangs.
completely transparent. When using 565, 555 or 444 colour modes, the
colour key is always 16 bits wide. The colour to key on is set in Reg 2A18.
- Local alpha is a per-pixel 256 step transparency, with 0 being transparent
- and 255 being solid. This is only available in 32 bit & 8 bit indexed
- colour modes.
+ Local alpha works differently depending on the colour mode. For 32bpp & 8
+ bit indexed, local alpha is a per-pixel 256 step transparency, with 0 being
+ transparent and 255 being solid. For the 16bpp modes 555 & 444, the unused
+ bit(s) act as a simple transparency switch, with 0 being solid & 1 being
+ fully transparent. There is no local alpha support for 16bit 565.
Global alpha is a 256 step transparency that applies to the entire osd,
with 0 being transparent & 255 being solid.
@@ -811,5 +813,5 @@ out what values are bad when it hangs.
--------------------------------------------------------------------------------
-v0.3 - 2 February 2007 - Ian Armstrong (ian@iarmst.demon.co.uk)
+v0.4 - 12 March 2007 - Ian Armstrong (ian@iarmst.demon.co.uk)
diff --git a/linux/Documentation/video4linux/cx2341x/fw-osd-api.txt b/linux/Documentation/video4linux/cx2341x/fw-osd-api.txt
index 0a602f3e6..89c460104 100644
--- a/linux/Documentation/video4linux/cx2341x/fw-osd-api.txt
+++ b/linux/Documentation/video4linux/cx2341x/fw-osd-api.txt
@@ -21,7 +21,11 @@ Enum 66/0x42
Description
Query OSD format
Result[0]
- 0=8bit index, 4=AlphaRGB 8:8:8:8
+ 0=8bit index
+ 1=16bit RGB 5:6:5
+ 2=16bit ARGB 1:5:5:5
+ 3=16bit ARGB 1:4:4:4
+ 4=32bit ARGB 8:8:8:8
-------------------------------------------------------------------------------
@@ -30,7 +34,11 @@ Enum 67/0x43
Description
Assign pixel format
Param[0]
- 0=8bit index, 4=AlphaRGB 8:8:8:8
+ 0=8bit index
+ 1=16bit RGB 5:6:5
+ 2=16bit ARGB 1:5:5:5
+ 3=16bit ARGB 1:4:4:4
+ 4=32bit ARGB 8:8:8:8
-------------------------------------------------------------------------------
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.c b/linux/drivers/media/video/ivtv/ivtv-driver.c
index 2fcf3e7c3..4031df6db 100644
--- a/linux/drivers/media/video/ivtv/ivtv-driver.c
+++ b/linux/drivers/media/video/ivtv/ivtv-driver.c
@@ -116,7 +116,7 @@ static int dec_yuv_buffers = IVTV_DEFAULT_DEC_YUV_BUFFERS;
static int dec_vbi_buffers = IVTV_DEFAULT_DEC_VBI_BUFFERS;
static int ivtv_yuv_mode = 0;
-static int ivtv_yuv_threshold=480;
+static int ivtv_yuv_threshold=-1;
static int ivtv_pci_latency = 1;
int ivtv_debug = 0;
@@ -1174,7 +1174,6 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
in one place. */
itv->std++; /* Force full standard initialization */
itv->std_out = itv->std;
- ivtv_v4l2_ioctls(itv, NULL, VIDIOC_S_STD, &itv->tuner_std);
ivtv_v4l2_ioctls(itv, NULL, VIDIOC_S_FREQUENCY, &vf);
retval = ivtv_streams_setup(itv);
@@ -1186,6 +1185,7 @@ static int __devinit ivtv_probe(struct pci_dev *dev,
if (itv->card->v4l2_capabilities & V4L2_CAP_VIDEO_OUTPUT) {
ivtv_init_mpeg_decoder(itv);
}
+ ivtv_v4l2_ioctls(itv, NULL, VIDIOC_S_STD, &itv->tuner_std);
IVTV_DEBUG_IRQ("Masking interrupts\n");
/* clear interrupt mask, effectively disabling interrupts */
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.h b/linux/drivers/media/video/ivtv/ivtv-driver.h
index e84caa59b..39e1d7e46 100644
--- a/linux/drivers/media/video/ivtv/ivtv-driver.h
+++ b/linux/drivers/media/video/ivtv/ivtv-driver.h
@@ -613,7 +613,6 @@ struct yuv_playback_info
int lace_mode;
int lace_threshold;
- int lace_threshold_last;
int lace_sync_field;
atomic_t next_dma_frame;
diff --git a/linux/drivers/media/video/ivtv/ivtv-yuv.c b/linux/drivers/media/video/ivtv/ivtv-yuv.c
index 286a0d7e7..bcea09542 100644
--- a/linux/drivers/media/video/ivtv/ivtv-yuv.c
+++ b/linux/drivers/media/video/ivtv/ivtv-yuv.c
@@ -613,16 +613,19 @@ static void ivtv_yuv_handle_vertical(struct ivtv *itv, struct yuv_frame_info *wi
}
itv->yuv_info.frame_interlaced_last = itv->yuv_info.frame_interlaced;
- itv->yuv_info.lace_threshold_last = itv->yuv_info.lace_threshold;
}
/* Modify the supplied coordinate information to fit the visible osd area */
static u32 ivtv_yuv_window_setup (struct ivtv *itv, struct yuv_frame_info *window)
{
- int osd_crop;
+ int osd_crop, lace_threshold;
u32 osd_scale;
u32 yuv_update = 0;
+ lace_threshold = itv->yuv_info.lace_threshold;
+ if (lace_threshold < 0)
+ lace_threshold = itv->yuv_info.decode_height - 1;
+
/* Work out the lace settings */
switch (itv->yuv_info.lace_mode) {
case IVTV_YUV_MODE_PROGRESSIVE: /* Progressive mode */
@@ -639,7 +642,7 @@ static u32 ivtv_yuv_window_setup (struct ivtv *itv, struct yuv_frame_info *windo
break;
case IVTV_YUV_MODE_AUTO:
- if (window->tru_h <= itv->yuv_info.lace_threshold || window->tru_h > 576 || window->tru_w > 720){
+ if (window->tru_h <= lace_threshold || window->tru_h > 576 || window->tru_w > 720){
itv->yuv_info.frame_interlaced = 0;
if ((window->tru_h < 512) ||
(window->tru_h > 576 && window->tru_h < 1021) ||