Commit c2d9a65b authored by Justin Ruggles's avatar Justin Ruggles

ac3enc: doxygen update.

Add some parameters to existing function documentation.
Remove some unneeded documentation.
Convert some static function documentation to non-doxygen style.
parent a4998e44
This diff is collapsed.
...@@ -41,6 +41,8 @@ static const AVClass ac3enc_class = { "Fixed-Point AC-3 Encoder", av_default_ite ...@@ -41,6 +41,8 @@ static const AVClass ac3enc_class = { "Fixed-Point AC-3 Encoder", av_default_ite
/** /**
* Finalize MDCT and free allocated memory. * Finalize MDCT and free allocated memory.
*
* @param s AC-3 encoder private context
*/ */
av_cold void AC3_NAME(mdct_end)(AC3EncodeContext *s) av_cold void AC3_NAME(mdct_end)(AC3EncodeContext *s)
{ {
...@@ -50,7 +52,9 @@ av_cold void AC3_NAME(mdct_end)(AC3EncodeContext *s) ...@@ -50,7 +52,9 @@ av_cold void AC3_NAME(mdct_end)(AC3EncodeContext *s)
/** /**
* Initialize MDCT tables. * Initialize MDCT tables.
* @param nbits log2(MDCT size) *
* @param s AC-3 encoder private context
* @return 0 on success, negative error code on failure
*/ */
av_cold int AC3_NAME(mdct_init)(AC3EncodeContext *s) av_cold int AC3_NAME(mdct_init)(AC3EncodeContext *s)
{ {
...@@ -60,7 +64,7 @@ av_cold int AC3_NAME(mdct_init)(AC3EncodeContext *s) ...@@ -60,7 +64,7 @@ av_cold int AC3_NAME(mdct_init)(AC3EncodeContext *s)
} }
/** /*
* Apply KBD window to input samples prior to MDCT. * Apply KBD window to input samples prior to MDCT.
*/ */
static void apply_window(DSPContext *dsp, int16_t *output, const int16_t *input, static void apply_window(DSPContext *dsp, int16_t *output, const int16_t *input,
...@@ -70,11 +74,9 @@ static void apply_window(DSPContext *dsp, int16_t *output, const int16_t *input, ...@@ -70,11 +74,9 @@ static void apply_window(DSPContext *dsp, int16_t *output, const int16_t *input,
} }
/** /*
* Normalize the input samples to use the maximum available precision. * Normalize the input samples to use the maximum available precision.
* This assumes signed 16-bit input samples. * This assumes signed 16-bit input samples.
*
* @return exponent shift
*/ */
static int normalize_samples(AC3EncodeContext *s) static int normalize_samples(AC3EncodeContext *s)
{ {
...@@ -87,7 +89,7 @@ static int normalize_samples(AC3EncodeContext *s) ...@@ -87,7 +89,7 @@ static int normalize_samples(AC3EncodeContext *s)
} }
/** /*
* Scale MDCT coefficients to 25-bit signed fixed-point. * Scale MDCT coefficients to 25-bit signed fixed-point.
*/ */
static void scale_coefficients(AC3EncodeContext *s) static void scale_coefficients(AC3EncodeContext *s)
...@@ -104,7 +106,7 @@ static void scale_coefficients(AC3EncodeContext *s) ...@@ -104,7 +106,7 @@ static void scale_coefficients(AC3EncodeContext *s)
} }
/** /*
* Clip MDCT coefficients to allowable range. * Clip MDCT coefficients to allowable range.
*/ */
static void clip_coefficients(DSPContext *dsp, int32_t *coef, unsigned int len) static void clip_coefficients(DSPContext *dsp, int32_t *coef, unsigned int len)
...@@ -113,7 +115,7 @@ static void clip_coefficients(DSPContext *dsp, int32_t *coef, unsigned int len) ...@@ -113,7 +115,7 @@ static void clip_coefficients(DSPContext *dsp, int32_t *coef, unsigned int len)
} }
/** /*
* Calculate a single coupling coordinate. * Calculate a single coupling coordinate.
*/ */
static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl) static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
......
...@@ -44,6 +44,8 @@ static const AVClass ac3enc_class = { "AC-3 Encoder", av_default_item_name, ...@@ -44,6 +44,8 @@ static const AVClass ac3enc_class = { "AC-3 Encoder", av_default_item_name,
/** /**
* Finalize MDCT and free allocated memory. * Finalize MDCT and free allocated memory.
*
* @param s AC-3 encoder private context
*/ */
av_cold void ff_ac3_float_mdct_end(AC3EncodeContext *s) av_cold void ff_ac3_float_mdct_end(AC3EncodeContext *s)
{ {
...@@ -54,7 +56,9 @@ av_cold void ff_ac3_float_mdct_end(AC3EncodeContext *s) ...@@ -54,7 +56,9 @@ av_cold void ff_ac3_float_mdct_end(AC3EncodeContext *s)
/** /**
* Initialize MDCT tables. * Initialize MDCT tables.
* @param nbits log2(MDCT size) *
* @param s AC-3 encoder private context
* @return 0 on success, negative error code on failure
*/ */
av_cold int ff_ac3_float_mdct_init(AC3EncodeContext *s) av_cold int ff_ac3_float_mdct_init(AC3EncodeContext *s)
{ {
...@@ -78,7 +82,7 @@ av_cold int ff_ac3_float_mdct_init(AC3EncodeContext *s) ...@@ -78,7 +82,7 @@ av_cold int ff_ac3_float_mdct_init(AC3EncodeContext *s)
} }
/** /*
* Apply KBD window to input samples prior to MDCT. * Apply KBD window to input samples prior to MDCT.
*/ */
static void apply_window(DSPContext *dsp, float *output, const float *input, static void apply_window(DSPContext *dsp, float *output, const float *input,
...@@ -88,7 +92,7 @@ static void apply_window(DSPContext *dsp, float *output, const float *input, ...@@ -88,7 +92,7 @@ static void apply_window(DSPContext *dsp, float *output, const float *input,
} }
/** /*
* Normalize the input samples. * Normalize the input samples.
* Not needed for the floating-point encoder. * Not needed for the floating-point encoder.
*/ */
...@@ -98,7 +102,7 @@ static int normalize_samples(AC3EncodeContext *s) ...@@ -98,7 +102,7 @@ static int normalize_samples(AC3EncodeContext *s)
} }
/** /*
* Scale MDCT coefficients from float to 24-bit fixed-point. * Scale MDCT coefficients from float to 24-bit fixed-point.
*/ */
static void scale_coefficients(AC3EncodeContext *s) static void scale_coefficients(AC3EncodeContext *s)
...@@ -111,7 +115,7 @@ static void scale_coefficients(AC3EncodeContext *s) ...@@ -111,7 +115,7 @@ static void scale_coefficients(AC3EncodeContext *s)
} }
/** /*
* Clip MDCT coefficients to allowable range. * Clip MDCT coefficients to allowable range.
*/ */
static void clip_coefficients(DSPContext *dsp, float *coef, unsigned int len) static void clip_coefficients(DSPContext *dsp, float *coef, unsigned int len)
...@@ -120,7 +124,7 @@ static void clip_coefficients(DSPContext *dsp, float *coef, unsigned int len) ...@@ -120,7 +124,7 @@ static void clip_coefficients(DSPContext *dsp, float *coef, unsigned int len)
} }
/** /*
* Calculate a single coupling coordinate. * Calculate a single coupling coordinate.
*/ */
static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl) static CoefType calc_cpl_coord(CoefSumType energy_ch, CoefSumType energy_cpl)
......
...@@ -64,7 +64,7 @@ alloc_fail: ...@@ -64,7 +64,7 @@ alloc_fail:
} }
/** /*
* Deinterleave input samples. * Deinterleave input samples.
* Channels are reordered from Libav's default order to AC-3 order. * Channels are reordered from Libav's default order to AC-3 order.
*/ */
...@@ -93,7 +93,7 @@ static void deinterleave_input_samples(AC3EncodeContext *s, ...@@ -93,7 +93,7 @@ static void deinterleave_input_samples(AC3EncodeContext *s,
} }
/** /*
* Apply the MDCT to input samples to generate frequency coefficients. * Apply the MDCT to input samples to generate frequency coefficients.
* This applies the KBD window and normalizes the input to reduce precision * This applies the KBD window and normalizes the input to reduce precision
* loss due to fixed-point calculations. * loss due to fixed-point calculations.
...@@ -120,7 +120,7 @@ static void apply_mdct(AC3EncodeContext *s) ...@@ -120,7 +120,7 @@ static void apply_mdct(AC3EncodeContext *s)
} }
/** /*
* Calculate coupling channel and coupling coordinates. * Calculate coupling channel and coupling coordinates.
*/ */
static void apply_channel_coupling(AC3EncodeContext *s) static void apply_channel_coupling(AC3EncodeContext *s)
...@@ -328,7 +328,7 @@ static void apply_channel_coupling(AC3EncodeContext *s) ...@@ -328,7 +328,7 @@ static void apply_channel_coupling(AC3EncodeContext *s)
} }
/** /*
* Determine rematrixing flags for each block and band. * Determine rematrixing flags for each block and band.
*/ */
static void compute_rematrixing_strategy(AC3EncodeContext *s) static void compute_rematrixing_strategy(AC3EncodeContext *s)
...@@ -391,9 +391,6 @@ static void compute_rematrixing_strategy(AC3EncodeContext *s) ...@@ -391,9 +391,6 @@ static void compute_rematrixing_strategy(AC3EncodeContext *s)
} }
/**
* Encode a single AC-3 frame.
*/
int AC3_NAME(encode_frame)(AVCodecContext *avctx, unsigned char *frame, int AC3_NAME(encode_frame)(AVCodecContext *avctx, unsigned char *frame,
int buf_size, void *data) int buf_size, void *data)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment