Skip to content

Commit

Permalink
Remove SoftStartSync configuration.
Browse files Browse the repository at this point in the history
  • Loading branch information
rofafor committed Jul 21, 2018
1 parent 1a8af29 commit cb659cc
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 47 deletions.
4 changes: 0 additions & 4 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,6 @@ Setup: /etc/vdr/setup.conf
0 disable 60Hz display mode
1 enable 60Hz display mode

vaapidevice.SoftStartSync = 0
0 disable soft start of audio/video sync
1 enable soft start of audio/video sync

vaapidevice.Video4to3DisplayFormat = 1
0 pan and scan
1 letter box
Expand Down
5 changes: 1 addition & 4 deletions po/de_DE.po
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR \n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2018-02-10 19:40+0200\n"
"POT-Creation-Date: 2018-06-30 21:56+0300\n"
"PO-Revision-Date: 2018-02-10 16:34+0200\n"
"Last-Translator: <unknown>\n"
"Language-Team: <german>\n"
Expand Down Expand Up @@ -67,9 +67,6 @@ msgstr "Video Hintergrundfarbe (Alpha)"
msgid "60hz display mode"
msgstr "60Hz Anzeigemodus"

msgid "Soft start a/v sync"
msgstr "Sanftanlauf A/V Sync"

msgid "Color balance"
msgstr ""

Expand Down
10 changes: 0 additions & 10 deletions vaapidevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ static char Config4to3DisplayFormat = 1; ///< config 4:3 display format
static char ConfigOtherDisplayFormat = 1; ///< config other display format
static uint32_t ConfigVideoBackground; ///< config video background color
static char ConfigVideo60HzMode; ///< config use 60Hz display mode
static char ConfigVideoSoftStartSync; ///< config use softstart sync

static int ConfigVideoColorBalance = 1; ///< config video color balance
static int ConfigVideoBrightness; ///< config video brightness
Expand Down Expand Up @@ -721,7 +720,6 @@ class cMenuSetupSoft:public cMenuSetupPage
uint32_t Background;
uint32_t BackgroundAlpha;
int _60HzMode;
int SoftStartSync;

int ColorBalance;
int Brightness;
Expand Down Expand Up @@ -878,7 +876,6 @@ void cMenuSetupSoft::Create(void)
Add(new cMenuEditIntItem(tr("Video background color (RGB)"), (int *)&Background, 0, 0x00FFFFFF));
Add(new cMenuEditIntItem(tr("Video background color (Alpha)"), (int *)&BackgroundAlpha, 0, 0xFF));
Add(new cMenuEditBoolItem(tr("60hz display mode"), &_60HzMode, trVDR("no"), trVDR("yes")));
Add(new cMenuEditBoolItem(tr("Soft start a/v sync"), &SoftStartSync, trVDR("no"), trVDR("yes")));

