[mythtv] XVideo wotj Intel(R) Textured Video vs Overlay Video
marc_mtv at merlins.org
Thu Sep 25 07:17:09 UTC 2008
On Wed, Sep 24, 2008 at 12:43:55PM -0500, Kevin Kuphal wrote:
> On Wed, Sep 24, 2008 at 12:39 PM, Marc MERLIN <marc_mtv at merlins.org> wrote:
> > Howdy,
> > I think I found a small problem with the current code in videoout_xv.cpp
> > and intel G35 video. The code still picks the wrong visual (first one, see
> > included
> > mail below why the first one is bad).
> > I'll be honest in not being too sure where to set "chromakey" in
> > vdp.GetOSDRenderer()
> > (maybe in the DB somewhere), but is there a reason for that not to be
> > default?
> > At least on that intel chip, picking a visual without XV_COLORKEY causes
> > pretty
> > bad playback on the textured video port.
> The OSD renderer is set up in the playback profiles (frontend, setup, TV
> settings, etc.). Change it from softblend or whatever it is to chromakey.
> Not sure if this is what is being looked for by the code but that's where it
> is is set.
So, setting the OSD like you say does change which XV port is used:
2008-09-24 22:43:37.343 VideoOutputXv: XVideo Adaptor Name: 'Intel(R) Video
but I still get the
2008-09-24 22:43:37.439 unsupported attribute
error and when I change the setting in the interface, it changes something
else that makes all my pictures very very bright and painful to watch.
With a slightly better patch (borrowed from one I found on the net), pasted below,
I get the XV port selected automatically:
VideoOutputXv: @ j=0 Looking for flag[s]: XvInputMask XvImageMask 10
VideoOutputXv: Adaptor#0: Intel(R) Textured Video has flag[s]: XvInputMask XvImageMask
VideoOutputXv: Has XVideo flags...
VideoOutputXv: Found Intel(R) Textured Video, skipping port0
VideoOutputXv: Adaptor#1: Intel(R) Video Overlay has flag[s]: XvInputMask XvImageMask
VideoOutputXv: Has XVideo flags...
VideoOutputXv: Has XV_BRIGHTNESS...
VideoOutputXv: Grabbed xv port 81
VideoOutputXv: XVideo surface found on port 81
VideoOutputXv: XVideo Adaptor Name: 'Intel(R) Video Overlay'
So this all works now, but should myth do something more user friendly like
the patch below to use the right xv port instead requiring from the user
to change the OSD to chromakey? (something that most users won't find unless
they ask here and someone tells them).
Second, mythtv seems to do something wrong when it activates xv, and messes up
the color/brightness for the overlay so that the picture looks really bring
The change is permanent because
mplayer -vo xv:port=81 file.avi
then also shows bad colors until I restart X.
I tried adjusting the colors/contrast with 'F' and set brigthness to 43%,
contrast 29% and color 20% to match the values I had in xvinfo before myth
messed with the colors.
I suppose that I've worked around myth resetting all those values to 50%
even though 50% is clearly wrong for my driver and it defaults to lower
values, but shouldn't mythtv just leave the default xv values that came with
the X server unless overridden by the user?
BTW, I also noticed that with the xv overlay, on a brand new 3GHz dual core
duo, the picture slows down a lot while the overlay is displayed and
re-accelerates to the normal when the overlay is gone. Is that normal?
my playback profile is CPU++
with ffmpeg & XVideo, decoder standard, renderer: xv-blit, osd: softblend,
osd fade on, primary deint: bob 2x, fallback deint: kernel
Here's my current intel G35 xv patch based on patch from Tino Keitel:
--- ../mythtv-0.21.0+fixes18207/libs/libmythtv/videoout_xv.cpp 2008-04-02 10:52:17.000000000 -0700
+++ ./libs/libmythtv/videoout_xv.cpp 2008-09-24 23:45:57.000000000 -0700
@@ -706,6 +705,16 @@
const XvPortID lastPort = ai[i].base_id + ai[i].num_ports - 1;
XvPortID p = 0;
+ // Intel Textured video produces tearing video, so skip it
+ if(!strncmp("Intel(R) Textured Video", lastAdaptorName.latin1(),
+ strlen("Intel(R) Textured Video")))
+ VERBOSE(VB_PLAYBACK, LOC +
+ "Found Intel(R) Textured Video, skipping port " << p);
"A mouse is a device used to point at the xterm you want to type in" - A.S.R.
Microsoft is to operating systems & security ....
.... what McDonalds is to gourmet cooking
Home page: http://marc.merlins.org/
More information about the mythtv-dev