summaryrefslogtreecommitdiffstats
path: root/video/out
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2012-12-27 01:27:59 +0100
committerwm4 <wm4@nowhere>2013-01-13 20:04:13 +0100
commit1800761a6501f2c39d65257f707de148a77bca47 (patch)
treea1eb9e047c4aec540ee84c1017f041c50db41aa5 /video/out
parent61e59cd92c779a4684ebfa554feacc0a4e8d3c78 (diff)
downloadmpv-1800761a6501f2c39d65257f707de148a77bca47.tar.bz2
mpv-1800761a6501f2c39d65257f707de148a77bca47.tar.xz
mp_image: remove mp_image.bpp
This field contained the "average" bit depth per pixel. It serves no purpose anymore. Remove it. Only vo_opengl_old still uses this in order to allocate a buffer that is shared between all planes.
Diffstat (limited to 'video/out')
-rw-r--r--video/out/vo_opengl_old.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/video/out/vo_opengl_old.c b/video/out/vo_opengl_old.c
index 5cfe306f8e..d010daacb9 100644
--- a/video/out/vo_opengl_old.c
+++ b/video/out/vo_opengl_old.c
@@ -610,7 +610,11 @@ static bool get_image(struct vo *vo, mp_image_t *mpi, int *th, bool *cplane)
width = p->texture_width;
height = p->texture_height;
}
- mpi->stride[0] = width * mpi->bpp / 8;
+ int avgbpp16 = 0;
+ for (int p = 0; p < 4; p++)
+ avgbpp16 += (16 * mpi->fmt.bpp[p]) >> mpi->fmt.xs[p] >> mpi->fmt.ys[p];
+ int avgbpp = avgbpp16 / 16;
+ mpi->stride[0] = width * avgbpp / 8;
needed_size = mpi->stride[0] * height;
if (!p->buffer)
gl->GenBuffers(1, &p->buffer);