diff options
author | wm4 <wm4@nowhere> | 2015-04-10 20:58:26 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-04-10 20:58:26 +0200 |
commit | b3495d9ccf5ad1d5d84284affed1083eee5887ee (patch) | |
tree | 8fa38799cd26ebf743b12357de92ef29366a4676 /video/filter | |
parent | cf55fa64710bdd5999b437f0cccdb036324ae11e (diff) | |
download | mpv-b3495d9ccf5ad1d5d84284affed1083eee5887ee.tar.bz2 mpv-b3495d9ccf5ad1d5d84284affed1083eee5887ee.tar.xz |
mp_image: remove redundant plane_w/h fields
Seems relatively painful in this case, but they are morally wrong.
Diffstat (limited to 'video/filter')
-rw-r--r-- | video/filter/vf_mirror.c | 5 |
1 files changed, 3 insertions, 2 deletions
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) { |