summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/vl
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/vl')
-rw-r--r--src/gallium/auxiliary/vl/vl_decoder.c15
-rw-r--r--src/gallium/auxiliary/vl/vl_decoder.h6
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 *