summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers/vdpau/vdpau_private.h
diff options
context:
space:
mode:
authorChristian König <deathsimple@vodafone.de>2011-07-08 20:53:39 +0200
committerChristian König <deathsimple@vodafone.de>2011-07-08 20:53:39 +0200
commit34145ecdad8d6d3b14dc88dafd71b689c68de36c (patch)
treedca2ef52101dd575d0ff8125ddb602db73fbe0ad /src/gallium/state_trackers/vdpau/vdpau_private.h
parentea78480029450c019287c2a94d7c42a6a1d12dc3 (diff)
vdpau: add implementation of VdpDecoderGetParameters
Diffstat (limited to 'src/gallium/state_trackers/vdpau/vdpau_private.h')
-rw-r--r--src/gallium/state_trackers/vdpau/vdpau_private.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h b/src/gallium/state_trackers/vdpau/vdpau_private.h
index 8a97c99bda9..8cf9ca1f4e5 100644
--- a/src/gallium/state_trackers/vdpau/vdpau_private.h
+++ b/src/gallium/state_trackers/vdpau/vdpau_private.h
@@ -171,6 +171,28 @@ ProfileToPipe(VdpDecoderProfile vdpau_profile)
}
}
+static inline VdpDecoderProfile
+PipeToProfile(enum pipe_video_profile p_profile)
+{
+ switch (p_profile) {
+ case PIPE_VIDEO_PROFILE_MPEG1:
+ return VDP_DECODER_PROFILE_MPEG1;
+ case PIPE_VIDEO_PROFILE_MPEG2_SIMPLE:
+ return VDP_DECODER_PROFILE_MPEG2_SIMPLE;
+ case PIPE_VIDEO_PROFILE_MPEG2_MAIN:
+ return VDP_DECODER_PROFILE_MPEG2_MAIN;
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE:
+ return VDP_DECODER_PROFILE_H264_BASELINE;
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_MAIN: /* Not defined in p_format.h */
+ return VDP_DECODER_PROFILE_H264_MAIN;
+ case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH:
+ return VDP_DECODER_PROFILE_H264_HIGH;
+ default:
+ assert(0);
+ return -1;
+ }
+}
+
typedef struct
{
Display *display;