[Intel-gfx] [PATCH] i915 XvMC: fixup colors

Daniel Vetter daniel.vetter at ffwll.ch
Mon Mar 8 23:22:53 CET 2010


My cleanup accidently created a inconsistency in the YUV plane ordering.
I think we can safely assume that I'm colorblind ;)

As Carl Worth rightly pointed out, this change deserves a more elaborate
explanation:

For Xv planar formats, the three planes are stored consecutively in
memory, ordered Y U V. Now for some totally odd reason (= none at all),
i915 xvmc stored it in Y V U order. Right after the release of 2.10, with
commit "Xv: consolidate xmvc passthrough handling" I've inadvertently
broken xvmc support (which started this whole odyssey into xvmc). When
fixing stuff up, I neglected this special plane ordering and simply
assumed it to be the same as Xv and dropped that special case for i915 in
src/i830_video.c. This patch completes the change to standard YUV plane
ordering by making the corresponding change in src/xvmc/i915_xvmc.c.

Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
---
 src/xvmc/i915_xvmc.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/xvmc/i915_xvmc.c b/src/xvmc/i915_xvmc.c
index 190b736..0888d63 100644
--- a/src/xvmc/i915_xvmc.c
+++ b/src/xvmc/i915_xvmc.c
@@ -31,9 +31,9 @@
 #include "i915_structs.h"
 #include "i915_program.h"
 
-#define UOFFSET(surface)        (SIZE_Y420(surface->width, surface->height) + \
+#define UOFFSET(surface)        (SIZE_Y420(surface->width, surface->height))
+#define VOFFSET(surface)        (SIZE_Y420(surface->width, surface->height) + \
                                  SIZE_UV420(surface->width, surface->height))
-#define VOFFSET(surface)        (SIZE_Y420(surface->width, surface->height))
 
 typedef union {
 	int16_t component[2];
-- 
1.6.6.1




More information about the Intel-gfx mailing list