diff options
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_decoder.c | 12 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_decoder.h | 6 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_video_buffer.c | 10 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_video_buffer.h | 6 |
4 files changed, 34 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/vl/vl_decoder.c b/src/gallium/auxiliary/vl/vl_decoder.c index 2be5c17ed3e..fac03359a0f 100644 --- a/src/gallium/auxiliary/vl/vl_decoder.c +++ b/src/gallium/auxiliary/vl/vl_decoder.c @@ -32,6 +32,18 @@ #include "vl_decoder.h" #include "vl_mpeg12_decoder.h" +bool +vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile) +{ + assert(screen); + switch (u_reduce_video_profile(profile)) { + case PIPE_VIDEO_CODEC_MPEG12: + return true; + default: + return false; + } +} + struct pipe_video_decoder * vl_create_decoder(struct pipe_context *pipe, enum pipe_video_profile profile, diff --git a/src/gallium/auxiliary/vl/vl_decoder.h b/src/gallium/auxiliary/vl/vl_decoder.h index 440f5ecfb04..0e9280dbfa2 100644 --- a/src/gallium/auxiliary/vl/vl_decoder.h +++ b/src/gallium/auxiliary/vl/vl_decoder.h @@ -32,6 +32,12 @@ #include <pipe/p_video_decoder.h> /** + * check if a given profile is supported with shader based decoding + */ +bool +vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile); + +/** * standard implementation of pipe->create_video_decoder */ struct pipe_video_decoder * diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.c b/src/gallium/auxiliary/vl/vl_video_buffer.c index 8b05749659f..4d8b6649dd2 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.c +++ b/src/gallium/auxiliary/vl/vl_video_buffer.c @@ -88,6 +88,16 @@ vl_video_buffer_is_format_supported(struct pipe_screen *screen, return true; } +unsigned +vl_video_buffer_max_size(struct pipe_screen *screen) +{ + uint32_t max_2d_texture_level; + + max_2d_texture_level = screen->get_param(screen, PIPE_CAP_MAX_TEXTURE_2D_LEVELS); + + return 1 << (max_2d_texture_level-1); +} + static void vl_video_buffer_destroy(struct pipe_video_buffer *buffer) { diff --git a/src/gallium/auxiliary/vl/vl_video_buffer.h b/src/gallium/auxiliary/vl/vl_video_buffer.h index 78aac3fa0f2..291d15c1e9d 100644 --- a/src/gallium/auxiliary/vl/vl_video_buffer.h +++ b/src/gallium/auxiliary/vl/vl_video_buffer.h @@ -55,6 +55,12 @@ const enum pipe_format * vl_video_buffer_formats(struct pipe_screen *screen, enum pipe_format format); /** + * get maximum size of video buffers + */ +unsigned +vl_video_buffer_max_size(struct pipe_screen *screen); + +/** * check if video buffer format is supported for a codec/profile * can be used as default implementation of screen->is_video_format_supported */ |