Google
  Web www.spinics.net

Re: [SAA6752HS] Resolution handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


Frederic CAND wrote:

Hello,

I need to use different resolutions for the
saa6752hs chipset, a feature that is not yet
implemented in the driver included in v4l2.
I would like to commit my work, but it
includes several changes :
[...]




here is the patch that corresponds to what
I explainded.

I'm looking for a **clean** method, using
VIDIOC_S_FMT in saa7134-empress that
would call saa7134_i2c_call_clients(...), but
we still need to store somewhere the new
image format, whether using
struct v4l2_mpeg_compression, or something
else ? (a static int inside saa6752hs.c ?)

--
CAND Frederic
EPITA GISTR 2005
ANEVIA

--- videodev2.h	2005-02-09 10:07:00.000000000 +0100
+++ videodev2.h	2005-03-01 11:40:01.000000000 +0100
@@ -315,6 +315,13 @@
 	V4L2_MPEG_ASPECT_1_221  = 4,   /*  1 : 2,21    */
 };
 
+enum v4l2_mpeg_videoformat {
+	V4L2_MPEG_VF_D1 = 0,    /* standard D1 video format: 720 pixels */
+	V4L2_MPEG_VF_2_3_D1 = 1,/* 2/3D1 video format: 480 pixels / line */
+	V4L2_MPEG_VF_1_2_D1 = 2,/* 1/2D1 video format: 352 pixels / line */
+	V4L2_MPEG_VF_SIF = 3,   /* SIF video format: 352 pixels / line */
+};
+
 struct v4l2_mpeg_compression {
 	/* general */
 	enum v4l2_mpeg_streamtype	st_type;
@@ -352,8 +359,11 @@
 	__u32                           pulldown:1;
 	__u32                           reserved_4:30; /* align */
 
+	/* video format */
+	enum v4l2_mpeg_videoformat	video_format; /* testing purpose */
+
 	/* I don't expect the above being perfect yet ;) */
-	__u32				reserved_5[8];
+	__u32				reserved_5[7];
 };
 #endif
 
--- saa6752hs.c	2004-12-09 14:07:00.000000000 +0100
+++ saa6752hs.c	2005-03-01 11:45:15.000000000 +0100
@@ -139,9 +139,9 @@
 		.target  = 256,
 	},
 
-#if 0
+#if 1
 	/* FIXME: size? via S_FMT? */
-	.video_format = MPEG_VIDEO_FORMAT_D1,
+	.video_format = V4L2_MPEG_VF_D1,
 #endif
 };
 
@@ -307,6 +307,9 @@
 		h->params.au_bitrate.target = 256;
 	else
 		h->params.au_bitrate.target = 384;
+
+	/* video format */
+	h->params.video_format = params->video_format;
 }
 
 static int saa6752hs_init(struct i2c_client* client)
@@ -318,10 +321,9 @@
 	unsigned char localPMT[256];
 
 	h = i2c_get_clientdata(client);
-
 	// Set video format - must be done first as it resets other settings
 	buf[0] = 0x41;
-	buf[1] = 0 /* MPEG_VIDEO_FORMAT_D1 */;
+	buf[1] = h->params.video_format;
 	i2c_master_send(client, buf, 2);
 
         // set bitrate
--

Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

[Home]     [Older V4L]     [Linux DVB]     [Video Disk Recorder]     [Video Technology]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Plasma TVs]     [Video Projectors]     [PDAs]     [Xorg]     [Util Linux NG]     [Xfree86]     [Devices]     [Big List of Linux Books]     [Free Photo Albums]     [LCD TVs]     [Fedora Users]     [Webcams]     [Fedora Women]     [HDTV]     [ALSA Users]     [ALSA Devel]     [Stuff]     [SSH]     [Linux USB]

Powered by Linux

Google PageRank Checking tool