On Sat, 2 Apr 2011 18:00:51 +0600 Roman Mamedov <[email protected]> wrote:
> The patch (see attachment) is made against siliconmotion driver version
> 2.2.8, however I have checked the related parts in the current version
> 1.7.3, and it looks like the code there is the same, so it should apply,
> maybe with minor modifications.
So I have patched the driver and compiled it. (The original patch did not
apply, so I had to recreate it manually, attaching it here).
The following section now additionally reported by xvinfo, but so far I do not
observe any change in the apps I use, and it is not yet clear to me how to
verify that an application actually uses any of these newly-added modes.
maximum XvImage size: 2048 x 2048
Number of image formats: 8
id: 0x32595559 (YUY2)
guid: 59555932-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
id: 0x32315659 (YV12)
guid: 59563132-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
id: 0x30323449 (I420)
guid: 49343230-0000-0010-8000-00aa00389b71
bits per pixel: 12
number of planes: 3
type: YUV (planar)
id: 0x59565955 (UYVY)
guid: 55595659-0000-0010-8000-00aa00389b71
bits per pixel: 16
number of planes: 1
type: YUV (packed)
id: 0x35315652 (RV15)
guid: 52563135-0035-0000-0000-000000000000
bits per pixel: 16
number of planes: 1
type: RGB (packed)
depth: 15
red, green, blue masks: 0x7c00, 0x3e0, 0x1f
id: 0x36315652 (RV16)
guid: 52563136-0000-0000-0000-000000000000
bits per pixel: 16
number of planes: 1
type: RGB (packed)
depth: 16
red, green, blue masks: 0xf800, 0x7e0, 0x1f
id: 0x34325652 (RV24)
guid: 52563234-0000-0000-0000-000000000000
bits per pixel: 24
number of planes: 1
type: RGB (packed)
depth: 24
red, green, blue masks: 0xff0000, 0xff00, 0xff
id: 0x32335652 (RV32)
guid: 52563332-0000-0000-0000-000000000000
bits per pixel: 32
number of planes: 1
type: RGB (packed)
depth: 24
red, green, blue masks: 0xff0000, 0xff00, 0xff
--
With respect,
Roman
--- orig/src/smi_video.c 2009-07-27 09:42:44.000000000 +0600
+++ new/src/smi_video.c 2011-04-02 19:21:53.545665717 +0600
@@ -223,7 +223,7 @@
/**************************************************************************/
/* number of (generated) XV_ENCODING vaulues */
-#define N_ENCODINGS ((N_VIDEO_NORMS) * (N_COMPOSITE_CHANNELS + N_SVIDEO_CHANNELS))
+#define N_ENCODINGS (((N_VIDEO_NORMS) * (N_COMPOSITE_CHANNELS + N_SVIDEO_CHANNELS)) +1)
/**************************************************************************/
@@ -288,7 +288,7 @@
XvPacked, /* format */
1, /* num_planes */
15, /* depth */
- 0x001F, 0x03E0, 0x7C00, /* red_mask, green, blue */
+ 0x7C00, 0x03E0, 0x001F, /* red_mask, green, blue */
0, 0, 0, /* y_sample_bits, u, v */
0, 0, 0, /* horz_y_period, u, v */
0, 0, 0, /* vert_y_period, u, v */
@@ -307,7 +307,7 @@
XvPacked, /* format */
1, /* num_planes */
16, /* depth */
- 0x001F, 0x07E0, 0xF800, /* red_mask, green, blue */
+ 0xF800, 0x07E0, 0x001F, /* red_mask, green, blue */
0, 0, 0, /* y_sample_bits, u, v */
0, 0, 0, /* horz_y_period, u, v */
0, 0, 0, /* vert_y_period, u, v */
@@ -326,7 +326,7 @@
XvPacked, /* format */
1, /* num_planes */
24, /* depth */
- 0x0000FF, 0x00FF00, 0xFF0000, /* red_mask, green, blue */
+ 0xFF0000, 0x00FF00, 0x0000FF, /* red_mask, green, blue */
0, 0, 0, /* y_sample_bits, u, v */
0, 0, 0, /* horz_y_period, u, v */
0, 0, 0, /* vert_y_period, u, v */
@@ -345,7 +345,7 @@
XvPacked, /* format */
1, /* num_planes */
24, /* depth */
- 0x0000FF, 0x00FF00, 0xFF0000, /* red_mask, green, blue */
+ 0xFF0000, 0x00FF00, 0x0000FF, /* red_mask, green, blue */
0, 0, 0, /* y_sample_bits, u, v */
0, 0, 0, /* horz_y_period, u, v */
0, 0, 0, /* vert_y_period, u, v */
@@ -372,7 +372,7 @@
XvPacked, /* format */
1, /* num_planes */
16, /* depth */
- 0x001F, 0x07E0, 0xF800, /* red_mask, green, blue */
+ 0xF800, 0x07E0, 0x001F, /* red_mask, green, blue */
0, 0, 0, /* y_sample_bits, u, v */
0, 0, 0, /* horz_y_period, u, v */
0, 0, 0, /* vert_y_period, u, v */
@@ -391,7 +391,7 @@
XvPacked, /* format */
1, /* num_planes */
24, /* depth */
- 0x0000FF, 0x00FF00, 0xFF0000, /* red_mask, green, blue */
+ 0xFF0000, 0x00FF00, 0x0000FF, /* red_mask, green, blue */
0, 0, 0, /* y_sample_bits, u, v */
0, 0, 0, /* horz_y_period, u, v */
0, 0, 0, /* vert_y_period, u, v */
@@ -569,6 +569,15 @@
/* fill arrays */
p->nenc = 0;
+ /* force XV_IMAGE at 0 */
+ p->enc[0].width = 2048;
+ p->enc[0].height = 2048;
+ p->enc[0].rate.numerator = 1;
+ p->enc[0].rate.denominator = 1;
+ p->enc[0].name = xalloc(strlen("XV_IMAGE")+1);
+ sprintf(p->enc[0].name, "% s", "XV_IMAGE");
+
+ p->nenc = 1;
for (ch = 0; ch < N_COMPOSITE_CHANNELS; ch++) {
for (n = 0; n < N_VIDEO_NORMS; n++) {
SMI_AddEncoding(p->enc, p->nenc, n, VID_COMPOSITE, ch);
signature.asc
Description: PGP signature
