~thopiekar/arm-mali/libvdpau-sunxi

« back to all changes in this revision

Viewing changes to surface_video.c

  • Committer: Jens Kuske
  • Date: 2016-12-17 15:42:57 UTC
  • Revision ID: git-v1:ffad9ab982f3c133cb30d2d509f7ef2893744650
Remove unneeded reconstruct buffer

This reverts commit 162bfcc214fa1b6ef64e1d39298dd9dfe3681190
and replaces it by direct non-tiled output.

On H3 and newer all subengines are able to work without any tiled
buffer, not only the H.265 engine. This saves us some memory and
reduces complexity of video surfaces.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
        return VDP_STATUS_OK;
69
69
}
70
70
 
71
 
VdpStatus rec_prepare(video_surface_ctx_t *video_surface)
72
 
{
73
 
        if (cedrus_get_ve_version(video_surface->device->cedrus) >= 0x1680)
74
 
        {
75
 
                if (!video_surface->rec)
76
 
                {
77
 
                        video_surface->rec = cedrus_mem_alloc(video_surface->device->cedrus, video_surface->luma_size + video_surface->chroma_size);
78
 
                        if (!video_surface->rec)
79
 
                                return VDP_STATUS_RESOURCES;
80
 
                }
81
 
        }
82
 
        else
83
 
                video_surface->rec = video_surface->yuv->data;
84
 
 
85
 
        return VDP_STATUS_OK;
86
 
}
87
 
 
88
71
VdpStatus vdp_video_surface_create(VdpDevice device,
89
72
                                   VdpChromaType chroma_type,
90
73
                                   uint32_t width,
146
129
        if (vs->decoder_private_free)
147
130
                vs->decoder_private_free(vs);
148
131
 
149
 
        if (vs->rec && vs->rec != vs->yuv->data)
150
 
                cedrus_mem_free(vs->rec);
151
 
 
152
132
        yuv_unref(vs->yuv);
153
133
 
154
134
        handle_destroy(surface);