Remove unsupported auto-crop feature from source

This commit is contained in:
Dirk Nehring 2020-04-16 21:15:19 +02:00
parent 309ad1c90e
commit a3eedbff0c
6 changed files with 6 additions and 120 deletions

View File

@ -39,6 +39,7 @@ CONFIG := #-DDEBUG # remove # to enable debug output
# sanitize selections --------
ifneq "$(MAKECMDGOALS)" "clean"
ifneq "$(MAKECMDGOALS)" "indent"
ifeq ($(VAAPI),0)
ifeq ($(CUVID),0)
@ -65,7 +66,8 @@ exit 1;
endif
endif
endif
endif # MAKECMDGOALS!=indent
endif # MAKECMDGOALS!=clean
#--------------------------
PLUGIN = softhdcuvid

View File

@ -232,18 +232,6 @@ Setup: /etc/vdr/setup.conf
0 = default (336 ms)
1 - 1000 = size of the buffer in ms
softhddevice.AutoCrop.Interval = 0
0 disables auto-crop
n each 'n' frames auto-crop is checked.
softhddevice.AutoCrop.Delay = 0
if auto-crop is over 'n' intervals the same, the cropping is
used.
softhddevice.AutoCrop.Tolerance = 0
if detected crop area is too small, cut max 'n' pixels at top and
bottom.
softhddevice.Background = 0
32bit RGBA background color
(Red * 16777216 + Green * 65536 + Blue * 256 + Alpha)

View File

@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: VDR \n"
"Report-Msgid-Bugs-To: <see README>\n"
"POT-Creation-Date: 2020-04-13 16:26+0200\n"
"POT-Creation-Date: 2020-04-15 18:57+0200\n"
"PO-Revision-Date: blabla\n"
"Last-Translator: blabla\n"
"Language-Team: blabla\n"
@ -450,18 +450,6 @@ msgstr "Schneide oben und unten ab (Pixel)"
msgid "Cut left and right (pixel)"
msgstr "Schneide links und rechts ab (Pixel)"
msgid "Auto-crop"
msgstr ""
msgid "Autocrop interval (frames)"
msgstr ""
msgid "Autocrop delay (n * interval)"
msgstr ""
msgid "Autocrop tolerance (pixel)"
msgstr ""
msgid "Audio"
msgstr "Audio"
@ -640,12 +628,6 @@ msgstr ""
msgid "surround downmix disabled"
msgstr ""
msgid "auto-crop disabled and freezed"
msgstr ""
msgid "auto-crop enabled"
msgstr ""
#, c-format
msgid "[softhddev]: hot key %d is not supported\n"
msgstr ""

View File

