Mesa (pipe-video): [g3dvl] remove PIPE_CAP_DECODE_TARGET_PREFERRED_FORMAT

Christian König deathsimple at kemper.freedesktop.org
Sat Apr 2 11:53:19 PDT 2011


Module: Mesa
Branch: pipe-video
Commit: 71ee815b5cb0612906f9400f9a06ce8b7cdd51b3
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=71ee815b5cb0612906f9400f9a06ce8b7cdd51b3

Author: Christian König <deathsimple at vodafone.de>
Date:   Sat Apr  2 19:50:37 2011 +0200

[g3dvl] remove PIPE_CAP_DECODE_TARGET_PREFERRED_FORMAT

It wasn't fully implemented anyway.

---

 src/gallium/auxiliary/vl/vl_mpeg12_context.c  |   20 ++++++--------------
 src/gallium/auxiliary/vl/vl_mpeg12_context.h  |    4 +---
 src/gallium/drivers/nv40/nv40_video_context.c |    3 +--
 src/gallium/drivers/nvfx/nvfx_video_context.c |    3 +--
 src/gallium/drivers/r600/r600_video_context.c |    3 +--
 src/gallium/drivers/softpipe/sp_screen.c      |    3 +--
 src/gallium/include/pipe/p_video_context.h    |    3 ---
 7 files changed, 11 insertions(+), 28 deletions(-)

diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_context.c b/src/gallium/auxiliary/vl/vl_mpeg12_context.c
index 9f3da73..8ea6fd0 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_context.c
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_context.c
@@ -256,17 +256,11 @@ vl_mpeg12_get_param(struct pipe_video_context *vpipe, int param)
 
    assert(vpipe);
 
-   switch (param) {
-      case PIPE_CAP_NPOT_TEXTURES:
-         return !ctx->pot_buffers;
-      case PIPE_CAP_DECODE_TARGET_PREFERRED_FORMAT:
-         return ctx->decode_format;
-      default:
-      {
-         debug_printf("vl_mpeg12_context: Unknown PIPE_CAP %d\n", param);
-         return 0;
-      }
-   }
+   if (param == PIPE_CAP_NPOT_TEXTURES)
+      return !ctx->pot_buffers;
+
+   debug_printf("vl_mpeg12_context: Unknown PIPE_CAP %d\n", param);
+   return 0;
 }
 
 static struct pipe_surface *
@@ -654,8 +648,7 @@ vl_create_mpeg12_context(struct pipe_context *pipe,
                          enum pipe_video_profile profile,
                          enum pipe_video_chroma_format chroma_format,
                          unsigned width, unsigned height,
-                         bool pot_buffers,
-                         enum pipe_format decode_format)
+                         bool pot_buffers)
 {
    struct vl_mpeg12_context *ctx;
 
@@ -686,7 +679,6 @@ vl_create_mpeg12_context(struct pipe_context *pipe,
    ctx->base.set_csc_matrix = vl_mpeg12_set_csc_matrix;
 
    ctx->pipe = pipe;
-   ctx->decode_format = decode_format;
    ctx->pot_buffers = pot_buffers;
 
    ctx->quads = vl_vb_upload_quads(ctx->pipe, 2, 2);
diff --git a/src/gallium/auxiliary/vl/vl_mpeg12_context.h b/src/gallium/auxiliary/vl/vl_mpeg12_context.h
index e0c6ca9..3cc0529 100644
--- a/src/gallium/auxiliary/vl/vl_mpeg12_context.h
+++ b/src/gallium/auxiliary/vl/vl_mpeg12_context.h
@@ -41,7 +41,6 @@ struct vl_mpeg12_context
 {
    struct pipe_video_context base;
    struct pipe_context *pipe;
-   enum pipe_format decode_format;
    bool pot_buffers;
    unsigned buffer_width, buffer_height;
 
@@ -89,7 +88,6 @@ vl_create_mpeg12_context(struct pipe_context *pipe,
                          enum pipe_video_profile profile,
                          enum pipe_video_chroma_format chroma_format,
                          unsigned width, unsigned height,
-                         bool pot_buffers,
-                         enum pipe_format decode_format);
+                         bool pot_buffers);
 
 #endif /* VL_MPEG12_CONTEXT_H */
diff --git a/src/gallium/drivers/nv40/nv40_video_context.c b/src/gallium/drivers/nv40/nv40_video_context.c
index 35395e8..34bb7cd 100644
--- a/src/gallium/drivers/nv40/nv40_video_context.c
+++ b/src/gallium/drivers/nv40/nv40_video_context.c
@@ -47,8 +47,7 @@ nv40_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
          return vl_create_mpeg12_context(pipe, profile,
                                          chroma_format,
                                          width, height,
-                                         true,
-                                         PIPE_FORMAT_XYUV);
+                                         true);
       default:
          return NULL;
    }
diff --git a/src/gallium/drivers/nvfx/nvfx_video_context.c b/src/gallium/drivers/nvfx/nvfx_video_context.c
index 0456926..01a84f2 100644
--- a/src/gallium/drivers/nvfx/nvfx_video_context.c
+++ b/src/gallium/drivers/nvfx/nvfx_video_context.c
@@ -47,8 +47,7 @@ nvfx_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
          return vl_create_mpeg12_context(pipe, profile,
                                          chroma_format,
                                          width, height,
-                                         true,
-                                         PIPE_FORMAT_XYUV);
+                                         true);
       default:
          return NULL;
    }
diff --git a/src/gallium/drivers/r600/r600_video_context.c b/src/gallium/drivers/r600/r600_video_context.c
index 8190c9a..c1b0c09 100644
--- a/src/gallium/drivers/r600/r600_video_context.c
+++ b/src/gallium/drivers/r600/r600_video_context.c
@@ -47,8 +47,7 @@ r600_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
          return vl_create_mpeg12_context(pipe, profile,
                                          chroma_format,
                                          width, height,
-                                         false,
-                                         PIPE_FORMAT_XYUV);
+                                         false);
       default:
          return NULL;
    }
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index 26f5e1b..d593664 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -307,8 +307,7 @@ sp_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
          return vl_create_mpeg12_context(pipe, profile,
                                          chroma_format,
                                          width, height,
-                                         true,
-                                         PIPE_FORMAT_XYUV);
+                                         true);
       default:
          return NULL;
    }
diff --git a/src/gallium/include/pipe/p_video_context.h b/src/gallium/include/pipe/p_video_context.h
index 09e2d27..7786f0a 100644
--- a/src/gallium/include/pipe/p_video_context.h
+++ b/src/gallium/include/pipe/p_video_context.h
@@ -34,9 +34,6 @@ extern "C" {
 
 #include <pipe/p_video_state.h>
 
-/* XXX: Move to an appropriate place */
-#define PIPE_CAP_DECODE_TARGET_PREFERRED_FORMAT 256
-
 struct pipe_screen;
 struct pipe_buffer;
 struct pipe_surface;



More information about the mesa-commit mailing list