summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2013-03-14 15:53:51 +0100
committerwm4 <wm4@nowhere>2013-03-17 19:07:29 +0100
commit36f5d800d5c63f4b19e4d9a28c5cf73e2e0466fe (patch)
treed70e6ae79556ab02581d56b8c67a5d6dfa78e2a0 /video
parent5b6da6e286d96d48ce79bbb08dfba3fcc6684eb9 (diff)
downloadmpv-36f5d800d5c63f4b19e4d9a28c5cf73e2e0466fe.tar.bz2
mpv-36f5d800d5c63f4b19e4d9a28c5cf73e2e0466fe.tar.xz
vo_x11: accept all swscale formats
There's no reason why there should be a separate vf_scale stage.
Diffstat (limited to 'video')
-rw-r--r--video/out/vo_x11.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/video/out/vo_x11.c b/video/out/vo_x11.c
index 1cff7bee1a..35ba66dbb6 100644
--- a/video/out/vo_x11.c
+++ b/video/out/vo_x11.c
@@ -47,8 +47,7 @@
#include "sub/draw_bmp.h"
#include "video/sws_utils.h"
-#define MODE_RGB 0x1
-#define MODE_BGR 0x2
+#include "video/fmt-conversion.h"
#include "core/mp_msg.h"
#include "core/options.h"
@@ -514,7 +513,10 @@ static void draw_image(struct vo *vo, mp_image_t *mpi)
wait_for_completion(vo, p->num_buffers - 1);
struct mp_image src = *mpi;
- mp_image_crop_rc(&src, p->src);
+ struct mp_rect src_rc = p->src;
+ src_rc.x0 = MP_ALIGN_DOWN(src_rc.x0, src.fmt.align_x);
+ src_rc.y0 = MP_ALIGN_DOWN(src_rc.y0, src.fmt.align_y);
+ mp_image_crop_rc(&src, src_rc);
dstStride[0] = p->image_width * ((p->bpp + 7) / 8);
dst[0] = p->ImageData[p->current_buf];
@@ -553,10 +555,8 @@ static int query_format(struct vo *vo, uint32_t format)
}
}
- switch (format) {
- case IMGFMT_420P:
+ if (sws_isSupportedInput(imgfmt2pixfmt(format)))
return VFCAP_CSP_SUPPORTED;
- }
return 0;
}