Mesa (pipe-video): [g3dvl] start to cleanup the mess and provide at least basic functionality
Christian König
deathsimple at kemper.freedesktop.org
Sun Apr 3 19:01:20 UTC 2011
Module: Mesa
Branch: pipe-video
Commit: e6d41e4d0326cac60b49e149d86d0f95c2518045
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=e6d41e4d0326cac60b49e149d86d0f95c2518045
Author: Christian König <deathsimple at vodafone.de>
Date: Sun Apr 3 00:14:38 2011 +0200
[g3dvl] start to cleanup the mess and provide at least basic functionality
---
src/gallium/state_trackers/vdpau/surface.c | 4 ++--
src/gallium/state_trackers/vdpau/vdpau_private.h | 18 ++++++++++++------
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 e63e631..aa8f90d 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 707bb56..c5503ea 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:
More information about the mesa-commit
mailing list