@ -136,11 +136,6 @@ static int ConfigVideoCutTopBottom[RESOLUTIONS];
/// config cut left and right pixels
static int ConfigVideoCutLeftRight[RESOLUTIONS];
static int ConfigAutoCropEnabled; ///< auto crop detection enabled
static int ConfigAutoCropInterval; ///< auto crop detection interval
static int ConfigAutoCropDelay; ///< auto crop detection delay
static int ConfigAutoCropTolerance; ///< auto crop detection tolerance
static int ConfigVideoAudioDelay; ///< config audio delay
static char ConfigAudioDrift; ///< config audio drift
static char ConfigAudioPassthrough; ///< config audio pass-through mask
@ -997,10 +992,6 @@ class cMenuSetupSoft:public cMenuSetupPage
int CutTopBottom[RESOLUTIONS];
int CutLeftRight[RESOLUTIONS];
int AutoCropInterval;
int AutoCropDelay;
int AutoCropTolerance;
int Audio;
int AudioDelay;
int AudioDrift;
@ -1243,15 +1234,6 @@ void cMenuSetupSoft::Create(void)
Add(new cMenuEditIntItem(tr("Cut left and right (pixel)"), &CutLeftRight[i], 0, 250));
}
}
#ifdef USE_AUTOCROP
//
// auto-crop
//
Add(SeparatorItem(tr("Auto-crop")));
Add(new cMenuEditIntItem(tr("Autocrop interval (frames)"), &AutoCropInterval, 0, 200, tr("off")));
Add(new cMenuEditIntItem(tr("Autocrop delay (n * interval)"), &AutoCropDelay, 0, 200));
Add(new cMenuEditIntItem(tr("Autocrop tolerance (pixel)"), &AutoCropTolerance, 0, 32));
#endif
}
//
// audio
@ -1428,13 +1410,6 @@ cMenuSetupSoft::cMenuSetupSoft(void)
CutTopBottom[i] = ConfigVideoCutTopBottom[i];
CutLeftRight[i] = ConfigVideoCutLeftRight[i];
}
//
// auto-crop
//
AutoCropInterval = ConfigAutoCropInterval;
AutoCropDelay = ConfigAutoCropDelay;
AutoCropTolerance = ConfigAutoCropTolerance;
//
// audio
//
@ -1591,12 +1566,6 @@ void cMenuSetupSoft::Store(void)
VideoSetCutTopBottom(ConfigVideoCutTopBottom);
VideoSetCutLeftRight(ConfigVideoCutLeftRight);
SetupStore("AutoCrop.Interval", ConfigAutoCropInterval = AutoCropInterval);
SetupStore("AutoCrop.Delay", ConfigAutoCropDelay = AutoCropDelay);
SetupStore("AutoCrop.Tolerance", ConfigAutoCropTolerance = AutoCropTolerance);
VideoSetAutoCrop(ConfigAutoCropInterval, ConfigAutoCropDelay, ConfigAutoCropTolerance);
ConfigAutoCropEnabled = ConfigAutoCropInterval != 0;
SetupStore("AudioDelay", ConfigVideoAudioDelay = AudioDelay);
VideoSetAudioDelay(ConfigVideoAudioDelay);
SetupStore("AudioDrift", ConfigAudioDrift = AudioDrift);
@ -2298,33 +2267,6 @@ static void HandleHotkey(int code)
case 22: // toggle full screen
VideoSetFullscreen(-1);
break;
case 23: // disable auto-crop
ConfigAutoCropEnabled = 0;
VideoSetAutoCrop(0, ConfigAutoCropDelay, ConfigAutoCropTolerance);
Skins.QueueMessage(mtInfo, tr("auto-crop disabled and freezed"));
break;
case 24: // enable auto-crop
ConfigAutoCropEnabled = 1;
if (!ConfigAutoCropInterval) {
ConfigAutoCropInterval = 50;
}
VideoSetAutoCrop(ConfigAutoCropInterval, ConfigAutoCropDelay, ConfigAutoCropTolerance);
Skins.QueueMessage(mtInfo, tr("auto-crop enabled"));
break;
case 25: // toggle auto-crop
ConfigAutoCropEnabled ^= 1;
// no interval configured, use some default
if (!ConfigAutoCropInterval) {
ConfigAutoCropInterval = 50;
}
VideoSetAutoCrop(ConfigAutoCropEnabled * ConfigAutoCropInterval, ConfigAutoCropDelay,
ConfigAutoCropTolerance);
if (ConfigAutoCropEnabled) {
Skins.QueueMessage(mtInfo, tr("auto-crop enabled"));
} else {
Skins.QueueMessage(mtInfo, tr("auto-crop disabled and freezed"));
}
break;
case 30: // change 4:3 -> window mode
case 31:
case 32:
@ -3294,7 +3236,6 @@ bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value)
ConfigSuspendX11 = atoi(value);
return true;
}
if (!strcasecmp(name, "Video4to3DisplayFormat")) {
Config4to3DisplayFormat = atoi(value);
VideoSet4to3DisplayFormat(Config4to3DisplayFormat);
@ -3437,20 +3378,6 @@ bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value)
}
}
if (!strcasecmp(name, "AutoCrop.Interval")) {
VideoSetAutoCrop(ConfigAutoCropInterval = atoi(value), ConfigAutoCropDelay, ConfigAutoCropTolerance);
ConfigAutoCropEnabled = ConfigAutoCropInterval != 0;
return true;
}
if (!strcasecmp(name, "AutoCrop.Delay")) {
VideoSetAutoCrop(ConfigAutoCropInterval, ConfigAutoCropDelay = atoi(value), ConfigAutoCropTolerance);
return true;
}
if (!strcasecmp(name, "AutoCrop.Tolerance")) {
VideoSetAutoCrop(ConfigAutoCropInterval, ConfigAutoCropDelay, ConfigAutoCropTolerance = atoi(value));
return true;
}
if (!strcasecmp(name, "AudioDelay")) {
VideoSetAudioDelay(ConfigVideoAudioDelay = atoi(value));
return true;
@ -3706,7 +3633,6 @@ static const char *SVDRPHelpText[] = {
" 12: toggle audio pass-through\n" " 13: decrease audio delay by 10ms\n"
" 14: increase audio delay by 10ms\n" " 15: toggle ac3 mixdown\n"
" 20: disable fullscreen\n\040 21: enable fullscreen\n" " 22: toggle fullscreen\n"
" 23: disable auto-crop\n\040 24: enable auto-crop\n" " 25: toggle auto-crop\n"
" 30: stretch 4:3 to display\n\040 31: pillar box 4:3 in display\n"
" 32: center cut-out 4:3 to display\n" " 39: rotate 4:3 to display zoom mode\n"
" 40: stretch other aspect ratios to display\n" " 41: letter box other aspect ratios in display\n"

13
video.c
View File

@ -779,7 +779,8 @@ static void VideoUpdateOutput(AVRational input_aspect_ratio, int input_width, in
*output_width = (*crop_width * input_aspect_ratio.num) / input_aspect_ratio.den; // normalize pixel aspect ratio
*output_x = video_x + (video_width - *output_width) / 2;
*output_y = video_y + (video_height - *output_height) / 2;
CuvidMessage(2, "video: original aspect output %dx%d%+d%+d\n", *output_width, *output_height, *output_x, *output_y);
CuvidMessage(2, "video: original aspect output %dx%d%+d%+d\n", *output_width, *output_height, *output_x,
*output_y);
return;
}
@ -6656,16 +6657,6 @@ void VideoSetAudioDelay(int ms)
VideoAudioDelay = ms * 90;
}
///
/// Set auto-crop parameters.
///
void VideoSetAutoCrop(int interval, int delay, int tolerance)
{
(void)interval;
(void)delay;
(void)tolerance;
}
///
/// Set EnableDPMSatBlackScreen
///

View File

@ -179,9 +179,6 @@ extern void VideoSetBackground(uint32_t);
/// Set audio delay.
extern void VideoSetAudioDelay(int);
/// Set auto-crop parameters.
extern void VideoSetAutoCrop(int, int, int);
/// Clear OSD.
extern void VideoOsdClear(void);