summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-04-03 00:14:38 +0200
committerChristian König <[email protected]>2011-04-03 00:14:38 +0200
commite6d41e4d0326cac60b49e149d86d0f95c2518045 (patch)
tree7b90c60242935647accc58e03dee8197aa8bb904 /src/gallium/state_trackers
parentd5b05a869a71147987a1c1d6c84f8df17148f031 (diff)
[g3dvl] start to cleanup the mess and provide at least basic functionality
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/vdpau/surface.c4
-rw-r--r--src/gallium/state_trackers/vdpau/vdpau_private.h18
2 files changed, 14 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c
index e63e631fd83..aa8f90d576a 100644
--- a/src/gallium/state_trackers/vdpau/surface.c
+++ b/src/gallium/state_trackers/vdpau/surface.c
@@ -63,7 +63,7 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type,
goto inv_device;
}
- p_surf->chroma_format = TypeToPipe(chroma_type);
+ p_surf->chroma_format = ChromaToPipe(chroma_type);
p_surf->device = dev;
p_surf->width = width;
p_surf->height = height;
@@ -124,7 +124,7 @@ vlVdpVideoSurfaceGetParameters(VdpVideoSurface surface,
*width = p_surf->width;
*height = p_surf->height;
- *chroma_type = PipeToType(p_surf->chroma_format);
+ *chroma_type = PipeToChroma(p_surf->chroma_format);
return VDP_STATUS_OK;
}
diff --git a/src/gallium/state_trackers/vdpau/vdpau_private.h b/src/gallium/state_trackers/vdpau/vdpau_private.h
index 707bb56b88b..c5503ea554e 100644
--- a/src/gallium/state_trackers/vdpau/vdpau_private.h
+++ b/src/gallium/state_trackers/vdpau/vdpau_private.h
@@ -41,7 +41,8 @@
#define INFORMATION_STRING TOSTRING(INFORMATION)
#define VL_HANDLES
-static enum pipe_video_chroma_format TypeToPipe(VdpChromaType vdpau_type)
+static inline enum pipe_video_chroma_format
+ChromaToPipe(VdpChromaType vdpau_type)
{
switch (vdpau_type) {
case VDP_CHROMA_TYPE_420:
@@ -57,7 +58,8 @@ static enum pipe_video_chroma_format TypeToPipe(VdpChromaType vdpau_type)
return -1;
}
-static VdpChromaType PipeToType(enum pipe_video_chroma_format pipe_type)
+static inline VdpChromaType
+PipeToChroma(enum pipe_video_chroma_format pipe_type)
{
switch (pipe_type) {
case PIPE_VIDEO_CHROMA_FORMAT_420:
@@ -74,7 +76,8 @@ static VdpChromaType PipeToType(enum pipe_video_chroma_format pipe_type)
}
-static enum pipe_format FormatToPipe(VdpYCbCrFormat vdpau_format)
+static inline enum pipe_format
+FormatToPipe(VdpYCbCrFormat vdpau_format)
{
switch (vdpau_format) {
case VDP_YCBCR_FORMAT_NV12:
@@ -96,7 +99,8 @@ static enum pipe_format FormatToPipe(VdpYCbCrFormat vdpau_format)
return -1;
}
-static enum pipe_format FormatRGBAToPipe(VdpRGBAFormat vdpau_format)
+static inline enum pipe_format
+FormatRGBAToPipe(VdpRGBAFormat vdpau_format)
{
switch (vdpau_format) {
case VDP_RGBA_FORMAT_A8:
@@ -116,7 +120,8 @@ static enum pipe_format FormatRGBAToPipe(VdpRGBAFormat vdpau_format)
return -1;
}
-static VdpYCbCrFormat PipeToFormat(enum pipe_format p_format)
+static inline VdpYCbCrFormat
+PipeToFormat(enum pipe_format p_format)
{
switch (p_format) {
case PIPE_FORMAT_NV12:
@@ -138,7 +143,8 @@ static VdpYCbCrFormat PipeToFormat(enum pipe_format p_format)
return -1;
}
-static enum pipe_video_profile ProfileToPipe(VdpDecoderProfile vdpau_profile)
+static inline enum pipe_video_profile
+ProfileToPipe(VdpDecoderProfile vdpau_profile)
{
switch (vdpau_profile) {
case VDP_DECODER_PROFILE_MPEG1: