Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jan 1999 19:41:37 -0500
From:      Randall Hopper <aa8vb@pagesz.net>
To:        Srikiran Prasad <prasadsr@umich.edu>
Cc:        multimedia@freebsd.org
Subject:   Re: FXTV - picture outside of fxtv window
Message-ID:  <19990121194137.D2047@pagesz.net>
In-Reply-To: <Pine.LNX.4.05.9901211326050.18780-100000@trip.eecs.umich.edu>; from Srikiran Prasad on Thu, Jan 21, 1999 at 01:28:11PM -0500
References:  <Pine.LNX.4.05.9901211326050.18780-100000@trip.eecs.umich.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Srikiran Prasad:
 |I am having a minor problem with fxtv and was  hoping that you could help.
 |I have my card working and all is fine with tuning and everything but the
 |display is displaced outside of the fxtv window by about 5 inches to the
 |left. If i turn off direct video then it is in the window and no probs
 |(other than the choppy performance). I am currently running FreeBSD 2.2.8
 |with XFREE 3.3.3 on a avermedia tv phone card .. Have you had this problem
 |before and if so could you give me some ideas on how to fix it.

What video card do you have?  

I've never had this problem, but a number of others on the list have (Tomi
Vainio, Michael Petry, Igor Nikolaev).  The binding factor generally seems
to be Matrox 8Meg cards running at 32bpp at desktop sizes larger than
1024x768.

If this is your case too, try replacing this line in tvcapture.c:
         video.addr      = x->base_addr + (g.y * x->pitch + g.x) * Bpp;

with this (for 1280x1024):
         video.addr      = x->base_addr + (g.y * x->pitch + g.x + 256) * Bpp 

or this (for 1600x1200):
         video.addr      = x->base_addr + (g.y * x->pitch + g.x + 640) * Bpp;

From previous investigation, it appears this is a bug in XFree86 where it
returns an incorrect base address frame buffer for the frame buffer.

Hope this helps.

Randall


Michael G. Petry:
 |A couple of us with Matrox cardsan 8meg have seen a strange shifting of
 |the video image when running fxtv. I'm running it at 1280x1024 in 24 bit
 |mode with a Bpp of 4. In the course of trying to understand the problem,
 |it seems the image is shifted by 256 pixels.  What concerns me is 1280 -
 |1024 is where I came up with the guess of 256. (it use to run justfine in
 |1024x768)
 |
 |In TVCAPTUREStart of tvcapture.c I changed the folowing:
 |
 |      video.addr = x->base_addr + (((g.y * x->pitch) + g.x + 256 ) * Bpp);
 |                                                          ^^^^^
 |This is a real hack at looking for the root cause. I don't know if this is a 
 |Matrox peculiarity or not. Are any others running in a higher than 1024xXXXX 
 |mode on their video boards and experiencing an image shift?

Randall Hopper:
 |Michael G Petry:
 | |Randall Hopper:
 | |>      I gather the video block on the Millenium @ 1280 looks fine
 | |> (solid, rectangular, correct colors); it just not in the window
 | |> frame.  It's off to the left.  And only does this in 1280x1024, not
 | |> 1024x768.
 | |
 | |Yep.  That's it.
 |
 | |      video.addr = x->base_addr + (((g.y * x->pitch) + g.x + 256 ) * Bpp);
 |
 |Interesting.  That means pitch and Bpp (4) are right.  The g.y and g.x
 |nums you reported looked right.  That only leaves base_addr.  Sounds like
 |what DGA's reporting is less by 1024 bytes from what that hardware is
 |configured for.

Randall Hopper:
 |Tomi Vainio:
 | |Igor Nikolaev writes:
 | | > I have fxtv Version 0.46 and (working) milennium II AGP (Xfree 3.3.2).
 | | > My videocard works in 32bpp mode (in 16bpp all o'k)
 | | > 
 | | > This is well know bug or unknown feature?
 | | > 
 | |
 | |This is known feature and Randall is trying to find out why this
 | |happens.  You can "fix" it by adding 256 to picture position.
 | |tvcapture.c line 1509: 
 | |video.addr      = x->base_addr + (g.y * x->pitch + g.x) * Bpp; ====>
 | |video.addr      = x->base_addr + (g.y * x->pitch + g.x + 256) * Bpp;
 |
 |Not much else I can do.  From what we've seen, sounds like an XFree86 bug
 |related to the Matrox 8Meg cards at 32bpp at desktops larger than 1024x768.
 |
 |You and Michael needed the "+256" for 1280.  From Igor's pic, looks like
 |for 1600x1200 he needs (and likely you'd need) +640:
 |
 |  video.addr      = x->base_addr + (g.y * x->pitch + g.x + 640) * Bpp;



--KsGdsel6WgEHnImy--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-multimedia" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990121194137.D2047>