diff options
author | wm4 <wm4@nowhere> | 2016-12-07 19:44:29 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-12-07 19:53:11 +0100 |
commit | 3eceac2eab0b42ee082a0b615ebf40a21f0fb915 (patch) | |
tree | a7f719897b49f44006d44a1efcdab3b8d203aad8 /video/img_format.c | |
parent | a660e15c9b96bd46209e78b3c3d4cf136a039a50 (diff) | |
download | mpv-3eceac2eab0b42ee082a0b615ebf40a21f0fb915.tar.bz2 mpv-3eceac2eab0b42ee082a0b615ebf40a21f0fb915.tar.xz |
Remove compatibility things
Possible with bumped FFmpeg/Libav.
These are just the simple cases.
Diffstat (limited to 'video/img_format.c')
-rw-r--r-- | video/img_format.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/video/img_format.c b/video/img_format.c index 24545a8501..0232f53890 100644 --- a/video/img_format.c +++ b/video/img_format.c @@ -161,21 +161,14 @@ struct mp_imgfmt_desc mp_imgfmt_get_desc(int mpfmt) int shift = -1; // shift for all components, or -1 if not uniform for (int c = 0; c < pd->nb_components; c++) { AVComponentDescriptor d = pd->comp[c]; -#if HAVE_AV_NEW_PIXDESC - int depth = d.depth; - int step = d.step; -#else - int depth = d.depth_minus1 + 1; - int step = d.step_minus1 + 1; -#endif // multiple components per plane -> Y is definitive, ignore chroma if (!desc.bpp[d.plane]) - desc.bpp[d.plane] = step * el_size; - planedepth[d.plane] += depth; - need_endian |= (depth + d.shift) > 8; + desc.bpp[d.plane] = d.step * el_size; + planedepth[d.plane] += d.depth; + need_endian |= (d.depth + d.shift) > 8; if (c == 0) - desc.component_bits = depth; - if (depth != desc.component_bits) + desc.component_bits = d.depth; + if (d.depth != desc.component_bits) desc.component_bits = 0; if (c == 0) shift = d.shift; |