diff options
author | wm4 <wm4@nowhere> | 2013-03-01 11:28:59 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2013-03-01 11:28:59 +0100 |
commit | 56149ff5ac9b5a287ed74e3bbe141c179a638dfc (patch) | |
tree | ac6c6fff708e09a4d627ad7c0a9bcf1783d67c27 /video/mp_image.c | |
parent | c9088fff86068f3fc983ec6944e648cdc3ebe0a3 (diff) | |
download | mpv-56149ff5ac9b5a287ed74e3bbe141c179a638dfc.tar.bz2 mpv-56149ff5ac9b5a287ed74e3bbe141c179a638dfc.tar.xz |
vf_flip: move flipping code to mp_image.c
Diffstat (limited to 'video/mp_image.c')
-rw-r--r-- | video/mp_image.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/video/mp_image.c b/video/mp_image.c index dd58f131a8..78becf28ea 100644 --- a/video/mp_image.c +++ b/video/mp_image.c @@ -399,6 +399,14 @@ void mp_image_clear(struct mp_image *img, int x0, int y0, int x1, int y1) } } +void mp_image_vflip(struct mp_image *img) +{ + for (int p = 0; p < img->num_planes; p++) { + img->planes[p] = img->planes[p] + img->stride[p] * (img->plane_h[p] - 1); + img->stride[p] = -img->stride[p]; + } +} + enum mp_csp mp_image_csp(struct mp_image *img) { if (img->colorspace != MP_CSP_AUTO) |