From 41151122e73f82d0bc9a806c80165878e930dc07 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 10 Apr 2015 21:02:16 +0200 Subject: mp_image: remove redundant chroma_x/y_shift fields --- video/filter/vf_dlopen.c | 8 ++++---- video/filter/vf_eq.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'video/filter') diff --git a/video/filter/vf_dlopen.c b/video/filter/vf_dlopen.c index 00e6245a2e..0424e83a61 100644 --- a/video/filter/vf_dlopen.c +++ b/video/filter/vf_dlopen.c @@ -82,11 +82,11 @@ static void set_imgprop(struct vf_dlopen_picdata *out, const mp_image_t *mpi) out->plane[i] = mpi->planes[i]; out->planestride[i] = mpi->stride[i]; out->planewidth[i] = - i ? (/*mpi->chroma_width*/ mpi->w >> mpi->chroma_x_shift) : mpi->w; + i ? (/*mpi->chroma_width*/ mpi->w >> mpi->fmt.chroma_xs) : mpi->w; out->planeheight[i] = - i ? (/*mpi->chroma_height*/ mpi->h >> mpi->chroma_y_shift) : mpi->h; - out->planexshift[i] = i ? mpi->chroma_x_shift : 0; - out->planeyshift[i] = i ? mpi->chroma_y_shift : 0; + i ? (/*mpi->chroma_height*/ mpi->h >> mpi->fmt.chroma_ys) : mpi->h; + out->planexshift[i] = i ? mpi->fmt.chroma_xs : 0; + out->planeyshift[i] = i ? mpi->fmt.chroma_ys : 0; } } diff --git a/video/filter/vf_eq.c b/video/filter/vf_eq.c index 3381f248f7..deacfff0e6 100644 --- a/video/filter/vf_eq.c +++ b/video/filter/vf_eq.c @@ -191,8 +191,8 @@ static struct mp_image *filter(struct vf_instance *vf, struct mp_image *src) if ((eq2->buf_w[0] != src->w) || (eq2->buf_h[0] != src->h)) { eq2->buf_w[0] = src->w; eq2->buf_h[0] = src->h; - eq2->buf_w[1] = eq2->buf_w[2] = src->w >> src->chroma_x_shift; - eq2->buf_h[1] = eq2->buf_h[2] = src->h >> src->chroma_y_shift; + eq2->buf_w[1] = eq2->buf_w[2] = src->w >> src->fmt.chroma_xs; + eq2->buf_h[1] = eq2->buf_h[2] = src->h >> src->fmt.chroma_ys; img_n = eq2->buf_w[0]*eq2->buf_h[0]; if(src->num_planes>1){ img_c = eq2->buf_w[1]*eq2->buf_h[1]; -- cgit v1.2.3