summaryrefslogtreecommitdiffstats
path: root/libmpcodecs
diff options
context:
space:
mode:
authorUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-24 07:28:20 +0300
committerUoti Urpala <uau@symbol.nonexistent.invalid>2008-04-25 03:34:28 +0300
commit0a39709c15890161388e6d32cceea2ff3350aa82 (patch)
tree054f1e27ea4b7ae17ea9716f7ef8b83506a9a89c /libmpcodecs
parentb14909a955259c3b9c3494a5096ceed81397926c (diff)
downloadmpv-0a39709c15890161388e6d32cceea2ff3350aa82.tar.bz2
mpv-0a39709c15890161388e6d32cceea2ff3350aa82.tar.xz
Move screen_size_xy to options struct
Diffstat (limited to 'libmpcodecs')
-rw-r--r--libmpcodecs/vd.c15
-rw-r--r--libmpcodecs/vf_scale.c4
2 files changed, 8 insertions, 11 deletions
diff --git a/libmpcodecs/vd.c b/libmpcodecs/vd.c
index b475f848e3..3f25e7642e 100644
--- a/libmpcodecs/vd.c
+++ b/libmpcodecs/vd.c
@@ -111,7 +111,6 @@ vd_functions_t* mpcodecs_vd_drivers[] = {
#include "libvo/video_out.h"
// libvo opts:
-float screen_size_xy=0;
float movie_aspect=-1.0;
int vo_flags=0;
int vd_use_slices=1;
@@ -260,15 +259,15 @@ csp_again:
// check source format aspect, calculate prescale ::atmos
screen_size_x=sh->disp_w;
screen_size_y=sh->disp_h;
- if(screen_size_xy>=0.001){
- if(screen_size_xy<=8){
+ if(opts->screen_size_xy>=0.001){
+ if(opts->screen_size_xy<=8){
// -xy means x+y scale
- screen_size_x*=screen_size_xy;
- screen_size_y*=screen_size_xy;
+ screen_size_x*=opts->screen_size_xy;
+ screen_size_y*=opts->screen_size_xy;
} else {
// -xy means forced width while keeping correct aspect
- screen_size_x=screen_size_xy;
- screen_size_y=screen_size_xy*sh->disp_h/sh->disp_w;
+ screen_size_x=opts->screen_size_xy;
+ screen_size_y=opts->screen_size_xy*sh->disp_h/sh->disp_w;
}
}
if(sh->aspect>0.01){
@@ -277,7 +276,7 @@ csp_again:
mp_msg(MSGT_IDENTIFY, MSGL_INFO, "ID_VIDEO_ASPECT=%1.4f\n", sh->aspect);
w=(int)((float)screen_size_y*sh->aspect); w+=w%2; // round
// we don't like horizontal downscale || user forced width:
- if(w<screen_size_x || screen_size_xy>8){
+ if(w<screen_size_x || opts->screen_size_xy>8){
screen_size_y=(int)((float)screen_size_x*(1.0/sh->aspect));
screen_size_y+=screen_size_y%2; // round
} else screen_size_x=w; // keep new width
diff --git a/libmpcodecs/vf_scale.c b/libmpcodecs/vf_scale.c
index fe8632b2ec..d3ec57769c 100644
--- a/libmpcodecs/vf_scale.c
+++ b/libmpcodecs/vf_scale.c
@@ -42,8 +42,6 @@ static struct vf_priv_s {
NULL
};
-extern float screen_size_xy;
-
//===========================================================================//
void sws_getFlagsAndFilterFromCmdLine(int *flags, SwsFilter **srcFilterParam, SwsFilter **dstFilterParam);
@@ -297,7 +295,7 @@ static int config(struct vf_instance* vf,
}
if (!opts->screen_size_x && !opts->screen_size_y
- && !(screen_size_xy >= 0.001)) {
+ && !(opts->screen_size_xy >= 0.001)) {
// Compute new d_width and d_height, preserving aspect
// while ensuring that both are >= output size in pixels.
if (vf->priv->h * d_width > vf->priv->w * d_height) {