On Fri, 19 Oct 2001, Billy Biggs wrote:

> Mark Vojkovich ([EMAIL PROTECTED]):
> 
> > > I'd be worried about scaling.  The Xv driver can't ensure the
> > > spacial position makes sense.  I guess it could be up to the
> > > application to align it nicely.
> > 
> >   I don't understand what you're worried about.  If you say top or
> > bottom that seems pretty clear to me.  I don't see what there is to
> > mess up.  This is pretty much the only way you're going to get
> > field-only display in Xv.
> 
>   It's just something silly, I guess, but important for preserving the
> spacial position of the fields.  Say you're scaling from 720x480 to
> 1024x768.  768/480 = 1.6, so, you want to scale up each field from 240
> lines up to 766.4 lines.  This gives a scaling of:
> 
>   [top field] y=0   to y=766.4
>   [bot field] y=1.6 to y=768
> 
>   So, if the card can scale to non-integer scanlines, cool, but I doubt
> most cards can do this.  So, someone has to choose a scale factor such
> that the start scanline of the bottom field, and the bottom scanline of
> the top field, are integer values so that the spacial position of the
> data in the field will make sense.

   The *sources* are subpixel.  All hardware is that way.  You
couldn't bob video otherwise.   You double the pitch and half the
surface size and you have a single field as a source (and bottom
starts a scanline later).  You just adjust the offset into the
texture appropriately to get spatial alignment correct.  It's
much easier for the driver to do than for you to do it.

   With write-only port attributes you can essentially extend
the Xv(Shm)PutImage function by specifying additional attributes
before the request.  An attribute such as XV_DISPLAY_FIELD could
be set to indicate that the next Put request is to be a field.
The value would be 0=top, 1=bottom in MPEG fashion.  It's a
one-shot thing and only applies to the next put.  All drivers
could add this without API or protocol changes. 


                                Mark.


_______________________________________________
Xpert mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/xpert

Reply via email to