[Mesa-dev] [PATCH 1/2] st/vdpau: clear Cb&Cr with 0.5f
Christian König
deathsimple at vodafone.de
Thu Jun 14 09:14:55 PDT 2012
That makes the output black in case of decoding errors.
Signed-off-by: Christian König <deathsimple at vodafone.de>
---
src/gallium/state_trackers/vdpau/surface.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/gallium/state_trackers/vdpau/surface.c b/src/gallium/state_trackers/vdpau/surface.c
index fde2336..ad260c6 100644
--- a/src/gallium/state_trackers/vdpau/surface.c
+++ b/src/gallium/state_trackers/vdpau/surface.c
@@ -355,12 +355,15 @@ vlVdpVideoSurfaceClear(vlVdpSurface *vlsurf)
surfaces = vlsurf->video_buffer->get_surfaces(vlsurf->video_buffer);
for (i = 0; i < VL_MAX_SURFACES; ++i) {
- union pipe_color_union black = {};
+ union pipe_color_union c = {};
if (!surfaces[i])
continue;
+
+ if (i > !!vlsurf->templat.interlaced)
+ c.f[0] = c.f[1] = c.f[2] = c.f[3] = 0.5f;
- pipe->clear_render_target(pipe, surfaces[i], &black, 0, 0,
+ pipe->clear_render_target(pipe, surfaces[i], &c, 0, 0,
surfaces[i]->width, surfaces[i]->height);
}
pipe->flush(pipe, NULL);
--
1.7.9.5
More information about the mesa-dev
mailing list