Commit e4cbf752 authored by Diego Biurrun's avatar Diego Biurrun
Browse files

Give all anonymously typedeffed structs in headers a name

Anonymous structs cannot be forward declared and have no benefit.
parent 76f644d9
......@@ -121,7 +121,7 @@ typedef struct SpecifierOpt {
} u;
} SpecifierOpt;
typedef struct {
typedef struct OptionDef {
const char *name;
int flags;
#define HAS_ARG 0x0001
......@@ -356,7 +356,7 @@ int read_yesno(void);
*/
int cmdutils_read_file(const char *filename, char **bufptr, size_t *size);
typedef struct {
typedef struct PtsCorrectionContext {
int64_t num_faulty_pts; /// Number of incorrect PTS values so far
int64_t num_faulty_dts; /// Number of incorrect DTS values so far
int64_t last_pts; /// PTS of the last frame
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -91,7 +91,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
* @{
*/
......
......@@ -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
......
......@@ -26,7 +26,7 @@
#include <stdint.h>
/** Sparse representation for the algebraic codebook (fixed) vector */
typedef struct {
typedef struct AMRFixed {
int n;
int x[10];
float y[10];
......
......@@ -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];
......
......@@ -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;
......
......@@ -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
......
......@@ -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;
......
......@@ -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
......
......@@ -31,7 +31,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
......
......@@ -25,7 +25,7 @@
#include <stdint.h>
#include "avcodec.h"
typedef struct {
typedef struct CIDEntry {
int cid;
unsigned int width, height;
int interlaced;
......
......@@ -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;
......
......@@ -26,7 +26,7 @@
typedef int DWTELEM;
typedef short IDWTELEM;
typedef struct {
typedef struct DWTCompose {
IDWTELEM *b0;
IDWTELEM *b1;
IDWTELEM *b2;
......
......@@ -30,7 +30,7 @@
#define PREV_SAMPLES_BUF_SIZE 1024
typedef struct {
typedef struct G722Context {
const AVClass *class;
AVFrame frame;
int bits_per_codeword;
......
......@@ -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"),
......
......@@ -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;
......
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment