mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Add vaSyncSurface for new surface displayed.
Intel 1080i needs sync to have frame decoded. Nvidia drops frames, if always synced.
This commit is contained in:
parent
61cbb31d3d
commit
a38cf3d9ae
2
Todo
2
Todo
@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
libva-intel-driver:
|
libva-intel-driver:
|
||||||
intel still has hangups most with 1080i
|
intel still has hangups most with 1080i
|
||||||
|
1080i does no v-sync (workaround written)
|
||||||
osd has sometimes wrong size (workaround written)
|
osd has sometimes wrong size (workaround written)
|
||||||
|
|
||||||
libva-vdpau-driver:
|
libva-vdpau-driver:
|
||||||
@ -16,6 +17,7 @@ x11:
|
|||||||
|
|
||||||
audio/alsa:
|
audio/alsa:
|
||||||
video/audio asyncron
|
video/audio asyncron
|
||||||
|
random crash in av_parser_parse2, when switching channels
|
||||||
|
|
||||||
playback of >2 channels on 2 channel hardware
|
playback of >2 channels on 2 channel hardware
|
||||||
done?
|
done?
|
||||||
|
6
video.c
6
video.c
@ -2444,6 +2444,7 @@ static void VaapiDisplayFrame(void)
|
|||||||
// look if any stream have a new surface available
|
// look if any stream have a new surface available
|
||||||
for (i = 0; i < VaapiDecoderN; ++i) {
|
for (i = 0; i < VaapiDecoderN; ++i) {
|
||||||
int filled;
|
int filled;
|
||||||
|
int next_surface;
|
||||||
|
|
||||||
decoder = VaapiDecoders[i];
|
decoder = VaapiDecoders[i];
|
||||||
filled = atomic_read(&decoder->SurfacesFilled);
|
filled = atomic_read(&decoder->SurfacesFilled);
|
||||||
@ -2457,6 +2458,7 @@ static void VaapiDisplayFrame(void)
|
|||||||
|
|
||||||
// 0 -> 1
|
// 0 -> 1
|
||||||
// 1 -> 0 + advance
|
// 1 -> 0 + advance
|
||||||
|
next_surface = 0;
|
||||||
if (decoder->Interlaced) {
|
if (decoder->Interlaced) {
|
||||||
// FIXME: first frame is never shown
|
// FIXME: first frame is never shown
|
||||||
if (decoder->SurfaceField) {
|
if (decoder->SurfaceField) {
|
||||||
@ -2465,6 +2467,7 @@ static void VaapiDisplayFrame(void)
|
|||||||
% VIDEO_SURFACES_MAX;
|
% VIDEO_SURFACES_MAX;
|
||||||
atomic_dec(&decoder->SurfacesFilled);
|
atomic_dec(&decoder->SurfacesFilled);
|
||||||
decoder->SurfaceField = 0;
|
decoder->SurfaceField = 0;
|
||||||
|
next_surface = 1;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
decoder->SurfaceField = 1;
|
decoder->SurfaceField = 1;
|
||||||
@ -2483,7 +2486,7 @@ static void VaapiDisplayFrame(void)
|
|||||||
|
|
||||||
start = GetMsTicks();
|
start = GetMsTicks();
|
||||||
// wait for rendering finished
|
// wait for rendering finished
|
||||||
if (0 && vaSyncSurface(decoder->VaDisplay, surface)
|
if (next_surface && vaSyncSurface(decoder->VaDisplay, surface)
|
||||||
!= VA_STATUS_SUCCESS) {
|
!= VA_STATUS_SUCCESS) {
|
||||||
Error(_("video/vaapi: vaSyncSurface failed\n"));
|
Error(_("video/vaapi: vaSyncSurface failed\n"));
|
||||||
}
|
}
|
||||||
@ -3465,6 +3468,7 @@ void VideoRenderFrame(VideoHwDecoder * decoder, AVCodecContext * video_ctx,
|
|||||||
|
|
||||||
VideoPollEvent();
|
VideoPollEvent();
|
||||||
|
|
||||||
|
// FIXME: with interlace it could happen that this is not displayed
|
||||||
if (!(decoder->Vaapi.FrameCounter % (50 * 10))) {
|
if (!(decoder->Vaapi.FrameCounter % (50 * 10))) {
|
||||||
int64_t audio_clock;
|
int64_t audio_clock;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user