summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-10-23 22:17:21 +0200
committerwm4 <wm4@nowhere>2012-10-24 21:56:35 +0200
commit3d98e8c674066809844cd35dfe02b28a07f91d77 (patch)
treeb5b6fb3d0ed543ba2c051965379b13fe5f402d80
parenta8824f12ddfe66585db43fb0f92d7c90b5bbd19d (diff)
downloadmpv-3d98e8c674066809844cd35dfe02b28a07f91d77.tar.bz2
mpv-3d98e8c674066809844cd35dfe02b28a07f91d77.tar.xz
options: remove --ffactor switch
This controlled the generation of the palette for DVD subs if no palette was found. The option name and description is confusing, and it was probably barely useful. Remove the option, and hardcode the behavior to the option's default value.
-rw-r--r--DOCS/man/en/options.rst8
-rw-r--r--cfg-mplayer.h1
-rw-r--r--mplayer.c1
-rw-r--r--sub/spudec.c10
-rw-r--r--sub/spudec.h1
-rw-r--r--sub/sub.c1
-rw-r--r--sub/sub.h1
7 files changed, 2 insertions, 21 deletions
diff --git a/DOCS/man/en/options.rst b/DOCS/man/en/options.rst
index dbd37c4c03..6a8b81cd7f 100644
--- a/DOCS/man/en/options.rst
+++ b/DOCS/man/en/options.rst
@@ -571,14 +571,6 @@
reliable enough), the filename extension is used to select the demuxer.
Always falls back on content-based demuxer selection.
---ffactor=<number>
- Resample the font alphamap. Can be:
-
- :0: plain white fonts
- :0.75: very narrow black outline (default)
- :1: narrow black outline
- :10: bold black outline
-
--field-dominance=<-1-1>
Set first field for interlaced content. Useful for deinterlacers that
double the framerate: ``--vf=tfields=1``, ``--vf=yadif=1`` and
diff --git a/cfg-mplayer.h b/cfg-mplayer.h
index b944b833e3..4ba1a75ca9 100644
--- a/cfg-mplayer.h
+++ b/cfg-mplayer.h
@@ -526,7 +526,6 @@ const m_option_t common_opts[] = {
{"sub-fuzziness", &sub_match_fuzziness, CONF_TYPE_INT, CONF_RANGE, 0, 2, NULL},
{"font", &font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
{"subfont", &sub_font_name, CONF_TYPE_STRING, 0, 0, 0, NULL},
- {"ffactor", &font_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0.0, 10.0, NULL},
{"sub-pos", &sub_pos, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL},
{"subfont-text-scale", &text_font_scale_factor, CONF_TYPE_FLOAT, CONF_RANGE, 0, 100, NULL},
OPT_MAKE_FLAGS("ass", ass_enabled, 0),
diff --git a/mplayer.c b/mplayer.c
index 6963471c0e..e078561f68 100644
--- a/mplayer.c
+++ b/mplayer.c
@@ -993,7 +993,6 @@ void init_vo_spudec(struct MPContext *mpctx)
sh_sub_t *sh = mpctx->sh_sub;
vo_spudec = spudec_new_scaled(NULL, width, height, sh->extradata,
sh->extradata_len);
- spudec_set_font_factor(vo_spudec, font_factor);
}
if (vo_spudec != NULL) {
diff --git a/sub/spudec.c b/sub/spudec.c
index d51f62c0fc..84b4113251 100644
--- a/sub/spudec.c
+++ b/sub/spudec.c
@@ -328,8 +328,8 @@ static void compute_palette(spudec_handle_t *this, packet_t *packet)
start = 0x80;
step = 0;
} else {
- start = this->font_start_level;
- step = (0xF0-this->font_start_level)/(cused-1);
+ start = 72;
+ step = (0xF0-start)/(cused-1);
}
memset(used, 0, sizeof(used));
for (i=0; i<4; i++) {
@@ -660,12 +660,6 @@ void spudec_get_indexed(void *this, struct mp_osd_res *dim,
}
}
-void spudec_set_font_factor(void * this, double factor)
-{
- spudec_handle_t *spu = this;
- spu->font_start_level = (int)(0xF0-(0xE0*factor));
-}
-
static void spudec_parse_extradata(spudec_handle_t *this,
uint8_t *extradata, int extradata_len)
{
diff --git a/sub/spudec.h b/sub/spudec.h
index 84a05cbee0..fa395798ac 100644
--- a/sub/spudec.h
+++ b/sub/spudec.h
@@ -32,7 +32,6 @@ void *spudec_new(unsigned int *palette);
void spudec_free(void *this);
void spudec_reset(void *this); // called after seek
int spudec_visible(void *this); // check if spu is visible
-void spudec_set_font_factor(void * this, double factor); // sets the equivalent to ffactor
int spudec_changed(void *this);
void spudec_set_forced_subs_only(void * const this, const unsigned int flag);
diff --git a/sub/sub.c b/sub/sub.c
index bba53c926f..029d902604 100644
--- a/sub/sub.c
+++ b/sub/sub.c
@@ -68,7 +68,6 @@ float text_font_scale_factor = 6;
char *font_name = NULL;
char *sub_font_name = NULL;
-float font_factor = 0.75;
float sub_delay = 0;
float sub_fps = 0;
diff --git a/sub/sub.h b/sub/sub.h
index 70adadcc70..4adf0a23d8 100644
--- a/sub/sub.h
+++ b/sub/sub.h
@@ -185,7 +185,6 @@ extern float text_font_scale_factor;
extern char *font_name;
extern char *sub_font_name;
-extern float font_factor;
extern float sub_delay;
extern float sub_fps;