Skip to content

Commit

Permalink
Merge remote-tracking branch 'qatar/master'
Browse files Browse the repository at this point in the history
* qatar/master:
  yuv4mpeg: return proper error codes.
  Give all anonymously typedeffed structs in headers a name
  fate: Add parseutils test
  parseutils-test: Drop random colors from parsing test
  vf_pad/scale: use double precision for aspect ratios.
  build: error on variable-length arrays
  ppc: swscale: rework yuv2planeX_altivec()
  ppc: fmtconvert: kill VLA in float_to_int16_interleave_altivec()
  x86: dsputil: kill VLA in gmc_mmx()
  libspeexenc: Updated commentary to reflect recent changes
  libspeexenc: Add an option for enabling DTX
  doc/APIchanges: fill in missing dates and hashes.
  lavr: bump major to 1 and declare it stable.
  lavr: change the type of the data buffers to uint8_t**.
  lavc: deprecate the audio resampling API.

Conflicts:
	cmdutils.h
	configure
	doc/APIchanges
	ffplay.c
	libavcodec/dwt.h
	libavcodec/libspeexenc.c
	libavfilter/vf_pad.c
	libavfilter/vf_scale.c
	libavformat/asf.h
	tests/fate/libavutil.mak
	tests/ref/fate/parseutils

Merged-by: Michael Niedermayer <michaelni@gmx.at>
  • Loading branch information
michaelni committed Oct 6, 2012
2 parents 886c366 + d3a72be commit 55c49af
Show file tree
Hide file tree
Showing 77 changed files with 269 additions and 293 deletions.
2 changes: 1 addition & 1 deletion cmdutils.h
Expand Up @@ -139,7 +139,7 @@ typedef struct SpecifierOpt {
} u;
} SpecifierOpt;

typedef struct {
typedef struct OptionDef {
const char *name;
int flags;
#define HAS_ARG 0x0001
Expand Down
1 change: 1 addition & 0 deletions configure
Expand Up @@ -3911,6 +3911,7 @@ elif enabled gcc; then
check_optflags -fno-tree-vectorize
check_cflags -Werror=implicit-function-declaration
check_cflags -Werror=missing-prototypes
# check_cflags -Werror=vla
elif enabled llvm_gcc; then
check_cflags -mllvm -stack-alignment=16
elif enabled clang; then
Expand Down
7 changes: 6 additions & 1 deletion doc/APIchanges
Expand Up @@ -97,7 +97,12 @@ API changes, most recent first:
2012-03-26 - a67d9cf - lavfi 2.66.100
Add avfilter_fill_frame_from_{audio_,}buffer_ref() functions.

2012-09-23 - a42aada - lavc 54.28.0 - avcodec.h
2012-10-05 - e7ba5b1 - lavr 1.0.0 - avresample.h
Data planes parameters to avresample_convert() and
avresample_read() are now uint8_t** instead of void**.
Libavresample is now stable.

2012-09-24 - a42aada - lavc 54.28.0 - avcodec.h
Add avcodec_free_frame(). This function must now
be used for freeing an AVFrame.

Expand Down
22 changes: 11 additions & 11 deletions libavcodec/aac.h
Expand Up @@ -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;
Expand All @@ -125,7 +125,7 @@ typedef struct {
/**
* Predictor State
*/
typedef struct {
typedef struct PredictorState {
float cor0;
float cor1;
float var0;
Expand All @@ -146,7 +146,7 @@ typedef struct {
/**
* Long Term Prediction
*/
typedef struct {
typedef struct LongTermPrediction {
int8_t present;
int16_t lag;
float coef;
Expand All @@ -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.
Expand All @@ -177,7 +177,7 @@ typedef struct {
/**
* Temporal Noise Shaping
*/
typedef struct {
typedef struct TemporalNoiseShaping {
int present;
int n_filt[8];
int length[8][4];
Expand All @@ -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
Expand All @@ -202,7 +202,7 @@ typedef struct {
*/
} DynamicRangeControl;

typedef struct {
typedef struct Pulse {
int num_pulse;
int start;
int pos[4];
Expand All @@ -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.
Expand All @@ -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;
Expand All @@ -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)
Expand All @@ -260,7 +260,7 @@ typedef struct {
/**
* main AAC context
*/
typedef struct {
typedef struct AACContext {
AVCodecContext *avctx;
AVFrame frame;

Expand Down
2 changes: 1 addition & 1 deletion libavcodec/aacadtsdec.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/aacps.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/ac3.h
Expand Up @@ -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
* @{
*/
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/ac3dec.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/acelp_vectors.h
Expand Up @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions libavcodec/adx.h
Expand Up @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions libavcodec/amrnbdata.h
Expand Up @@ -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
Expand All @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions libavcodec/amrwbdata.h
Expand Up @@ -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
Expand All @@ -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
Expand Down
10 changes: 10 additions & 0 deletions libavcodec/avcodec.h
Expand Up @@ -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
*
* @{
*/
Expand All @@ -4350,13 +4352,15 @@ 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,
enum AVSampleFormat sample_fmt_in,
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);

/**
Expand All @@ -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);


Expand All @@ -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);

/**
Expand All @@ -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);


Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions libavcodec/bytestream.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/cavs.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/dirac.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/dnxhddata.h
Expand Up @@ -25,7 +25,7 @@
#include <stdint.h>
#include "avcodec.h"

typedef struct {
typedef struct CIDEntry {
int cid;
unsigned int width, height;
int interlaced;
Expand Down
4 changes: 2 additions & 2 deletions libavcodec/dnxhdenc.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/dwt.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/g722.h
Expand Up @@ -30,7 +30,7 @@

#define PREV_SAMPLES_BUF_SIZE 1024

typedef struct {
typedef struct G722Context {
const AVClass *class;
AVFrame frame;
int bits_per_codeword;
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/gsmdec_data.h
Expand Up @@ -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"),
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/huffman.h
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion libavcodec/indeo3data.h
Expand Up @@ -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
Expand Down

0 comments on commit 55c49af

Please sign in to comment.