summaryrefslogtreecommitdiffstats
path: root/video/img_format.c
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/img_format.c
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/img_format.c')
-rw-r--r--video/img_format.c8
1 files changed, 0 insertions, 8 deletions
diff --git a/video/img_format.c b/video/img_format.c
index 3427bb49d2..0e35fd72a5 100644
--- a/video/img_format.c
+++ b/video/img_format.c
@@ -158,8 +158,6 @@ static struct mp_imgfmt_desc get_avutil_fmt(enum PixelFormat fmt)
};
int planedepth[4] = {0};
- int xs[4] = {0, pd->log2_chroma_w, pd->log2_chroma_w, 0};
- int ys[4] = {0, pd->log2_chroma_h, pd->log2_chroma_h, 0};
int el_size = (pd->flags & PIX_FMT_BITSTREAM) ? 1 : 8;
for (int c = 0; c < pd->nb_components; c++) {
AVComponentDescriptor d = pd->comp[c];
@@ -169,12 +167,6 @@ static struct mp_imgfmt_desc get_avutil_fmt(enum PixelFormat fmt)
planedepth[d.plane] += d.depth_minus1 + 1;
}
- int avgbpp16 = 0;
- for (int p = 0; p < 4; p++)
- avgbpp16 += (16 * desc.bpp[p]) >> xs[p] >> ys[p];
- desc.avg_bpp = avgbpp16 / 16;
- //assert(desc.avg_bpp == av_get_padded_bits_per_pixel(pd));
-
for (int p = 0; p < 4; p++) {
if (desc.bpp[p])
desc.num_planes++;