diff options
author | Johns <johns98@gmx.net> | 2012-03-30 17:19:31 +0200 |
---|---|---|
committer | Johns <johns98@gmx.net> | 2012-03-30 17:19:31 +0200 |
commit | b41f934c3707bcd3f31b794c1a7aba5c9ccb32f1 (patch) | |
tree | 1ae30d387aef3b99145785b6c1ee0d83fc8d7e62 /video.c | |
parent | 6058f3da5649888fc489a516659b8b346fd24c80 (diff) | |
download | vdr-plugin-softhddevice-b41f934c3707bcd3f31b794c1a7aba5c9ccb32f1.tar.gz vdr-plugin-softhddevice-b41f934c3707bcd3f31b794c1a7aba5c9ccb32f1.tar.bz2 |
Faster VdpauBlackSurface version.
Diffstat (limited to 'video.c')
-rw-r--r-- | video.c | 48 |
1 files changed, 25 insertions, 23 deletions
@@ -7248,38 +7248,40 @@ static void VdpauMixVideo(VdpauDecoder * decoder) /// @param decoder VDPAU hw decoder /// /// @FIXME: render only video area, not fullscreen! +/// decoder->Output.. isn't correct setup for radio stations /// static void VdpauBlackSurface(VdpauDecoder * decoder) { VdpStatus status; - void *image; - void const *data[1]; - uint32_t pitches[1]; - VdpRect dst_rect; - - Debug(3, "video/vdpau: black surface\n"); - - // FIXME: clear video window area - (void)decoder; - - image = calloc(4, VideoWindowWidth * VideoWindowHeight); + VdpRect source_rect; + VdpRect output_rect; - dst_rect.x0 = 0; - dst_rect.y0 = 0; - dst_rect.x1 = dst_rect.x0 + VideoWindowWidth; - dst_rect.y1 = dst_rect.y0 + VideoWindowHeight; - data[0] = image; - pitches[0] = VideoWindowWidth * 4; + source_rect.x0 = 0; + source_rect.y0 = 0; + source_rect.x1 = 0; + source_rect.y1 = 0; + + if ( 0 ) { + // FIXME: wrong for radio channels + output_rect.x0 = decoder->OutputX; // video output (scale) + output_rect.y0 = decoder->OutputY; + output_rect.x1 = decoder->OutputX + decoder->OutputWidth; + output_rect.y1 = decoder->OutputY + decoder->OutputHeight; + } else { + output_rect.x0 = 0; + output_rect.y0 = 0; + output_rect.x1 = VideoWindowWidth; + output_rect.y1 = VideoWindowHeight; + } - status = - VdpauOutputSurfacePutBitsNative(VdpauSurfacesRb[VdpauSurfaceIndex], - data, pitches, &dst_rect); + status = VdpauOutputSurfaceRenderOutputSurface( + VdpauSurfacesRb[VdpauSurfaceIndex], &output_rect, + VdpauOsdOutputSurface[!VdpauOsdSurfaceIndex], &source_rect, NULL, NULL, + VDP_OUTPUT_SURFACE_RENDER_ROTATE_0); if (status != VDP_STATUS_OK) { - Error(_("video/vdpau: output surface put bits failed: %s\n"), + Error(_("video/vdpau: can't render output surface: %s\n"), VdpauGetErrorString(status)); } - - free(image); } /// |