diff options
author | Christian König <[email protected]> | 2012-01-02 14:22:33 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2012-01-15 12:40:44 +0100 |
commit | e027759336bf49e3f568bd73b9e5f26d56ef6f83 (patch) | |
tree | b82a3cd8c9f0ca6ce718567aa1ec128b14c7c0b3 /src/gallium/state_trackers/vdpau/surface.c | |
parent | 39491d1d31d9f03437816fbb4f2872761ae1157c (diff) |
vl/video_buffer: use template style create params
Just like in the rest of gallium, this reduces the
number of parameters significantly.
Signed-off-by: Christian König <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/vdpau/surface.c')
-rw-r--r-- | src/gallium/state_trackers/vdpau/surface.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c index 77503cfff49..206a8397e9f 100644 --- a/src/gallium/state_trackers/vdpau/surface.c +++ b/src/gallium/state_trackers/vdpau/surface.c @@ -44,6 +44,7 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type, uint32_t width, uint32_t height, VdpVideoSurface *surface) { + struct pipe_video_buffer tmpl; vlVdpSurface *p_surf; VdpStatus ret; @@ -72,12 +73,15 @@ vlVdpVideoSurfaceCreate(VdpDevice device, VdpChromaType chroma_type, } p_surf->device = dev; + memset(&tmpl, 0, sizeof(tmpl)); + tmpl.buffer_format = PIPE_FORMAT_YV12; + tmpl.chroma_format = ChromaToPipe(chroma_type); + tmpl.width = width; + tmpl.height = height; p_surf->video_buffer = dev->context->pipe->create_video_buffer ( dev->context->pipe, - PIPE_FORMAT_YV12, // most common used - ChromaToPipe(chroma_type), - width, height + &tmpl ); *surface = vlAddDataHTAB(p_surf); |