diff options
author | wm4 <wm4@nowhere> | 2017-07-07 17:50:36 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-07-07 17:56:22 +0200 |
commit | 03596ac551c67cf66c962b1533feec49de18626d (patch) | |
tree | cfb850e97e0d90d00a71be24a39bba57c65df08f /audio/format.c | |
parent | 300097536d1de5beea286e8c8b492370333462b0 (diff) | |
download | mpv-03596ac551c67cf66c962b1533feec49de18626d.tar.bz2 mpv-03596ac551c67cf66c962b1533feec49de18626d.tar.xz |
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.
Diffstat (limited to 'audio/format.c')
-rw-r--r-- | audio/format.c | 16 |
1 files changed, 0 insertions, 16 deletions
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"; |