aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-07-27 11:20:13 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-07-27 11:20:13 +0200
commit01a0612c7081954e2bdeb24230daffff8625777b (patch)
tree47663f8a04ea6758b8d3e8f377eb0a8d147cc6d9 /libavcodec
parentdcf1830a15a1e9ad1e16086369d55d8cb3a14e83 (diff)
parenta8d89df367859e5addd8bdbbebb4d787493397da (diff)
downloadffmpeg-01a0612c7081954e2bdeb24230daffff8625777b.tar.gz
Merge branch 'release/0.8' into release/0.7
* release/0.8: (82 commits) Fix version numbers rtp: disable udp fifos, the rtp code cannot work with the fifos in its current form as rtp bypasses the public API. udp: allow fifo size to be tuned seperately riff: Add mpgv MPEG-2 fourcc Update Changelog matroskadec: fix integer underflow if header length < probe length. ffmpeg: fix operation with --disable-avfilter vf_libopencv: replace opencv/cxtypes.h #include by opencv/cxcore.h build: Create mlib optimization directories during out-of-tree builds. changelog: misc typo and wording fixes (cherry picked from commit b047941d7da470ba0dcedb1fd0aa828075265ffc) doc: Remove outdated comments about gcc 2.95 and gcc 3.3 support. (cherry picked from commit 5ccbf80963c1cc54aed97b1c81b1657ab91baf6a) matroskadec: matroska_read_seek after after EBML_STOP leads to failure. Update RELEASE file update Changelog mt: proper locking around release_buffer calls. vp8/mt: flush worker thread, not application thread context, on seek. docs: Mention the upstream bugzilla url about the dlltool vs MSVC issue docs: Use proper markup for a literal command line option docs: Don't recommend adding --enable-memalign-hack docs: Remove needless configure options ... Conflicts: VERSION libavcodec/opt.h libavformat/utils.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aac.h9
-rw-r--r--libavcodec/ac3.h4
-rw-r--r--libavcodec/ac3dec.h30
-rw-r--r--libavcodec/amrnbdec.c16
-rw-r--r--libavcodec/apedec.c2
-rw-r--r--libavcodec/ass.h3
-rw-r--r--libavcodec/avcodec.h6
-rw-r--r--libavcodec/cook.c2
-rw-r--r--libavcodec/h264.c5
-rw-r--r--libavcodec/h264.h2
-rw-r--r--libavcodec/h264idct_template.c1
-rw-r--r--libavcodec/high_bit_depth.h18
-rw-r--r--libavcodec/libvorbis.c1
-rw-r--r--libavcodec/libvpxenc.c1
-rw-r--r--libavcodec/libxvidff.c1
-rw-r--r--libavcodec/motion_est_template.c4
-rw-r--r--libavcodec/opt.h6
-rw-r--r--libavcodec/pthread.c16
-rw-r--r--libavcodec/qcelpdata.h4
-rw-r--r--libavcodec/rv34.c155
-rw-r--r--libavcodec/rv40data.h2
-rw-r--r--libavcodec/sbr.h8
-rw-r--r--libavcodec/tableprint.h3
-rw-r--r--libavcodec/utils.c6
-rw-r--r--libavcodec/vc1.c2
-rw-r--r--libavcodec/vc1dec.c6
-rw-r--r--libavcodec/vp8.c33
-rw-r--r--libavcodec/wmavoice.c22
28 files changed, 215 insertions, 153 deletions
diff --git a/libavcodec/aac.h b/libavcodec/aac.h
index f089ee9a29..477acb5d4e 100644
--- a/libavcodec/aac.h
+++ b/libavcodec/aac.h
@@ -258,7 +258,7 @@ typedef struct {
DynamicRangeControl che_drc;
/**
- * @defgroup elements Channel element related data.
+ * @name Channel element related data
* @{
*/
enum ChannelPosition che_pos[4][MAX_ELEM_ID]; /**< channel element channel mapping with the
@@ -270,14 +270,15 @@ typedef struct {
/** @} */
/**
- * @defgroup temporary aligned temporary buffers (We do not want to have these on the stack.)
+ * @name temporary aligned temporary buffers
+ * (We do not want to have these on the stack.)
* @{
*/
DECLARE_ALIGNED(32, float, buf_mdct)[1024];
/** @} */
/**
- * @defgroup tables Computed / set up during initialization.
+ * @name Computed / set up during initialization
* @{
*/
FFTContext mdct;
@@ -289,7 +290,7 @@ typedef struct {
/** @} */
/**
- * @defgroup output Members used for output interleaving.
+ * @name Members used for output interleaving
* @{
*/
float *output_data[MAX_CHANNELS]; ///< Points to each element's 'ret' buffer (PCM output).
diff --git a/libavcodec/ac3.h b/libavcodec/ac3.h
index a53817e1b0..8e8482f7c5 100644
--- a/libavcodec/ac3.h
+++ b/libavcodec/ac3.h
@@ -94,7 +94,7 @@ typedef struct AC3BitAllocParameters {
* Coded AC-3 header values up to the lfeon element, plus derived values.
*/
typedef struct {
- /** @defgroup coded Coded elements
+ /** @name Coded elements
* @{
*/
uint16_t sync_word;
@@ -112,7 +112,7 @@ typedef struct {
int num_blocks; ///< number of audio blocks
/** @} */
- /** @defgroup derived Derived values
+ /** @name Derived values
* @{
*/
uint8_t sr_shift;
diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h
index 377e5154d7..4b3e7e3d7e 100644
--- a/libavcodec/ac3dec.h
+++ b/libavcodec/ac3dec.h
@@ -69,7 +69,7 @@ typedef struct {
AVCodecContext *avctx; ///< parent context
GetBitContext gbc; ///< bitstream reader
-///@defgroup bsi bit stream information
+///@name Bit stream information
///@{
int frame_type; ///< frame type (strmtyp)
int substreamid; ///< substream identification
@@ -87,7 +87,7 @@ typedef struct {
int eac3; ///< indicates if current frame is E-AC-3
///@}
-///@defgroup audfrm frame syntax parameters
+///@name Frame syntax parameters
int snr_offset_strategy; ///< SNR offset strategy (snroffststr)
int block_switch_syntax; ///< block switch syntax enabled (blkswe)
int dither_flag_syntax; ///< dither flag syntax enabled (dithflage)
@@ -97,7 +97,7 @@ typedef struct {
int skip_syntax; ///< skip field syntax enabled (skipflde)
///@}
-///@defgroup cpl standard coupling
+///@name Standard coupling
int cpl_in_use[AC3_MAX_BLOCKS]; ///< coupling in use (cplinu)
int cpl_strategy_exists[AC3_MAX_BLOCKS];///< coupling strategy exists (cplstre)
int channel_in_cpl[AC3_MAX_CHANNELS]; ///< channel in coupling (chincpl)
@@ -110,7 +110,7 @@ typedef struct {
int cpl_coords[AC3_MAX_CHANNELS][AC3_MAX_CPL_BANDS]; ///< coupling coordinates (cplco)
///@}
-///@defgroup spx spectral extension
+///@name Spectral extension
///@{
int spx_in_use; ///< spectral extension in use (spxinu)
uint8_t channel_uses_spx[AC3_MAX_CHANNELS]; ///< channel uses spectral extension (chinspx)
@@ -126,12 +126,12 @@ typedef struct {
float spx_signal_blend[AC3_MAX_CHANNELS][SPX_MAX_BANDS];///< spx signal blending factor (sblendfact)
///@}
-///@defgroup aht adaptive hybrid transform
+///@name Adaptive hybrid transform
int channel_uses_aht[AC3_MAX_CHANNELS]; ///< channel AHT in use (chahtinu)
int pre_mantissa[AC3_MAX_CHANNELS][AC3_MAX_COEFS][AC3_MAX_BLOCKS]; ///< pre-IDCT mantissas
///@}
-///@defgroup channel channel
+///@name Channel
int fbw_channels; ///< number of full-bandwidth channels
int channels; ///< number of total channels
int lfe_ch; ///< index of LFE channel
@@ -141,27 +141,27 @@ typedef struct {
int out_channels; ///< number of output channels
///@}
-///@defgroup dynrng dynamic range
+///@name Dynamic range
float dynamic_range[2]; ///< dynamic range
///@}
-///@defgroup bandwidth bandwidth
+///@name Bandwidth
int start_freq[AC3_MAX_CHANNELS]; ///< start frequency bin (strtmant)
int end_freq[AC3_MAX_CHANNELS]; ///< end frequency bin (endmant)
///@}
-///@defgroup rematrixing rematrixing
+///@name Rematrixing
int num_rematrixing_bands; ///< number of rematrixing bands (nrematbnd)
int rematrixing_flags[4]; ///< rematrixing flags (rematflg)
///@}
-///@defgroup exponents exponents
+///@name Exponents
int num_exp_groups[AC3_MAX_CHANNELS]; ///< Number of exponent groups (nexpgrp)
int8_t dexps[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< decoded exponents
int exp_strategy[AC3_MAX_BLOCKS][AC3_MAX_CHANNELS]; ///< exponent strategies (expstr)
///@}
-///@defgroup bitalloc bit allocation
+///@name Bit allocation
AC3BitAllocParameters bit_alloc_params; ///< bit allocation parameters
int first_cpl_leak; ///< first coupling leak state (firstcplleak)
int snr_offset[AC3_MAX_CHANNELS]; ///< signal-to-noise ratio offsets (snroffst)
@@ -177,25 +177,25 @@ typedef struct {
uint8_t dba_values[AC3_MAX_CHANNELS][8]; ///< delta values for each segment
///@}
-///@defgroup dithering zero-mantissa dithering
+///@name Zero-mantissa dithering
int dither_flag[AC3_MAX_CHANNELS]; ///< dither flags (dithflg)
AVLFG dith_state; ///< for dither generation
///@}
-///@defgroup imdct IMDCT
+///@name IMDCT
int block_switch[AC3_MAX_CHANNELS]; ///< block switch flags (blksw)
FFTContext imdct_512; ///< for 512 sample IMDCT
FFTContext imdct_256; ///< for 256 sample IMDCT
///@}
-///@defgroup opt optimization
+///@name Optimization
DSPContext dsp; ///< for optimization
AC3DSPContext ac3dsp;
FmtConvertContext fmt_conv; ///< optimized conversion functions
float mul_bias; ///< scaling for float_to_int16 conversion
///@}
-///@defgroup arrays aligned arrays
+///@name Aligned arrays
DECLARE_ALIGNED(16, int, fixed_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< fixed-point transform coefficients
DECLARE_ALIGNED(32, float, transform_coeffs)[AC3_MAX_CHANNELS][AC3_MAX_COEFS]; ///< transform coefficients
DECLARE_ALIGNED(32, float, delay)[AC3_MAX_CHANNELS][AC3_BLOCK_SIZE]; ///< delay - added to the next block
diff --git a/libavcodec/amrnbdec.c b/libavcodec/amrnbdec.c
index 55dc8b05f5..96412bfc21 100644
--- a/libavcodec/amrnbdec.c
+++ b/libavcodec/amrnbdec.c
@@ -204,7 +204,7 @@ static enum Mode unpack_bitstream(AMRContext *p, const uint8_t *buf,
}
-/// @defgroup amr_lpc_decoding AMR pitch LPC coefficient decoding functions
+/// @name AMR pitch LPC coefficient decoding functions
/// @{
/**
@@ -341,7 +341,7 @@ static void lsf2lsp_3(AMRContext *p)
/// @}
-/// @defgroup amr_pitch_vector_decoding AMR pitch vector decoding functions
+/// @name AMR pitch vector decoding functions
/// @{
/**
@@ -403,7 +403,7 @@ static void decode_pitch_vector(AMRContext *p,
/// @}
-/// @defgroup amr_algebraic_code_book AMR algebraic code book (fixed) vector decoding functions
+/// @name AMR algebraic code book (fixed) vector decoding functions
/// @{
/**
@@ -547,7 +547,7 @@ static void pitch_sharpening(AMRContext *p, int subframe, enum Mode mode,
/// @}
-/// @defgroup amr_gain_decoding AMR gain decoding functions
+/// @name AMR gain decoding functions
/// @{
/**
@@ -633,7 +633,7 @@ static void decode_gains(AMRContext *p, const AMRNBSubframe *amr_subframe,
/// @}
-/// @defgroup amr_pre_processing AMR pre-processing functions
+/// @name AMR preprocessing functions
/// @{
/**
@@ -751,7 +751,7 @@ static const float *anti_sparseness(AMRContext *p, AMRFixed *fixed_sparse,
/// @}
-/// @defgroup amr_synthesis AMR synthesis functions
+/// @name AMR synthesis functions
/// @{
/**
@@ -812,7 +812,7 @@ static int synthesis(AMRContext *p, float *lpc,
/// @}
-/// @defgroup amr_update AMR update functions
+/// @name AMR update functions
/// @{
/**
@@ -837,7 +837,7 @@ static void update_state(AMRContext *p)
/// @}
-/// @defgroup amr_postproc AMR Post processing functions
+/// @name AMR Postprocessing functions
/// @{
/**
diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c
index 05498777b4..f036c4a1d7 100644
--- a/libavcodec/apedec.c
+++ b/libavcodec/apedec.c
@@ -217,7 +217,7 @@ static av_cold int ape_decode_close(AVCodecContext * avctx)
}
/**
- * @defgroup rangecoder APE range decoder
+ * @name APE range decoding functions
* @{
*/
diff --git a/libavcodec/ass.h b/libavcodec/ass.h
index 74ef61b776..efff44d6ed 100644
--- a/libavcodec/ass.h
+++ b/libavcodec/ass.h
@@ -25,8 +25,7 @@
#include "avcodec.h"
/**
- * Default values for ASS style.
- * @defgroup ass_default
+ * @name Default values for ASS style
* @{
*/
#define ASS_DEFAULT_FONT "Arial"
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index ec8206b2e6..ea3dd6f4a6 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2622,7 +2622,7 @@ typedef struct AVCodecContext {
#if FF_API_FLAC_GLOBAL_OPTS
/**
- * @defgroup flac_opts FLAC options
+ * @name FLAC options
* @deprecated Use FLAC encoder private options instead.
* @{
*/
@@ -3037,7 +3037,7 @@ typedef struct AVCodec {
const AVProfile *profiles; ///< array of recognized profiles, or NULL if unknown, array is terminated by {FF_PROFILE_UNKNOWN}
/**
- * @defgroup framethreading Frame-level threading support functions.
+ * @name Frame-level threading support functions
* @{
*/
/**
@@ -4063,7 +4063,7 @@ int av_get_bits_per_sample(enum CodecID codec_id);
#if FF_API_OLD_SAMPLE_FMT
/**
- * @deprecated Use av_get_bits_per_sample_fmt() instead.
+ * @deprecated Use av_get_bytes_per_sample() instead.
*/
attribute_deprecated
int av_get_bits_per_sample_format(enum AVSampleFormat sample_fmt);
diff --git a/libavcodec/cook.c b/libavcodec/cook.c
index f0dee7905a..116be2fe98 100644
--- a/libavcodec/cook.c
+++ b/libavcodec/cook.c
@@ -335,7 +335,7 @@ static av_cold int cook_decode_close(AVCodecContext *avctx)
* Fill the gain array for the timedomain quantization.
*
* @param gb pointer to the GetBitContext
- * @param gaininfo[9] array of gain indexes
+ * @param gaininfo array[9] of gain indexes
*/
static void decode_gain_info(GetBitContext *gb, int *gaininfo)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 3b7ed58933..2fae265edd 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1682,7 +1682,7 @@ static av_always_inline void hl_decode_mb_predict_luma(H264Context *h, int mb_ty
uint64_t tr_high;
if(dir == DIAG_DOWN_LEFT_PRED || dir == VERT_LEFT_PRED){
const int topright_avail= (h->topright_samples_available<<i)&0x8000;
- assert(mb_y || linesize <= block_offset[i]);
+ assert(s->mb_y || linesize <= block_offset[i]);
if(!topright_avail){
if (pixel_shift) {
tr_high= ((uint16_t*)ptr)[3 - linesize/2]*0x0001000100010001ULL;
@@ -2488,7 +2488,8 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
s->dropable= h->nal_ref_idc == 0;
- if((s->avctx->flags2 & CODEC_FLAG2_FAST) && !h->nal_ref_idc){
+ /* FIXME: 2tap qpel isn't implemented for high bit depth. */
+ if((s->avctx->flags2 & CODEC_FLAG2_FAST) && !h->nal_ref_idc && !h->pixel_shift){
s->me.qpel_put= s->dsp.put_2tap_qpel_pixels_tab;
s->me.qpel_avg= s->dsp.avg_2tap_qpel_pixels_tab;
}else{
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 7bad91b215..4188ad922c 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -507,7 +507,7 @@ typedef struct H264Context{
int cabac_init_idc;
/**
- * @defgroup multithreading Members for slice based multithreading
+ * @name Members for slice based multithreading
* @{
*/
struct H264Context *thread_context[MAX_THREADS];
diff --git a/libavcodec/h264idct_template.c b/libavcodec/h264idct_template.c
index 83f6f38691..2acdf47a2f 100644
--- a/libavcodec/h264idct_template.c
+++ b/libavcodec/h264idct_template.c
@@ -237,7 +237,6 @@ void FUNCC(ff_h264_idct_add8)(uint8_t **dest, const int *block_offset, DCTELEM *
}
/**
* IDCT transforms the 16 dc values and dequantizes them.
- * @param qp quantization parameter
*/
void FUNCC(ff_h264_luma_dc_dequant_idct)(DCTELEM *p_output, DCTELEM *p_input, int qmul){
#define stride 16
diff --git a/libavcodec/high_bit_depth.h b/libavcodec/high_bit_depth.h
index 511cd00f3a..c0a6eafe89 100644
--- a/libavcodec/high_bit_depth.h
+++ b/libavcodec/high_bit_depth.h
@@ -1,3 +1,21 @@
+/*
+ * This file is part of Libav.
+ *
+ * Libav is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * Libav is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with Libav; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
#include "dsputil.h"
#ifndef BIT_DEPTH
diff --git a/libavcodec/libvorbis.c b/libavcodec/libvorbis.c
index bc219ded9b..4e05268439 100644
--- a/libavcodec/libvorbis.c
+++ b/libavcodec/libvorbis.c
@@ -30,6 +30,7 @@
#include "avcodec.h"
#include "bytestream.h"
#include "vorbis.h"
+#include "libavutil/mathematics.h"
#undef NDEBUG
#include <assert.h>
diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index f5c942e0fc..ac1b79fcc7 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -31,6 +31,7 @@
#include "avcodec.h"
#include "libavutil/base64.h"
#include "libavutil/opt.h"
+#include "libavutil/mathematics.h"
/**
* Portion of struct vpx_codec_cx_pkt from vpx_encoder.h.
diff --git a/libavcodec/libxvidff.c b/libavcodec/libxvidff.c
index effd2db158..c09d9a8ff8 100644
--- a/libavcodec/libxvidff.c
+++ b/libavcodec/libxvidff.c
@@ -30,6 +30,7 @@
#include "avcodec.h"
#include "libavutil/cpu.h"
#include "libavutil/intreadwrite.h"
+#include "libavutil/mathematics.h"
#include "libxvid_internal.h"
#if !HAVE_MKSTEMP
#include <fcntl.h>
diff --git a/libavcodec/motion_est_template.c b/libavcodec/motion_est_template.c
index 461e85932b..3ff001bc82 100644
--- a/libavcodec/motion_est_template.c
+++ b/libavcodec/motion_est_template.c
@@ -992,8 +992,8 @@ static av_always_inline int diamond_search(MpegEncContext * s, int *best, int dm
return var_diamond_search(s, best, dmin, src_index, ref_index, penalty_factor, size, h, flags);
}
-/*!
- \param P[10][2] a list of candidate mvs to check before starting the
+/**
+ @param P a list of candidate mvs to check before starting the
iterative search. If one of the candidates is close to the optimal mv, then
it takes fewer iterations. And it increases the chance that we find the
optimal mv.
diff --git a/libavcodec/opt.h b/libavcodec/opt.h
index 95147595b7..505377d7d9 100644
--- a/libavcodec/opt.h
+++ b/libavcodec/opt.h
@@ -19,6 +19,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+/**
+ * @file
+ * This header is provided for compatibility only and will be removed
+ * on next major bump
+ */
+
#ifndef AVCODEC_OPT_H
#define AVCODEC_OPT_H
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index e84f2aea4c..4c0d4210ad 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -411,9 +411,10 @@ static void release_delayed_buffers(PerThreadContext *p)
FrameThreadContext *fctx = p->parent;
while (p->num_released_buffers > 0) {
- AVFrame *f = &p->released_buffers[--p->num_released_buffers];
+ AVFrame *f;
pthread_mutex_lock(&fctx->buffer_mutex);
+ f = &p->released_buffers[--p->num_released_buffers];
free_progress(f);
f->thread_opaque = NULL;
@@ -749,9 +750,12 @@ void ff_thread_flush(AVCodecContext *avctx)
if (!avctx->thread_opaque) return;
park_frame_worker_threads(fctx, avctx->thread_count);
-
- if (fctx->prev_thread)
- update_context_from_thread(fctx->threads->avctx, fctx->prev_thread->avctx, 0);
+ if (fctx->prev_thread) {
+ if (fctx->prev_thread != &fctx->threads[0])
+ update_context_from_thread(fctx->threads[0].avctx, fctx->prev_thread->avctx, 0);
+ if (avctx->codec->flush)
+ avctx->codec->flush(fctx->threads[0].avctx);
+ }
fctx->next_decoding = fctx->next_finished = 0;
fctx->delaying = 1;
@@ -839,6 +843,7 @@ int ff_thread_get_buffer(AVCodecContext *avctx, AVFrame *f)
void ff_thread_release_buffer(AVCodecContext *avctx, AVFrame *f)
{
PerThreadContext *p = avctx->thread_opaque;
+ FrameThreadContext *fctx;
if (!(avctx->active_thread_type&FF_THREAD_FRAME)) {
avctx->release_buffer(avctx, f);
@@ -854,7 +859,10 @@ void ff_thread_release_buffer(AVCodecContext *avctx, AVFrame *f)
av_log(avctx, AV_LOG_DEBUG, "thread_release_buffer called on pic %p, %d buffers used\n",
f, f->owner->internal_buffer_count);
+ fctx = p->parent;
+ pthread_mutex_lock(&fctx->buffer_mutex);
p->released_buffers[p->num_released_buffers++] = *f;
+ pthread_mutex_unlock(&fctx->buffer_mutex);
memset(f->data, 0, sizeof(f->data));
}
diff --git a/libavcodec/qcelpdata.h b/libavcodec/qcelpdata.h
index d79cea9f6c..df04435af2 100644
--- a/libavcodec/qcelpdata.h
+++ b/libavcodec/qcelpdata.h
@@ -38,14 +38,14 @@
* QCELP unpacked data frame
*/
typedef struct {
-/// @defgroup qcelp_codebook_parameters QCELP excitation codebook parameters
+/// @name QCELP excitation codebook parameters
/// @{
uint8_t cbsign[16]; ///!< sign of the codebook gain for each codebook subframe
uint8_t cbgain[16]; ///!< unsigned codebook gain for each codebook subframe
uint8_t cindex[16]; ///!< codebook index for each codebook subframe
/// @}
-/// @defgroup qcelp_pitch_parameters QCELP pitch prediction parameters
+/// @name QCELP pitch prediction parameters
/// @{
uint8_t plag[4]; ///!< pitch lag for each pitch subframe
uint8_t pfrac[4]; ///!< fractional pitch lag for each pitch subframe
diff --git a/libavcodec/rv34.c b/libavcodec/rv34.c
index a5db0b0255..132d953474 100644
--- a/libavcodec/rv34.c
+++ b/libavcodec/rv34.c
@@ -62,8 +62,10 @@ static const int rv34_mb_type_to_lavc[12] = {
static RV34VLC intra_vlcs[NUM_INTRA_TABLES], inter_vlcs[NUM_INTER_TABLES];
+static int rv34_decode_mv(RV34DecContext *r, int block_type);
+
/**
- * @defgroup vlc RV30/40 VLC generating functions
+ * @name RV30/40 VLC generating functions
* @{
*/
@@ -171,7 +173,7 @@ static av_cold void rv34_init_tables(void)
/**
- * @defgroup transform RV30/40 inverse transform functions
+ * @name RV30/40 inverse transform functions
* @{
*/
@@ -246,7 +248,7 @@ static void rv34_inv_transform_noround(DCTELEM *block){
/**
- * @defgroup block RV30/40 4x4 block decoding functions
+ * @name RV30/40 4x4 block decoding functions
* @{
*/
@@ -393,7 +395,7 @@ static inline void rv34_dequant4x4_16x16(DCTELEM *block, int Qdc, int Q)
/**
- * @defgroup rv3040_bitstream RV30/40 bitstream parsing
+ * @name RV30/40 bitstream parsing
* @{
*/
@@ -432,10 +434,76 @@ static inline int rv34_decode_dquant(GetBitContext *gb, int quant)
return get_bits(gb, 5);
}
+/**
+ * Decode macroblock header and return CBP in case of success, -1 otherwise.
+ */
+static int rv34_decode_mb_header(RV34DecContext *r, int8_t *intra_types)
+{
+ MpegEncContext *s = &r->s;
+ GetBitContext *gb = &s->gb;
+ int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
+ int i, t;
+
+ if(!r->si.type){
+ r->is16 = get_bits1(gb);
+ if(!r->is16 && !r->rv30){
+ if(!get_bits1(gb))
+ av_log(s->avctx, AV_LOG_ERROR, "Need DQUANT\n");
+ }
+ s->current_picture_ptr->mb_type[mb_pos] = r->is16 ? MB_TYPE_INTRA16x16 : MB_TYPE_INTRA;
+ r->block_type = r->is16 ? RV34_MB_TYPE_INTRA16x16 : RV34_MB_TYPE_INTRA;
+ }else{
+ r->block_type = r->decode_mb_info(r);
+ if(r->block_type == -1)
+ return -1;
+ s->current_picture_ptr->mb_type[mb_pos] = rv34_mb_type_to_lavc[r->block_type];
+ r->mb_type[mb_pos] = r->block_type;
+ if(r->block_type == RV34_MB_SKIP){
+ if(s->pict_type == AV_PICTURE_TYPE_P)
+ r->mb_type[mb_pos] = RV34_MB_P_16x16;
+ if(s->pict_type == AV_PICTURE_TYPE_B)
+ r->mb_type[mb_pos] = RV34_MB_B_DIRECT;
+ }
+ r->is16 = !!IS_INTRA16x16(s->current_picture_ptr->mb_type[mb_pos]);
+ rv34_decode_mv(r, r->block_type);
+ if(r->block_type == RV34_MB_SKIP){
+ fill_rectangle(intra_types, 4, 4, r->intra_types_stride, 0, sizeof(intra_types[0]));
+ return 0;
+ }
+ r->chroma_vlc = 1;
+ r->luma_vlc = 0;
+ }
+ if(IS_INTRA(s->current_picture_ptr->mb_type[mb_pos])){
+ if(r->is16){
+ t = get_bits(gb, 2);
+ fill_rectangle(intra_types, 4, 4, r->intra_types_stride, t, sizeof(intra_types[0]));
+ r->luma_vlc = 2;
+ }else{
+ if(r->decode_intra_types(r, gb, intra_types) < 0)
+ return -1;
+ r->luma_vlc = 1;
+ }
+ r->chroma_vlc = 0;
+ r->cur_vlcs = choose_vlc_set(r->si.quant, r->si.vlc_set, 0);
+ }else{
+ for(i = 0; i < 16; i++)
+ intra_types[(i & 3) + (i>>2) * r->intra_types_stride] = 0;
+ r->cur_vlcs = choose_vlc_set(r->si.quant, r->si.vlc_set, 1);
+ if(r->mb_type[mb_pos] == RV34_MB_P_MIX16x16){
+ r->is16 = 1;
+ r->chroma_vlc = 1;
+ r->luma_vlc = 2;
+ r->cur_vlcs = choose_vlc_set(r->si.quant, r->si.vlc_set, 0);
+ }
+ }
+
+ return rv34_decode_cbp(gb, r->cur_vlcs, r->is16);
+}
+
/** @} */ //bitstream functions
/**
- * @defgroup mv motion vector related code (prediction, reconstruction, motion compensation)
+ * @name motion vector related code (prediction, reconstruction, motion compensation)
* @{
*/
@@ -885,7 +953,7 @@ static int rv34_decode_mv(RV34DecContext *r, int block_type)
/** @} */ // mv group
/**
- * @defgroup recons Macroblock reconstruction functions
+ * @name Macroblock reconstruction functions
* @{
*/
/** mapping of RV30/40 intra prediction types to standard H.264 types */
@@ -1027,79 +1095,6 @@ static void rv34_output_macroblock(RV34DecContext *r, int8_t *intra_types, int c
}
}
-/** @} */ // recons group
-
-/**
- * @addtogroup bitstream
- * Decode macroblock header and return CBP in case of success, -1 otherwise.
- */
-static int rv34_decode_mb_header(RV34DecContext *r, int8_t *intra_types)
-{
- MpegEncContext *s = &r->s;
- GetBitContext *gb = &s->gb;
- int mb_pos = s->mb_x + s->mb_y * s->mb_stride;
- int i, t;
-
- if(!r->si.type){
- r->is16 = get_bits1(gb);
- if(!r->is16 && !r->rv30){
- if(!get_bits1(gb))
- av_log(s->avctx, AV_LOG_ERROR, "Need DQUANT\n");
- }
- s->current_picture_ptr->mb_type[mb_pos] = r->is16 ? MB_TYPE_INTRA16x16 : MB_TYPE_INTRA;
- r->block_type = r->is16 ? RV34_MB_TYPE_INTRA16x16 : RV34_MB_TYPE_INTRA;
- }else{
- r->block_type = r->decode_mb_info(r);
- if(r->block_type == -1)
- return -1;
- s->current_picture_ptr->mb_type[mb_pos] = rv34_mb_type_to_lavc[r->block_type];
- r->mb_type[mb_pos] = r->block_type;
- if(r->block_type == RV34_MB_SKIP){
- if(s->pict_type == AV_PICTURE_TYPE_P)
- r->mb_type[mb_pos] = RV34_MB_P_16x16;
- if(s->pict_type == AV_PICTURE_TYPE_B)
- r->mb_type[mb_pos] = RV34_MB_B_DIRECT;
- }
- r->is16 = !!IS_INTRA16x16(s->current_picture_ptr->mb_type[mb_pos]);
- rv34_decode_mv(r, r->block_type);
- if(r->block_type == RV34_MB_SKIP){
- fill_rectangle(intra_types, 4, 4, r->intra_types_stride, 0, sizeof(intra_types[0]));
- return 0;
- }
- r->chroma_vlc = 1;
- r->luma_vlc = 0;
- }
- if(IS_INTRA(s->current_picture_ptr->mb_type[mb_pos])){
- if(r->is16){
- t = get_bits(gb, 2);
- fill_rectangle(intra_types, 4, 4, r->intra_types_stride, t, sizeof(intra_types[0]));
- r->luma_vlc = 2;
- }else{
- if(r->decode_intra_types(r, gb, intra_types) < 0)
- return -1;
- r->luma_vlc = 1;
- }
- r->chroma_vlc = 0;
- r->cur_vlcs = choose_vlc_set(r->si.quant, r->si.vlc_set, 0);
- }else{
- for(i = 0; i < 16; i++)
- intra_types[(i & 3) + (i>>2) * r->intra_types_stride] = 0;
- r->cur_vlcs = choose_vlc_set(r->si.quant, r->si.vlc_set, 1);
- if(r->mb_type[mb_pos] == RV34_MB_P_MIX16x16){
- r->is16 = 1;
- r->chroma_vlc = 1;
- r->luma_vlc = 2;
- r->cur_vlcs = choose_vlc_set(r->si.quant, r->si.vlc_set, 0);
- }
- }
-
- return rv34_decode_cbp(gb, r->cur_vlcs, r->is16);
-}
-
-/**
- * @addtogroup recons
- * @{
- */
/**
* mask for retrieving all bits in coded block pattern
* corresponding to one 8x8 block
@@ -1109,6 +1104,8 @@ static int rv34_decode_mb_header(RV34DecContext *r, int8_t *intra_types)
#define U_CBP_MASK 0x0F0000
#define V_CBP_MASK 0xF00000
+/** @} */ // recons group
+
static void rv34_apply_differences(RV34DecContext *r, int cbp)
{
diff --git a/libavcodec/rv40data.h b/libavcodec/rv40data.h
index 7912919ba1..436afa84e2 100644
--- a/libavcodec/rv40data.h
+++ b/libavcodec/rv40data.h
@@ -65,7 +65,7 @@ static const uint8_t rv40_luma_dc_quant[2][32] = {
};
/**
- * @defgroup loopfilter coefficients used by the RV40 loop filter
+ * @name Coefficients used by the RV40 loop filter
* @{
*/
/**
diff --git a/libavcodec/sbr.h b/libavcodec/sbr.h
index 82a996fdc6..69c847ac15 100644
--- a/libavcodec/sbr.h
+++ b/libavcodec/sbr.h
@@ -42,7 +42,7 @@ typedef struct {
uint8_t bs_xover_band;
/**
- * @defgroup bs_header_extra_1 Variables associated with bs_header_extra_1
+ * @name Variables associated with bs_header_extra_1
* @{
*/
uint8_t bs_freq_scale;
@@ -58,7 +58,7 @@ typedef struct {
*/
typedef struct {
/**
- * @defgroup aac_bitstream Main bitstream data variables
+ * @name Main bitstream data variables
* @{
*/
unsigned bs_frame_class;
@@ -74,7 +74,7 @@ typedef struct {
/** @} */
/**
- * @defgroup state State variables
+ * @name State variables
* @{
*/
DECLARE_ALIGNED(16, float, synthesis_filterbank_samples)[SBR_SYNTHESIS_BUF_SIZE];
@@ -116,7 +116,7 @@ typedef struct {
SpectrumParameters spectrum_params;
int bs_amp_res_header;
/**
- * @defgroup bs_header_extra_2 variables associated with bs_header_extra_2
+ * @name Variables associated with bs_header_extra_2
* @{
*/
unsigned bs_limiter_bands;
diff --git a/libavcodec/tableprint.h b/libavcodec/tableprint.h
index d81b9a387b..cbe075ec29 100644
--- a/libavcodec/tableprint.h
+++ b/libavcodec/tableprint.h
@@ -56,8 +56,7 @@ void write_##type##_2d_array(const void *arg, int len, int len2)\
}
/**
- * \defgroup printfuncs Predefined functions for printing tables
- *
+ * @name Predefined functions for printing tables
* \{
*/
void write_int8_t_array (const int8_t *, int);
diff --git a/libavcodec/utils.c b/libavcodec/utils.c
index b61fb75274..5520ede336 100644
--- a/libavcodec/utils.c
+++ b/libavcodec/utils.c
@@ -149,6 +149,10 @@ void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height, int l
case PIX_FMT_YUV420P10BE:
case PIX_FMT_YUV422P10LE:
case PIX_FMT_YUV422P10BE:
+ case PIX_FMT_YUV444P9LE:
+ case PIX_FMT_YUV444P9BE:
+ case PIX_FMT_YUV444P10LE:
+ case PIX_FMT_YUV444P10BE:
w_align= 16; //FIXME check for non mpeg style codecs and use less alignment
h_align= 16;
if(s->codec_id == CODEC_ID_MPEG2VIDEO || s->codec_id == CODEC_ID_MJPEG || s->codec_id == CODEC_ID_AMV || s->codec_id == CODEC_ID_THP || s->codec_id == CODEC_ID_H264)
@@ -1191,7 +1195,7 @@ void avcodec_flush_buffers(AVCodecContext *avctx)
{
if(HAVE_PTHREADS && avctx->active_thread_type&FF_THREAD_FRAME)
ff_thread_flush(avctx);
- if(avctx->codec->flush)
+ else if(avctx->codec->flush)
avctx->codec->flush(avctx);
}
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index e062a35cc1..d6b48b46d0 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -40,7 +40,7 @@
/***********************************************************************/
/**
- * @defgroup vc1bitplane VC-1 Bitplane decoding
+ * @name VC-1 Bitplane decoding
* @see 8.7, p56
* @{
*/
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 7093363084..8f70baa918 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -137,7 +137,7 @@ static int vc1_init_common(VC1Context *v)
/***********************************************************************/
/**
- * @defgroup vc1bitplane VC-1 Bitplane decoding
+ * @name VC-1 Bitplane decoding
* @see 8.7, p56
* @{
*/
@@ -774,7 +774,7 @@ static void vc1_mc_4mv_chroma(VC1Context *v)
/***********************************************************************/
/**
- * @defgroup vc1block VC-1 Block-level functions
+ * @name VC-1 Block-level functions
* @see 7.1.4, p91 and 8.1.1.7, p(1)04
* @{
*/
@@ -1512,7 +1512,7 @@ static inline int vc1_pred_dc(MpegEncContext *s, int overlap, int pq, int n,
/** @} */ // Block group
/**
- * @defgroup vc1_std_mb VC1 Macroblock-level functions in Simple/Main Profiles
+ * @name VC1 Macroblock-level functions in Simple/Main Profiles
* @see 7.1.4, p91 and 8.1.1.7, p(1)04
* @{
*/
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c
index 082d8e5829..3e93653085 100644
--- a/libavcodec/vp8.c
+++ b/libavcodec/vp8.c
@@ -641,8 +641,6 @@ void decode_mb_mode(VP8Context *s, VP8Macroblock *mb, int mb_x, int mb_y, uint8_
* @param block destination for block coefficients
* @param probs probabilities to use when reading trees from the bitstream
* @param i initial coeff index, 0 unless a separate DC block is coded
- * @param zero_nhood the initial prediction context for number of surrounding
- * all-zero blocks (only left/top, so 0-2)
* @param qmul array holding the dc/ac dequant factor at position 0/1
* @return 0 if no coeffs were decoded
* otherwise, the index of the last coeff decoded plus one
@@ -701,6 +699,17 @@ skip_eob:
}
#endif
+/**
+ * @param c arithmetic bitstream reader context
+ * @param block destination for block coefficients
+ * @param probs probabilities to use when reading trees from the bitstream
+ * @param i initial coeff index, 0 unless a separate DC block is coded
+ * @param zero_nhood the initial prediction context for number of surrounding
+ * all-zero blocks (only left/top, so 0-2)
+ * @param qmul array holding the dc/ac dequant factor at position 0/1
+ * @return 0 if no coeffs were decoded
+ * otherwise, the index of the last coeff decoded plus one
+ */
static av_always_inline
int decode_block_coeffs(VP56RangeCoder *c, DCTELEM block[16],
uint8_t probs[16][3][NUM_DCT_TOKENS-1],
@@ -1034,10 +1043,9 @@ static const uint8_t subpel_idx[3][8] = {
};
/**
- * Generic MC function.
+ * luma MC function
*
* @param s VP8 decoding context
- * @param luma 1 for luma (Y) planes, 0 for chroma (Cb/Cr) planes
* @param dst target buffer for block data at block position
* @param src reference picture buffer at origin (0, 0)
* @param mv motion vector (relative to block position) to get pixel data from
@@ -1083,6 +1091,23 @@ void vp8_mc_luma(VP8Context *s, uint8_t *dst, AVFrame *ref, const VP56mv *mv,
}
}
+/**
+ * chroma MC function
+ *
+ * @param s VP8 decoding context
+ * @param dst1 target buffer for block data at block position (U plane)
+ * @param dst2 target buffer for block data at block position (V plane)
+ * @param ref reference picture buffer at origin (0, 0)
+ * @param mv motion vector (relative to block position) to get pixel data from
+ * @param x_off horizontal position of block from origin (0, 0)
+ * @param y_off vertical position of block from origin (0, 0)
+ * @param block_w width of block (16, 8 or 4)
+ * @param block_h height of block (always same as block_w)
+ * @param width width of src/dst plane data
+ * @param height height of src/dst plane data
+ * @param linesize size of a single line of plane data, including padding
+ * @param mc_func motion compensation function pointers (bilinear or sixtap MC)
+ */
static av_always_inline
void vp8_mc_chroma(VP8Context *s, uint8_t *dst1, uint8_t *dst2, AVFrame *ref,
const VP56mv *mv, int x_off, int y_off,
diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index 3604eac782..002c529a30 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -128,9 +128,7 @@ static const struct frame_type_desc {
*/
typedef struct {
/**
- * @defgroup struct_global Global values
- * Global values, specified in the stream header / extradata or used
- * all over.
+ * @name Global values specified in the stream header / extradata or used all over.
* @{
*/
GetBitContext gb; ///< packet bitreader. During decoder init,
@@ -182,8 +180,9 @@ typedef struct {
/**
* @}
- * @defgroup struct_packet Packet values
- * Packet values, specified in the packet header or related to a packet.
+ *
+ * @name Packet values specified in the packet header or related to a packet.
+ *
* A packet is considered to be a single unit of data provided to this
* decoder by the demuxer.
* @{
@@ -213,7 +212,8 @@ typedef struct {
/**
* @}
- * @defgroup struct_frame Frame and superframe values
+ *
+ * @name Frame and superframe values
* Superframe and frame data - these can change from frame to frame,
* although some of them do in that case serve as a cache / history for
* the next frame or superframe.
@@ -256,7 +256,9 @@ typedef struct {
float synth_history[MAX_LSPS]; ///< see #excitation_history
/**
* @}
- * @defgroup post_filter Postfilter values
+ *
+ * @name Postfilter values
+ *
* Variables used for postfilter implementation, mostly history for
* smoothing and so on, and context variables for FFT/iFFT.
* @{
@@ -432,7 +434,7 @@ static av_cold int wmavoice_decode_init(AVCodecContext *ctx)
}
/**
- * @defgroup postfilter Postfilter functions
+ * @name Postfilter functions
* Postfilter functions (gain control, wiener denoise filter, DC filter,
* kalman smoothening, plus surrounding code to wrap it)
* @{
@@ -825,7 +827,7 @@ static void dequant_lsps(double *lsps, int num,
}
/**
- * @defgroup lsp_dequant LSP dequantization routines
+ * @name LSP dequantization routines
* LSP dequantization routines, for 10/16LSPs and independent/residual coding.
* @note we assume enough bits are available, caller should check.
* lsp10i() consumes 24 bits; lsp10r() consumes an additional 24 bits;
@@ -969,7 +971,7 @@ static void dequant_lsp16r(GetBitContext *gb,
/**
* @}
- * @defgroup aw Pitch-adaptive window coding functions
+ * @name Pitch-adaptive window coding functions
* The next few functions are for pitch-adaptive window coding.
* @{
*/