xf86-video-intel: unexpected phenomenon on XV texture adapter with no scaling
Krzysztof Halasa
khc at pm.waw.pl
Fri Jun 19 18:17:06 PDT 2009
Roland Scheidegger <sroland at tungstengraphics.com> writes:
> X11 doesn't do any scaling, so you will always get a 1:1 exact
> mapping.
Sure, I just wanted to see if it's not mplayer or a codec doing that.
> textured xv however uses bilinear texture filtering (some drivers can
> actually do better), it doesn't even know what a 1:1 mapping is. So if
> you have some half-pixel offset somewhere bilinear filter will produce
> exactly the same grey for all pixels if you have an alternating pattern
> of black and white lines in the source image.
Right, that's what I suspected when I saw this with textured XVideo.
It seems that the fix to i915 is:
diff --git a/src/i915_video.c b/src/i915_video.c
index 1ef58ac..3b4247c 100644
--- a/src/i915_video.c
+++ b/src/i915_video.c
@@ -136,8 +136,8 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
format = COLR_BUF_ARGB8888 | DEPTH_FRMT_24_FIXED_8_OTHER;
OUT_BATCH(LOD_PRECLAMP_OGL |
- DSTORG_HORT_BIAS(0x80) |
- DSTORG_VERT_BIAS(0x80) |
+ DSTORG_HORT_BIAS(0x8) |
+ DSTORG_VERT_BIAS(0x8) |
format);
/* front buffer, pitch, offset */
But I will do more experiments with my interlaced mode changes.
> With a very quick look at the r600 code, I suggest trying out the
> attached patch to test my theory about half pixel offsets in hardware.
Thanks, will do.
> Overlays are a bit a different matter, not only are they usually hard to
> set up really correctly but they may actually use filters where you
> can't get a basically unfiltered output even with a 1:1 mapping (not
> sure about this though), unless you'd switch filtering off (I guess
> could do that if we'd add detection for unscaled case).
Right. Not a problem if the textured video works. BTW R300 overlay seems
to work fine and the newer Radeons are texture-only anyway, I'll look at
i830 overlay too.
--
Krzysztof Halasa
More information about the xorg
mailing list