[vlc-commits] aout: drop support for S24N

Rémi Denis-Courmont git at videolan.org
Thu Dec 20 18:53:03 CET 2012


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Dec 20 19:52:48 2012 +0200| [21fcab35d353ec503362018b3002504fd07e102a] | committer: Rémi Denis-Courmont

aout: drop support for S24N

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=21fcab35d353ec503362018b3002504fd07e102a
---

 modules/audio_filter/converter/format.c |   55 -------------------------------
 modules/audio_output/oss.c              |    2 --
 modules/audio_output/sndio.c            |    3 --
 3 files changed, 60 deletions(-)

diff --git a/modules/audio_filter/converter/format.c b/modules/audio_filter/converter/format.c
index ea08b73..fbcf651 100644
--- a/modules/audio_filter/converter/format.c
+++ b/modules/audio_filter/converter/format.c
@@ -190,26 +190,6 @@ static block_t *S16toU8(filter_t *filter, block_t *b)
     return b;
 }
 
-static block_t *S24toS16(filter_t *filter, block_t *b)
-{
-    VLC_UNUSED(filter);
-    uint8_t *src = (uint8_t *)b->p_buffer;
-    uint8_t *dst = (uint8_t *)src;
-    for (int i = b->i_buffer / 3; i--;) {
-#ifdef WORDS_BIGENDIAN
-        *dst++ = *src++;
-        *dst++ = *src++;
-        src++;
-#else
-        src++;
-        *dst++ = *src++;
-        *dst++ = *src++;
-#endif
-    }
-
-    b->i_buffer = b->i_buffer * 2 / 3;
-    return b;
-}
 static block_t *S32toS16(filter_t *filter, block_t *b)
 {
     VLC_UNUSED(filter);
@@ -313,23 +293,6 @@ static void U8toS16(block_t *bdst, const block_t *bsrc)
         *dst++ = ((*src++) - 128) << 8;
 }
 
-static void S16toS24(block_t *bdst, const block_t *bsrc)
-{
-    uint8_t *src = (uint8_t *)bsrc->p_buffer;
-    uint8_t *dst = (uint8_t *)bdst->p_buffer;
-
-    for (int i = bsrc->i_buffer / 2; i--;) {
-#ifdef WORDS_BIGENDIAN
-        *dst++ = *src++;
-        *dst++ = *src++;
-        *dst++ = 0;
-#else
-        *dst++ = 0;
-        *dst++ = *src++;
-        *dst++ = *src++;
-#endif
-    }
-}
 static void S16toS32(block_t *bdst, const block_t *bsrc)
 {
     int16_t *src = (int16_t *)bsrc->p_buffer;
@@ -355,20 +318,6 @@ static void S16toFl32(block_t *bdst, const block_t *bsrc)
 #endif
     }
 }
-static void S24toFl32(block_t *bdst, const block_t *bsrc)
-{
-    uint8_t *src = bsrc->p_buffer;
-    float   *dst = (float *)bdst->p_buffer;
-    for (int i = bsrc->i_buffer / 3; i--;) {
-#ifdef WORDS_BIGENDIAN
-        int32_t v = (src[0] << 24) | (src[1] << 16) | (src[2] <<  8);
-#else
-        int32_t v = (src[0] <<  8) | (src[1] << 16) | (src[2] << 24);
-#endif
-        src += 3;
-        *dst++ = v / 2147483648.0;
-    }
-}
 
 /* */
 static const struct {
@@ -381,7 +330,6 @@ static const struct {
     { VLC_CODEC_FI32, VLC_CODEC_S16N,   Fi32toS16 },
     { VLC_CODEC_S32N, VLC_CODEC_FL32,   S32toFl32 },
 
-    { VLC_CODEC_S24N, VLC_CODEC_S16N,   S24toS16 },
     { VLC_CODEC_S32N, VLC_CODEC_S16N,   S32toS16 },
     { VLC_CODEC_FL32, VLC_CODEC_S16N,   Fl32toS16 },
 
@@ -395,9 +343,6 @@ static const struct {
     vlc_fourcc_t   dst;
     cvt_indirect_t convert;
 } cvt_indirects[] = {
-    { VLC_CODEC_S24N, VLC_CODEC_FL32, S24toFl32 },
-
-    { VLC_CODEC_S16N, VLC_CODEC_S24N, S16toS24 },
     { VLC_CODEC_S16N, VLC_CODEC_S32N, S16toS32 },
     { VLC_CODEC_S16N, VLC_CODEC_FL32, S16toFl32 },
 
diff --git a/modules/audio_output/oss.c b/modules/audio_output/oss.c
index 5c98c30..2318eda 100644
--- a/modules/audio_output/oss.c
+++ b/modules/audio_output/oss.c
@@ -148,8 +148,6 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
     {
         case AFMT_U8:     fmt->i_format = VLC_CODEC_U8;   break;
         case AFMT_S16_NE: fmt->i_format = VLC_CODEC_S16N; break;
-        //case AFMT_S24_BE:
-        //case AFMT_S24_LE:
         case AFMT_S32_NE: fmt->i_format = VLC_CODEC_S32N; break;
 #ifdef AFMT_FLOAT
         case AFMT_FLOAT:  fmt->i_format = VLC_CODEC_FL32; break;
diff --git a/modules/audio_output/sndio.c b/modules/audio_output/sndio.c
index db13812..7f121dc 100644
--- a/modules/audio_output/sndio.c
+++ b/modules/audio_output/sndio.c
@@ -124,9 +124,6 @@ static int Start (audio_output_t *aout, audio_sample_format_t *restrict fmt)
         case 16:
             fmt->i_format = VLC_CODEC_S16N;
             break;
-        case 24:
-            fmt->i_format = VLC_CODEC_S24N;
-            break;
         case 32:
             fmt->i_format = VLC_CODEC_S32N;
             break;



More information about the vlc-commits mailing list