[vlc-devel] [PATCH 01/19] aout: move documentation to vlc_aout.h

Marvin Scholz epirat07 at gmail.com
Mon Jul 27 16:28:55 CEST 2020


Overall the patchset looks good to me now.

Any other opinions?

On 23 Jul 2020, at 15:18, Kartik Ohri wrote:

> Move documentation for VLC API methods aout_ChannelReorder,
> aout_Interleave and aout_Deinterleave from
> src/audio_output/common.c to include/vlc_aout.h.
> ---
>  include/vlc_aout.h        | 33 +++++++++++++++++++++++++++++++++
>  src/audio_output/common.c | 31 -------------------------------
>  2 files changed, 33 insertions(+), 31 deletions(-)
>
> diff --git a/include/vlc_aout.h b/include/vlc_aout.h
> index 49527f30fb..0125b059ee 100644
> --- a/include/vlc_aout.h
> +++ b/include/vlc_aout.h
> @@ -336,11 +336,44 @@ static const uint32_t pi_vlc_chan_order_wg4[] =
>   */
>  VLC_API unsigned aout_CheckChannelReorder( const uint32_t *, const 
> uint32_t *,
>                                             uint32_t mask, uint8_t 
> *table );
> +
> +/**
> + * Reorders audio samples within a block of linear audio interleaved 
> samples.
> + * \param ptr start address of the block of samples
> + * \param bytes size of the block in bytes (must be a multiple of the 
> product
> + *              of the channels count and the sample size)
> + * \param channels channels count (also length of the chans_table 
> table)
> + * \param chans_table permutation table to reorder the channels
> + *                    (usually computed by 
> aout_CheckChannelReorder())
> + * \param fourcc sample format (must be a linear sample format)
> + * \note The samples must be naturally aligned in memory.
> + */
>  VLC_API void aout_ChannelReorder(void *, size_t, uint8_t, const 
> uint8_t *, vlc_fourcc_t);
>
> +/**
> + * Interleaves audio samples within a block of samples.
> + * \param dst destination buffer for interleaved samples
> + * \param srcv source buffers (one per plane) of uninterleaved 
> samples
> + * \param samples number of samples (per channel/per plane)
> + * \param chans channels/planes count
> + * \param fourcc sample format (must be a linear sample format)
> + * \note The samples must be naturally aligned in memory.
> + * \warning Destination and source buffers MUST NOT overlap.
> + */
>  VLC_API void aout_Interleave(void *dst, const void *const *planes,
>                               unsigned samples, unsigned channels,
>                               vlc_fourcc_t fourcc);
> +
> +/**
> + * Deinterleaves audio samples within a block of samples.
> + * \param dst destination buffer for planar samples
> + * \param src source buffer with interleaved samples
> + * \param samples number of samples (per channel/per plane)
> + * \param chans channels/planes count
> + * \param fourcc sample format (must be a linear sample format)
> + * \note The samples must be naturally aligned in memory.
> + * \warning Destination and source buffers MUST NOT overlap.
> + */
>  VLC_API void aout_Deinterleave(void *dst, const void *src, unsigned 
> samples,
>                               unsigned channels, vlc_fourcc_t fourcc);
>
> diff --git a/src/audio_output/common.c b/src/audio_output/common.c
> index 9ed3a82546..64a7f683a1 100644
> --- a/src/audio_output/common.c
> +++ b/src/audio_output/common.c
> @@ -286,17 +286,6 @@ unsigned aout_CheckChannelReorder( const uint32_t 
> *chans_in,
>      return 0;
>  }
>
> -/**
> - * Reorders audio samples within a block of linear audio interleaved 
> samples.
> - * \param ptr start address of the block of samples
> - * \param bytes size of the block in bytes (must be a multiple of the 
> product
> - *              of the channels count and the sample size)
> - * \param channels channels count (also length of the chans_table 
> table)
> - * \param chans_table permutation table to reorder the channels
> - *                    (usually computed by 
> aout_CheckChannelReorder())
> - * \param fourcc sample format (must be a linear sample format)
> - * \note The samples must be naturally aligned in memory.
> - */
>  void aout_ChannelReorder( void *ptr, size_t bytes, uint8_t channels,
>                            const uint8_t *restrict chans_table, 
> vlc_fourcc_t fourcc )
>  {
> @@ -353,16 +342,6 @@ do { \
>      }
>  }
>
> -/**
> - * Interleaves audio samples within a block of samples.
> - * \param dst destination buffer for interleaved samples
> - * \param srcv source buffers (one per plane) of uninterleaved 
> samples
> - * \param samples number of samples (per channel/per plane)
> - * \param chans channels/planes count
> - * \param fourcc sample format (must be a linear sample format)
> - * \note The samples must be naturally aligned in memory.
> - * \warning Destination and source buffers MUST NOT overlap.
> - */
>  void aout_Interleave( void *restrict dst, const void *const *srcv,
>                        unsigned samples, unsigned chans, vlc_fourcc_t 
> fourcc )
>  {
> @@ -389,16 +368,6 @@ do { \
>  #undef INTERLEAVE_TYPE
>  }
>
> -/**
> - * Deinterleaves audio samples within a block of samples.
> - * \param dst destination buffer for planar samples
> - * \param src source buffer with interleaved samples
> - * \param samples number of samples (per channel/per plane)
> - * \param chans channels/planes count
> - * \param fourcc sample format (must be a linear sample format)
> - * \note The samples must be naturally aligned in memory.
> - * \warning Destination and source buffers MUST NOT overlap.
> - */
>  void aout_Deinterleave( void *restrict dst, const void *restrict src,
>                        unsigned samples, unsigned chans, vlc_fourcc_t 
> fourcc )
>  {
> -- 
> 2.25.1
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list