Commit 49bd8e4b authored by Måns Rullgård's avatar Måns Rullgård

Fix grammar errors in documentation

Originally committed as revision 23904 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 38e23c88
......@@ -51,7 +51,7 @@ extern struct SwsContext *sws_opts;
int opt_default(const char *opt, const char *arg);
/**
* Sets the libav* libraries log level.
* Set the libav* libraries log level.
*/
int opt_loglevel(const char *opt, const char *arg);
......@@ -61,8 +61,8 @@ int opt_loglevel(const char *opt, const char *arg);
int opt_timelimit(const char *opt, const char *arg);
/**
* Parses a string and returns its corresponding value as a double.
* Exits from the application if the string cannot be correctly
* Parse a string and return its corresponding value as a double.
* Exit from the application if the string cannot be correctly
* parsed or the corresponding value is invalid.
*
* @param context the context of the value to be set (e.g. the
......@@ -76,8 +76,8 @@ int opt_timelimit(const char *opt, const char *arg);
double parse_number_or_die(const char *context, const char *numstr, int type, double min, double max);
/**
* Parses a string specifying a time and returns its corresponding
* value as a number of microseconds. Exits from the application if
* Parse a string specifying a time and return its corresponding
* value as a number of microseconds. Exit from the application if
* the string cannot be correctly parsed.
*
* @param context the context of the value to be set (e.g. the
......@@ -122,7 +122,7 @@ typedef struct {
void show_help_options(const OptionDef *options, const char *msg, int mask, int value);
/**
* Parses the command line arguments.
* Parse the command line arguments.
* @param options Array with the definitions required to interpret every
* option of the form: -<option_name> [<argument>]
* @param parse_arg_function Name of the function called to process every
......@@ -135,7 +135,7 @@ void parse_options(int argc, char **argv, const OptionDef *options,
void set_context_opts(void *ctx, void *opts_ctx, int flags);
/**
* Prints an error message to stderr, indicating filename and a human
* Print an error message to stderr, indicating filename and a human
* readable description of the error code err.
*
* If strerror_r() is not available the use of this function in a
......@@ -148,73 +148,73 @@ void print_error(const char *filename, int err);
void list_fmts(void (*get_fmt_string)(char *buf, int buf_size, int fmt), int nb_fmts);
/**
* Prints the program banner to stderr. The banner contents depend on the
* Print the program banner to stderr. The banner contents depend on the
* current version of the repository and of the libav* libraries used by
* the program.
*/
void show_banner(void);
/**
* Prints the version of the program to stdout. The version message
* Print the version of the program to stdout. The version message
* depends on the current versions of the repository and of the libav*
* libraries.
*/
void show_version(void);
/**
* Prints the license of the program to stdout. The license depends on
* Print the license of the program to stdout. The license depends on
* the license of the libraries compiled into the program.
*/
void show_license(void);
/**
* Prints a listing containing all the formats supported by the
* Print a listing containing all the formats supported by the
* program.
*/
void show_formats(void);
/**
* Prints a listing containing all the codecs supported by the
* Print a listing containing all the codecs supported by the
* program.
*/
void show_codecs(void);
/**
* Prints a listing containing all the filters supported by the
* Print a listing containing all the filters supported by the
* program.
*/
void show_filters(void);
/**
* Prints a listing containing all the bit stream filters supported by the
* Print a listing containing all the bit stream filters supported by the
* program.
*/
void show_bsfs(void);
/**
* Prints a listing containing all the protocols supported by the
* Print a listing containing all the protocols supported by the
* program.
*/
void show_protocols(void);
/**
* Prints a listing containing all the pixel formats supported by the
* Print a listing containing all the pixel formats supported by the
* program.
*/
void show_pix_fmts(void);
/**
* Returns a positive value if reads from standard input a line
* Return a positive value if reads from standard input a line
* starting with [yY], otherwise returns 0.
*/
int read_yesno(void);
/**
* Reads the file with name filename, and puts its content in a newly
* Read the file with name filename, and put its content in a newly
* allocated 0-terminated buffer.
*
* @param bufptr puts here the pointer to the newly allocated buffer
* @param size puts here the size of the newly allocated buffer
* @param bufptr location where pointer to buffer is returned
* @param size location where size of buffer is returned
* @return 0 in case of success, a negative value corresponding to an
* AVERROR error code in case of failure.
*/
......
......@@ -41,8 +41,8 @@ typedef struct {
} AACADTSHeaderInfo;
/**
* Parses AAC frame header.
* Parses the ADTS frame header to the end of the variable header, which is
* Parse AAC frame header.
* Parse the ADTS frame header to the end of the variable header, which is
* the first 54 bits.
* @param gbc[in] BitContext containing the first 54 bits of the frame.
* @param hdr[out] Pointer to struct where header info is written.
......
......@@ -42,7 +42,7 @@ static const uint8_t band_start_tab[51] = {
};
/**
* Maps each frequency coefficient bin to the critical band that contains it.
* Map each frequency coefficient bin to the critical band that contains it.
*/
static const uint8_t bin_to_band_tab[253] = {
0,
......@@ -261,7 +261,7 @@ void ac3_parametric_bit_allocation(AC3BitAllocParameters *s, uint8_t *bap,
}
/**
* Initializes some tables.
* Initialize some tables.
* note: This function must remain thread safe because it is called by the
* AVParser init code.
*/
......
......@@ -114,7 +114,7 @@ typedef enum {
void ac3_common_init(void);
/**
* Calculates the log power-spectral density of the input signal.
* Calculate the log power-spectral density of the input signal.
* This gives a rough estimate of signal power in the frequency domain by using
* the spectral envelope (exponents). The psd is also separately grouped
* into critical bands for use in the calculating the masking curve.
......@@ -131,7 +131,7 @@ void ff_ac3_bit_alloc_calc_psd(int8_t *exp, int start, int end, int16_t *psd,
int16_t *band_psd);
/**
* Calculates the masking curve.
* Calculate the masking curve.
* First, the excitation is calculated using parameters in s and the signal
* power in each critical band. The excitation is compared with a predefined
* hearing threshold table to produce the masking curve. If delta bit
......@@ -159,7 +159,7 @@ int ff_ac3_bit_alloc_calc_mask(AC3BitAllocParameters *s, int16_t *band_psd,
int16_t *mask);
/**
* Calculates bit allocation pointers.
* Calculate bit allocation pointers.
* The SNR is the difference between the masking curve and the signal. AC-3
* uses this value for each frequency bin to allocate bits. The snroffset
* parameter is a global adjustment to the SNR for all bins.
......
......@@ -27,8 +27,8 @@
#include "get_bits.h"
/**
* Parses AC-3 frame header.
* Parses the header up to the lfeon element, which is the first 52 or 54 bits
* Parse AC-3 frame header.
* Parse the header up to the lfeon element, which is the first 52 or 54 bits
* depending on the audio coding mode.
* @param gbc[in] BitContext containing the first 54 bits of the frame.
* @param hdr[out] Pointer to struct where header info is written.
......@@ -39,8 +39,8 @@
int ff_ac3_parse_header(GetBitContext *gbc, AC3HeaderInfo *hdr);
/**
* Parses AC-3 frame header and sets channel_map
* Parses the header up to the lfeon (channel_map in E-AC-3)
* Parse AC-3 frame header and sets channel_map
* Parse the header up to the lfeon (channel_map in E-AC-3)
* element, which is the first 52, 54 or 104 bits depending
* on the audio coding mode.
* @param gbc[in] BitContext containing the first 54 bits of the frame.
......
......@@ -73,7 +73,7 @@ const uint16_t ff_ac3_frame_size_tab[38][3] = {
};
/**
* Maps audio coding mode (acmod) to number of full-bandwidth channels.
* Map audio coding mode (acmod) to number of full-bandwidth channels.
* from ATSC A/52 Table 5.8 Audio Coding Mode
*/
const uint8_t ff_ac3_channels_tab[8] = {
......@@ -81,7 +81,7 @@ const uint8_t ff_ac3_channels_tab[8] = {
};
/**
* Maps audio coding mode (acmod) to channel layout mask.
* Map audio coding mode (acmod) to channel layout mask.
*/
const uint16_t ff_ac3_channel_layout_tab[8] = {
CH_LAYOUT_STEREO,
......
/*
* Provides registration of all codecs, parsers and bitstream filters for libavcodec.
* Provide registration of all codecs, parsers and bitstream filters for libavcodec.
* Copyright (c) 2002 Fabrice Bellard
*
* This file is part of FFmpeg.
......@@ -21,7 +21,7 @@
/**
* @file
* Provides registration of all codecs, parsers and bitstream filters for libavcodec.
* Provide registration of all codecs, parsers and bitstream filters for libavcodec.
*/
#include "avcodec.h"
......
......@@ -271,7 +271,7 @@ static av_cold void dprint_specific_config(ALSDecContext *ctx)
}
/** Reads an ALSSpecificConfig from a buffer into the output struct.
/** Read an ALSSpecificConfig from a buffer into the output struct.
*/
static av_cold int read_specific_config(ALSDecContext *ctx)
{
......@@ -406,7 +406,7 @@ static av_cold int read_specific_config(ALSDecContext *ctx)
}
/** Checks the ALSSpecificConfig for unsupported features.
/** Check the ALSSpecificConfig for unsupported features.
*/
static int check_specific_config(ALSDecContext *ctx)
{
......@@ -430,7 +430,7 @@ static int check_specific_config(ALSDecContext *ctx)
}
/** Parses the bs_info field to extract the block partitioning used in
/** Parse the bs_info field to extract the block partitioning used in
* block switching mode, refer to ISO/IEC 14496-3, section 11.6.2.
*/
static void parse_bs_info(const uint32_t bs_info, unsigned int n,
......@@ -454,7 +454,7 @@ static void parse_bs_info(const uint32_t bs_info, unsigned int n,
}
/** Reads and decodes a Rice codeword.
/** Read and decodes a Rice codeword.
*/
static int32_t decode_rice(GetBitContext *gb, unsigned int k)
{
......@@ -472,7 +472,7 @@ static int32_t decode_rice(GetBitContext *gb, unsigned int k)
}
/** Converts PARCOR coefficient k to direct filter coefficient.
/** Convert PARCOR coefficient k to direct filter coefficient.
*/
static void parcor_to_lpc(unsigned int k, const int32_t *par, int32_t *cof)
{
......@@ -490,7 +490,7 @@ static void parcor_to_lpc(unsigned int k, const int32_t *par, int32_t *cof)
}
/** Reads block switching field if necessary and sets actual block sizes.
/** Read block switching field if necessary and sets actual block sizes.
* Also assures that the block sizes of the last frame correspond to the
* actual number of samples.
*/
......@@ -545,7 +545,7 @@ static void get_block_sizes(ALSDecContext *ctx, unsigned int *div_blocks,
}
/** Reads the block data for a constant block
/** Read the block data for a constant block
*/
static void read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
{
......@@ -570,7 +570,7 @@ static void read_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
}
/** Decodes the block data for a constant block
/** Decode the block data for a constant block
*/
static void decode_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
{
......@@ -584,7 +584,7 @@ static void decode_const_block_data(ALSDecContext *ctx, ALSBlockData *bd)
}
/** Reads the block data for a non-constant block
/** Read the block data for a non-constant block
*/
static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
{
......@@ -831,7 +831,7 @@ static int read_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
}
/** Decodes the block data for a non-constant block
/** Decode the block data for a non-constant block
*/
static int decode_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
{
......@@ -940,7 +940,7 @@ static int decode_var_block_data(ALSDecContext *ctx, ALSBlockData *bd)
}
/** Reads the block data.
/** Read the block data.
*/
static int read_block(ALSDecContext *ctx, ALSBlockData *bd)
{
......@@ -958,7 +958,7 @@ static int read_block(ALSDecContext *ctx, ALSBlockData *bd)
}
/** Decodes the block data.
/** Decode the block data.
*/
static int decode_block(ALSDecContext *ctx, ALSBlockData *bd)
{
......@@ -980,7 +980,7 @@ static int decode_block(ALSDecContext *ctx, ALSBlockData *bd)
}
/** Reads and decodes block data successively.
/** Read and decodes block data successively.
*/
static int read_decode_block(ALSDecContext *ctx, ALSBlockData *bd)
{
......@@ -997,7 +997,7 @@ static int read_decode_block(ALSDecContext *ctx, ALSBlockData *bd)
}
/** Computes the number of samples left to decode for the current frame and
/** Compute the number of samples left to decode for the current frame and
* sets these samples to zero.
*/
static void zero_remaining(unsigned int b, unsigned int b_max,
......@@ -1013,7 +1013,7 @@ static void zero_remaining(unsigned int b, unsigned int b_max,
}
/** Decodes blocks independently.
/** Decode blocks independently.
*/
static int decode_blocks_ind(ALSDecContext *ctx, unsigned int ra_frame,
unsigned int c, const unsigned int *div_blocks,
......@@ -1051,7 +1051,7 @@ static int decode_blocks_ind(ALSDecContext *ctx, unsigned int ra_frame,
}
/** Decodes blocks dependently.
/** Decode blocks dependently.
*/
static int decode_blocks(ALSDecContext *ctx, unsigned int ra_frame,
unsigned int c, const unsigned int *div_blocks,
......@@ -1132,7 +1132,7 @@ static int decode_blocks(ALSDecContext *ctx, unsigned int ra_frame,
}
/** Reads the channel data.
/** Read the channel data.
*/
static int read_channel_data(ALSDecContext *ctx, ALSChannelData *cd, int c)
{
......@@ -1260,7 +1260,7 @@ static int revert_channel_correlation(ALSDecContext *ctx, ALSBlockData *bd,
}
/** Reads the frame data.
/** Read the frame data.
*/
static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame)
{
......@@ -1389,7 +1389,7 @@ static int read_frame_data(ALSDecContext *ctx, unsigned int ra_frame)
}
/** Decodes an ALS frame.
/** Decode an ALS frame.
*/
static int decode_frame(AVCodecContext *avctx,
void *data, int *data_size,
......@@ -1511,7 +1511,7 @@ static int decode_frame(AVCodecContext *avctx,
}
/** Uninitializes the ALS decoder.
/** Uninitialize the ALS decoder.
*/
static av_cold int decode_end(AVCodecContext *avctx)
{
......@@ -1541,7 +1541,7 @@ static av_cold int decode_end(AVCodecContext *avctx)
}
/** Initializes the ALS decoder.
/** Initialize the ALS decoder.
*/
static av_cold int decode_init(AVCodecContext *avctx)
{
......@@ -1693,7 +1693,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
}
/** Flushes (resets) the frame ID after seeking.
/** Flush (reset) the frame ID after seeking.
*/
static av_cold void flush(AVCodecContext *avctx)
{
......
......@@ -48,7 +48,7 @@
#define AV_TIME_BASE_Q (AVRational){1, AV_TIME_BASE}
/**
* Identifies the syntax and semantics of the bitstream.
* Identifie the syntax and semantics of the bitstream.
* The principle is roughly:
* Two decoders with the same ID can decode the same streams.
* Two encoders with the same ID can encode compatible streams.
......@@ -2951,7 +2951,7 @@ attribute_deprecated ReSampleContext *audio_resample_init(int output_channels, i
int output_rate, int input_rate);
#endif
/**
* Initializes audio resampling context
* Initialize audio resampling context
*
* @param output_channels number of output channels
* @param input_channels number of input channels
......@@ -2978,7 +2978,7 @@ void audio_resample_close(ReSampleContext *s);
/**
* Initializes an audio resampler.
* Initialize an audio resampler.
* Note, if either rate is not an integer then simply scale both rates up so they are.
* @param filter_length length of each FIR filter in the filterbank relative to the cutoff freq
* @param log2_phase_count log2 of the number of entries in the polyphase filterbank
......@@ -3001,7 +3001,7 @@ int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consum
/**
* Compensates samplerate/timestamp drift. The compensation is done by changing
* Compensate samplerate/timestamp drift. The compensation is done by changing
* the resampler parameters, so no audible clicks or similar distortions occur
* @param compensation_distance distance in output samples over which the compensation should be performed
* @param sample_delta number of output samples which should be output less
......@@ -3074,15 +3074,15 @@ void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
#if LIBAVCODEC_VERSION_MAJOR < 53
/**
* Returns the pixel format corresponding to the name name.
* Return the pixel format corresponding to the name name.
*
* If there is no pixel format with name name, then looks for a
* If there is no pixel format with name name, then look for a
* pixel format with the name corresponding to the native endian
* format of name.
* For example in a little-endian system, first looks for "gray16",
* For example in a little-endian system, first look for "gray16",
* then for "gray16le".
*
* Finally if no pixel format has been found, returns PIX_FMT_NONE.
* Finally if no pixel format has been found, return PIX_FMT_NONE.
*
* @deprecated Deprecated in favor of av_get_pix_fmt().
*/
......@@ -3090,14 +3090,14 @@ attribute_deprecated enum PixelFormat avcodec_get_pix_fmt(const char* name);
#endif
/**
* Returns a value representing the fourCC code associated to the
* Return a value representing the fourCC code associated to the
* pixel format pix_fmt, or 0 if no associated fourCC code can be
* found.
*/
unsigned int avcodec_pix_fmt_to_codec_tag(enum PixelFormat pix_fmt);
/**
* Puts a string representing the codec tag codec_tag in buf.
* Put a string representing the codec tag codec_tag in buf.
*
* @param buf_size size in bytes of buf
* @return the length of the string that would have been generated if
......@@ -3113,7 +3113,7 @@ size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_ta
#define FF_LOSS_CHROMA 0x0020 /**< loss of chroma (e.g. RGB to gray conversion) */
/**
* Computes what kind of losses will occur when converting from one specific
* Compute what kind of losses will occur when converting from one specific
* pixel format to another.
* When converting from one pixel format to another, information loss may occur.
* For example, when converting from RGB24 to GRAY, the color information will
......@@ -3133,7 +3133,7 @@ int avcodec_get_pix_fmt_loss(enum PixelFormat dst_pix_fmt, enum PixelFormat src_
int has_alpha);
/**
* Finds the best pixel format to convert to given a certain source pixel
* Find the best pixel format to convert to given a certain source pixel
* format. When converting from one pixel format to another, information loss
* may occur. For example, when converting from RGB24 to GRAY, the color
* information will be lost. Similarly, other losses occur when converting from
......@@ -3195,22 +3195,22 @@ int avpicture_deinterlace(AVPicture *dst, const AVPicture *src,
AVCodec *av_codec_next(AVCodec *c);
/**
* Returns the LIBAVCODEC_VERSION_INT constant.
* Return the LIBAVCODEC_VERSION_INT constant.
*/
unsigned avcodec_version(void);
/**
* Returns the libavcodec build-time configuration.
* Return the libavcodec build-time configuration.
*/
const char *avcodec_configuration(void);
/**
* Returns the libavcodec license.
* Return the libavcodec license.
*/
const char *avcodec_license(void);
/**
* Initializes libavcodec.
* Initialize libavcodec.
*
* @warning This function must be called before any other libavcodec
* function.
......@@ -3232,7 +3232,7 @@ attribute_deprecated void register_avcodec(AVCodec *codec);
void avcodec_register(AVCodec *codec);
/**
* Finds a registered encoder with a matching codec ID.
* Find a registered encoder with a matching codec ID.
*
* @param id CodecID of the requested encoder
* @return An encoder if one was found, NULL otherwise.
......@@ -3240,7 +3240,7 @@ void avcodec_register(AVCodec *codec);
AVCodec *avcodec_find_encoder(enum CodecID id);
/**
* Finds a registered encoder with the specified name.
* Find a registered encoder with the specified name.
*
* @param name name of the requested encoder
* @return An encoder if one was found, NULL otherwise.
......@@ -3248,7 +3248,7 @@ AVCodec *avcodec_find_encoder(enum CodecID id);
AVCodec *avcodec_find_encoder_by_name(const char *name);
/**
* Finds a registered decoder with a matching codec ID.
* Find a registered decoder with a matching codec ID.
*
* @param id CodecID of the requested decoder
* @return A decoder if one was found, NULL otherwise.
......@@ -3256,7 +3256,7 @@ AVCodec *avcodec_find_encoder_by_name(const char *name);
AVCodec *avcodec_find_decoder(enum CodecID id);
/**
* Finds a registered decoder with the specified name.
* Find a registered decoder with the specified name.
*
* @param name name of the requested decoder
* @return A decoder if one was found, NULL otherwise.
......@@ -3265,7 +3265,7 @@ AVCodec *avcodec_find_decoder_by_name(const char *name);
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
/**
* Sets the fields of the given AVCodecContext to default values.
* Set the fields of the given AVCodecContext to default values.
*
* @param s The AVCodecContext of which the fields should be set to default values.
*/
......@@ -3276,7 +3276,7 @@ void avcodec_get_context_defaults(AVCodecContext *s);
void avcodec_get_context_defaults2(AVCodecContext *s, enum AVMediaType);
/**
* Allocates an AVCodecContext and sets its fields to default values. The
* Allocate an AVCodecContext and set its fields to default values. The
* resulting struct can be deallocated by simply calling av_free().
*
* @return An AVCodecContext filled with default values or NULL on failure.
......@@ -3302,14 +3302,14 @@ AVCodecContext *avcodec_alloc_context2(enum AVMediaType);
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
/**
* Sets the fields of the given AVFrame to default values.
* Set the fields of the given AVFrame to default values.
*
* @param pic The AVFrame of which the fields should be set to default values.
*/
void avcodec_get_frame_defaults(AVFrame *pic);
/**
* Allocates an AVFrame and sets its fields to default values. The resulting
* Allocate an AVFrame and set its fields to default values. The resulting
* struct can be deallocated by simply calling av_free().