Add(new cMenuEditBoolItem(tr("Color balance"), &ColorBalance, trVDR("off"), trVDR("on")));
if (ColorBalance) {
Expand Down Expand Up @@ -1082,7 +1079,6 @@ cMenuSetupSoft::cMenuSetupSoft(void)
Background = ConfigVideoBackground >> 8;
BackgroundAlpha = ConfigVideoBackground & 0xFF;
_60HzMode = ConfigVideo60HzMode;
SoftStartSync = ConfigVideoSoftStartSync;

ColorBalance = ConfigVideoColorBalance;
Brightness = ConfigVideoBrightness;
Expand Down Expand Up @@ -1170,8 +1166,6 @@ void cMenuSetupSoft::Store(void)
VideoSetBackground(ConfigVideoBackground);
SetupStore("60HzMode", ConfigVideo60HzMode = _60HzMode);
VideoSet60HzMode(ConfigVideo60HzMode);
SetupStore("SoftStartSync", ConfigVideoSoftStartSync = SoftStartSync);
VideoSetSoftStartSync(ConfigVideoSoftStartSync);

SetupStore("ColorBalance", ConfigVideoColorBalance = ColorBalance);
VideoSetColorBalance(ConfigVideoColorBalance);
Expand Down Expand Up @@ -2520,10 +2514,6 @@ bool cPluginVaapiDevice::SetupParse(const char *name, const char *value)
VideoSet60HzMode(ConfigVideo60HzMode = atoi(value));
return true;
}
if (!strcasecmp(name, "SoftStartSync")) {
VideoSetSoftStartSync(ConfigVideoSoftStartSync = atoi(value));
return true;
}
if (!strcasecmp(name, "ColorBalance")) {
VideoSetColorBalance(ConfigVideoColorBalance = atoi(value));
return true;
Expand Down
30 changes: 4 additions & 26 deletions video.c
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,6 @@ static VideoZoomModes Video4to3ZoomMode;
static VideoZoomModes VideoOtherZoomMode;

static char Video60HzMode; ///< handle 60hz displays
static char VideoSoftStartSync; ///< soft start sync audio/video
static const int VideoSoftStartFrames = 100; ///< soft start frames

static xcb_atom_t WmDeleteWindowAtom; ///< WM delete message atom
static xcb_atom_t NetWmState; ///< wm-state message atom
Expand Down Expand Up @@ -3710,13 +3708,6 @@ static void VaapiSyncDecoder(VaapiDecoder * decoder)
decoder->TrickCounter = decoder->TrickSpeed;
goto skip_sync;
}
// at start of new video stream, soft or hard sync video to audio
// FIXME: video waits for audio, audio for video
if (!VideoSoftStartSync && decoder->StartCounter < VideoSoftStartFrames && video_clock != (int64_t) AV_NOPTS_VALUE
&& (audio_clock == (int64_t) AV_NOPTS_VALUE || video_clock > audio_clock + VideoAudioDelay + 120 * 90)) {
err = VaapiMessage(2, "video: initial slow down video, frame %d", decoder->StartCounter);
goto out;
}

if (decoder->SyncCounter && decoder->SyncCounter--) {
goto skip_sync;
Expand Down Expand Up @@ -3759,18 +3750,15 @@ static void VaapiSyncDecoder(VaapiDecoder * decoder)
Debug("video: slow down video, duping frame (/\\=%.2f ms, vClk %s - aClk %s)", diff * 1000 / (double)90000,
Timestamp2String(video_clock), Timestamp2String(audio_clock));
++decoder->FramesDuped;
if (VideoSoftStartSync) {
decoder->SyncCounter = 1;
goto out;
}
decoder->SyncCounter = 1;
goto out;
} else if ((diff < (int64_t) - 20 * 90) && (filled > 1 + 2 * decoder->Interlaced)) {
Debug("video: speed up video, droping frame (/\\=%.2f ms, vClk %s - aClk %s)", diff * 1000 / (double)90000,
Timestamp2String(video_clock), Timestamp2String(audio_clock));
++decoder->FramesDropped;
VaapiAdvanceDecoderFrame(decoder);
if (VideoSoftStartSync) {
decoder->SyncCounter = 1;
}
decoder->SyncCounter = 1;
goto out;
}
#if defined(DEBUG) || defined(AV_INFO)
if (!decoder->SyncCounter && decoder->StartCounter < 1000) {
Expand Down Expand Up @@ -5212,16 +5200,6 @@ void VideoSet60HzMode(int onoff)
Video60HzMode = onoff;
}

///
/// Set soft start audio/video sync.
///
/// @param onoff enable / disable the soft start sync.
///
void VideoSetSoftStartSync(int onoff)
{
VideoSoftStartSync = onoff;
}

///
/// Vaapi helper to set various video params (brightness, contrast etc.)
///
Expand Down
3 changes: 0 additions & 3 deletions video.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ extern int VideoSetGeometry(const char *);
/// Set 60Hz display mode.
extern void VideoSet60HzMode(int);

/// Set soft start audio/video sync.
extern void VideoSetSoftStartSync(int);

/// Set color balance mode.
extern void VideoSetColorBalance(int);

Expand Down

0 comments on commit cb659cc

Please sign in to comment.