diff options
author | Younes Manton <[email protected]> | 2010-06-06 11:48:47 -0400 |
---|---|---|
committer | Younes Manton <[email protected]> | 2010-06-06 12:19:22 -0400 |
commit | 6414952efe3b53fd33d73d592da74975a1075330 (patch) | |
tree | b4dd6a7002487d7c99d308d0e391db2b65b7cdc0 /src/gallium/drivers | |
parent | 156fbb9fc530cd2a1d57dc516f67e720ce7f2238 (diff) |
vl: Drop DRI1, clean up DRI2 bits.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/nvfx/nvfx_video_context.c | 3 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_video_context.c | 18 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_video_context.h | 7 |
3 files changed, 18 insertions, 10 deletions
diff --git a/src/gallium/drivers/nvfx/nvfx_video_context.c b/src/gallium/drivers/nvfx/nvfx_video_context.c index 5b85b29e29b..4e21f35f40d 100644 --- a/src/gallium/drivers/nvfx/nvfx_video_context.c +++ b/src/gallium/drivers/nvfx/nvfx_video_context.c @@ -44,5 +44,6 @@ nvfx_video_create(struct pipe_screen *screen, enum pipe_video_profile profile, return sp_video_create_ex(pipe, profile, chroma_format, width, height, VL_MPEG12_MC_RENDERER_BUFFER_PICTURE, VL_MPEG12_MC_RENDERER_EMPTY_BLOCK_XFER_ONE, - true); + true, + PIPE_FORMAT_VUYA); } diff --git a/src/gallium/drivers/softpipe/sp_video_context.c b/src/gallium/drivers/softpipe/sp_video_context.c index fcee9b66823..9aec8a8c4fe 100644 --- a/src/gallium/drivers/softpipe/sp_video_context.c +++ b/src/gallium/drivers/softpipe/sp_video_context.c @@ -74,8 +74,7 @@ sp_mpeg12_get_param(struct pipe_video_context *vpipe, int param) #endif return FALSE; case PIPE_CAP_DECODE_TARGET_PREFERRED_FORMAT: - //return PIPE_FORMAT_AYUV; - return PIPE_FORMAT_VUYA; + return ctx->decode_format; default: { debug_printf("Softpipe: Unknown PIPE_CAP %d\n", param); @@ -322,7 +321,8 @@ sp_mpeg12_create(struct pipe_context *pipe, enum pipe_video_profile profile, unsigned width, unsigned height, enum VL_MPEG12_MC_RENDERER_BUFFER_MODE bufmode, enum VL_MPEG12_MC_RENDERER_EMPTY_BLOCK eb_handling, - bool pot_buffers) + bool pot_buffers, + enum pipe_format decode_format) { struct sp_mpeg12_context *ctx; @@ -352,6 +352,7 @@ sp_mpeg12_create(struct pipe_context *pipe, enum pipe_video_profile profile, ctx->base.set_csc_matrix = sp_mpeg12_set_csc_matrix; ctx->pipe = pipe; + ctx->decode_format = decode_format; if (!vl_mpeg12_mc_renderer_init(&ctx->mc_renderer, ctx->pipe, width, height, chroma_format, @@ -382,7 +383,7 @@ sp_mpeg12_create(struct pipe_context *pipe, enum pipe_video_profile profile, 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) + unsigned width, unsigned height, void *priv) { struct pipe_context *pipe; @@ -400,7 +401,8 @@ sp_video_create(struct pipe_screen *screen, enum pipe_video_profile profile, width, height, VL_MPEG12_MC_RENDERER_BUFFER_PICTURE, VL_MPEG12_MC_RENDERER_EMPTY_BLOCK_XFER_ONE, - true); + true, + PIPE_FORMAT_AYUV); } struct pipe_video_context * @@ -409,7 +411,8 @@ sp_video_create_ex(struct pipe_context *pipe, enum pipe_video_profile profile, unsigned width, unsigned height, enum VL_MPEG12_MC_RENDERER_BUFFER_MODE bufmode, enum VL_MPEG12_MC_RENDERER_EMPTY_BLOCK eb_handling, - bool pot_buffers) + bool pot_buffers, + enum pipe_format decode_format) { assert(pipe); assert(width && height); @@ -420,7 +423,8 @@ sp_video_create_ex(struct pipe_context *pipe, enum pipe_video_profile profile, chroma_format, width, height, bufmode, eb_handling, - pot_buffers); + pot_buffers, + decode_format); default: return NULL; } diff --git a/src/gallium/drivers/softpipe/sp_video_context.h b/src/gallium/drivers/softpipe/sp_video_context.h index bc5daa05ac6..0fe48d7a872 100644 --- a/src/gallium/drivers/softpipe/sp_video_context.h +++ b/src/gallium/drivers/softpipe/sp_video_context.h @@ -46,12 +46,14 @@ struct sp_mpeg12_context void *rast; void *dsa; void *blend; + + enum pipe_format decode_format; }; 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); + unsigned width, unsigned height, void *priv); /* Other drivers can call this function in their pipe_video_context constructors and pass it an accelerated pipe_context along with suitable buffering modes, etc */ @@ -61,6 +63,7 @@ sp_video_create_ex(struct pipe_context *pipe, enum pipe_video_profile profile, unsigned width, unsigned height, enum VL_MPEG12_MC_RENDERER_BUFFER_MODE bufmode, enum VL_MPEG12_MC_RENDERER_EMPTY_BLOCK eb_handling, - bool pot_buffers); + bool pot_buffers, + enum pipe_format decode_format); #endif /* SP_VIDEO_CONTEXT_H */ |