summaryrefslogtreecommitdiffstats
path: root/video/decode
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-12-05 22:55:35 +0100
committerwm4 <wm4@nowhere>2013-12-05 22:58:54 +0100
commit66e20ef8ad0c3e3ce420f08fa7849000a4cc060a (patch)
tree0ddad02966c4b878cd02e745dcd30158ad0108d2 /video/decode
parentb2c4653b8841dba16e0dcc38fd49f9ae5b1166ff (diff)
downloadmpv-66e20ef8ad0c3e3ce420f08fa7849000a4cc060a.tar.bz2
mpv-66e20ef8ad0c3e3ce420f08fa7849000a4cc060a.tar.xz
video: remove --flip
The --flip option flipped the image upside-down, by trying to use VO support, or if not available, by inserting a video filter. I'm not sure why it existed. Maybe it was important in ancient times when VfW based decoders output an image this way (but even then, flipping an image is a free operation by negating the stride). One nice thing about this is that it provided a possible path for implementing video orientation, which is a feature we should probably support eventually. The important part is that it would be for free for VOs that support it, and would work even with hardware decoding. But for now get rid of it. It's useless, trivial, stands in the way, and supporting video orientation would require solving other problems first.
Diffstat (limited to 'video/decode')
-rw-r--r--video/decode/dec_video.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/video/decode/dec_video.c b/video/decode/dec_video.c
index bfdeb2c3a7..7b7f7f73fc 100644
--- a/video/decode/dec_video.c
+++ b/video/decode/dec_video.c
@@ -384,7 +384,6 @@ int mpcodecs_reconfig_vo(struct dec_video *d_video,
{
struct MPOpts *opts = d_video->opts;
vf_instance_t *vf = d_video->vfilter;
- int vocfg_flags = 0;
struct mp_image_params p = *params;
struct sh_video *sh = d_video->header->video;
@@ -429,15 +428,6 @@ int mpcodecs_reconfig_vo(struct dec_video *d_video,
}
d_video->vfilter = vf;
- // autodetect flipping
- bool flip = opts->flip;
- if (flip && !(flags & VFCAP_FLIP)) {
- // we need to flip, but no flipping filter avail.
- vf_add_before_vo(&vf, "flip", NULL);
- d_video->vfilter = vf;
- flip = false;
- }
-
float decoder_aspect = p.d_w / (float)p.d_h;
if (d_video->initial_decoder_aspect == 0)
d_video->initial_decoder_aspect = decoder_aspect;
@@ -479,13 +469,11 @@ int mpcodecs_reconfig_vo(struct dec_video *d_video,
// Make sure the user-overrides are consistent (no RGB csp for YUV, etc.).
mp_image_params_guess_csp(&p);
- vocfg_flags = (flip ? VOFLAG_FLIPPING : 0);
-
// Time to config libvo!
- mp_msg(MSGT_CPLAYER, MSGL_V, "VO Config (%dx%d->%dx%d,flags=%d,0x%X)\n",
- p.w, p.h, p.d_w, p.d_h, vocfg_flags, p.imgfmt);
+ mp_msg(MSGT_CPLAYER, MSGL_V, "VO Config (%dx%d->%dx%d,0x%X)\n",
+ p.w, p.h, p.d_w, p.d_h, p.imgfmt);
- if (vf_reconfig_wrapper(vf, &p, vocfg_flags) < 0) {
+ if (vf_reconfig_wrapper(vf, &p, 0) < 0) {
mp_tmsg(MSGT_CPLAYER, MSGL_WARN, "FATAL: Cannot initialize video driver.\n");
d_video->vf_initialized = -1;
return -1;