From: Christian König Date: Sat, 2 Apr 2011 22:09:01 +0000 (+0200) Subject: [g3dvl] start over with vdpau decoding X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d5b05a869a71147987a1c1d6c84f8df17148f031;p=mesa.git [g3dvl] start over with vdpau decoding --- diff --git a/src/gallium/state_trackers/vdpau/decode.c b/src/gallium/state_trackers/vdpau/decode.c index b5e22883067..7905227597a 100644 --- a/src/gallium/state_trackers/vdpau/decode.c +++ b/src/gallium/state_trackers/vdpau/decode.c @@ -39,6 +39,9 @@ vlVdpDecoderCreate(VdpDevice device, uint32_t max_references, VdpDecoder *decoder) { + return VDP_STATUS_NO_IMPLEMENTATION; + +#if 0 enum pipe_video_profile p_profile = PIPE_VIDEO_PROFILE_UNKNOWN; VdpStatus ret = VDP_STATUS_OK; vlVdpDecoder *vldecoder = NULL; @@ -93,11 +96,15 @@ no_screen: no_decoder: inv_device: return ret; +#endif } VdpStatus vlVdpDecoderDestroy(VdpDecoder decoder) { + return VDP_STATUS_NO_IMPLEMENTATION; + +#if 0 debug_printf("[VDPAU] Destroying decoder\n"); vlVdpDecoder *vldecoder; @@ -117,8 +124,10 @@ vlVdpDecoderDestroy(VdpDecoder decoder) FREE(vldecoder); return VDP_STATUS_OK; +#endif } +#if 0 VdpStatus vlVdpCreateSurfaceTarget(vlVdpDecoder *vldecoder, vlVdpSurface *vlsurf) { @@ -154,12 +163,12 @@ vlVdpCreateSurfaceTarget(vlVdpDecoder *vldecoder, vlVdpSurface *vlsurf) memset(&surf_template, 0, sizeof(surf_template)); surf_template.format = surf_tex->format; surf_template.usage = PIPE_BIND_SAMPLER_VIEW | PIPE_BIND_RENDER_TARGET; - vlsurf->psurface = vctx->create_surface(vctx->screen, surf_tex, &surf_template); + //vlsurf->psurface = vctx->create_surface(vctx->screen, surf_tex, &surf_template); pipe_resource_reference(&surf_tex, NULL); - if (!vlsurf->psurface) - return VDP_STATUS_RESOURCES; + //if (!vlsurf->psurface) + // return VDP_STATUS_RESOURCES; debug_printf("[VDPAU] Done creating surface\n"); return VDP_STATUS_OK; @@ -227,6 +236,7 @@ vlVdpDecoderRenderMpeg2(vlVdpDecoder *vldecoder, skip_frame: return ret; } +#endif VdpStatus vlVdpDecoderRender(VdpDecoder decoder, @@ -235,6 +245,9 @@ vlVdpDecoderRender(VdpDecoder decoder, uint32_t bitstream_buffer_count, VdpBitstreamBuffer const *bitstream_buffers) { + return VDP_STATUS_NO_IMPLEMENTATION; + +#if 0 vlVdpDecoder *vldecoder; vlVdpSurface *vlsurf; struct vl_screen *vscreen; @@ -281,6 +294,7 @@ vlVdpDecoderRender(VdpDecoder decoder, assert(0); return ret; +#endif } VdpStatus diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c index a625ea401ba..e63e631fd83 100644 --- a/src/gallium/state_trackers/vdpau/surface.c +++ b/src/gallium/state_trackers/vdpau/surface.c @@ -77,7 +77,7 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type, return VDP_STATUS_OK; no_handle: - FREE(p_surf->psurface); + //FREE(p_surf->psurface); inv_device: no_surf: FREE(p_surf); @@ -97,12 +97,12 @@ vlVdpVideoSurfaceDestroy(VdpVideoSurface surface) if (!p_surf) return VDP_STATUS_INVALID_HANDLE; - if (p_surf->psurface) { - if (p_surf->psurface->texture) { - if (p_surf->psurface->texture->screen) - p_surf->psurface->context->surface_destroy(p_surf->psurface->context, p_surf->psurface); - } - } + //if (p_surf->psurface) { + // if (p_surf->psurface->texture) { + // if (p_surf->psurface->texture->screen) + // p_surf->psurface->context->surface_destroy(p_surf->psurface->context, p_surf->psurface); + // } + //} FREE(p_surf); return VDP_STATUS_OK; } @@ -142,8 +142,8 @@ vlVdpVideoSurfaceGetBitsYCbCr(VdpVideoSurface surface, if (!p_surf) return VDP_STATUS_INVALID_HANDLE; - if (!p_surf->psurface) - return VDP_STATUS_RESOURCES; + //if (!p_surf->psurface) + // return VDP_STATUS_RESOURCES; 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 d04c517733d..707bb56b88b 100644 --- a/src/gallium/state_trackers/vdpau/vdpau_private.h +++ b/src/gallium/state_trackers/vdpau/vdpau_private.h @@ -187,12 +187,13 @@ typedef struct typedef struct { vlVdpDevice *device; + enum pipe_video_chroma_format chroma_format; uint32_t width; uint32_t height; - uint32_t pitch; - struct pipe_surface *psurface; - enum pipe_video_chroma_format chroma_format; - uint8_t *data; + + //uint32_t pitch; + //struct pipe_surface *psurface; + //uint8_t *data; } vlVdpSurface; typedef struct