From 03596ac551c67cf66c962b1533feec49de18626d Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 7 Jul 2017 17:50:36 +0200 Subject: audio: drop AF_FORMAT_S24 This is the last sample format that was only in mpv and not in FFmpeg (except the spdif special formats). It was a huge pain, even if the removed code in af_lavrresample is pretty small after all. Note that this drops S24 from the ao_coreaudio AOs too. I'm not sure about the impact, but I expect it doesn't matter. af_fmt_change_bytes() was unused as well, so remove that too. --- audio/format.c | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'audio/format.c') diff --git a/audio/format.c b/audio/format.c index efbb605d98..9a0ebbee42 100644 --- a/audio/format.c +++ b/audio/format.c @@ -28,7 +28,6 @@ int af_fmt_to_bytes(int format) switch (af_fmt_from_planar(format)) { case AF_FORMAT_U8: return 1; case AF_FORMAT_S16: return 2; - case AF_FORMAT_S24: return 3; case AF_FORMAT_S32: return 4; case AF_FORMAT_FLOAT: return 4; case AF_FORMAT_DOUBLE: return 8; @@ -38,20 +37,6 @@ int af_fmt_to_bytes(int format) return 0; } -int af_fmt_change_bytes(int format, int bytes) -{ - if (!af_fmt_is_valid(format) || !bytes) - return 0; - for (int fmt = 1; fmt < AF_FORMAT_COUNT; fmt++) { - if (af_fmt_to_bytes(fmt) == bytes && - af_fmt_is_float(fmt) == af_fmt_is_float(format) && - af_fmt_is_planar(fmt) == af_fmt_is_planar(format) && - (fmt == format || (!af_fmt_is_spdif(fmt) && !af_fmt_is_spdif(format)))) - return fmt; - } - return 0; -} - // All formats are considered signed, except explicitly unsigned int formats. bool af_fmt_is_unsigned(int format) { @@ -130,7 +115,6 @@ const char *af_fmt_to_str(int format) switch (format) { case AF_FORMAT_U8: return "u8"; case AF_FORMAT_S16: return "s16"; - case AF_FORMAT_S24: return "s24"; case AF_FORMAT_S32: return "s32"; case AF_FORMAT_FLOAT: return "float"; case AF_FORMAT_DOUBLE: return "double"; -- cgit v1.2.3