|
Roadmap |
Site sponsored by
IGEL
|
||
|
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [directfb-users] Re: XDirectFB on secend head flickers
On Mon, Aug 09, 2004 at 08:49:07PM +0300, Ville Syrjälä wrote: > On Mon, Aug 09, 2004 at 03:49:05PM +0200, TheNop wrote: > > Hi everybody, > > > > I use XDirectFB on the second head (TV pal) of the Matrox G400. > > The problem is, that on the tv output there is a heavy line flicker. > > If there are horizontal lines on the screen the lines are jumping up an > > down. > > > > If I use dfbinfo I see that the Matrox CRTC2 layer has the cap: > > flicker_filtering > > Could it be possible, that the option can reduce the line flicker effect? > > When yes, how can I switch it on? > > You can try the attached patch. It allows dfblayer to toggle the layer > options. You need to be using the multi-app core for it to work. Patch attached for real this time... -- Ville Syrjälä syrjala@sci.fi http://www.sci.fi/~syrjala/ Index: tools/dfblayer.c
===================================================================
RCS file: /cvs/directfb/DirectFB/tools/dfblayer.c,v
retrieving revision 1.5
diff -u -r1.5 dfblayer.c
--- tools/dfblayer.c 5 Dec 2003 04:01:10 -0000 1.5
+++ tools/dfblayer.c 9 Aug 2004 17:28:10 -0000
@@ -55,6 +55,7 @@
static int height = 0;
static DFBSurfacePixelFormat format = DSPF_UNKNOWN;
static DFBDisplayLayerBufferMode buffermode = -1;
+static DFBDisplayLayerOptions options = DLOP_NONE;
static int opacity = -1;
/*****************************************************************************/
@@ -142,6 +143,7 @@
fprintf (stderr, " -m, --mode <width>x<height> Change the resolution (pixels)\n");
fprintf (stderr, " -f, --format <pixelformat> Change the pixel format\n");
fprintf (stderr, " -b, --buffer <buffermode> Change the buffer mode (single/video/system)\n");
+ fprintf (stderr, " -O, --option <option> Toggle one of the layer's options\n");
fprintf (stderr, " -o, --opacity <opacity> Change the layer's opacity (0-255)\n");
fprintf (stderr, " -h, --help Show this help message\n");
fprintf (stderr, " -v, --version Print version information\n");
@@ -183,6 +185,17 @@
fprintf (stderr, " WINDOWS\n");
fprintf (stderr, "\n");
+
+ fprintf (stderr, "Valid options:\n");
+ fprintf (stderr, " ALPHACHANNEL\n");
+ fprintf (stderr, " FLICKER_FILTERING\n");
+ fprintf (stderr, " DEINTERLACING\n");
+ fprintf (stderr, " SRC_COLORKEY\n");
+ fprintf (stderr, " DST_COLORKEY\n");
+ fprintf (stderr, " OPACITY\n");
+ fprintf (stderr, " FIELD_PARITY\n");
+
+ fprintf (stderr, "\n");
fprintf (stderr, "Specifying neither mode nor format just displays the current configuration.\n");
fprintf (stderr, "\n");
}
@@ -255,6 +268,31 @@
}
static DFBBoolean
+parse_option( const char *arg )
+{
+ if (!strcasecmp( arg, "alphachannel" ))
+ options |= DLOP_ALPHACHANNEL;
+ else if (!strcasecmp( arg, "flicker_filtering" ))
+ options |= DLOP_FLICKER_FILTERING;
+ else if (!strcasecmp( arg, "deinterlacing" ))
+ options |= DLOP_DEINTERLACING;
+ else if (!strcasecmp( arg, "src_colorkey" ))
+ options |= DLOP_SRC_COLORKEY;
+ else if (!strcasecmp( arg, "dst_colorkey" ))
+ options |= DLOP_DST_COLORKEY;
+ else if (!strcasecmp( arg, "opacity" ))
+ options |= DLOP_OPACITY;
+ else if (!strcasecmp( arg, "field_parity" ))
+ options |= DLOP_FIELD_PARITY;
+ else {
+ fprintf (stderr, "\nInvalid buffer mode specified!\n\n" );
+ return DFB_FALSE;
+ }
+
+ return DFB_TRUE;
+}
+
+static DFBBoolean
parse_opacity( const char *arg )
{
if (sscanf( arg, "%d", &opacity ) != 1 || opacity < 0 || opacity > 255) {
@@ -332,6 +370,18 @@
continue;
}
+ if (strcmp (arg, "-O") == 0 || strcmp (arg, "--option") == 0) {
+ if (++n == argc) {
+ print_usage (argv[0]);
+ return DFB_FALSE;
+ }
+
+ if (!parse_option( argv[n] ))
+ return DFB_FALSE;
+
+ continue;
+ }
+
if (strcmp (arg, "-o") == 0 || strcmp (arg, "--opacity") == 0) {
if (++n == argc) {
print_usage (argv[0]);
@@ -384,6 +434,19 @@
config.buffermode = buffermode;
}
+ if (options) {
+ DFBDisplayLayerConfig cfg;
+
+ ret = layer->GetConfiguration( layer, &cfg );
+ if (ret) {
+ DirectFBError( "IDirectFBDisplayLayer::GetConfiguration() failed", ret );
+ return;
+ }
+
+ config.flags |= DLCONF_OPTIONS;
+ config.options = cfg.options ^ options;
+ }
+
/* Set the configuration if anything changed. */
if (config.flags) {
ret = layer->SetConfiguration( layer, &config );
|
|
| directfb.org |
|
Development |
|
Old Archives |