diff options
author | Rico Schüller <[email protected]> | 2013-08-14 13:17:22 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2013-08-14 13:20:01 +0200 |
commit | d1ba1055d98c246d1ee9d9c14706bb9fba6a98c7 (patch) | |
tree | 7e3317f7eb5d30d2ccccce0e84a40ea4e721e37e /src/gallium/auxiliary | |
parent | 830f4df993b41fc90c776b19f77f77a29ce0e7f4 (diff) |
vl: Add support for max level query v2
This patch adds the level query support to the video decoders
and uses some more reasonable defaults.
v2: (ck) add commit message
Reviewed-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_decoder.c | 15 | ||||
-rw-r--r-- | src/gallium/auxiliary/vl/vl_decoder.h | 6 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/vl/vl_decoder.c b/src/gallium/auxiliary/vl/vl_decoder.c index d6909cbfc0d..16f09b501e6 100644 --- a/src/gallium/auxiliary/vl/vl_decoder.c +++ b/src/gallium/auxiliary/vl/vl_decoder.c @@ -44,6 +44,21 @@ vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile } } +int +vl_level_supported(struct pipe_screen *screen, enum pipe_video_profile profile) +{ + assert(screen); + switch (profile) { + case PIPE_VIDEO_PROFILE_MPEG1: + return 0; + case PIPE_VIDEO_PROFILE_MPEG2_SIMPLE: + case PIPE_VIDEO_PROFILE_MPEG2_MAIN: + return 3; + default: + return 0; + } +} + 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 8fa6527ce54..b0b4161d4ec 100644 --- a/src/gallium/auxiliary/vl/vl_decoder.h +++ b/src/gallium/auxiliary/vl/vl_decoder.h @@ -38,6 +38,12 @@ bool vl_profile_supported(struct pipe_screen *screen, enum pipe_video_profile profile); /** + * get the maximum supported level for the given profile with shader based decoding + */ +int +vl_level_supported(struct pipe_screen *screen, enum pipe_video_profile profile); + +/** * standard implementation of pipe->create_video_decoder */ struct pipe_video_decoder * |