From b3495d9ccf5ad1d5d84284affed1083eee5887ee Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 10 Apr 2015 20:58:26 +0200 Subject: mp_image: remove redundant plane_w/h fields Seems relatively painful in this case, but they are morally wrong. --- video/filter/vf_mirror.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'video/filter') diff --git a/video/filter/vf_mirror.c b/video/filter/vf_mirror.c index 90316b2be9..3b4138c535 100644 --- a/video/filter/vf_mirror.c +++ b/video/filter/vf_mirror.c @@ -63,10 +63,11 @@ static struct mp_image *filter(struct vf_instance *vf, struct mp_image *mpi) mp_image_copy_attributes(dmpi, mpi); for (int p = 0; p < mpi->num_planes; p++) { - for (int y = 0; y < mpi->plane_h[p]; y++) { + int plane_h = mp_image_plane_h(mpi, p); + for (int y = 0; y < plane_h; y++) { void *p_src = mpi->planes[p] + mpi->stride[p] * y; void *p_dst = dmpi->planes[p] + dmpi->stride[p] * y; - int w = dmpi->plane_w[p]; + int w = mp_image_plane_w(dmpi, p); if (mpi->imgfmt == IMGFMT_YUYV) { mirror_4_m(p_dst, p_src, w / 2, 2, 1, 0, 3); } else if (mpi->imgfmt == IMGFMT_UYVY) { -- cgit v1.2.3