summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_video.c
diff options
context:
space:
mode:
authorRico Schüller <[email protected]>2013-08-14 13:17:22 +0200
committerChristian König <[email protected]>2013-08-14 13:20:01 +0200
commitd1ba1055d98c246d1ee9d9c14706bb9fba6a98c7 (patch)
tree7e3317f7eb5d30d2ccccce0e84a40ea4e721e37e /src/gallium/drivers/nvc0/nvc0_video.c
parent830f4df993b41fc90c776b19f77f77a29ce0e7f4 (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/drivers/nvc0/nvc0_video.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_video.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_video.c b/src/gallium/drivers/nvc0/nvc0_video.c
index 7cc086a0e8c..a871ab792d7 100644
--- a/src/gallium/drivers/nvc0/nvc0_video.c
+++ b/src/gallium/drivers/nvc0/nvc0_video.c
@@ -48,6 +48,31 @@ nvc0_screen_get_video_param(struct pipe_screen *pscreen,
return true;
case PIPE_VIDEO_CAP_SUPPORTS_PROGRESSIVE:
return false;
+ case PIPE_VIDEO_CAP_MAX_LEVEL:
+ switch (profile) {
+ case PIPE_VIDEO_PROFILE_MPEG1:
+ return 0;
+ case PIPE_VIDEO_PROFILE_MPEG2_SIMPLE:
+ case PIPE_VIDEO_PROFILE_MPEG2_MAIN:
+ return 3;
+ case PIPE_VIDEO_PROFILE_MPEG4_SIMPLE:
+ return 3;
+ case PIPE_VIDEO_PROFILE_MPEG4_ADVANCED_SIMPLE:
+ return 5;
+ case PIPE_VIDEO_PROFILE_VC1_SIMPLE:
+ return 1;
+ case PIPE_VIDEO_PROFILE_VC1_MAIN:
+ return 2;
+ case PIPE_VIDEO_PROFILE_VC1_ADVANCED:
+ return 4;
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE:
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN:
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
+ return 41;
+ default:
+ debug_printf("unknown video profile: %d\n", profile);
+ return 0;
+ }
default:
debug_printf("unknown video param: %d\n", param);
return 0;