summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aacpsy.c2
-rw-r--r--libavcodec/amrwbdec.c68
-rw-r--r--libavcodec/avcodec.h16
-rw-r--r--libavcodec/cavs_parser.c2
-rw-r--r--libavcodec/celp_math.h2
-rw-r--r--libavcodec/dca_parser.c2
-rw-r--r--libavcodec/dsputil.c2
-rw-r--r--libavcodec/error_resilience.c12
-rw-r--r--libavcodec/get_bits.h19
-rw-r--r--libavcodec/h261dec.c10
-rw-r--r--libavcodec/h261enc.c2
-rw-r--r--libavcodec/h263dec.c4
-rw-r--r--libavcodec/h264.c13
-rw-r--r--libavcodec/h264.h4
-rw-r--r--libavcodec/h264_cabac.c2
-rw-r--r--libavcodec/h264_cavlc.c4
-rw-r--r--libavcodec/h264_mvpred.h6
-rw-r--r--libavcodec/ituh263dec.c10
-rw-r--r--libavcodec/ituh263enc.c2
-rw-r--r--libavcodec/latm_parser.c2
-rw-r--r--libavcodec/mjpeg_parser.c2
-rw-r--r--libavcodec/mpeg12.c7
-rw-r--r--libavcodec/mpeg4video.h4
-rw-r--r--libavcodec/mpeg4video_parser.h2
-rw-r--r--libavcodec/mpeg4videodec.c22
-rw-r--r--libavcodec/mpeg4videoenc.c4
-rw-r--r--libavcodec/mpegvideo.c21
-rw-r--r--libavcodec/mpegvideo.h6
-rw-r--r--libavcodec/mpegvideo_common.h8
-rw-r--r--libavcodec/mpegvideo_enc.c2
-rw-r--r--libavcodec/msmpeg4.c2
-rw-r--r--libavcodec/parser.c2
-rw-r--r--libavcodec/proresdec_lgpl.c5
-rw-r--r--libavcodec/pthread.c2
-rw-r--r--libavcodec/ratecontrol.c4
-rw-r--r--libavcodec/resample2.c2
-rw-r--r--libavcodec/thread.h11
-rw-r--r--libavcodec/vc1_parser.c2
-rw-r--r--libavcodec/vcr1.c4
39 files changed, 150 insertions, 146 deletions
diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index 4152b70bbf..f81ed487ba 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -216,7 +216,7 @@ static const float psy_fir_coeffs[] = {
};
/**
- * calculates the attack threshold for ABR from the above table for the LAME psy model
+ * Calculate the ABR attack threshold from the above LAME psymodel table.
*/
static float lame_calc_attack_threshold(int bitrate)
{
diff --git a/libavcodec/amrwbdec.c b/libavcodec/amrwbdec.c
index b0e54f9261..524979d755 100644
--- a/libavcodec/amrwbdec.c
+++ b/libavcodec/amrwbdec.c
@@ -111,7 +111,7 @@ static av_cold int amrwb_decode_init(AVCodecContext *avctx)
/**
* Decode the frame header in the "MIME/storage" format. This format
- * is simpler and does not carry the auxiliary information of the frame
+ * is simpler and does not carry the auxiliary frame information.
*
* @param[in] ctx The Context
* @param[in] buf Pointer to the input buffer
@@ -133,7 +133,7 @@ static int decode_mime_header(AMRWBContext *ctx, const uint8_t *buf)
}
/**
- * Decodes quantized ISF vectors using 36-bit indexes (6K60 mode only)
+ * Decode quantized ISF vectors using 36-bit indexes (6K60 mode only).
*
* @param[in] ind Array of 5 indexes
* @param[out] isf_q Buffer for isf_q[LP_ORDER]
@@ -160,7 +160,7 @@ static void decode_isf_indices_36b(uint16_t *ind, float *isf_q)
}
/**
- * Decodes quantized ISF vectors using 46-bit indexes (except 6K60 mode)
+ * Decode quantized ISF vectors using 46-bit indexes (except 6K60 mode).
*
* @param[in] ind Array of 7 indexes
* @param[out] isf_q Buffer for isf_q[LP_ORDER]
@@ -193,8 +193,8 @@ static void decode_isf_indices_46b(uint16_t *ind, float *isf_q)
}
/**
- * Apply mean and past ISF values using the prediction factor
- * Updates past ISF vector
+ * Apply mean and past ISF values using the prediction factor.
+ * Updates past ISF vector.
*
* @param[in,out] isf_q Current quantized ISF
* @param[in,out] isf_past Past quantized ISF
@@ -215,7 +215,7 @@ static void isf_add_mean_and_past(float *isf_q, float *isf_past)
/**
* Interpolate the fourth ISP vector from current and past frames
- * to obtain a ISP vector for each subframe
+ * to obtain an ISP vector for each subframe.
*
* @param[in,out] isp_q ISPs for each subframe
* @param[in] isp4_past Past ISP for subframe 4
@@ -232,9 +232,9 @@ static void interpolate_isp(double isp_q[4][LP_ORDER], const double *isp4_past)
}
/**
- * Decode an adaptive codebook index into pitch lag (except 6k60, 8k85 modes)
- * Calculate integer lag and fractional lag always using 1/4 resolution
- * In 1st and 3rd subframes the index is relative to last subframe integer lag
+ * Decode an adaptive codebook index into pitch lag (except 6k60, 8k85 modes).
+ * Calculate integer lag and fractional lag always using 1/4 resolution.
+ * In 1st and 3rd subframes the index is relative to last subframe integer lag.
*
* @param[out] lag_int Decoded integer pitch lag
* @param[out] lag_frac Decoded fractional pitch lag
@@ -271,9 +271,9 @@ static void decode_pitch_lag_high(int *lag_int, int *lag_frac, int pitch_index,
}
/**
- * Decode a adaptive codebook index into pitch lag for 8k85 and 6k60 modes
- * Description is analogous to decode_pitch_lag_high, but in 6k60 relative
- * index is used for all subframes except the first
+ * Decode an adaptive codebook index into pitch lag for 8k85 and 6k60 modes.
+ * The description is analogous to decode_pitch_lag_high, but in 6k60 the
+ * relative index is used for all subframes except the first.
*/
static void decode_pitch_lag_low(int *lag_int, int *lag_frac, int pitch_index,
uint8_t *base_lag_int, int subframe, enum Mode mode)
@@ -298,7 +298,7 @@ static void decode_pitch_lag_low(int *lag_int, int *lag_frac, int pitch_index,
/**
* Find the pitch vector by interpolating the past excitation at the
- * pitch delay, which is obtained in this function
+ * pitch delay, which is obtained in this function.
*
* @param[in,out] ctx The context
* @param[in] amr_subframe Current subframe data
@@ -351,10 +351,10 @@ static void decode_pitch_vector(AMRWBContext *ctx,
/**
* The next six functions decode_[i]p_track decode exactly i pulses
* positions and amplitudes (-1 or 1) in a subframe track using
- * an encoded pulse indexing (TS 26.190 section 5.8.2)
+ * an encoded pulse indexing (TS 26.190 section 5.8.2).
*
* The results are given in out[], in which a negative number means
- * amplitude -1 and vice versa (i.e., ampl(x) = x / abs(x) )
+ * amplitude -1 and vice versa (i.e., ampl(x) = x / abs(x) ).
*
* @param[out] out Output buffer (writes i elements)
* @param[in] code Pulse index (no. of bits varies, see below)
@@ -470,7 +470,7 @@ static void decode_6p_track(int *out, int code, int m, int off) ///code: 6m-2 bi
/**
* Decode the algebraic codebook index to pulse positions and signs,
- * then construct the algebraic codebook vector
+ * then construct the algebraic codebook vector.
*
* @param[out] fixed_vector Buffer for the fixed codebook excitation
* @param[in] pulse_hi MSBs part of the pulse index array (higher modes only)
@@ -541,7 +541,7 @@ static void decode_fixed_vector(float *fixed_vector, const uint16_t *pulse_hi,
}
/**
- * Decode pitch gain and fixed gain correction factor
+ * Decode pitch gain and fixed gain correction factor.
*
* @param[in] vq_gain Vector-quantized index for gains
* @param[in] mode Mode of the current frame
@@ -559,7 +559,7 @@ static void decode_gains(const uint8_t vq_gain, const enum Mode mode,
}
/**
- * Apply pitch sharpening filters to the fixed codebook vector
+ * Apply pitch sharpening filters to the fixed codebook vector.
*
* @param[in] ctx The context
* @param[in,out] fixed_vector Fixed codebook excitation
@@ -580,7 +580,7 @@ static void pitch_sharpening(AMRWBContext *ctx, float *fixed_vector)
}
/**
- * Calculate the voicing factor (-1.0 = unvoiced to 1.0 = voiced)
+ * Calculate the voicing factor (-1.0 = unvoiced to 1.0 = voiced).
*
* @param[in] p_vector, f_vector Pitch and fixed excitation vectors
* @param[in] p_gain, f_gain Pitch and fixed gains
@@ -599,8 +599,8 @@ static float voice_factor(float *p_vector, float p_gain,
}
/**
- * Reduce fixed vector sparseness by smoothing with one of three IR filters
- * Also known as "adaptive phase dispersion"
+ * Reduce fixed vector sparseness by smoothing with one of three IR filters,
+ * also known as "adaptive phase dispersion".
*
* @param[in] ctx The context
* @param[in,out] fixed_vector Unfiltered fixed vector
@@ -670,7 +670,7 @@ static float *anti_sparseness(AMRWBContext *ctx,
/**
* Calculate a stability factor {teta} based on distance between
- * current and past isf. A value of 1 shows maximum signal stability
+ * current and past isf. A value of 1 shows maximum signal stability.
*/
static float stability_factor(const float *isf, const float *isf_past)
{
@@ -687,7 +687,7 @@ static float stability_factor(const float *isf, const float *isf_past)
/**
* Apply a non-linear fixed gain smoothing in order to reduce
- * fluctuation in the energy of excitation
+ * fluctuation in the energy of excitation.
*
* @param[in] fixed_gain Unsmoothed fixed gain
* @param[in,out] prev_tr_gain Previous threshold gain (updated)
@@ -718,7 +718,7 @@ static float noise_enhancer(float fixed_gain, float *prev_tr_gain,
}
/**
- * Filter the fixed_vector to emphasize the higher frequencies
+ * Filter the fixed_vector to emphasize the higher frequencies.
*
* @param[in,out] fixed_vector Fixed codebook vector
* @param[in] voice_fac Frame voicing factor
@@ -742,7 +742,7 @@ static void pitch_enhancer(float *fixed_vector, float voice_fac)
}
/**
- * Conduct 16th order linear predictive coding synthesis from excitation
+ * Conduct 16th order linear predictive coding synthesis from excitation.
*
* @param[in] ctx Pointer to the AMRWBContext
* @param[in] lpc Pointer to the LPC coefficients
@@ -802,7 +802,7 @@ static void de_emphasis(float *out, float *in, float m, float mem[1])
/**
* Upsample a signal by 5/4 ratio (from 12.8kHz to 16kHz) using
- * a FIR interpolation filter. Uses past data from before *in address
+ * a FIR interpolation filter. Uses past data from before *in address.
*
* @param[out] out Buffer for interpolated signal
* @param[in] in Current signal data (length 0.8*o_size)
@@ -832,7 +832,7 @@ static void upsample_5_4(float *out, const float *in, int o_size)
/**
* Calculate the high-band gain based on encoded index (23k85 mode) or
- * on the low-band speech signal and the Voice Activity Detection flag
+ * on the low-band speech signal and the Voice Activity Detection flag.
*
* @param[in] ctx The context
* @param[in] synth LB speech synthesis at 12.8k
@@ -857,7 +857,7 @@ static float find_hb_gain(AMRWBContext *ctx, const float *synth,
/**
* Generate the high-band excitation with the same energy from the lower
- * one and scaled by the given gain
+ * one and scaled by the given gain.
*
* @param[in] ctx The context
* @param[out] hb_exc Buffer for the excitation
@@ -880,7 +880,7 @@ static void scaled_hb_excitation(AMRWBContext *ctx, float *hb_exc,
}
/**
- * Calculate the auto-correlation for the ISF difference vector
+ * Calculate the auto-correlation for the ISF difference vector.
*/
static float auto_correlation(float *diff_isf, float mean, int lag)
{
@@ -896,7 +896,7 @@ static float auto_correlation(float *diff_isf, float mean, int lag)
/**
* Extrapolate a ISF vector to the 16kHz range (20th order LP)
- * used at mode 6k60 LP filter for the high frequency band
+ * used at mode 6k60 LP filter for the high frequency band.
*
* @param[out] out Buffer for extrapolated isf
* @param[in] isf Input isf vector
@@ -981,7 +981,7 @@ static void lpc_weighting(float *out, const float *lpc, float gamma, int size)
/**
* Conduct 20th order linear predictive coding synthesis for the high
- * frequency band excitation at 16kHz
+ * frequency band excitation at 16kHz.
*
* @param[in] ctx The context
* @param[in] subframe Current subframe index (0 to 3)
@@ -1019,8 +1019,8 @@ static void hb_synthesis(AMRWBContext *ctx, int subframe, float *samples,
}
/**
- * Apply to high-band samples a 15th order filter
- * The filter characteristic depends on the given coefficients
+ * Apply a 15th order filter to high-band samples.
+ * The filter characteristic depends on the given coefficients.
*
* @param[out] out Buffer for filtered output
* @param[in] fir_coef Filter coefficients
@@ -1048,7 +1048,7 @@ static void hb_fir_filter(float *out, const float fir_coef[HB_FIR_SIZE + 1],
}
/**
- * Update context state before the next subframe
+ * Update context state before the next subframe.
*/
static void update_sub_state(AMRWBContext *ctx)
{
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 63ef000198..a1967078e6 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2667,7 +2667,7 @@ typedef struct AVCodecContext {
#if FF_API_X264_GLOBAL_OPTS
/**
- * Influences how often B-frames are used.
+ * Influence how often B-frames are used.
* - encoding: Set by user.
* - decoding: unused
*/
@@ -2748,7 +2748,7 @@ typedef struct AVCodecContext {
int mv0_threshold;
/**
- * Adjusts sensitivity of b_frame_strategy 1.
+ * Adjust sensitivity of b_frame_strategy 1.
* - encoding: Set by user.
* - decoding: unused
*/
@@ -3032,7 +3032,7 @@ typedef struct AVCodecContext {
#if FF_API_FLAC_GLOBAL_OPTS
/**
- * Determines which LPC analysis algorithm to use.
+ * Determine which LPC analysis algorithm to use.
* - encoding: Set by user
* - decoding: unused
*/
@@ -4263,7 +4263,7 @@ int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
AVPacket *avpkt);
/**
- * Frees all allocated data in the given subtitle struct.
+ * Free all allocated data in the given subtitle struct.
*
* @param sub AVSubtitle to free.
*/
@@ -4628,8 +4628,16 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width,
unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
/**
+<<<<<<< HEAD
* Logs a generic warning message about a missing feature. This function is
* intended to be used internally by FFmpeg (libavcodec, libavformat, etc.)
+||||||| merged common ancestors
+ * Logs a generic warning message about a missing feature. This function is
+ * intended to be used internally by Libav (libavcodec, libavformat, etc.)
+=======
+ * Log a generic warning message about a missing feature. This function is
+ * intended to be used internally by Libav (libavcodec, libavformat, etc.)
+>>>>>>> qatar/master
* only, and would normally not be used by applications.
* @param[in] avc a pointer to an arbitrary struct of which the first field is
* a pointer to an AVClass struct
diff --git a/libavcodec/cavs_parser.c b/libavcodec/cavs_parser.c
index 0f4c1b274d..690ef54f97 100644
--- a/libavcodec/cavs_parser.c
+++ b/libavcodec/cavs_parser.c
@@ -30,7 +30,7 @@
/**
- * finds the end of the current frame in the bitstream.
+ * Find the end of the current frame in the bitstream.
* @return the position of the first byte of the next frame, or -1
*/
static int cavs_find_frame_end(ParseContext *pc, const uint8_t *buf,
diff --git a/libavcodec/celp_math.h b/libavcodec/celp_math.h
index 4803245478..ec62a9ea09 100644
--- a/libavcodec/celp_math.h
+++ b/libavcodec/celp_math.h
@@ -74,7 +74,7 @@ static inline int bidir_sal(int value, int offset)
int64_t ff_dot_product(const int16_t *a, const int16_t *b, int length);
/**
- * returns the dot product.
+ * Return the dot product.
* @param a input data array
* @param b input data array
* @param length number of elements
diff --git a/libavcodec/dca_parser.c b/libavcodec/dca_parser.c
index 851c31bcaf..0c8ea8a07f 100644
--- a/libavcodec/dca_parser.c
+++ b/libavcodec/dca_parser.c
@@ -39,7 +39,7 @@ typedef struct DCAParseContext {
|| state == DCA_MARKER_RAW_LE || state == DCA_MARKER_RAW_BE || state == DCA_HD_MARKER)
/**
- * finds the end of the current frame in the bitstream.
+ * Find the end of the current frame in the bitstream.
* @return the position of the first byte of the next frame, or -1
*/
static int dca_find_frame_end(DCAParseContext * pc1, const uint8_t * buf,
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 4c13cb3ca4..80ed6503fa 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -1824,7 +1824,7 @@ static void add_8x8basis_c(int16_t rem[64], int16_t basis[64], int scale){
}
/**
- * permutes an 8x8 block.
+ * Permute an 8x8 block.
* @param block the block which will be permuted according to the given permutation vector
* @param permutation the permutation vector
* @param last the last non zero coefficient in scantable order, used to speed the permutation up
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index 115e4239e9..5be179be72 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -80,7 +80,7 @@ static void set_mv_strides(MpegEncContext *s, int *mv_step, int *stride){
}
/**
- * replaces the current MB with a flat dc only version.
+ * Replace the current MB with a flat dc-only version.
*/
static void put_dc(MpegEncContext *s, uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, int mb_x, int mb_y)
{
@@ -714,7 +714,7 @@ static int is_intra_more_likely(MpegEncContext *s){
}
void ff_er_frame_start(MpegEncContext *s){
- if(!s->error_recognition) return;
+ if(!s->err_recognition) return;
memset(s->error_status_table, MV_ERROR|AC_ERROR|DC_ERROR|VP_START|AC_END|DC_END|MV_END, s->mb_stride*s->mb_height*sizeof(uint8_t));
s->error_count= 3*s->mb_num;
@@ -722,7 +722,7 @@ void ff_er_frame_start(MpegEncContext *s){
}
/**
- * adds a slice.
+ * Add a slice.
* @param endx x component of the last macroblock, can be -1 for the last of the previous line
* @param status the status at the end (MV_END, AC_ERROR, ...), it is assumed that no earlier end or
* error of the same type occurred
@@ -742,7 +742,7 @@ void ff_er_add_slice(MpegEncContext *s, int startx, int starty, int endx, int en
return;
}
- if(!s->error_recognition) return;
+ if(!s->err_recognition) return;
mask &= ~VP_START;
if(status & (AC_ERROR|AC_END)){
@@ -798,7 +798,7 @@ void ff_er_frame_end(MpegEncContext *s){
int size = s->b8_stride * 2 * s->mb_height;
Picture *pic= s->current_picture_ptr;
- if(!s->error_recognition || s->error_count==0 || s->avctx->lowres ||
+ if(!s->err_recognition || s->error_count==0 || s->avctx->lowres ||
s->avctx->hwaccel ||
s->avctx->codec->capabilities&CODEC_CAP_HWACCEL_VDPAU ||
s->picture_structure != PICT_FRAME || // we do not support ER of field pictures yet, though it should not crash if enabled
@@ -872,7 +872,7 @@ void ff_er_frame_end(MpegEncContext *s){
}
#endif
/* handle missing slices */
- if(s->error_recognition>=4){
+ if(s->err_recognition&AV_EF_EXPLODE){
int end_ok=1;
for(i=s->mb_num-2; i>=s->mb_width+100; i--){ //FIXME +100 hack
diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h
index 3b09dfd285..d4d81375b1 100644
--- a/libavcodec/get_bits.h
+++ b/libavcodec/get_bits.h
@@ -85,13 +85,13 @@ gb
getbitcontext
OPEN_READER(name, gb)
- loads gb into local variables
+ load gb into local variables
CLOSE_READER(name, gb)
- stores local vars in gb
+ store local vars in gb
UPDATE_CACHE(name, gb)
- refills the internal cache from the bitstream
+ refill the internal cache from the bitstream
after this call at least MIN_CACHE_BITS will be available,
GET_CACHE(name, gb)
@@ -290,7 +290,7 @@ static inline unsigned int get_bits(GetBitContext *s, int n){
}
/**
- * Shows 1-25 bits.
+ * Show 1-25 bits.
*/
static inline unsigned int show_bits(GetBitContext *s, int n){
register int tmp;
@@ -337,7 +337,7 @@ static inline void skip_bits1(GetBitContext *s){
}
/**
- * reads 0-32 bits.
+ * Read 0-32 bits.
*/
static inline unsigned int get_bits_long(GetBitContext *s, int n){
if (n <= MIN_CACHE_BITS) return get_bits(s, n);
@@ -353,14 +353,14 @@ static inline unsigned int get_bits_long(GetBitContext *s, int n){
}
/**
- * reads 0-32 bits as a signed integer.
+ * Read 0-32 bits as a signed integer.
*/
static inline int get_sbits_long(GetBitContext *s, int n) {
return sign_extend(get_bits_long(s, n), n);
}
/**
- * shows 0-32 bits.
+ * Show 0-32 bits.
*/
static inline unsigned int show_bits_long(GetBitContext *s, int n){
if (n <= MIN_CACHE_BITS) return show_bits(s, n);
@@ -380,7 +380,7 @@ static inline int check_marker(GetBitContext *s, const char *msg)
}
/**
- * init GetBitContext.
+ * Inititalize GetBitContext.
* @param buffer bitstream buffer, must be FF_INPUT_BUFFER_PADDING_SIZE bytes larger than the actual read bits
* because some optimized bitstream readers read 32 or 64 bit at once and could read over the end
* @param bit_size the size of the buffer in bits
@@ -442,7 +442,6 @@ void free_vlc(VLC *vlc);
/**
- *
* If the vlc code is invalid and max_depth=1, then no bits will be removed.
* If the vlc code is invalid and max_depth>1, then the number of bits removed
* is undefined.
@@ -504,7 +503,7 @@ void free_vlc(VLC *vlc);
/**
- * parses a vlc code, faster than get_vlc()
+ * Parse a vlc code, faster than get_vlc().
* @param bits is the number of bits which will be read at once, must be
* identical to nb_bits in init_vlc()
* @param max_depth is the number of times bits bits must be read to completely
diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c
index 186fe9a651..9b34690e17 100644
--- a/libavcodec/h261dec.c
+++ b/libavcodec/h261dec.c
@@ -97,7 +97,7 @@ static av_cold int h261_decode_init(AVCodecContext *avctx){
}
/**
- * decodes the group of blocks header or slice header.
+ * Decode the group of blocks header or slice header.
* @return <0 if an error occurred
*/
static int h261_decode_gob_header(H261Context *h){
@@ -150,7 +150,7 @@ static int h261_decode_gob_header(H261Context *h){
}
/**
- * decodes the group of blocks / video packet header.
+ * Decode the group of blocks / video packet header.
* @return <0 if no resync found
*/
static int ff_h261_resync(H261Context *h){
@@ -191,7 +191,7 @@ static int ff_h261_resync(H261Context *h){
}
/**
- * decodes skipped macroblocks
+ * Decode skipped macroblocks.
* @return 0
*/
static int h261_decode_mb_skipped(H261Context *h, int mba1, int mba2 )
@@ -355,7 +355,7 @@ intra:
}
/**
- * decodes a macroblock
+ * Decode a macroblock.
* @return <0 if an error occurred
*/
static int h261_decode_block(H261Context * h, DCTELEM * block,
@@ -437,7 +437,7 @@ static int h261_decode_block(H261Context * h, DCTELEM * block,
}
/**
- * decodes the H261 picture header.
+ * Decode the H.261 picture header.
* @return <0 if no startcode found
*/
static int h261_decode_picture_header(H261Context *h){
diff --git a/libavcodec/h261enc.c b/libavcodec/h261enc.c
index a275bfda4a..0110addf73 100644
--- a/libavcodec/h261enc.c
+++ b/libavcodec/h261enc.c
@@ -251,7 +251,7 @@ void ff_h261_encode_init(MpegEncContext *s){
/**
- * encodes a 8x8 block.
+ * Encode an 8x8 block.
* @param block the 8x8 block
* @param n block index (0-3 are luma, 4-5 are chroma)
*/
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index dfb055b930..2c9385c579 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -127,7 +127,7 @@ av_cold int ff_h263_decode_end(AVCodecContext *avctx)
}
/**
- * returns the number of bytes consumed for building the current frame
+ * Return the number of bytes consumed for building the current frame.
*/
static int get_consumed_bytes(MpegEncContext *s, int buf_size){
int pos= (get_bits_count(&s->gb)+7)>>3;
@@ -310,7 +310,7 @@ static int decode_slice(MpegEncContext *s){
max_extra+= 17;
/* buggy padding but the frame should still end approximately at the bitstream end */
- if((s->workaround_bugs&FF_BUG_NO_PADDING) && s->error_recognition>=3)
+ if((s->workaround_bugs&FF_BUG_NO_PADDING) && (s->err_recognition&AV_EF_BUFFER))
max_extra+= 48;
else if((s->workaround_bugs&FF_BUG_NO_PADDING))
max_extra+= 256*256*256*64;
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index f145a63f64..179553f25e 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -63,7 +63,8 @@ static const enum PixelFormat hwaccel_pixfmt_list_h264_jpeg_420[] = {
};
/**
- * checks if the top & left blocks are available if needed & changes the dc mode so it only uses the available blocks.
+ * Check if the top & left blocks are available if needed and
+ * change the dc mode so it only uses the available blocks.
*/
int ff_h264_check_intra4x4_pred_mode(H264Context *h){
MpegEncContext * const s = &h->s;
@@ -2597,7 +2598,7 @@ static void clone_slice(H264Context *dst, H264Context *src)
}
/**
- * computes profile from profile_idc and constraint_set?_flags
+ * Compute profile from profile_idc and constraint_set?_flags.
*
* @param sps SPS
*
@@ -2624,7 +2625,7 @@ int ff_h264_get_profile(SPS *sps)
}
/**
- * decodes a slice header.
+ * Decode a slice header.
* This will also call MPV_common_init() and frame_start() as needed.
*
* @param h h264context
@@ -3743,12 +3744,12 @@ static int execute_decode_slices(H264Context *h, int context_count){
} else {
for(i = 1; i < context_count; i++) {
hx = h->thread_context[i];
- hx->s.error_recognition = avctx->error_recognition;
+ hx->s.err_recognition = avctx->err_recognition;
hx->s.error_count = 0;
hx->x264_build= h->x264_build;
}
- avctx->execute(avctx, (void *)decode_slice,
+ avctx->execute(avctx, decode_slice,
h->thread_context, NULL, context_count, sizeof(void*));
/* pull back stuff from slices to master context */
@@ -4024,7 +4025,7 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
}
/**
- * returns the number of bytes consumed for building the current frame
+ * Return the number of bytes consumed for building the current frame.
*/
static int get_consumed_bytes(MpegEncContext *s, int pos, int buf_size){
if(pos==0) pos=1; //avoid infinite loops (i doubt that is needed but ...)
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index ae71d68036..196aba9ee3 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -784,14 +784,14 @@ static av_always_inline uint16_t pack8to16(int a, int b){
}
/**
- * gets the chroma qp.
+ * Get the chroma qp.
*/
static av_always_inline int get_chroma_qp(H264Context *h, int t, int qscale){
return h->pps.chroma_qp_table[t][qscale];
}
/**
- * gets the predicted intra4x4 prediction mode.
+ * Get the predicted intra4x4 prediction mode.
*/
static av_always_inline int pred_intra_mode(H264Context *h, int n){
const int index8= scan8[n];
diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c
index 31c2658a6b..0bb42bcf73 100644
--- a/libavcodec/h264_cabac.c
+++ b/libavcodec/h264_cabac.c
@@ -1863,7 +1863,7 @@ static av_always_inline void decode_cabac_luma_residual( H264Context *h, const u
}
/**
- * decodes a macroblock
+ * Decode a macroblock.
* @return 0 if OK, AC_ERROR / DC_ERROR / MV_ERROR if an error is noticed
*/
int ff_h264_decode_mb_cabac(H264Context *h) {
diff --git a/libavcodec/h264_cavlc.c b/libavcodec/h264_cavlc.c
index b0dc999132..738f84a423 100644
--- a/libavcodec/h264_cavlc.c
+++ b/libavcodec/h264_cavlc.c
@@ -281,7 +281,7 @@ static int8_t cavlc_level_tab[7][1<<LEVEL_TAB_BITS][2];
#define RUN7_VLC_BITS 6
/**
- * gets the predicted number of non-zero coefficients.
+ * Get the predicted number of non-zero coefficients.
* @param n block index
*/
static inline int pred_non_zero_count(H264Context *h, int n){
@@ -436,7 +436,7 @@ static inline int get_level_prefix(GetBitContext *gb){
}
/**
- * decodes a residual block.
+ * Decode a residual block.
* @param n block index
* @param scantable scantable
* @param max_coeff number of coefficients in the block
diff --git a/libavcodec/h264_mvpred.h b/libavcodec/h264_mvpred.h
index 4cf79ea161..8f524efd03 100644
--- a/libavcodec/h264_mvpred.h
+++ b/libavcodec/h264_mvpred.h
@@ -86,7 +86,7 @@ static av_always_inline int fetch_diagonal_mv(H264Context *h, const int16_t **C,
}
/**
- * gets the predicted MV.
+ * Get the predicted MV.
* @param n the block index
* @param part_width the width of the partition (4, 8,16) -> (1, 2, 4)
* @param mx the x component of the predicted motion vector
@@ -142,7 +142,7 @@ static av_always_inline void pred_motion(H264Context * const h, int n, int part_
}
/**
- * gets the directionally predicted 16x8 MV.
+ * Get the directionally predicted 16x8 MV.
* @param n the block index
* @param mx the x component of the predicted motion vector
* @param my the y component of the predicted motion vector
@@ -177,7 +177,7 @@ static av_always_inline void pred_16x8_motion(H264Context * const h, int n, int
}
/**
- * gets the directionally predicted 8x16 MV.
+ * Get the directionally predicted 8x16 MV.
* @param n the block index
* @param mx the x component of the predicted motion vector
* @param my the y component of the predicted motion vector
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c
index 69e7ab9c99..c622961dd2 100644
--- a/libavcodec/ituh263dec.c
+++ b/libavcodec/ituh263dec.c
@@ -148,7 +148,7 @@ int ff_h263_decode_mba(MpegEncContext *s)
}
/**
- * decodes the group of blocks header or slice header.
+ * Decode the group of blocks header or slice header.
* @return <0 if an error occurred
*/
static int h263_decode_gob_header(MpegEncContext *s)
@@ -203,7 +203,7 @@ static int h263_decode_gob_header(MpegEncContext *s)
}
/**
- * finds the next resync_marker
+ * Find the next resync_marker.
* @param p pointer to buffer to scan
* @param end pointer to the end of the buffer
* @return pointer to the next resync_marker, or end if none was found
@@ -224,7 +224,7 @@ const uint8_t *ff_h263_find_resync_marker(const uint8_t *restrict p, const uint8
}
/**
- * decodes the group of blocks / video packet header.
+ * Decode the group of blocks / video packet header.
* @return bit position of the resync_marker, or <0 if none was found
*/
int ff_h263_resync(MpegEncContext *s){
@@ -306,7 +306,7 @@ int h263_decode_motion(MpegEncContext * s, int pred, int f_code)
}
-/* Decodes RVLC of H.263+ UMV */
+/* Decode RVLC of H.263+ UMV */
static int h263p_decode_umotion(MpegEncContext * s, int pred)
{
int code = 0, sign;
@@ -484,7 +484,7 @@ static int h263_decode_block(MpegEncContext * s, DCTELEM * block,
level = get_bits(&s->gb, 8);
if((level&0x7F) == 0){
av_log(s->avctx, AV_LOG_ERROR, "illegal dc %d at %d %d\n", level, s->mb_x, s->mb_y);
- if(s->error_recognition >= FF_ER_COMPLIANT)
+ if(s->err_recognition & AV_EF_BITSTREAM)
return -1;
}
if (level == 255)
diff --git a/libavcodec/ituh263enc.c b/libavcodec/ituh263enc.c
index 01c603e26d..9d41376ca7 100644
--- a/libavcodec/ituh263enc.c
+++ b/libavcodec/ituh263enc.c
@@ -302,7 +302,7 @@ void ff_clean_h263_qscales(MpegEncContext *s){
static const int dquant_code[5]= {1,0,9,2,3};
/**
- * encodes a 8x8 block.
+ * Encode an 8x8 block.
* @param block the 8x8 block
* @param n block index (0-3 are luma, 4-5 are chroma)
*/
diff --git a/libavcodec/latm_parser.c b/libavcodec/latm_parser.c
index e8ed4cbb35..6cf45c89a8 100644
--- a/libavcodec/latm_parser.c
+++ b/libavcodec/latm_parser.c
@@ -36,7 +36,7 @@ typedef struct LATMParseContext{
} LATMParseContext;
/**
- * finds the end of the current frame in the bitstream.
+ * Find the end of the current frame in the bitstream.
* @return the position of the first byte of the next frame, or -1
*/
static int latm_find_frame_end(AVCodecParserContext *s1, const uint8_t *buf,
diff --git a/libavcodec/mjpeg_parser.c b/libavcodec/mjpeg_parser.c
index c1a47eb38b..40841c3b37 100644
--- a/libavcodec/mjpeg_parser.c
+++ b/libavcodec/mjpeg_parser.c
@@ -34,7 +34,7 @@ typedef struct MJPEGParserContext{
}MJPEGParserContext;
/**
- * finds the end of the current frame in the bitstream.
+ * Find the end of the current frame in the bitstream.
* @return the position of the first byte of the next frame, or -1
*/
static int find_frame_end(MJPEGParserContext *m, const uint8_t *buf, int buf_size){
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index fde4e0217e..7258093f7e 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1653,9 +1653,10 @@ static int mpeg_field_start(MpegEncContext *s, const uint8_t *buf, int buf_size)
#define DECODE_SLICE_OK 0
/**
- * decodes a slice. MpegEncContext.mb_y must be set to the MB row from the startcode
- * @return DECODE_SLICE_ERROR if the slice is damaged<br>
- * DECODE_SLICE_OK if this slice is ok<br>
+ * Decode a slice.
+ * MpegEncContext.mb_y must be set to the MB row from the startcode.
+ * @return DECODE_SLICE_ERROR if the slice is damaged,
+ * DECODE_SLICE_OK if this slice is OK
*/
static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
const uint8_t **buf, int buf_size)
diff --git a/libavcodec/mpeg4video.h b/libavcodec/mpeg4video.h
index f1e6a4d172..00eba68c22 100644
--- a/libavcodec/mpeg4video.h
+++ b/libavcodec/mpeg4video.h
@@ -119,7 +119,7 @@ extern uint8_t ff_mpeg4_static_rl_table_store[3][2][2*MAX_RUN + MAX_LEVEL + 3];
/**
- * predicts the dc.
+ * Predict the dc.
* encoding quantized level -> quantized diff
* decoding quantized diff -> quantized level
* @param n block index (0-3 are luma, 4-5 are chroma)
@@ -174,7 +174,7 @@ static inline int ff_mpeg4_pred_dc(MpegEncContext * s, int n, int level, int *di
}else{
level += pred;
ret= level;
- if(s->error_recognition>=3){
+ if(s->err_recognition&AV_EF_BITSTREAM){
if(level<0){
av_log(s->avctx, AV_LOG_ERROR, "dc<0 at %dx%d\n", s->mb_x, s->mb_y);
return -1;
diff --git a/libavcodec/mpeg4video_parser.h b/libavcodec/mpeg4video_parser.h
index 822a24cb99..50f8b44403 100644
--- a/libavcodec/mpeg4video_parser.h
+++ b/libavcodec/mpeg4video_parser.h
@@ -26,7 +26,7 @@
#include "parser.h"
/**
- * finds the end of the current frame in the bitstream.
+ * Find the end of the current frame in the bitstream.
* @return the position of the first byte of the next frame, or -1
*/
int ff_mpeg4_find_frame_end(ParseContext *pc, const uint8_t *buf, int buf_size);
diff --git a/libavcodec/mpeg4videodec.c b/libavcodec/mpeg4videodec.c
index 5394887edf..1a07888832 100644
--- a/libavcodec/mpeg4videodec.c
+++ b/libavcodec/mpeg4videodec.c
@@ -47,7 +47,7 @@ static const int mb_type_b_map[4]= {
};
/**
- * predicts the ac.
+ * Predict the ac.
* @param n block index (0-3 are luma, 4-5 are chroma)
* @param dir the ac prediction direction
*/
@@ -349,7 +349,7 @@ static void mpeg4_decode_sprite_trajectory(MpegEncContext * s, GetBitContext *gb
}
/**
- * decodes the next video packet.
+ * Decode the next video packet.
* @return <0 if something went wrong
*/
int mpeg4_decode_video_packet_header(MpegEncContext *s)
@@ -435,7 +435,7 @@ int mpeg4_decode_video_packet_header(MpegEncContext *s)
}
/**
- * gets the average motion vector for a GMC MB.
+ * Get the average motion vector for a GMC MB.
* @param n either 0 for the x component or 1 for y
* @return the average MV for a GMC MB
*/
@@ -481,7 +481,7 @@ static inline int get_amv(MpegEncContext *s, int n){
}
/**
- * decodes the dc value.
+ * Decode the dc value.
* @param n block index (0-3 are luma, 4-5 are chroma)
* @param dir_ptr the prediction direction will be stored here
* @return the quantized dc
@@ -516,7 +516,7 @@ static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr)
if (code > 8){
if(get_bits1(&s->gb)==0){ /* marker */
- if(s->error_recognition>=2){
+ if(s->err_recognition&AV_EF_BITSTREAM){
av_log(s->avctx, AV_LOG_ERROR, "dc marker bit missing\n");
return -1;
}
@@ -528,7 +528,7 @@ static inline int mpeg4_decode_dc(MpegEncContext * s, int n, int *dir_ptr)
}
/**
- * decodes first partition.
+ * Decode first partition.
* @return number of MBs decoded or <0 if an error occurred
*/
static int mpeg4_decode_partition_a(MpegEncContext *s){
@@ -780,7 +780,7 @@ static int mpeg4_decode_partition_b(MpegEncContext *s, int mb_count){
}
/**
- * decodes the first & second partition
+ * Decode the first and second partition.
* @return <0 if error (and sets error type in the error_status_table)
*/
int ff_mpeg4_decode_partitions(MpegEncContext *s)
@@ -833,7 +833,7 @@ int ff_mpeg4_decode_partitions(MpegEncContext *s)
}
/**
- * decodes a block.
+ * Decode a block.
* @return <0 if an error occurred
*/
static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
@@ -1012,7 +1012,7 @@ static inline int mpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
else level= level * qmul - qadd;
if((unsigned)(level + 2048) > 4095){
- if(s->error_recognition > FF_ER_COMPLIANT){
+ if(s->err_recognition & AV_EF_BITSTREAM){
if(level > 2560 || level<-2560){
av_log(s->avctx, AV_LOG_ERROR, "|level| overflow in 3. esc, qp=%d\n", s->qscale);
return -1;
@@ -1848,7 +1848,7 @@ no_cplx_est:
}
/**
- * decodes the user data stuff in the header.
+ * Decode the user data stuff in the header.
* Also initializes divx/xvid/lavc_version/build.
*/
static int decode_user_data(MpegEncContext *s, GetBitContext *gb){
@@ -2118,7 +2118,7 @@ static int decode_vop_header(MpegEncContext *s, GetBitContext *gb){
}
/**
- * decode mpeg4 headers
+ * Decode mpeg4 headers.
* @return <0 if no VOP found (or a damaged one)
* FRAME_SKIPPED if a not coded VOP is found
* 0 if a VOP is found
diff --git a/libavcodec/mpeg4videoenc.c b/libavcodec/mpeg4videoenc.c
index 0c5c5f2280..02fdf3eaca 100644
--- a/libavcodec/mpeg4videoenc.c
+++ b/libavcodec/mpeg4videoenc.c
@@ -238,7 +238,7 @@ void ff_clean_mpeg4_qscales(MpegEncContext *s){
/**
- * encodes the dc value.
+ * Encode the dc value.
* @param n block index (0-3 are luma, 4-5 are chroma)
*/
static inline void mpeg4_encode_dc(PutBitContext * s, int level, int n)
@@ -291,7 +291,7 @@ static inline int mpeg4_get_dc_length(int level, int n){
}
/**
- * encodes a 8x8 block
+ * Encode an 8x8 block.
* @param n block index (0-3 are luma, 4-5 are chroma)
*/
static inline void mpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n, int intra_dc,
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 666cad8151..2b792642c5 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -289,7 +289,7 @@ static int alloc_frame_buffer(MpegEncContext *s, Picture *pic)
}
/**
- * allocates a Picture
+ * Allocate a Picture.
* The pixels are allocated/set by calling get_buffer() if shared = 0
*/
int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared)
@@ -388,7 +388,7 @@ fail: // for the FF_ALLOCZ_OR_GOTO macro
}
/**
- * deallocates a picture
+ * Deallocate a picture.
*/
static void free_picture(MpegEncContext *s, Picture *pic)
{
@@ -625,9 +625,9 @@ int ff_mpeg_update_thread_context(AVCodecContext *dst,
}
/**
- * sets the given MpegEncContext to common defaults
+ * Set the given MpegEncContext to common defaults
* (same for encoding and decoding).
- * the changed fields will not depend upon the
+ * The changed fields will not depend upon the
* prior state of the MpegEncContext.
*/
void MPV_common_defaults(MpegEncContext *s)
@@ -653,7 +653,7 @@ void MPV_common_defaults(MpegEncContext *s)
}
/**
- * sets the given MpegEncContext to defaults for decoding.
+ * Set the given MpegEncContext to defaults for decoding.
* the changed fields will not depend upon
* the prior state of the MpegEncContext.
*/
@@ -1264,7 +1264,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
}
}
- s->error_recognition= avctx->error_recognition;
+ s->err_recognition = avctx->err_recognition;
/* set dequantizer, we can't do it during init as it might change for mpeg4
and we can't do it in the header decode as init is not called for mpeg4 there yet */
@@ -1359,7 +1359,7 @@ void MPV_frame_end(MpegEncContext *s)
}
/**
- * draws an line from (ex, ey) -> (sx, sy).
+ * Draw a line from (ex, ey) -> (sx, sy).
* @param w width of the image
* @param h height of the image
* @param stride stride/linesize of the image
@@ -1408,7 +1408,7 @@ static void draw_line(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int h
}
/**
- * draws an arrow from (ex, ey) -> (sx, sy).
+ * Draw an arrow from (ex, ey) -> (sx, sy).
* @param w width of the image
* @param h height of the image
* @param stride stride/linesize of the image
@@ -1441,7 +1441,7 @@ static void draw_arrow(uint8_t *buf, int sx, int sy, int ex, int ey, int w, int
}
/**
- * prints debuging info for the given picture.
+ * Print debuging info for the given picture.
*/
void ff_print_debug_info(MpegEncContext *s, AVFrame *pict){
@@ -2099,7 +2099,7 @@ static inline void add_dequant_dct(MpegEncContext *s,
}
/**
- * cleans dc, ac, coded_block for the current non intra MB
+ * Clean dc, ac, coded_block for the current non-intra MB.
*/
void ff_clean_intra_table_entries(MpegEncContext *s)
{
@@ -2404,7 +2404,6 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[12][64]){
}
/**
- *
* @param h is the normal height, this will be reduced automatically if needed for the last row
*/
void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h
index 13ea78df84..16f1491869 100644
--- a/libavcodec/mpegvideo.h
+++ b/libavcodec/mpegvideo.h
@@ -492,7 +492,7 @@ typedef struct MpegEncContext {
GetBitContext last_resync_gb; ///< used to search for the next resync marker
int mb_num_left; ///< number of MBs left in this video packet (for partitioned Slices only)
int next_p_frame_damaged; ///< set if the next p frame is damaged, to avoid showing trashed b frames
- int error_recognition;
+ int err_recognition;
ParseContext parse_context;
@@ -735,8 +735,8 @@ void ff_init_block_index(MpegEncContext *s);
void ff_copy_picture(Picture *dst, Picture *src);
/**
- * allocates a Picture
- * The pixels are allocated/set by calling get_buffer() if shared=0
+ * Allocate a Picture.
+ * The pixels are allocated/set by calling get_buffer() if shared = 0.
*/
int ff_alloc_picture(MpegEncContext *s, Picture *pic, int shared);
diff --git a/libavcodec/mpegvideo_common.h b/libavcodec/mpegvideo_common.h
index a7badd1ffb..93ce265932 100644
--- a/libavcodec/mpegvideo_common.h
+++ b/libavcodec/mpegvideo_common.h
@@ -42,14 +42,14 @@
int dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow);
/**
- * allocates a Picture
- * The pixels are allocated/set by calling get_buffer() if shared=0
+ * Allocate a Picture.
+ * The pixels are allocated/set by calling get_buffer() if shared = 0.
*/
int alloc_picture(MpegEncContext *s, Picture *pic, int shared);
/**
- * sets the given MpegEncContext to common defaults (same for encoding and decoding).
- * the changed fields will not depend upon the prior state of the MpegEncContext.
+ * Set the given MpegEncContext to common defaults (same for encoding and decoding).
+ * The changed fields will not depend upon the prior state of the MpegEncContext.
*/
void MPV_common_defaults(MpegEncContext *s);
diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index 16139ec51f..40dea427d4 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -228,7 +228,7 @@ static void update_duplicate_context_after_me(MpegEncContext *dst, MpegEncContex
}
/**
- * sets the given MpegEncContext to defaults for encoding.
+ * Set the given MpegEncContext to defaults for encoding.
* the changed fields will not depend upon the prior state of the MpegEncContext.
*/
static void MPV_encode_defaults(MpegEncContext *s){
diff --git a/libavcodec/msmpeg4.c b/libavcodec/msmpeg4.c
index b364845c25..7093aeaa83 100644
--- a/libavcodec/msmpeg4.c
+++ b/libavcodec/msmpeg4.c
@@ -1810,7 +1810,7 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block,
i-= 192;
if(i&(~63)){
const int left= get_bits_left(&s->gb);
- if(((i+192 == 64 && level/qmul==-1) || s->error_recognition<=1) && left>=0){
+ if(((i+192 == 64 && level/qmul==-1) || !(s->err_recognition&AV_EF_BITSTREAM)) && left>=0){
av_log(s->avctx, AV_LOG_ERROR, "ignoring overflow at %d %d\n", s->mb_x, s->mb_y);
break;
}else{
diff --git a/libavcodec/parser.c b/libavcodec/parser.c
index ff71656f78..058d78a6aa 100644
--- a/libavcodec/parser.c
+++ b/libavcodec/parser.c
@@ -214,7 +214,7 @@ void av_parser_close(AVCodecParserContext *s)
/*****************************************************/
/**
- * combines the (truncated) bitstream to a complete frame
+ * Combine the (truncated) bitstream to a complete frame.
* @return -1 if no complete frame could be created, AVERROR(ENOMEM) if there was a memory allocation error
*/
int ff_combine_frame(ParseContext *pc, int next, const uint8_t **buf, int *buf_size)
diff --git a/libavcodec/proresdec_lgpl.c b/libavcodec/proresdec_lgpl.c
index 5a1fcd2e0c..1e9b962790 100644
--- a/libavcodec/proresdec_lgpl.c
+++ b/libavcodec/proresdec_lgpl.c
@@ -499,8 +499,9 @@ static void decode_slice_plane(ProresContext *ctx, ProresThreadData *td,
}
-static int decode_slice(AVCodecContext *avctx, ProresThreadData *td)
+static int decode_slice(AVCodecContext *avctx, void *tdata)
{
+ ProresThreadData *td = tdata;
ProresContext *ctx = avctx->priv_data;
int mb_x_pos = td->x_pos;
int mb_y_pos = td->y_pos;
@@ -621,7 +622,7 @@ static int decode_picture(ProresContext *ctx, int pic_num,
}
}
- return avctx->execute(avctx, (void *) decode_slice,
+ return avctx->execute(avctx, decode_slice,
ctx->slice_data, NULL, slice_num,
sizeof(ctx->slice_data[0]));
}
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 2154163c10..2be54d8d0a 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -324,7 +324,7 @@ static attribute_align_arg void *frame_worker_thread(void *arg)
}
/**
- * Updates the next thread's AVCodecContext with values from the reference thread's context.
+ * Update the next thread's AVCodecContext with values from the reference thread's context.
*
* @param dst The destination context.
* @param src The source context.
diff --git a/libavcodec/ratecontrol.c b/libavcodec/ratecontrol.c
index 5919ea2b23..1fe014fe2f 100644
--- a/libavcodec/ratecontrol.c
+++ b/libavcodec/ratecontrol.c
@@ -300,7 +300,7 @@ int ff_vbv_update(MpegEncContext *s, int frame_size){
}
/**
- * modifies the bitrate curve from pass1 for one frame
+ * Modify the bitrate curve from pass1 for one frame.
*/
static double get_qscale(MpegEncContext *s, RateControlEntry *rce, double rate_factor, int frame_num){
RateControlContext *rcc= &s->rc_context;
@@ -404,7 +404,7 @@ static double get_diff_limited_q(MpegEncContext *s, RateControlEntry *rce, doubl
}
/**
- * gets the qmin & qmax for pict_type
+ * Get the qmin & qmax for pict_type.
*/
static void get_qminmax(int *qmin_ret, int *qmax_ret, MpegEncContext *s, int pict_type){
int qmin= s->avctx->lmin;
diff --git a/libavcodec/resample2.c b/libavcodec/resample2.c
index 5c425587ab..5fe9924c40 100644
--- a/libavcodec/resample2.c
+++ b/libavcodec/resample2.c
@@ -90,7 +90,7 @@ static double bessel(double x){
}
/**
- * builds a polyphase filterbank.
+ * Build a polyphase filterbank.
* @param factor resampling factor
* @param scale wanted sum of coefficients for each filter
* @param type 0->cubic, 1->blackman nuttall windowed sinc, 2..16->kaiser windowed sinc beta=2..16
diff --git a/libavcodec/thread.h b/libavcodec/thread.h
index 1c5ffe7a73..205e45035d 100644
--- a/libavcodec/thread.h
+++ b/libavcodec/thread.h
@@ -31,15 +31,15 @@
#include "avcodec.h"
/**
- * Waits for decoding threads to finish and resets internal
- * state. Called by avcodec_flush_buffers().
+ * Wait for decoding threads to finish and reset internal state.
+ * Called by avcodec_flush_buffers().
*
* @param avctx The context.
*/
void ff_thread_flush(AVCodecContext *avctx);
/**
- * Submits a new frame to a decoding thread.
+ * Submit a new frame to a decoding thread.
* Returns the next available frame in picture. *got_picture_ptr
* will be 0 if none is available.
* The return value on success is the size of the consumed packet for
@@ -62,8 +62,7 @@ int ff_thread_decode_frame(AVCodecContext *avctx, AVFrame *picture,
void ff_thread_finish_setup(AVCodecContext *avctx);
/**
- * Notifies later decoding threads when part of their reference picture
- * is ready.
+ * Notify later decoding threads when part of their reference picture is ready.
* Call this when some part of the picture is finished decoding.
* Later calls with lower values of progress have no effect.
*
@@ -75,7 +74,7 @@ void ff_thread_finish_setup(AVCodecContext *avctx);
void ff_thread_report_progress(AVFrame *f, int progress, int field);
/**
- * Waits for earlier decoding threads to finish reference pictures
+ * Wait for earlier decoding threads to finish reference pictures.
* Call this before accessing some part of a picture, with a given
* value for progress, and it will return after the responsible decoding
* thread calls ff_thread_report_progress() with the same or
diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c
index 88724e54fd..5e1bd2cd5f 100644
--- a/libavcodec/vc1_parser.c
+++ b/libavcodec/vc1_parser.c
@@ -96,7 +96,7 @@ static void vc1_extract_headers(AVCodecParserContext *s, AVCodecContext *avctx,
}
/**
- * finds the end of the current frame in the bitstream.
+ * Find the end of the current frame in the bitstream.
* @return the position of the first byte of the next frame, or -1
*/
static int vc1_find_frame_end(ParseContext *pc, const uint8_t *buf,
diff --git a/libavcodec/vcr1.c b/libavcodec/vcr1.c
index 0c06813cf1..73a7226523 100644
--- a/libavcodec/vcr1.c
+++ b/libavcodec/vcr1.c
@@ -114,8 +114,6 @@ static int decode_frame(AVCodecContext *avctx,
*picture= *(AVFrame*)&a->picture;
*data_size = sizeof(AVPicture);
- emms_c();
-
return buf_size;
}
@@ -130,8 +128,6 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, int buf_size,
p->pict_type= AV_PICTURE_TYPE_I;
p->key_frame= 1;
- emms_c();
-
avpriv_align_put_bits(&a->pb);
while(get_bit_count(&a->pb)&31)
put_bits(&a->pb, 8, 0);