[vlc-commits] [Git][videolan/vlc][master] 3 commits: mux/wav: remove unused define

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Thu Jul 6 11:54:03 UTC 2023



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
7b07c85f by Ilkka Ollakka at 2023-07-06T10:53:06+00:00
mux/wav: remove unused define

- - - - -
7d1bd61e by Ilkka Ollakka at 2023-07-06T10:53:06+00:00
mux/wav: fix channel ordering

Previously it muxed channels in incorrect order.

Remove unneeded arrays and use already defined one in demuxer-side.

WAVE-mapping don't match AOUT_CHAN mapping, so simpler to use
AOUT_CHAN_* mapping than trying to check how get reordering work with
WAVE_*.

- - - - -
bf70d6aa by Ilkka Ollakka at 2023-07-06T10:53:06+00:00
mux/wav: cleanup channel mapping loop

with previous code, it only handled 6 channels

- - - - -


1 changed file:

- modules/mux/wav.c


Changes:

=====================================
modules/mux/wav.c
=====================================
@@ -35,6 +35,8 @@
 #include <vlc_block.h>
 #include <vlc_codecs.h>
 
+#include "../demux/windows_audio_commons.h"
+
 /*****************************************************************************
  * Module descriptor
  *****************************************************************************/
@@ -57,7 +59,6 @@ static int AddStream( sout_mux_t *, sout_input_t * );
 static void DelStream( sout_mux_t *, sout_input_t * );
 static int Mux      ( sout_mux_t * );
 
-#define MAX_CHANNELS 6
 
 typedef struct
 {
@@ -77,18 +78,6 @@ typedef struct
     uint8_t pi_chan_table[AOUT_CHAN_MAX];
 } sout_mux_sys_t;
 
-static const uint32_t pi_channels_in[] =
-    { WAVE_SPEAKER_FRONT_LEFT, WAVE_SPEAKER_FRONT_RIGHT,
-      WAVE_SPEAKER_SIDE_LEFT, WAVE_SPEAKER_SIDE_RIGHT,
-      WAVE_SPEAKER_BACK_LEFT, WAVE_SPEAKER_BACK_RIGHT, WAVE_SPEAKER_BACK_CENTER,
-      WAVE_SPEAKER_FRONT_CENTER, WAVE_SPEAKER_LOW_FREQUENCY, 0 };
-static const uint32_t pi_channels_out[] =
-    { WAVE_SPEAKER_FRONT_LEFT, WAVE_SPEAKER_FRONT_RIGHT,
-      WAVE_SPEAKER_FRONT_CENTER, WAVE_SPEAKER_LOW_FREQUENCY,
-      WAVE_SPEAKER_BACK_LEFT, WAVE_SPEAKER_BACK_RIGHT,
-      WAVE_SPEAKER_BACK_CENTER,
-      WAVE_SPEAKER_SIDE_LEFT, WAVE_SPEAKER_SIDE_RIGHT, 0 };
-
 /*****************************************************************************
  * Open:
  *****************************************************************************/
@@ -174,12 +163,12 @@ static int AddStream( sout_mux_t *p_mux, sout_input_t *p_input )
     p_sys->i_channel_mask = 0;
     if( p_input->p_fmt->audio.i_physical_channels )
     {
-        for( unsigned i = 0; i < pi_vlc_chan_order_wg4[i]; i++ )
+        for( unsigned i = 0; pi_vlc_chan_order_wg4[i]; i++ )
             if( p_input->p_fmt->audio.i_physical_channels & pi_vlc_chan_order_wg4[i])
-                p_sys->i_channel_mask |= pi_channels_in[i];
+                p_sys->i_channel_mask |= pi_vlc_chan_order_wg4[i];
 
         p_sys->i_chans_to_reorder =
-            aout_CheckChannelReorder( pi_channels_in, pi_channels_out,
+            aout_CheckChannelReorder( NULL, pi_channels_aout,
                                       p_sys->i_channel_mask,
                                       p_sys->pi_chan_table );
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8b96a63e5926625603d8ffcbc00ee437aa21fafd...bf70d6aa232abcd22f66cc19b6954f001506eb77

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/8b96a63e5926625603d8ffcbc00ee437aa21fafd...bf70d6aa232abcd22f66cc19b6954f001506eb77
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list