[g3dvl] start to cleanup the mess and provide at least basic functionality
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
@@ -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:
|
||||
|
Reference in New Issue
Block a user