summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/aac.h22
-rw-r--r--libavcodec/aacadtsdec.h2
-rw-r--r--libavcodec/aacps.h2
-rw-r--r--libavcodec/ac3.h2
-rw-r--r--libavcodec/ac3dec.h2
-rw-r--r--libavcodec/acelp_vectors.h2
-rw-r--r--libavcodec/adx.h4
-rw-r--r--libavcodec/amrnbdata.h4
-rw-r--r--libavcodec/amrwbdata.h4
-rw-r--r--libavcodec/avcodec.h10
-rw-r--r--libavcodec/bytestream.h4
-rw-r--r--libavcodec/cavs.h2
-rw-r--r--libavcodec/dirac.h2
-rw-r--r--libavcodec/dnxhddata.h2
-rw-r--r--libavcodec/dnxhdenc.h4
-rw-r--r--libavcodec/dwt.h2
-rw-r--r--libavcodec/g722.h2
-rw-r--r--libavcodec/gsmdec_data.h2
-rw-r--r--libavcodec/huffman.h2
-rw-r--r--libavcodec/indeo3data.h2
-rw-r--r--libavcodec/intrax8.h2
-rw-r--r--libavcodec/ivi_common.h16
-rw-r--r--libavcodec/libschroedinger.h2
-rw-r--r--libavcodec/libspeexenc.c2
-rw-r--r--libavcodec/mlp.h4
-rw-r--r--libavcodec/mpc.h4
-rw-r--r--libavcodec/mpeg4audio.h2
-rw-r--r--libavcodec/ppc/fmtconvert_altivec.c25
-rw-r--r--libavcodec/proresdsp.h2
-rw-r--r--libavcodec/qcelpdata.h4
-rw-r--r--libavcodec/ra144.h2
-rw-r--r--libavcodec/resample.c4
-rw-r--r--libavcodec/resample2.c4
-rw-r--r--libavcodec/roqvideo.h6
-rw-r--r--libavcodec/rtjpeg.h2
-rw-r--r--libavcodec/sbr.h6
-rw-r--r--libavcodec/version.h3
-rw-r--r--libavcodec/vorbis.h2
-rw-r--r--libavcodec/vp56.h10
-rw-r--r--libavcodec/vp56data.h2
-rw-r--r--libavcodec/vp8.h8
-rw-r--r--libavcodec/w32pthreads.h6
-rw-r--r--libavcodec/x86/dsputil_mmx.c58
-rw-r--r--libavcodec/x86/dsputil_mmx.h2
44 files changed, 122 insertions, 134 deletions
diff --git a/libavcodec/aac.h b/libavcodec/aac.h
index a1e91b09b6..1070e5f310 100644
--- a/libavcodec/aac.h
+++ b/libavcodec/aac.h
@@ -113,7 +113,7 @@ enum OCStatus {
OC_LOCKED, ///< Output configuration locked in place
};
-typedef struct {
+typedef struct OutputConfiguration {
MPEG4AudioConfig m4ac;
uint8_t layout_map[MAX_ELEM_ID*4][3];
int layout_map_tags;
@@ -125,7 +125,7 @@ typedef struct {
/**
* Predictor State
*/
-typedef struct {
+typedef struct PredictorState {
float cor0;
float cor1;
float var0;
@@ -146,7 +146,7 @@ typedef struct {
/**
* Long Term Prediction
*/
-typedef struct {
+typedef struct LongTermPrediction {
int8_t present;
int16_t lag;
float coef;
@@ -156,7 +156,7 @@ typedef struct {
/**
* Individual Channel Stream
*/
-typedef struct {
+typedef struct IndividualChannelStream {
uint8_t max_sfb; ///< number of scalefactor bands per group
enum WindowSequence window_sequence[2];
uint8_t use_kb_window[2]; ///< If set, use Kaiser-Bessel window, otherwise use a sinus window.
@@ -177,7 +177,7 @@ typedef struct {
/**
* Temporal Noise Shaping
*/
-typedef struct {
+typedef struct TemporalNoiseShaping {
int present;
int n_filt[8];
int length[8][4];
@@ -189,7 +189,7 @@ typedef struct {
/**
* Dynamic Range Control - decoded from the bitstream but not processed further.
*/
-typedef struct {
+typedef struct DynamicRangeControl {
int pce_instance_tag; ///< Indicates with which program the DRC info is associated.
int dyn_rng_sgn[17]; ///< DRC sign information; 0 - positive, 1 - negative
int dyn_rng_ctl[17]; ///< DRC magnitude information
@@ -202,7 +202,7 @@ typedef struct {
*/
} DynamicRangeControl;
-typedef struct {
+typedef struct Pulse {
int num_pulse;
int start;
int pos[4];
@@ -212,7 +212,7 @@ typedef struct {
/**
* coupling parameters
*/
-typedef struct {
+typedef struct ChannelCoupling {
enum CouplingPoint coupling_point; ///< The point during decoding at which coupling is applied.
int num_coupled; ///< number of target elements
enum RawDataBlockType type[8]; ///< Type of channel element to be coupled - SCE or CPE.
@@ -226,7 +226,7 @@ typedef struct {
/**
* Single Channel Element - used for both SCE and LFE elements.
*/
-typedef struct {
+typedef struct SingleChannelElement {
IndividualChannelStream ics;
TemporalNoiseShaping tns;
Pulse pulse;
@@ -245,7 +245,7 @@ typedef struct {
/**
* channel element - generic struct for SCE/CPE/CCE/LFE
*/
-typedef struct {
+typedef struct ChannelElement {
// CPE specific
int common_window; ///< Set if channels share a common 'IndividualChannelStream' in bitstream.
int ms_mode; ///< Signals mid/side stereo flags coding mode (used by encoder)
@@ -260,7 +260,7 @@ typedef struct {
/**
* main AAC context
*/
-typedef struct {
+typedef struct AACContext {
AVCodecContext *avctx;
AVFrame frame;
diff --git a/libavcodec/aacadtsdec.h b/libavcodec/aacadtsdec.h
index fb2cbd9b35..d0584ef36a 100644
--- a/libavcodec/aacadtsdec.h
+++ b/libavcodec/aacadtsdec.h
@@ -28,7 +28,7 @@
#define AAC_ADTS_HEADER_SIZE 7
-typedef struct {
+typedef struct AACADTSHeaderInfo {
uint32_t sample_rate;
uint32_t samples;
uint32_t bit_rate;
diff --git a/libavcodec/aacps.h b/libavcodec/aacps.h
index d310c91b95..29323ffc0a 100644
--- a/libavcodec/aacps.h
+++ b/libavcodec/aacps.h
@@ -38,7 +38,7 @@
#define PS_AP_LINKS 3
#define PS_MAX_AP_DELAY 5
-typedef struct {
+typedef struct PSContext {
int start;
int enable_iid;
int iid_quant;
diff --git a/libavcodec/ac3.h b/libavcodec/ac3.h
index b9f34b9d90..e609bb51ce 100644
--- a/libavcodec/ac3.h
+++ b/libavcodec/ac3.h
@@ -93,7 +93,7 @@ typedef struct AC3BitAllocParameters {
* @struct AC3HeaderInfo
* Coded AC-3 header values up to the lfeon element, plus derived values.
*/
-typedef struct {
+typedef struct AC3HeaderInfo {
/** @name Coded elements
* @{
*/
diff --git a/libavcodec/ac3dec.h b/libavcodec/ac3dec.h
index e0f3dc7be4..c3a43bf5cf 100644
--- a/libavcodec/ac3dec.h
+++ b/libavcodec/ac3dec.h
@@ -65,7 +65,7 @@
/** Large enough for maximum possible frame size when the specification limit is ignored */
#define AC3_FRAME_BUFFER_SIZE 32768
-typedef struct {
+typedef struct AC3DecodeContext {
AVClass *class; ///< class for AVOptions
AVCodecContext *avctx; ///< parent context
AVFrame frame; ///< AVFrame for decoded output
diff --git a/libavcodec/acelp_vectors.h b/libavcodec/acelp_vectors.h
index d92f288de4..fae834dac1 100644
--- a/libavcodec/acelp_vectors.h
+++ b/libavcodec/acelp_vectors.h
@@ -50,7 +50,7 @@ void ff_acelp_vectors_init(ACELPVContext *c);
void ff_acelp_vectors_init_mips(ACELPVContext *c);
/** Sparse representation for the algebraic codebook (fixed) vector */
-typedef struct {
+typedef struct AMRFixed {
int n;
int x[10];
float y[10];
diff --git a/libavcodec/adx.h b/libavcodec/adx.h
index a14ddce499..85b35d15be 100644
--- a/libavcodec/adx.h
+++ b/libavcodec/adx.h
@@ -35,11 +35,11 @@
#include "avcodec.h"
-typedef struct {
+typedef struct ADXChannelState {
int s1,s2;
} ADXChannelState;
-typedef struct {
+typedef struct ADXContext {
AVFrame frame;
int channels;
ADXChannelState prev[2];
diff --git a/libavcodec/amrnbdata.h b/libavcodec/amrnbdata.h
index 6e555bfdb4..435fd9924b 100644
--- a/libavcodec/amrnbdata.h
+++ b/libavcodec/amrnbdata.h
@@ -55,7 +55,7 @@ enum Mode {
/**
* AMRNB unpacked data subframe
*/
-typedef struct {
+typedef struct AMRNBSubframe {
uint16_t p_lag; ///< index to decode the pitch lag
uint16_t p_gain; ///< index to decode the pitch gain
uint16_t fixed_gain; ///< index to decode the fixed gain factor, for MODE_12k2 and MODE_7k95
@@ -65,7 +65,7 @@ typedef struct {
/**
* AMRNB unpacked data frame
*/
-typedef struct {
+typedef struct AMRNBFrame {
uint16_t lsf[5]; ///< lsf parameters: 5 parameters for MODE_12k2, only 3 for other modes
AMRNBSubframe subframe[4]; ///< unpacked data for each subframe
} AMRNBFrame;
diff --git a/libavcodec/amrwbdata.h b/libavcodec/amrwbdata.h
index 83390fc393..8390582b05 100644
--- a/libavcodec/amrwbdata.h
+++ b/libavcodec/amrwbdata.h
@@ -66,7 +66,7 @@ enum Mode {
/* All decoded parameters in these structs must be 2 bytes long
* because of the direct indexing at the frame parsing */
-typedef struct {
+typedef struct AMRWBSubFrame {
uint16_t adap; ///< adaptive codebook index
uint16_t ltp; ///< ltp-filtering flag
uint16_t vq_gain; ///< VQ adaptive and innovative gains
@@ -75,7 +75,7 @@ typedef struct {
uint16_t pul_il[4]; ///< LSBs part of codebook index
} AMRWBSubFrame;
-typedef struct {
+typedef struct AMRWBFrame {
uint16_t vad; ///< voice activity detection flag
uint16_t isp_id[7]; ///< index of ISP subvectors
AMRWBSubFrame subframe[4]; ///< data for subframes
diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
index 2683ee5887..719921a779 100644
--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -4323,9 +4323,11 @@ int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
* @}
*/
+#if FF_API_AVCODEC_RESAMPLE
/**
* @defgroup lavc_resample Audio resampling
* @ingroup libavc
+ * @deprecated use libswresample instead
*
* @{
*/
@@ -4350,6 +4352,7 @@ typedef struct ReSampleContext ReSampleContext;
* @param cutoff cutoff frequency, 1.0 corresponds to half the output sampling rate
* @return allocated ReSampleContext, NULL if error occurred
*/
+attribute_deprecated
ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
int output_rate, int input_rate,
enum AVSampleFormat sample_fmt_out,
@@ -4357,6 +4360,7 @@ ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
int filter_length, int log2_phase_count,
int linear, double cutoff);
+attribute_deprecated
int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
/**
@@ -4365,6 +4369,7 @@ int audio_resample(ReSampleContext *s, short *output, short *input, int nb_sampl
* @param s a non-NULL pointer to a resample context previously
* created with av_audio_resample_init()
*/
+attribute_deprecated
void audio_resample_close(ReSampleContext *s);
@@ -4377,6 +4382,7 @@ void audio_resample_close(ReSampleContext *s);
between the 2 closest, if 0 the closest will be used
* @param cutoff cutoff frequency, 1.0 corresponds to half the output sampling rate
*/
+attribute_deprecated
struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
/**
@@ -4388,6 +4394,7 @@ struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter
* @param update_ctx If this is 0 then the context will not be modified, that way several channels can be resampled with the same context.
* @return the number of samples written in dst or -1 if an error occurred
*/
+attribute_deprecated
int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);
@@ -4403,12 +4410,15 @@ int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consum
* note, due to rounding the actual compensation might be slightly different,
* especially if the compensation_distance is large and the in_rate used during init is small
*/
+attribute_deprecated
void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);
+attribute_deprecated
void av_resample_close(struct AVResampleContext *c);
/**
* @}
*/
+#endif
/**
* @addtogroup lavc_picture
diff --git a/libavcodec/bytestream.h b/libavcodec/bytestream.h
index 39a1e28a12..af7f75bd45 100644
--- a/libavcodec/bytestream.h
+++ b/libavcodec/bytestream.h
@@ -29,11 +29,11 @@
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
-typedef struct {
+typedef struct GetByteContext {
const uint8_t *buffer, *buffer_end, *buffer_start;
} GetByteContext;
-typedef struct {
+typedef struct PutByteContext {
uint8_t *buffer, *buffer_end, *buffer_start;
int eof;
} PutByteContext;
diff --git a/libavcodec/cavs.h b/libavcodec/cavs.h
index 461d7c8ba8..039053dddb 100644
--- a/libavcodec/cavs.h
+++ b/libavcodec/cavs.h
@@ -152,7 +152,7 @@ struct dec_2dvlc {
int8_t max_run;
};
-typedef struct {
+typedef struct AVSContext {
MpegEncContext s;
CAVSDSPContext cdsp;
Picture picture; ///< currently decoded frame
diff --git a/libavcodec/dirac.h b/libavcodec/dirac.h
index 542d4910f8..b0f955bf46 100644
--- a/libavcodec/dirac.h
+++ b/libavcodec/dirac.h
@@ -34,7 +34,7 @@
#include "avcodec.h"
#include "get_bits.h"
-typedef struct {
+typedef struct dirac_source_params {
unsigned width;
unsigned height;
uint8_t chroma_format; ///< 0: 444 1: 422 2: 420
diff --git a/libavcodec/dnxhddata.h b/libavcodec/dnxhddata.h
index 6e774b5c88..6ebee3d0f3 100644
--- a/libavcodec/dnxhddata.h
+++ b/libavcodec/dnxhddata.h
@@ -25,7 +25,7 @@
#include <stdint.h>
#include "avcodec.h"
-typedef struct {
+typedef struct CIDEntry {
int cid;
unsigned int width, height;
int interlaced;
diff --git a/libavcodec/dnxhdenc.h b/libavcodec/dnxhdenc.h
index e57047d5dc..36a42fb100 100644
--- a/libavcodec/dnxhdenc.h
+++ b/libavcodec/dnxhdenc.h
@@ -29,12 +29,12 @@
#include "mpegvideo.h"
#include "dnxhddata.h"
-typedef struct {
+typedef struct RCCMPEntry {
uint16_t mb;
int value;
} RCCMPEntry;
-typedef struct {
+typedef struct RCEntry {
int ssd;
int bits;
} RCEntry;
diff --git a/libavcodec/dwt.h b/libavcodec/dwt.h
index 6df32f39f2..d82e510006 100644
--- a/libavcodec/dwt.h
+++ b/libavcodec/dwt.h
@@ -29,7 +29,7 @@ typedef short IDWTELEM;
#define MAX_DWT_SUPPORT 8
#define MAX_DECOMPOSITIONS 8
-typedef struct {
+typedef struct DWTCompose {
IDWTELEM *b[MAX_DWT_SUPPORT];
IDWTELEM *b0;
diff --git a/libavcodec/g722.h b/libavcodec/g722.h
index eb3b9b872e..bab1da48cc 100644
--- a/libavcodec/g722.h
+++ b/libavcodec/g722.h
@@ -30,7 +30,7 @@
#define PREV_SAMPLES_BUF_SIZE 1024
-typedef struct {
+typedef struct G722Context {
const AVClass *class;
AVFrame frame;
int bits_per_codeword;
diff --git a/libavcodec/gsmdec_data.h b/libavcodec/gsmdec_data.h
index 3eb30b84b7..6abe2b47b3 100644
--- a/libavcodec/gsmdec_data.h
+++ b/libavcodec/gsmdec_data.h
@@ -25,7 +25,7 @@
#include <stdint.h>
#include "avcodec.h"
-typedef struct {
+typedef struct GSMContext {
AVFrame frame;
// Contains first 120 elements from the previous frame
// (used by long_term_synth according to the "lag"),
diff --git a/libavcodec/huffman.h b/libavcodec/huffman.h
index 2fdf88d405..4f9ccbad50 100644
--- a/libavcodec/huffman.h
+++ b/libavcodec/huffman.h
@@ -29,7 +29,7 @@
#include "avcodec.h"
#include "get_bits.h"
-typedef struct {
+typedef struct Node {
int16_t sym;
int16_t n0;
uint32_t count;
diff --git a/libavcodec/indeo3data.h b/libavcodec/indeo3data.h
index e6f370c84d..0b5648eb20 100644
--- a/libavcodec/indeo3data.h
+++ b/libavcodec/indeo3data.h
@@ -320,7 +320,7 @@ static const int32_t delta_tab_3_4_m10[79] = { TAB_3_4 };
static const int32_t delta_tab_3_5_m10[79] = { TAB_3_5 };
-typedef struct {
+typedef struct vqEntry {
const int16_t *deltas; ///< delta tables for 4x4 block modes
const int32_t *deltas_m10; ///< delta tables for 8x8 block modes
uint8_t num_dyads; ///< number of two-pixel deltas
diff --git a/libavcodec/intrax8.h b/libavcodec/intrax8.h
index dd2dc7d696..40d689a93c 100644
--- a/libavcodec/intrax8.h
+++ b/libavcodec/intrax8.h
@@ -23,7 +23,7 @@
#include "mpegvideo.h"
#include "intrax8dsp.h"
-typedef struct{
+typedef struct IntraX8Context {
VLC * j_ac_vlc[4];//they point to the static j_mb_vlc
VLC * j_orient_vlc;
VLC * j_dc_vlc[3];
diff --git a/libavcodec/ivi_common.h b/libavcodec/ivi_common.h
index 4636f6ce52..44b28cd231 100644
--- a/libavcodec/ivi_common.h
+++ b/libavcodec/ivi_common.h
@@ -40,7 +40,7 @@
/**
* huffman codebook descriptor
*/
-typedef struct {
+typedef struct IVIHuffDesc {
int32_t num_rows;
uint8_t xbits[16];
} IVIHuffDesc;
@@ -48,7 +48,7 @@ typedef struct {
/**
* macroblock/block huffman table descriptor
*/
-typedef struct {
+typedef struct IVIHuffTab {
int32_t tab_sel; /// index of one of the predefined tables
/// or "7" for custom one
VLC *tab; /// pointer to the table associated with tab_sel
@@ -85,7 +85,7 @@ typedef void (DCTransformPtr) (const int32_t *in, int16_t *out, uint32_t pitch,
/**
* run-value (RLE) table descriptor
*/
-typedef struct {
+typedef struct RVMapDesc {
uint8_t eob_sym; ///< end of block symbol
uint8_t esc_sym; ///< escape symbol
uint8_t runtab[256];
@@ -98,7 +98,7 @@ extern const RVMapDesc ff_ivi_rvmap_tabs[9];
/**
* information for Indeo macroblock (16x16, 8x8 or 4x4)
*/
-typedef struct {
+typedef struct IVIMbInfo {
int16_t xpos;
int16_t ypos;
uint32_t buf_offs; ///< address in the output buffer for this mb
@@ -113,7 +113,7 @@ typedef struct {
/**
* information for Indeo tile
*/
-typedef struct {
+typedef struct IVITile {
int xpos;
int ypos;
int width;
@@ -130,7 +130,7 @@ typedef struct {
/**
* information for Indeo wavelet band
*/
-typedef struct {
+typedef struct IVIBandDesc {
int plane; ///< plane number this band belongs to
int band_num; ///< band number
int width;
@@ -178,7 +178,7 @@ typedef struct {
/**
* color plane (luma or chroma) information
*/
-typedef struct {
+typedef struct IVIPlaneDesc {
uint16_t width;
uint16_t height;
uint8_t num_bands; ///< number of bands this plane subdivided into
@@ -186,7 +186,7 @@ typedef struct {
} IVIPlaneDesc;
-typedef struct {
+typedef struct IVIPicConfig {
uint16_t pic_width;
uint16_t pic_height;
uint16_t chroma_width;
diff --git a/libavcodec/libschroedinger.h b/libavcodec/libschroedinger.h
index bacc0da050..df8ab985be 100644
--- a/libavcodec/libschroedinger.h
+++ b/libavcodec/libschroedinger.h
@@ -31,7 +31,7 @@
#include "avcodec.h"
-typedef struct {
+typedef struct SchroVideoFormatInfo {
uint16_t width;
uint16_t height;
uint16_t frame_rate_num;
diff --git a/libavcodec/libspeexenc.c b/libavcodec/libspeexenc.c
index e3db143f75..fb597efb6e 100644
--- a/libavcodec/libspeexenc.c
+++ b/libavcodec/libspeexenc.c
@@ -219,7 +219,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
/* Activiting Discontinuous Transmission */
if (s->dtx) {
speex_encoder_ctl(s->enc_state, SPEEX_SET_DTX, &s->dtx);
- if ( !(s->abr || s->vad || s->header.vbr))
+ if (!(s->abr || s->vad || s->header.vbr))
av_log(avctx, AV_LOG_WARNING, "DTX is not much of use without ABR, VAD or VBR\n");
}
diff --git a/libavcodec/mlp.h b/libavcodec/mlp.h
index 628b58d318..d8d1292903 100644
--- a/libavcodec/mlp.h
+++ b/libavcodec/mlp.h
@@ -71,7 +71,7 @@
#define IIR 1
/** filter data */
-typedef struct {
+typedef struct FilterParams {
uint8_t order; ///< number of taps in filter
uint8_t shift; ///< Right shift to apply to output of filter.
@@ -79,7 +79,7 @@ typedef struct {
} FilterParams;
/** sample data coding information */
-typedef struct {
+typedef struct ChannelParams {
FilterParams filter_params[NUM_FILTERS];
int32_t coeff[NUM_FILTERS][MAX_FIR_ORDER];
diff --git a/libavcodec/mpc.h b/libavcodec/mpc.h
index 34ef263b40..7ee402b356 100644
--- a/libavcodec/mpc.h
+++ b/libavcodec/mpc.h
@@ -41,7 +41,7 @@
#define MPC_FRAME_SIZE (BANDS * SAMPLES_PER_BAND)
/** Subband structure - hold all variables for each subband */
-typedef struct {
+typedef struct Band {
int msf; ///< mid-stereo flag
int res[2];
int scfi[2];
@@ -49,7 +49,7 @@ typedef struct {
int Q[2];
}Band;
-typedef struct {
+typedef struct MPCContext {
AVFrame frame;
DSPContext dsp;
MPADSPContext mpadsp;
diff --git a/libavcodec/mpeg4audio.h b/libavcodec/mpeg4audio.h
index 21000a9acc..64839c6617 100644
--- a/libavcodec/mpeg4audio.h
+++ b/libavcodec/mpeg4audio.h
@@ -26,7 +26,7 @@
#include "get_bits.h"
#include "put_bits.h"
-typedef struct {
+typedef struct MPEG4AudioConfig {
int object_type;
int sampling_index;
int sample_rate;
diff --git a/libavcodec/ppc/fmtconvert_altivec.c b/libavcodec/ppc/fmtconvert_altivec.c
index 3cb11543dd..7eff9f04d1 100644
--- a/libavcodec/ppc/fmtconvert_altivec.c
+++ b/libavcodec/ppc/fmtconvert_altivec.c
@@ -83,6 +83,22 @@ static void float_to_int16_altivec(int16_t *dst, const float *src, long len)
}
}
+static void float_to_int16_stride_altivec(int16_t *dst, const float *src,
+ long len, int stride)
+{
+ int i, j;
+ vector signed short d, s;
+
+ for (i = 0; i < len - 7; i += 8) {
+ d = float_to_int16_one_altivec(src + i);
+ for (j = 0; j < 8; j++) {
+ s = vec_splat(d, j);
+ vec_ste(s, 0, dst);
+ dst += stride;
+ }
+ }
+}
+
static void float_to_int16_interleave_altivec(int16_t *dst, const float **src,
long len, int channels)
{
@@ -124,13 +140,8 @@ static void float_to_int16_interleave_altivec(int16_t *dst, const float **src,
}
}
} else {
- DECLARE_ALIGNED(16, int16_t, tmp)[len];
- int c, j;
- for (c = 0; c < channels; c++) {
- float_to_int16_altivec(tmp, src[c], len);
- for (i = 0, j = c; i < len; i++, j+=channels)
- dst[j] = tmp[i];
- }
+ for (i = 0; i < channels; i++)
+ float_to_int16_stride_altivec(dst + i, src[i], len, channels);
}
}
}
diff --git a/libavcodec/proresdsp.h b/libavcodec/proresdsp.h
index a35e0d627e..09541d9642 100644
--- a/libavcodec/proresdsp.h
+++ b/libavcodec/proresdsp.h
@@ -27,7 +27,7 @@
#define PRORES_BITS_PER_SAMPLE 10 ///< output precision of prores decoder
-typedef struct {
+typedef struct ProresDSPContext {
int idct_permutation_type;
uint8_t idct_permutation[64];
int dct_permutation_type;
diff --git a/libavcodec/qcelpdata.h b/libavcodec/qcelpdata.h
index 4a7dcdb38b..d58e9f8316 100644
--- a/libavcodec/qcelpdata.h
+++ b/libavcodec/qcelpdata.h
@@ -37,7 +37,7 @@
/**
* QCELP unpacked data frame
*/
-typedef struct {
+typedef struct QCELPFrame {
/// @name QCELP excitation codebook parameters
/// @{
uint8_t cbsign[16]; ///< sign of the codebook gain for each codebook subframe
@@ -73,7 +73,7 @@ typedef struct {
*/
static const float qcelp_hammsinc_table[4] = { -0.006822, 0.041249, -0.143459, 0.588863};
-typedef struct {
+typedef struct QCELPBitmap {
uint8_t index; /**< index into the QCELPContext structure */
uint8_t bitpos; /**< position of the lowest bit in the value's byte */
uint8_t bitlen; /**< number of bits to read */
diff --git a/libavcodec/ra144.h b/libavcodec/ra144.h
index 03c4860367..331dc35f3c 100644
--- a/libavcodec/ra144.h
+++ b/libavcodec/ra144.h
@@ -33,7 +33,7 @@
#define FRAMESIZE 20 ///< size of encoded frame
#define LPC_ORDER 10 ///< order of LPC filter
-typedef struct {
+typedef struct RA144Context {
AVCodecContext *avctx;
AVFrame frame;
LPCContext lpc_ctx;
diff --git a/libavcodec/resample.c b/libavcodec/resample.c
index 04e5aab371..dfaad66216 100644
--- a/libavcodec/resample.c
+++ b/libavcodec/resample.c
@@ -32,6 +32,8 @@
#include "libavutil/mem.h"
#include "libavutil/samplefmt.h"
+#if FF_API_AVCODEC_RESAMPLE
+
#define MAX_CHANNELS 8
struct AVResampleContext;
@@ -429,3 +431,5 @@ void audio_resample_close(ReSampleContext *s)
av_audio_convert_free(s->convert_ctx[1]);
av_free(s);
}
+
+#endif
diff --git a/libavcodec/resample2.c b/libavcodec/resample2.c
index 38186121ca..3a3cd13dfe 100644
--- a/libavcodec/resample2.c
+++ b/libavcodec/resample2.c
@@ -30,6 +30,8 @@
#include "dsputil.h"
#include "libavutil/common.h"
+#if FF_API_AVCODEC_RESAMPLE
+
#ifndef CONFIG_RESAMPLE_HP
#define FILTER_SHIFT 15
@@ -321,3 +323,5 @@ av_log(NULL, AV_LOG_DEBUG, "%d %d %d\n", c->dst_incr, c->ideal_dst_incr, c->comp
return dst_index;
}
+
+#endif
diff --git a/libavcodec/roqvideo.h b/libavcodec/roqvideo.h
index 6fc7161c8a..2f9493d3b6 100644
--- a/libavcodec/roqvideo.h
+++ b/libavcodec/roqvideo.h
@@ -27,16 +27,16 @@
#include "bytestream.h"
#include "dsputil.h"
-typedef struct {
+typedef struct roq_cell {
unsigned char y[4];
unsigned char u, v;
} roq_cell;
-typedef struct {
+typedef struct roq_qcell {
int idx[4];
} roq_qcell;
-typedef struct {
+typedef struct motion_vect {
int d[2];
} motion_vect;
diff --git a/libavcodec/rtjpeg.h b/libavcodec/rtjpeg.h
index 5b359db9eb..0fd24a356c 100644
--- a/libavcodec/rtjpeg.h
+++ b/libavcodec/rtjpeg.h
@@ -29,7 +29,7 @@
#define RTJPEG_FILE_VERSION 0
#define RTJPEG_HEADER_SIZE 12
-typedef struct {
+typedef struct RTJpegContext {
int w, h;
DSPContext *dsp;
uint8_t scan[64];
diff --git a/libavcodec/sbr.h b/libavcodec/sbr.h
index e68b3cf916..7c0afdc84c 100644
--- a/libavcodec/sbr.h
+++ b/libavcodec/sbr.h
@@ -37,7 +37,7 @@
/**
* Spectral Band Replication header - spectrum parameters that invoke a reset if they differ from the previous header.
*/
-typedef struct {
+typedef struct SpectrumParameters {
uint8_t bs_start_freq;
uint8_t bs_stop_freq;
uint8_t bs_xover_band;
@@ -57,7 +57,7 @@ typedef struct {
/**
* Spectral Band Replication per channel data
*/
-typedef struct {
+typedef struct SBRData {
/**
* @name Main bitstream data variables
* @{
@@ -111,7 +111,7 @@ typedef struct {
/**
* Spectral Band Replication
*/
-typedef struct {
+typedef struct SpectralBandReplication {
int sample_rate;
int start;
int reset;
diff --git a/libavcodec/version.h b/libavcodec/version.h
index 39888179b5..b2f4bb010f 100644
--- a/libavcodec/version.h
+++ b/libavcodec/version.h
@@ -94,5 +94,8 @@
#ifndef FF_API_VDA_ASYNC
#define FF_API_VDA_ASYNC (LIBAVCODEC_VERSION_MAJOR < 55)
#endif
+#ifndef FF_API_AVCODEC_RESAMPLE
+#define FF_API_AVCODEC_RESAMPLE (LIBAVCODEC_VERSION_MAJOR < 55)
+#endif
#endif /* AVCODEC_VERSION_H */
diff --git a/libavcodec/vorbis.h b/libavcodec/vorbis.h
index 14045ec53e..0bab0b9c0f 100644
--- a/libavcodec/vorbis.h
+++ b/libavcodec/vorbis.h
@@ -29,7 +29,7 @@ extern const uint8_t ff_vorbis_channel_layout_offsets[8][8];
extern const uint8_t ff_vorbis_encoding_channel_layout_offsets[8][8];
extern const uint64_t ff_vorbis_channel_layouts[9];
-typedef struct {
+typedef struct vorbis_floor1_entry {
uint16_t x;
uint16_t sort;
uint16_t low;
diff --git a/libavcodec/vp56.h b/libavcodec/vp56.h
index 44bd229a6d..65245a2246 100644
--- a/libavcodec/vp56.h
+++ b/libavcodec/vp56.h
@@ -35,7 +35,7 @@
typedef struct vp56_context VP56Context;
-typedef struct {
+typedef struct VP56mv {
DECLARE_ALIGNED(4, int16_t, x);
int16_t y;
} VP56mv;
@@ -52,7 +52,7 @@ typedef int (*VP56ParseCoeffModels)(VP56Context *s);
typedef int (*VP56ParseHeader)(VP56Context *s, const uint8_t *buf,
int buf_size);
-typedef struct {
+typedef struct VP56RangeCoder {
int high;
int bits; /* stored negated (i.e. negative "bits" is a positive number of
bits left) in order to eliminate a negate in cache refilling */
@@ -61,18 +61,18 @@ typedef struct {
unsigned int code_word;
} VP56RangeCoder;
-typedef struct {
+typedef struct VP56RefDc {
uint8_t not_null_dc;
VP56Frame ref_frame;
DCTELEM dc_coeff;
} VP56RefDc;
-typedef struct {
+typedef struct VP56Macroblock {
uint8_t type;
VP56mv mv;
} VP56Macroblock;
-typedef struct {
+typedef struct VP56Model {
uint8_t coeff_reorder[64]; /* used in vp6 only */
uint8_t coeff_index_to_pos[64]; /* used in vp6 only */
uint8_t vector_sig[2]; /* delta sign */
diff --git a/libavcodec/vp56data.h b/libavcodec/vp56data.h
index d48a89cbe9..f30732ed94 100644
--- a/libavcodec/vp56data.h
+++ b/libavcodec/vp56data.h
@@ -51,7 +51,7 @@ typedef enum {
VP56_MB_INTER_V2_GF = 9, /**< Inter MB, second vector, from golden frame */
} VP56mb;
-typedef struct {
+typedef struct VP56Tree {
int8_t val;
int8_t prob_idx;
} VP56Tree;
diff --git a/libavcodec/vp8.h b/libavcodec/vp8.h
index 4f026dfe8d..eb4aad278f 100644
--- a/libavcodec/vp8.h
+++ b/libavcodec/vp8.h
@@ -72,13 +72,13 @@ enum inter_splitmvmode {
VP8_SPLITMVMODE_NONE, ///< (only used in prediction) no split MVs
};
-typedef struct {
+typedef struct VP8FilterStrength {
uint8_t filter_level;
uint8_t inner_limit;
uint8_t inner_filter;
} VP8FilterStrength;
-typedef struct {
+typedef struct VP8Macroblock {
uint8_t skip;
// todo: make it possible to check for at least (i4x4 or split_mv)
// in one op. are others needed?
@@ -93,7 +93,7 @@ typedef struct {
VP56mv bmv[16];
} VP8Macroblock;
-typedef struct {
+typedef struct VP8ThreadData {
DECLARE_ALIGNED(16, DCTELEM, block)[6][4][16];
DECLARE_ALIGNED(16, DCTELEM, block_dc)[16];
/**
@@ -123,7 +123,7 @@ typedef struct {
} VP8ThreadData;
#define MAX_THREADS 8
-typedef struct {
+typedef struct VP8Context {
VP8ThreadData *thread_data;
AVCodecContext *avctx;
AVFrame *framep[4];
diff --git a/libavcodec/w32pthreads.h b/libavcodec/w32pthreads.h
index c4bbb9a51b..29185c71ec 100644
--- a/libavcodec/w32pthreads.h
+++ b/libavcodec/w32pthreads.h
@@ -43,7 +43,7 @@
#include "libavutil/internal.h"
#include "libavutil/mem.h"
-typedef struct {
+typedef struct pthread_t {
void *handle;
void *(*func)(void* arg);
void *arg;
@@ -57,7 +57,7 @@ typedef CRITICAL_SECTION pthread_mutex_t;
/* This is the CONDITIONAL_VARIABLE typedef for using Window's native
* conditional variables on kernels 6.0+.
* MinGW does not currently have this typedef. */
-typedef struct {
+typedef struct pthread_cond_t {
void *ptr;
} pthread_cond_t;
@@ -118,7 +118,7 @@ static inline int pthread_mutex_unlock(pthread_mutex_t *m)
/* for pre-Windows 6.0 platforms we need to define and use our own condition
* variable and api */
-typedef struct {
+typedef struct win32_cond_t {
pthread_mutex_t mtx_broadcast;
pthread_mutex_t mtx_waiter_count;
volatile int waiter_count;
diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c
index c36a027229..f608f661dd 100644
--- a/libavcodec/x86/dsputil_mmx.c
+++ b/libavcodec/x86/dsputil_mmx.c
@@ -1929,15 +1929,10 @@ static av_noinline void emulated_edge_mc_sse(uint8_t *buf, const uint8_t *src,
#if HAVE_INLINE_ASM
-typedef void emulated_edge_mc_func(uint8_t *dst, const uint8_t *src,
- int linesize, int block_w, int block_h,
- int src_x, int src_y, int w, int h);
-
-static av_always_inline void gmc(uint8_t *dst, uint8_t *src,
- int stride, int h, int ox, int oy,
- int dxx, int dxy, int dyx, int dyy,
- int shift, int r, int width, int height,
- emulated_edge_mc_func *emu_edge_fn)
+static void gmc_mmx(uint8_t *dst, uint8_t *src,
+ int stride, int h, int ox, int oy,
+ int dxx, int dxy, int dyx, int dyy,
+ int shift, int r, int width, int height)
{
const int w = 8;
const int ix = ox >> (16 + shift);
@@ -1952,7 +1947,6 @@ static av_always_inline void gmc(uint8_t *dst, uint8_t *src,
const uint16_t dxy4[4] = { dxys, dxys, dxys, dxys };
const uint16_t dyy4[4] = { dyys, dyys, dyys, dyys };
const uint64_t shift2 = 2 * shift;
- uint8_t edge_buf[(h + 1) * stride];
int x, y;
const int dxw = (dxx - (1 << (16 + shift))) * (w - 1);
@@ -1963,7 +1957,9 @@ static av_always_inline void gmc(uint8_t *dst, uint8_t *src,
((ox ^ (ox + dxw)) | (ox ^ (ox + dxh)) | (ox ^ (ox + dxw + dxh)) |
(oy ^ (oy + dyw)) | (oy ^ (oy + dyh)) | (oy ^ (oy + dyw + dyh))) >> (16 + shift)
// uses more than 16 bits of subpel mv (only at huge resolution)
- || (dxx | dxy | dyx | dyy) & 15) {
+ || (dxx | dxy | dyx | dyy) & 15 ||
+ (unsigned)ix >= width - w ||
+ (unsigned)iy >= height - h) {
// FIXME could still use mmx for some of the rows
ff_gmc_c(dst, src, stride, h, ox, oy, dxx, dxy, dyx, dyy,
shift, r, width, height);
@@ -1971,11 +1967,6 @@ static av_always_inline void gmc(uint8_t *dst, uint8_t *src,
}
src += ix + iy * stride;
- if ((unsigned)ix >= width - w ||
- (unsigned)iy >= height - h) {
- emu_edge_fn(edge_buf, src, stride, w + 1, h + 1, ix, iy, width, height);
- src = edge_buf;
- }
__asm__ volatile (
"movd %0, %%mm6 \n\t"
@@ -2054,36 +2045,6 @@ static av_always_inline void gmc(uint8_t *dst, uint8_t *src,
}
}
-#if HAVE_YASM
-#if ARCH_X86_32
-static void gmc_mmx(uint8_t *dst, uint8_t *src,
- int stride, int h, int ox, int oy,
- int dxx, int dxy, int dyx, int dyy,
- int shift, int r, int width, int height)
-{
- gmc(dst, src, stride, h, ox, oy, dxx, dxy, dyx, dyy, shift, r,
- width, height, &emulated_edge_mc_mmx);
-}
-#endif
-static void gmc_sse(uint8_t *dst, uint8_t *src,
- int stride, int h, int ox, int oy,
- int dxx, int dxy, int dyx, int dyy,
- int shift, int r, int width, int height)
-{
- gmc(dst, src, stride, h, ox, oy, dxx, dxy, dyx, dyy, shift, r,
- width, height, &emulated_edge_mc_sse);
-}
-#else
-static void gmc_mmx(uint8_t *dst, uint8_t *src,
- int stride, int h, int ox, int oy,
- int dxx, int dxy, int dyx, int dyy,
- int shift, int r, int width, int height)
-{
- gmc(dst, src, stride, h, ox, oy, dxx, dxy, dyx, dyy, shift, r,
- width, height, &ff_emulated_edge_mc_8);
-}
-#endif
-
#define PREFETCH(name, op) \
static void name(void *mem, int stride, int h) \
{ \
@@ -2584,9 +2545,7 @@ static void dsputil_init_mmx(DSPContext *c, AVCodecContext *avctx, int mm_flags)
SET_HPEL_FUNCS(avg_no_rnd, 1, 8, mmx);
}
-#if ARCH_X86_32 || !HAVE_YASM
c->gmc = gmc_mmx;
-#endif
c->add_bytes = add_bytes_mmx;
@@ -2841,9 +2800,6 @@ static void dsputil_init_sse(DSPContext *c, AVCodecContext *avctx, int mm_flags)
if (!high_bit_depth)
c->emulated_edge_mc = emulated_edge_mc_sse;
-#if HAVE_INLINE_ASM
- c->gmc = gmc_sse;
-#endif
#endif /* HAVE_YASM */
}
diff --git a/libavcodec/x86/dsputil_mmx.h b/libavcodec/x86/dsputil_mmx.h
index 100381cb48..16d741d573 100644
--- a/libavcodec/x86/dsputil_mmx.h
+++ b/libavcodec/x86/dsputil_mmx.h
@@ -26,7 +26,7 @@
#include "libavcodec/dsputil.h"
#include "libavutil/x86/asm.h"
-typedef struct { uint64_t a, b; } xmm_reg;
+typedef struct xmm_reg { uint64_t a, b; } xmm_reg;
extern const uint64_t ff_bone;
extern const uint64_t ff_wtwo;