[g3dvl] start over with vdpau decoding
authorChristian König <deathsimple@vodafone.de>
Sat, 2 Apr 2011 22:09:01 +0000 (00:09 +0200)
committerChristian König <deathsimple@vodafone.de>
Sat, 2 Apr 2011 22:09:01 +0000 (00:09 +0200)
src/gallium/state_trackers/vdpau/decode.c
src/gallium/state_trackers/vdpau/surface.c
src/gallium/state_trackers/vdpau/vdpau_private.h

index b5e2288306728e69c8c10a7587ed410805ed65db..7905227597aee50298de76df53d14ccf71f6a8cf 100644 (file)
@@ -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
index a625ea401baaa7ff6901ab604858f0733c1eeee7..e63e631fd835529fbc3a4c8c0000caabefa69b9e 100644 (file)
@@ -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;
 }
index d04c517733d13b6fe3ee4f2f99bb4bce2165e050..707bb56b88b5914e51036386e069c118e44a83d1 100644 (file)
@@ -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