diff options
author | Christian König <[email protected]> | 2011-03-17 00:08:20 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2011-03-17 00:08:20 +0100 |
commit | a1fecd09c2c5fdba3da5c38fce567b5bd2e6053d (patch) | |
tree | 5c3dff571cfaabd94142e0c005d25c95807d1e77 /src/gallium/drivers/r600 | |
parent | e87bd8c9578dee384ff03039aa792e1a8dae7f36 (diff) |
[g3dvl] move mpeg12 context out of softpipe
Diffstat (limited to 'src/gallium/drivers/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600_video_context.c | 43 |
1 files changed, 39 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_video_context.c b/src/gallium/drivers/r600/r600_video_context.c index 8a569cd0c65..0b915d62143 100644 --- a/src/gallium/drivers/r600/r600_video_context.c +++ b/src/gallium/drivers/r600/r600_video_context.c @@ -1,5 +1,33 @@ +/************************************************************************** + * + * Copyright 2010 Christian König + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. + * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR + * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, + * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE + * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ + #include "r600_video_context.h" -#include <softpipe/sp_video_context.h> +#include "util/u_video.h" +#include <vl/vl_mpeg12_context.h> struct pipe_video_context * r600_video_create(struct pipe_screen *screen, enum pipe_video_profile profile, @@ -14,7 +42,14 @@ r600_video_create(struct pipe_screen *screen, enum pipe_video_profile profile, if (!pipe) return NULL; - return sp_video_create_ex(pipe, profile, chroma_format, width, height, - true, - PIPE_FORMAT_VUYX); + switch (u_reduce_video_profile(profile)) { + case PIPE_VIDEO_CODEC_MPEG12: + return vl_create_mpeg12_context(pipe, profile, + chroma_format, + width, height, + true, + PIPE_FORMAT_XYUV); + default: + return NULL; + } } |