[FFmpeg-devel] [PATCH 07/10] swr: start doxycommenting the API.

Michael Niedermayer michaelni at gmx.at
Thu Nov 17 02:59:35 CET 2011


On Wed, Nov 16, 2011 at 09:50:54PM +0100, Clément Bœsch wrote:
> ---
>  libswresample/swresample_internal.h |   82 +++++++++++++++++++----------------
>  1 files changed, 45 insertions(+), 37 deletions(-)
> 
> diff --git a/libswresample/swresample_internal.h b/libswresample/swresample_internal.h
> index f1f548a..871424e 100644
> --- a/libswresample/swresample_internal.h
> +++ b/libswresample/swresample_internal.h
> @@ -24,50 +24,57 @@
>  #include "swresample.h"
>  
>  typedef struct AudioData{
> -    uint8_t *ch[SWR_CH_MAX];
> -    uint8_t *data;
> -    int ch_count;
> -    int bps;
> -    int count;
> -    int planar;
> +    uint8_t *ch[SWR_CH_MAX];    ///< samples buffer per channel
> +    uint8_t *data;              ///< samples buffer
> +    int ch_count;               ///< number of channels
> +    int bps;                    ///< bytes per sample
> +    int count;                  ///< number of samples
> +    int planar;                 ///< 1 if planar audio, 0 otherwise
>  } AudioData;
>  
> -typedef struct SwrContext {          //FIXME find unused fields
> -    const AVClass *av_class;
> -    int log_level_offset;
> -    void *log_ctx;
> -    enum AVSampleFormat  in_sample_fmt;
> -    enum AVSampleFormat int_sample_fmt; ///<AV_SAMPLE_FMT_FLT OR AV_SAMPLE_FMT_S16
> -    enum AVSampleFormat out_sample_fmt;
> -    int64_t  in_ch_layout;
> -    int64_t out_ch_layout;
> -    int      in_sample_rate;
> -    int     out_sample_rate;
> -    int flags;
> -    float slev, clev, rematrix_volume;
> -    const int *channel_map;             ///< channel index (or -1 if muted channel) map
> -    int used_ch_count;                  ///< number of used channels (mapped channel count if channel_map, otherwise in.ch_count)
> +typedef struct SwrContext {
> +    const AVClass *av_class;                        ///< AVClass used for AVOption and av_log()
> +    int log_level_offset;                           ///< logging level offset

> +    void *log_ctx;                                  ///< logging context

parent loging context


> +    enum AVSampleFormat  in_sample_fmt;             ///< input sample format
> +    enum AVSampleFormat int_sample_fmt;             ///< internal sample format (AV_SAMPLE_FMT_FLT or AV_SAMPLE_FMT_S16)
> +    enum AVSampleFormat out_sample_fmt;             ///< output sample format
> +    int64_t  in_ch_layout;                          ///< input channel layout
> +    int64_t out_ch_layout;                          ///< output channel layout
> +    int      in_sample_rate;                        ///< input sample rate
> +    int     out_sample_rate;                        ///< output sample rate
> +    int flags;                                      ///< miscellaneous flags such as SWR_FLAG_RESAMPLE
> +    float slev;                                     ///< surround mixing level, XXX: unused
> +    float clev;                                     ///< center mixing level

> +    float rematrix_volume;                          ///< used to set a different rematrixing volume than 1.0

rematrixing sometimes has to reduce the volume to avoid overflow so 1.0 is not always teh default


> +    const int *channel_map;                         ///< channel index (or -1 if muted channel) map
> +    int used_ch_count;                              ///< number of used channels (mapped channel count if channel_map, otherwise in.ch_count)

number of used input channels


[...]

> +    float   matrix   [SWR_CH_MAX][SWR_CH_MAX  ];    ///< float channel levels squared matrix for rematrixing
> +    int32_t matrix32 [SWR_CH_MAX][SWR_CH_MAX  ];    ///< integer channel levels squared matrix for rematrixing
> +    uint8_t matrix_ch[SWR_CH_MAX][SWR_CH_MAX+1];    ///< channel matrix for rematrixing

these sound non ideal, i suggest to leave it to a later patch

the rest sounded ok to me


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Many that live deserve death. And some that die deserve life. Can you give
it to them? Then do not be too eager to deal out death in judgement. For
even the very wise cannot see all ends. -- Gandalf
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20111117/6ce9cc55/attachment.asc>


More information about the ffmpeg-devel mailing list