summaryrefslogtreecommitdiff
path: root/src/i915_video.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2009-08-11 16:06:35 +0200
committerEric Anholt <eric@anholt.net>2009-10-05 13:07:42 -0700
commit232418d72ee967a81e39481b9f2ee379cb685458 (patch)
treebfcddc2a962f82be226b29fbbeef9f79c45b3a75 /src/i915_video.c
parent219b14310efe49aff5d3d9023d2ba440c9f702c1 (diff)
Xv: use is_planar_fourcc helper some more
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/i915_video.c')
-rw-r--r--src/i915_video.c17
1 files changed, 1 insertions, 16 deletions
diff --git a/src/i915_video.c b/src/i915_video.c
index 3b4247cf..b978a43d 100644
--- a/src/i915_video.c
+++ b/src/i915_video.c
@@ -53,27 +53,12 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
int nbox_total = REGION_NUM_RECTS(dstRegion);
int nbox_this_time;
int dxo, dyo, pix_xoff, pix_yoff;
- Bool planar;
#if 0
ErrorF("I915DisplayVideo: %dx%d (pitch %d)\n", width, height,
video_pitch);
#endif
- switch (id) {
- case FOURCC_UYVY:
- case FOURCC_YUY2:
- planar = FALSE;
- break;
- case FOURCC_YV12:
- case FOURCC_I420:
- planar = TRUE;
- break;
- default:
- ErrorF("Unknown format 0x%x\n", id);
- return;
- }
-
#define BYTES_FOR_BOXES(n) ((200 + (n) * 20) * 4)
#define BOXES_IN_BYTES(s) ((((s)/4) - 200) / 20)
#define BATCH_BYTES(p) ((p)->batch_bo->size - 16)
@@ -147,7 +132,7 @@ I915DisplayVideoTextured(ScrnInfoPtr pScrn, I830PortPrivPtr pPriv, int id,
OUT_RELOC_PIXMAP(pPixmap, I915_GEM_DOMAIN_RENDER, I915_GEM_DOMAIN_RENDER, 0);
ADVANCE_BATCH();
- if (!planar) {
+ if (!is_planar_fourcc(id)) {
FS_LOCALS(10);
BEGIN_BATCH(16);