[MPlayer-dev-eng] nvidia_vid YV12 support

Joachim Breuer jmbreuer at gmx.net
Thu Jan 1 11:19:53 CET 2004


Hello!

I've had a look at nvidia_vid.c and I *think* that I understood enough
of what's going on to be of some help.

My major problem (as is anyones, I guess) is the lack of documentation
for nVidia GPUs. But then, in a discussion between Dmitry Baryshkov
and Sascha Sommer Sep/03 <003501c38384$d998d720$38b2ebd9 at oemcomputer>
etc. there are some docs mentioned, and the register names shown as
comments in nvidia_vid.c (NV_PVIDEO_FORMAT etc.) have to come from
somewhere...

I've already had a look the deactivated YV12 section and activated it
just for fun and played around a bit with the parameters, but what I
can see is - while definitely based on the incoming video stream -
severely distorted geometrically (line length mismatch) and color-wise
(shades of magenta on green).

After setting NV_PVIDEO_FORMAT.b16 to turn on YV12 mode the
"best-looking" set-up so far is:

  vinfo->dest.pitch.y = 1;
  vinfo->dest.pitch.u = 1;
  vinfo->dest.pitch.v = 1;

  info->pitch = info->width;

  vinfo->offset.y = 0;
  vinfo->offset.v = info->width*info->height*2;
  vinfo->offset.u = info->width*info->height*3;

  vinfo->frame_size = info->width * info->height * 3;

["Works" with a 720x576 DVD stream and a 260x208 test stream, with
wrong geometry/aspect it seems to cause alignment faults in the GPU -
bright green overlay until next GPU reset. As I don't know the
alignment requirements I can't really enforce them... yet.]

Btw, what units are the offsets, pitches and frame_size in? Bytes? How
do non-even buffer sizes get aligned by the video output routines?

Is there anyone who could help me out with notes/docs on the nVidia
graphics controller, preferrably applicable to my NV25 (GF4 Ti4200)? 
Thanks!

I've got some real motivation too - my "main" DVD box's Matrox G400
died and got replaced with aforementioned Ti4200 (for reasons outside
my scope of control), but now DVD playback... sucks. Other video
formats able to use nvidia_vid are fine, though.

Slightly OT: Is there perhaps a (DLL or whatever) MPEG2 (DVD-capable)
codec that can decode to UYVY?


So long,
   Joe

-- 
"I use emacs, which might be thought of as a thermonuclear
 word processor."
-- Neal Stephenson, "In the beginning... was the command line"




More information about the MPlayer-dev-eng mailing list