Glamor bug in XVideo / XvPutImage when src_y != 0
eric at anholt.net
Tue Feb 9 20:52:46 UTC 2016
Hans de Goede <hdegoede at redhat.com> writes:
> Hi Eric,
> While working on getting tvtime to work on cards using
> the modesetting driver + glamor, I have hit what I believe
> is a bug in glamor's XVideo implementation. I've tried
> with the current xserver master and it seems the bug is
> still present there.
> The problem is that src_y seems to get added to dest_y
> resulting in the bottom of the window where the tv
> is displaying via xv showing garbage when tvtime is
> using XvPutImage / XvShmPutImag to put only part of
> the tv image on the screen (to get rid of overscan or
> show a 16:9 show properly while it is transmitted as 4:3)
> Besides the bottom showing garbage the top of the
> actual desired content is missing, so src_x does seem
> to get correctly applied to the source image, as said
> it seems as if it is also getting added to dest_x
> (which is 0) shifting the desired image up in the window,
> and (correctly) clipping the top of the image of.
> Using tvtime requires an old analog tvcard + patches
> which I've in my personal git to get it work with
> planar yuv XVideo (until now it only supported
> packed yuv).
> I do not know of another way to reproduce this, but if
> you can spot the problem and send me a patch on top of
> current xserver master I will happily test it.
Maybe s/nlines/height/ in glamor_xv_put_image's boxes, and remove the
shifts by "top"? I think we're uploading the rectangle from (0,srcy +
width,srch), but then we're texturing from the (src_x,srcy +
src_w,src_h) box within that uploaded content.
We could try to correct the other way and upload from (srcx,srcy +
srcw,srch) and then texture from (0,0+srcw,srch), but then you get bad
things when srch flips between even/odd iirc. Handing us a chunk of
data over the wire and then asking to only use a subset of that is kind
of silly, and it's probably not something we should be optimizing for.
Since we can XV into pixmaps these days, maybe it's time to try to write
some tests. I'm not sure where we'd want to put them, though. I've
never tried to write an xts test, and it sounds terrifying.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 818 bytes
Desc: not available
More information about the xorg-devel