aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-07-03 02:56:12 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-07-03 03:14:10 +0200
commitcbfdfbe846f872d4283579c8cbca42c90896905c (patch)
treeadc2aebfe0b12ffa1a889dc72ab57bcb1e0ad9e0 /libavcodec
parent59bd0fef6691f5b23eebbd7dd2f3e74c8d60c6a7 (diff)
parent5dd045ebc11933dca4d6af06e6b1e62be56802f7 (diff)
downloadffmpeg-cbfdfbe846f872d4283579c8cbca42c90896905c.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: ARM: ac3: update ff_ac3_extract_exponents_neon per 8b7b2d6 ARM: NEON optimised vector_clip_int32() swscale: disable full_chroma_int when converting to non-24/32bpp RGB. suggest to use av_get_bytes_per_sample() in av_get_bits_per_sample_format() doxy ffmpeg: use av_get_bytes_per_sample() in place of av_get_bits_per_sample_fmt() put_bits: remove ALT_BITSTREAM_WRITER put_bits: always use intreadwrite.h macros libavformat: Add an example how to use the metadata API doxygen: Prefer member groups over grouping into modules doxygen: be more permissive when searching for API examples avformat: doxify the Metadata API lavf: restore old behavior for custom AVIOContex with an AVFMT_NOFILE format. lavf: use the correct pointer in av_open_input_stream(). avidec: infer absolute vs relative index from first packet Conflicts: libavformat/Makefile libavformat/avidec.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/arm/ac3dsp_neon.S7
-rw-r--r--libavcodec/arm/dsputil_init_neon.c3
-rw-r--r--libavcodec/arm/dsputil_neon.S16
-rw-r--r--libavcodec/ass.h3
-rw-r--r--libavcodec/avcodec.h6
-rw-r--r--libavcodec/bitstream.c4
-rw-r--r--libavcodec/h264.h2
-rw-r--r--libavcodec/mpegvideo_enc.c2
-rw-r--r--libavcodec/put_bits.h117
-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.h2
-rw-r--r--libavcodec/vc1.c2
-rw-r--r--libavcodec/vc1dec.c6
-rw-r--r--libavcodec/wmavoice.c22
22 files changed, 159 insertions, 263 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 e0b6332065..b8d826e139 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/arm/ac3dsp_neon.S b/libavcodec/arm/ac3dsp_neon.S
index fdf1deabc9..e97197c27a 100644
--- a/libavcodec/arm/ac3dsp_neon.S
+++ b/libavcodec/arm/ac3dsp_neon.S
@@ -95,19 +95,14 @@ function ff_float_to_fixed24_neon, export=1
endfunc
function ff_ac3_extract_exponents_neon, export=1
- vmov.i32 q14, #24
vmov.i32 q15, #8
1:
- vld1.32 {q0}, [r1,:128]
+ vld1.32 {q0}, [r1,:128]!
vabs.s32 q1, q0
vclz.i32 q3, q1
vsub.i32 q3, q3, q15
- vcge.s32 q2, q3, q14
- vbit q3, q14, q2
- vbic q0, q0, q2
vmovn.i32 d6, q3
vmovn.i16 d6, q3
- vst1.32 {q0}, [r1,:128]!
vst1.32 {d6[0]}, [r0,:32]!
subs r2, r2, #4
bgt 1b
diff --git a/libavcodec/arm/dsputil_init_neon.c b/libavcodec/arm/dsputil_init_neon.c
index 6faf3dc8d0..c818b33fef 100644
--- a/libavcodec/arm/dsputil_init_neon.c
+++ b/libavcodec/arm/dsputil_init_neon.c
@@ -160,6 +160,8 @@ void ff_vector_fmul_add_neon(float *dst, const float *src0, const float *src1,
void ff_vector_clipf_neon(float *dst, const float *src, float min, float max,
int len);
+void ff_vector_clip_int32_neon(int32_t *dst, const int32_t *src, int32_t min,
+ int32_t max, unsigned int len);
void ff_vorbis_inverse_coupling_neon(float *mag, float *ang, int blocksize);
@@ -316,6 +318,7 @@ void ff_dsputil_init_neon(DSPContext *c, AVCodecContext *avctx)
c->vector_fmul_reverse = ff_vector_fmul_reverse_neon;
c->vector_fmul_add = ff_vector_fmul_add_neon;
c->vector_clipf = ff_vector_clipf_neon;
+ c->vector_clip_int32 = ff_vector_clip_int32_neon;
c->vector_fmul_sv_scalar[0] = ff_vector_fmul_sv_scalar_2_neon;
c->vector_fmul_sv_scalar[1] = ff_vector_fmul_sv_scalar_4_neon;
diff --git a/libavcodec/arm/dsputil_neon.S b/libavcodec/arm/dsputil_neon.S
index 2147658af6..250a32af6e 100644
--- a/libavcodec/arm/dsputil_neon.S
+++ b/libavcodec/arm/dsputil_neon.S
@@ -815,3 +815,19 @@ function ff_apply_window_int16_neon, export=1
pop {r4,pc}
endfunc
+
+function ff_vector_clip_int32_neon, export=1
+ vdup.32 q0, r2
+ vdup.32 q1, r3
+ ldr r2, [sp]
+1:
+ vld1.32 {q2-q3}, [r1,:128]!
+ vmin.s32 q2, q2, q1
+ vmin.s32 q3, q3, q1
+ vmax.s32 q2, q2, q0
+ vmax.s32 q3, q3, q0
+ vst1.32 {q2-q3}, [r0,:128]!
+ subs r2, r2, #8
+ bgt 1b
+ bx lr
+endfunc
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 4cd928dc83..1eb10ab41d 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2535,7 +2535,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.
* @{
*/
@@ -2957,7 +2957,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
* @{
*/
/**
@@ -3915,7 +3915,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/bitstream.c b/libavcodec/bitstream.c
index f0fa9652c6..b164ecdd11 100644
--- a/libavcodec/bitstream.c
+++ b/libavcodec/bitstream.c
@@ -43,11 +43,7 @@ const uint8_t ff_log2_run[41]={
void align_put_bits(PutBitContext *s)
{
-#ifdef ALT_BITSTREAM_WRITER
- put_bits(s,( - s->index) & 7,0);
-#else
put_bits(s,s->bit_left & 7,0);
-#endif
}
void ff_put_string(PutBitContext *pb, const char *string, int terminate_string)
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/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c
index bb7fdc735f..888d8130e9 100644
--- a/libavcodec/mpegvideo_enc.c
+++ b/libavcodec/mpegvideo_enc.c
@@ -2170,9 +2170,7 @@ static int encode_thread(AVCodecContext *c, void *arg){
int d= 100 / s->avctx->error_rate;
if(r % d == 0){
current_packet_size=0;
-#ifndef ALT_BITSTREAM_WRITER
s->pb.buf_ptr= s->ptr_lastgob;
-#endif
assert(put_bits_ptr(&s->pb) == s->ptr_lastgob);
}
}
diff --git a/libavcodec/put_bits.h b/libavcodec/put_bits.h
index 79016912d5..a3fc5f16f1 100644
--- a/libavcodec/put_bits.h
+++ b/libavcodec/put_bits.h
@@ -36,19 +36,10 @@
#include "mathops.h"
#include "config.h"
-//#define ALT_BITSTREAM_WRITER
-//#define ALIGNED_BITSTREAM_WRITER
-
-/* buf and buf_end must be present and used by every alternative writer. */
typedef struct PutBitContext {
-#ifdef ALT_BITSTREAM_WRITER
- uint8_t *buf, *buf_end;
- int index;
-#else
uint32_t bit_buf;
int bit_left;
uint8_t *buf, *buf_ptr, *buf_end;
-#endif
int size_in_bits;
} PutBitContext;
@@ -68,15 +59,9 @@ static inline void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_s
s->size_in_bits= 8*buffer_size;
s->buf = buffer;
s->buf_end = s->buf + buffer_size;
-#ifdef ALT_BITSTREAM_WRITER
- s->index=0;
- ((uint32_t*)(s->buf))[0]=0;
-// memset(buffer, 0, buffer_size);
-#else
s->buf_ptr = s->buf;
s->bit_left=32;
s->bit_buf=0;
-#endif
}
/**
@@ -84,11 +69,7 @@ static inline void init_put_bits(PutBitContext *s, uint8_t *buffer, int buffer_s
*/
static inline int put_bits_count(PutBitContext *s)
{
-#ifdef ALT_BITSTREAM_WRITER
- return s->index;
-#else
return (s->buf_ptr - s->buf) * 8 + 32 - s->bit_left;
-#endif
}
/**
@@ -96,9 +77,6 @@ static inline int put_bits_count(PutBitContext *s)
*/
static inline void flush_put_bits(PutBitContext *s)
{
-#ifdef ALT_BITSTREAM_WRITER
- align_put_bits(s);
-#else
#ifndef BITSTREAM_WRITER_LE
s->bit_buf<<= s->bit_left;
#endif
@@ -115,10 +93,9 @@ static inline void flush_put_bits(PutBitContext *s)
}
s->bit_left=32;
s->bit_buf=0;
-#endif
}
-#if defined(ALT_BITSTREAM_WRITER) || defined(BITSTREAM_WRITER_LE)
+#ifdef BITSTREAM_WRITER_LE
#define align_put_bits align_put_bits_unsupported_here
#define ff_put_string ff_put_string_unsupported_here
#define ff_copy_bits ff_copy_bits_unsupported_here
@@ -148,7 +125,6 @@ void ff_copy_bits(PutBitContext *pb, const uint8_t *src, int length);
* Use put_bits32 to write 32 bits.
*/
static inline void put_bits(PutBitContext *s, int n, unsigned int value)
-#ifndef ALT_BITSTREAM_WRITER
{
unsigned int bit_buf;
int bit_left;
@@ -164,12 +140,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
#ifdef BITSTREAM_WRITER_LE
bit_buf |= value << (32 - bit_left);
if (n >= bit_left) {
-#if !HAVE_FAST_UNALIGNED
- if (3 & (intptr_t) s->buf_ptr) {
- AV_WL32(s->buf_ptr, bit_buf);
- } else
-#endif
- *(uint32_t *)s->buf_ptr = av_le2ne32(bit_buf);
+ AV_WL32(s->buf_ptr, bit_buf);
s->buf_ptr+=4;
bit_buf = (bit_left==32)?0:value >> bit_left;
bit_left+=32;
@@ -182,12 +153,7 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
} else {
bit_buf<<=bit_left;
bit_buf |= value >> (n - bit_left);
-#if !HAVE_FAST_UNALIGNED
- if (3 & (intptr_t) s->buf_ptr) {
- AV_WB32(s->buf_ptr, bit_buf);
- } else
-#endif
- *(uint32_t *)s->buf_ptr = av_be2ne32(bit_buf);
+ AV_WB32(s->buf_ptr, bit_buf);
//printf("bitbuf = %08x\n", bit_buf);
s->buf_ptr+=4;
bit_left+=32 - n;
@@ -198,70 +164,6 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value)
s->bit_buf = bit_buf;
s->bit_left = bit_left;
}
-#else /* ALT_BITSTREAM_WRITER defined */
-{
-# ifdef ALIGNED_BITSTREAM_WRITER
-# if ARCH_X86
- __asm__ volatile(
- "movl %0, %%ecx \n\t"
- "xorl %%eax, %%eax \n\t"
- "shrdl %%cl, %1, %%eax \n\t"
- "shrl %%cl, %1 \n\t"
- "movl %0, %%ecx \n\t"
- "shrl $3, %%ecx \n\t"
- "andl $0xFFFFFFFC, %%ecx \n\t"
- "bswapl %1 \n\t"
- "orl %1, (%2, %%ecx) \n\t"
- "bswapl %%eax \n\t"
- "addl %3, %0 \n\t"
- "movl %%eax, 4(%2, %%ecx) \n\t"
- : "=&r" (s->index), "=&r" (value)
- : "r" (s->buf), "r" (n), "0" (s->index), "1" (value<<(-n))
- : "%eax", "%ecx"
- );
-# else
- int index= s->index;
- uint32_t *ptr= ((uint32_t *)s->buf)+(index>>5);
-
- value<<= 32-n;
-
- ptr[0] |= av_be2ne32(value>>(index&31));
- ptr[1] = av_be2ne32(value<<(32-(index&31)));
-//if(n>24) printf("%d %d\n", n, value);
- index+= n;
- s->index= index;
-# endif
-# else //ALIGNED_BITSTREAM_WRITER
-# if ARCH_X86
- __asm__ volatile(
- "movl $7, %%ecx \n\t"
- "andl %0, %%ecx \n\t"
- "addl %3, %%ecx \n\t"
- "negl %%ecx \n\t"
- "shll %%cl, %1 \n\t"
- "bswapl %1 \n\t"
- "movl %0, %%ecx \n\t"
- "shrl $3, %%ecx \n\t"
- "orl %1, (%%ecx, %2) \n\t"
- "addl %3, %0 \n\t"
- "movl $0, 4(%%ecx, %2) \n\t"
- : "=&r" (s->index), "=&r" (value)
- : "r" (s->buf), "r" (n), "0" (s->index), "1" (value)
- : "%ecx"
- );
-# else
- int index= s->index;
- uint32_t *ptr= (uint32_t*)(((uint8_t *)s->buf)+(index>>3));
-
- ptr[0] |= av_be2ne32(value<<(32-n-(index&7) ));
- ptr[1] = 0;
-//if(n>24) printf("%d %d\n", n, value);
- index+= n;
- s->index= index;
-# endif
-# endif //!ALIGNED_BITSTREAM_WRITER
-}
-#endif
static inline void put_sbits(PutBitContext *pb, int n, int32_t value)
{
@@ -292,11 +194,7 @@ static void av_unused put_bits32(PutBitContext *s, uint32_t value)
*/
static inline uint8_t* put_bits_ptr(PutBitContext *s)
{
-#ifdef ALT_BITSTREAM_WRITER
- return s->buf + (s->index>>3);
-#else
return s->buf_ptr;
-#endif
}
/**
@@ -306,13 +204,8 @@ static inline uint8_t* put_bits_ptr(PutBitContext *s)
static inline void skip_put_bytes(PutBitContext *s, int n)
{
assert((put_bits_count(s)&7)==0);
-#ifdef ALT_BITSTREAM_WRITER
- FIXME may need some cleaning of the buffer
- s->index += n<<3;
-#else
assert(s->bit_left==32);
s->buf_ptr += n;
-#endif
}
/**
@@ -322,13 +215,9 @@ static inline void skip_put_bytes(PutBitContext *s, int n)
*/
static inline void skip_put_bits(PutBitContext *s, int n)
{
-#ifdef ALT_BITSTREAM_WRITER
- s->index += n;
-#else
s->bit_left -= n;
s->buf_ptr-= 4*(s->bit_left>>5);
s->bit_left &= 31;
-#endif
}
/**
diff --git a/libavcodec/qcelpdata.h b/libavcodec/qcelpdata.h
index 82cc61d7ea..e71ee9fdb7 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 ae9ae1084f..241132e092 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 d3e4dd956f..e126a72afb 100644
--- a/libavcodec/tableprint.h
+++ b/libavcodec/tableprint.h
@@ -56,7 +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
*
* \{
*/
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 852c874ee1..e82fba2fcb 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/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.
* @{
*/