summaryrefslogtreecommitdiff
path: root/video.c
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-01-12 23:07:06 +0100
committerJohns <johns98@gmx.net>2012-01-12 23:07:06 +0100
commit8e53cbd4a9d7f30a4e32738d3d2c040d898f4193 (patch)
tree7bff7403f23dfd5f77ba92949d575aed2ab4eb85 /video.c
parent54661f90ea0c69ae488b9a50985d3eb3921afc59 (diff)
downloadvdr-plugin-softhddevice-8e53cbd4a9d7f30a4e32738d3d2c040d898f4193.tar.gz
vdr-plugin-softhddevice-8e53cbd4a9d7f30a4e32738d3d2c040d898f4193.tar.bz2
VAAPI: Instant use new deinterlace configuration.
Diffstat (limited to 'video.c')
-rw-r--r--video.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/video.c b/video.c
index a796858..62f8184 100644
--- a/video.c
+++ b/video.c
@@ -209,6 +209,8 @@ static int VideoWindowY; ///< video outout window y coordinate
static unsigned VideoWindowWidth; ///< video output window width
static unsigned VideoWindowHeight; ///< video output window height
+static char VideoSurfaceModesChanged; ///< flag surface modes changed
+
/// Default deinterlace mode.
static VideoDeinterlaceModes VideoDeinterlace[VideoResolutionMax];
@@ -2754,10 +2756,16 @@ static void VaapiDisplayFrame(void)
uint32_t put1;
uint32_t put2;
int i;
+ VaapiDecoder *decoder;
+ if (VideoSurfaceModesChanged) { // handle changed modes
+ for (i = 0; i < VaapiDecoderN; ++i) {
+ VaapiInitSurfaceFlags(VaapiDecoders[i]);
+ }
+ VideoSurfaceModesChanged = 0;
+ }
// look if any stream have a new surface available
for (i = 0; i < VaapiDecoderN; ++i) {
- VaapiDecoder *decoder;
VASurfaceID surface;
int filled;
@@ -6777,6 +6785,7 @@ void VideoSetDeinterlace(int mode[VideoResolutionMax])
VideoDeinterlace[1] = mode[1];
VideoDeinterlace[2] = mode[2];
VideoDeinterlace[3] = mode[3];
+ VideoSurfaceModesChanged = 1;
}
///
@@ -6788,6 +6797,7 @@ void VideoSetSkipChromaDeinterlace(int onoff[VideoResolutionMax])
VideoSkipChromaDeinterlace[1] = onoff[1];
VideoSkipChromaDeinterlace[2] = onoff[2];
VideoSkipChromaDeinterlace[3] = onoff[3];
+ VideoSurfaceModesChanged = 1;
}
///
@@ -6799,6 +6809,7 @@ void VideoSetDenoise(int level[VideoResolutionMax])
VideoSharpen[1] = level[1];
VideoSharpen[2] = level[2];
VideoSharpen[3] = level[3];
+ VideoSurfaceModesChanged = 1;
}
///
@@ -6810,6 +6821,7 @@ void VideoSetSharpen(int level[VideoResolutionMax])
VideoSharpen[1] = level[1];
VideoSharpen[2] = level[2];
VideoSharpen[3] = level[3];
+ VideoSurfaceModesChanged = 1;
}
///
@@ -6821,6 +6833,7 @@ void VideoSetScaling(int mode[VideoResolutionMax])
VideoScaling[1] = mode[1];
VideoScaling[2] = mode[2];
VideoScaling[3] = mode[3];
+ VideoSurfaceModesChanged = 1;
}
///