summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-04-06 00:06:20 +0200
committerChristian König <[email protected]>2011-04-06 00:06:20 +0200
commitd9ad3aa3b9647f1ede2568600978af956ff32fff (patch)
tree91eb6e083acdaa6f368a607ad558df27d6d2ede1 /src/gallium/drivers
parent3a2b906805985e0a4258bcbaed4cdff758875514 (diff)
[g3dvl] and finally split the decoder part out of the context
This should give a good basis to implement vdpau ontop of it.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/nv40/nv40_video_context.c16
-rw-r--r--src/gallium/drivers/nv40/nv40_video_context.h4
-rw-r--r--src/gallium/drivers/nvfx/nvfx_video_context.c16
-rw-r--r--src/gallium/drivers/nvfx/nvfx_video_context.h4
-rw-r--r--src/gallium/drivers/r600/r600_video_context.c16
-rw-r--r--src/gallium/drivers/r600/r600_video_context.h4
-rw-r--r--src/gallium/drivers/softpipe/sp_screen.c17
7 files changed, 15 insertions, 62 deletions
diff --git a/src/gallium/drivers/nv40/nv40_video_context.c b/src/gallium/drivers/nv40/nv40_video_context.c
index 34bb7cdbdda..cd231e434a5 100644
--- a/src/gallium/drivers/nv40/nv40_video_context.c
+++ b/src/gallium/drivers/nv40/nv40_video_context.c
@@ -27,12 +27,10 @@
#include "nv40_video_context.h"
#include "util/u_video.h"
-#include <vl/vl_mpeg12_context.h>
+#include <vl/vl_context.h>
struct pipe_video_context *
-nv40_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
- enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height, void *priv)
+nv40_video_create(struct pipe_screen *screen, void *priv)
{
struct pipe_context *pipe;
@@ -42,13 +40,5 @@ nv40_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
if (!pipe)
return NULL;
- switch (u_reduce_video_profile(profile)) {
- case PIPE_VIDEO_CODEC_MPEG12:
- return vl_create_mpeg12_context(pipe, profile,
- chroma_format,
- width, height,
- true);
- default:
- return NULL;
- }
+ return vl_create_context(pipe, true);
}
diff --git a/src/gallium/drivers/nv40/nv40_video_context.h b/src/gallium/drivers/nv40/nv40_video_context.h
index 64196caca72..d34ab7ab130 100644
--- a/src/gallium/drivers/nv40/nv40_video_context.h
+++ b/src/gallium/drivers/nv40/nv40_video_context.h
@@ -31,8 +31,6 @@
#include <pipe/p_video_context.h>
struct pipe_video_context *
-nv40_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
- enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height, void *priv);
+nv40_video_create(struct pipe_screen *screen, void *priv);
#endif
diff --git a/src/gallium/drivers/nvfx/nvfx_video_context.c b/src/gallium/drivers/nvfx/nvfx_video_context.c
index 01a84f2ebc6..9c9ccfe317d 100644
--- a/src/gallium/drivers/nvfx/nvfx_video_context.c
+++ b/src/gallium/drivers/nvfx/nvfx_video_context.c
@@ -27,12 +27,10 @@
#include "nvfx_video_context.h"
#include "util/u_video.h"
-#include <vl/vl_mpeg12_context.h>
+#include <vl/vl_context.h>
struct pipe_video_context *
-nvfx_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
- enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height, void *priv)
+nvfx_video_create(struct pipe_screen *screen, void *priv)
{
struct pipe_context *pipe;
@@ -42,13 +40,5 @@ nvfx_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
if (!pipe)
return NULL;
- switch (u_reduce_video_profile(profile)) {
- case PIPE_VIDEO_CODEC_MPEG12:
- return vl_create_mpeg12_context(pipe, profile,
- chroma_format,
- width, height,
- true);
- default:
- return NULL;
- }
+ return vl_create_context(pipe, profile, true);
}
diff --git a/src/gallium/drivers/nvfx/nvfx_video_context.h b/src/gallium/drivers/nvfx/nvfx_video_context.h
index 6619427cc29..b220b9f82dc 100644
--- a/src/gallium/drivers/nvfx/nvfx_video_context.h
+++ b/src/gallium/drivers/nvfx/nvfx_video_context.h
@@ -31,8 +31,6 @@
#include <pipe/p_video_context.h>
struct pipe_video_context *
-nvfx_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
- enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height, void *priv);
+nvfx_video_create(struct pipe_screen *screen, void *priv);
#endif
diff --git a/src/gallium/drivers/r600/r600_video_context.c b/src/gallium/drivers/r600/r600_video_context.c
index c1b0c098245..a0ab3475fde 100644
--- a/src/gallium/drivers/r600/r600_video_context.c
+++ b/src/gallium/drivers/r600/r600_video_context.c
@@ -27,12 +27,10 @@
#include "r600_video_context.h"
#include "util/u_video.h"
-#include <vl/vl_mpeg12_context.h>
+#include <vl/vl_context.h>
struct pipe_video_context *
-r600_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
- enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height, void *priv)
+r600_video_create(struct pipe_screen *screen, void *priv)
{
struct pipe_context *pipe;
@@ -42,13 +40,5 @@ r600_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
if (!pipe)
return NULL;
- switch (u_reduce_video_profile(profile)) {
- case PIPE_VIDEO_CODEC_MPEG12:
- return vl_create_mpeg12_context(pipe, profile,
- chroma_format,
- width, height,
- false);
- default:
- return NULL;
- }
+ return vl_create_context(pipe, false);
}
diff --git a/src/gallium/drivers/r600/r600_video_context.h b/src/gallium/drivers/r600/r600_video_context.h
index bda33a00d44..f579980bd36 100644
--- a/src/gallium/drivers/r600/r600_video_context.h
+++ b/src/gallium/drivers/r600/r600_video_context.h
@@ -4,8 +4,6 @@
#include <pipe/p_video_context.h>
struct pipe_video_context *
-r600_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
- enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height, void *priv);
+r600_video_create(struct pipe_screen *screen, void *priv);
#endif
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c
index d5936641ba5..bb72cf63bc5 100644
--- a/src/gallium/drivers/softpipe/sp_screen.c
+++ b/src/gallium/drivers/softpipe/sp_screen.c
@@ -33,7 +33,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
#include "draw/draw_context.h"
-#include "vl/vl_mpeg12_context.h"
+#include "vl/vl_context.h"
#include "state_tracker/sw_winsys.h"
#include "tgsi/tgsi_exec.h"
@@ -288,29 +288,18 @@ softpipe_flush_frontbuffer(struct pipe_screen *_screen,
}
static struct pipe_video_context *
-sp_video_create(struct pipe_screen *screen, enum pipe_video_profile profile,
- enum pipe_video_chroma_format chroma_format,
- unsigned width, unsigned height, void *priv)
+sp_video_create(struct pipe_screen *screen, void *priv)
{
struct pipe_context *pipe;
assert(screen);
- assert(width && height);
pipe = screen->context_create(screen, NULL);
if (!pipe)
return NULL;
/* TODO: Use slice buffering for softpipe when implemented, no advantage to buffering an entire picture with softpipe */
- switch (u_reduce_video_profile(profile)) {
- case PIPE_VIDEO_CODEC_MPEG12:
- return vl_create_mpeg12_context(pipe, profile,
- chroma_format,
- width, height,
- true);
- default:
- return NULL;
- }
+ return vl_create_context(pipe, true);
}
/**