Commit 02fb2546 authored by Mike Melanson's avatar Mike Melanson

The POSIX namespace shall be held sacrosanct. To that end,

continue eliminating _t from structure names in FFmpeg.

Originally committed as revision 16118 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 5e660449
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
typedef struct { typedef struct {
uint8_t y0, y1, y2, y3; uint8_t y0, y1, y2, y3;
uint8_t u, v; uint8_t u, v;
} cvid_codebook_t; } cvid_codebook;
#define MAX_STRIPS 32 #define MAX_STRIPS 32
...@@ -48,9 +48,9 @@ typedef struct { ...@@ -48,9 +48,9 @@ typedef struct {
uint16_t id; uint16_t id;
uint16_t x1, y1; uint16_t x1, y1;
uint16_t x2, y2; uint16_t x2, y2;
cvid_codebook_t v4_codebook[256]; cvid_codebook v4_codebook[256];
cvid_codebook_t v1_codebook[256]; cvid_codebook v1_codebook[256];
} cvid_strip_t; } cvid_strip;
typedef struct CinepakContext { typedef struct CinepakContext {
...@@ -63,13 +63,13 @@ typedef struct CinepakContext { ...@@ -63,13 +63,13 @@ typedef struct CinepakContext {
int width, height; int width, height;
int palette_video; int palette_video;
cvid_strip_t strips[MAX_STRIPS]; cvid_strip strips[MAX_STRIPS];
int sega_film_skip_bytes; int sega_film_skip_bytes;
} CinepakContext; } CinepakContext;
static void cinepak_decode_codebook (cvid_codebook_t *codebook, static void cinepak_decode_codebook (cvid_codebook *codebook,
int chunk_id, int size, const uint8_t *data) int chunk_id, int size, const uint8_t *data)
{ {
const uint8_t *eod = (data + size); const uint8_t *eod = (data + size);
...@@ -118,12 +118,12 @@ static void cinepak_decode_codebook (cvid_codebook_t *codebook, ...@@ -118,12 +118,12 @@ static void cinepak_decode_codebook (cvid_codebook_t *codebook,
} }
} }
static int cinepak_decode_vectors (CinepakContext *s, cvid_strip_t *strip, static int cinepak_decode_vectors (CinepakContext *s, cvid_strip *strip,
int chunk_id, int size, const uint8_t *data) int chunk_id, int size, const uint8_t *data)
{ {
const uint8_t *eod = (data + size); const uint8_t *eod = (data + size);
uint32_t flag, mask; uint32_t flag, mask;
cvid_codebook_t *codebook; cvid_codebook *codebook;
unsigned int x, y; unsigned int x, y;
uint32_t iy[4]; uint32_t iy[4];
uint32_t iu[2]; uint32_t iu[2];
...@@ -262,7 +262,7 @@ static int cinepak_decode_vectors (CinepakContext *s, cvid_strip_t *strip, ...@@ -262,7 +262,7 @@ static int cinepak_decode_vectors (CinepakContext *s, cvid_strip_t *strip,
} }
static int cinepak_decode_strip (CinepakContext *s, static int cinepak_decode_strip (CinepakContext *s,
cvid_strip_t *strip, const uint8_t *data, int size) cvid_strip *strip, const uint8_t *data, int size)
{ {
const uint8_t *eod = (data + size); const uint8_t *eod = (data + size);
int chunk_id, chunk_size; int chunk_id, chunk_size;
......
...@@ -60,7 +60,7 @@ typedef struct ...@@ -60,7 +60,7 @@ typedef struct
int count; int count;
unsigned char used; unsigned char used;
int children[2]; int children[2];
} hnode_t; } hnode;
typedef struct IdcinContext { typedef struct IdcinContext {
...@@ -70,7 +70,7 @@ typedef struct IdcinContext { ...@@ -70,7 +70,7 @@ typedef struct IdcinContext {
const unsigned char *buf; const unsigned char *buf;
int size; int size;
hnode_t huff_nodes[256][HUF_TOKENS*2]; hnode huff_nodes[256][HUF_TOKENS*2];
int num_huff_nodes[256]; int num_huff_nodes[256];
} IdcinContext; } IdcinContext;
...@@ -81,7 +81,7 @@ typedef struct IdcinContext { ...@@ -81,7 +81,7 @@ typedef struct IdcinContext {
* Returns the node index of the lowest unused node, or -1 if all nodes * Returns the node index of the lowest unused node, or -1 if all nodes
* are used. * are used.
*/ */
static int huff_smallest_node(hnode_t *hnodes, int num_hnodes) { static int huff_smallest_node(hnode *hnodes, int num_hnodes) {
int i; int i;
int best, best_node; int best, best_node;
...@@ -114,7 +114,7 @@ static int huff_smallest_node(hnode_t *hnodes, int num_hnodes) { ...@@ -114,7 +114,7 @@ static int huff_smallest_node(hnode_t *hnodes, int num_hnodes) {
* That is: huff_nodes[prev][num_huff_nodes[prev]] is the root node. * That is: huff_nodes[prev][num_huff_nodes[prev]] is the root node.
*/ */
static av_cold void huff_build_tree(IdcinContext *s, int prev) { static av_cold void huff_build_tree(IdcinContext *s, int prev) {
hnode_t *node, *hnodes; hnode *node, *hnodes;
int num_hnodes, i; int num_hnodes, i;
num_hnodes = HUF_TOKENS; num_hnodes = HUF_TOKENS;
...@@ -173,7 +173,7 @@ static av_cold int idcin_decode_init(AVCodecContext *avctx) ...@@ -173,7 +173,7 @@ static av_cold int idcin_decode_init(AVCodecContext *avctx)
static void idcin_decode_vlcs(IdcinContext *s) static void idcin_decode_vlcs(IdcinContext *s)
{ {
hnode_t *hnodes; hnode *hnodes;
long x, y; long x, y;
int prev; int prev;
unsigned char v = 0; unsigned char v = 0;
......
...@@ -56,7 +56,7 @@ static VLC svq1_inter_mean; ...@@ -56,7 +56,7 @@ static VLC svq1_inter_mean;
typedef struct svq1_pmv_s { typedef struct svq1_pmv_s {
int x; int x;
int y; int y;
} svq1_pmv_t; } svq1_pmv;
static const uint16_t checksum_table[256] = { static const uint16_t checksum_table[256] = {
0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7, 0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
...@@ -301,7 +301,7 @@ static int svq1_decode_block_non_intra (GetBitContext *bitbuf, uint8_t *pixels, ...@@ -301,7 +301,7 @@ static int svq1_decode_block_non_intra (GetBitContext *bitbuf, uint8_t *pixels,
return 0; return 0;
} }
static int svq1_decode_motion_vector (GetBitContext *bitbuf, svq1_pmv_t *mv, svq1_pmv_t **pmv) { static int svq1_decode_motion_vector (GetBitContext *bitbuf, svq1_pmv *mv, svq1_pmv **pmv) {
int diff; int diff;
int i; int i;
...@@ -342,11 +342,11 @@ static void svq1_skip_block (uint8_t *current, uint8_t *previous, int pitch, int ...@@ -342,11 +342,11 @@ static void svq1_skip_block (uint8_t *current, uint8_t *previous, int pitch, int
static int svq1_motion_inter_block (MpegEncContext *s, GetBitContext *bitbuf, static int svq1_motion_inter_block (MpegEncContext *s, GetBitContext *bitbuf,
uint8_t *current, uint8_t *previous, int pitch, uint8_t *current, uint8_t *previous, int pitch,
svq1_pmv_t *motion, int x, int y) { svq1_pmv *motion, int x, int y) {
uint8_t *src; uint8_t *src;
uint8_t *dst; uint8_t *dst;
svq1_pmv_t mv; svq1_pmv mv;
svq1_pmv_t *pmv[3]; svq1_pmv *pmv[3];
int result; int result;
/* predict and decode motion vector */ /* predict and decode motion vector */
...@@ -394,11 +394,11 @@ static int svq1_motion_inter_block (MpegEncContext *s, GetBitContext *bitbuf, ...@@ -394,11 +394,11 @@ static int svq1_motion_inter_block (MpegEncContext *s, GetBitContext *bitbuf,
static int svq1_motion_inter_4v_block (MpegEncContext *s, GetBitContext *bitbuf, static int svq1_motion_inter_4v_block (MpegEncContext *s, GetBitContext *bitbuf,
uint8_t *current, uint8_t *previous, int pitch, uint8_t *current, uint8_t *previous, int pitch,
svq1_pmv_t *motion,int x, int y) { svq1_pmv *motion,int x, int y) {
uint8_t *src; uint8_t *src;
uint8_t *dst; uint8_t *dst;
svq1_pmv_t mv; svq1_pmv mv;
svq1_pmv_t *pmv[4]; svq1_pmv *pmv[4];
int i, result; int i, result;
/* predict and decode motion vector (0) */ /* predict and decode motion vector (0) */
...@@ -484,7 +484,7 @@ static int svq1_motion_inter_4v_block (MpegEncContext *s, GetBitContext *bitbuf, ...@@ -484,7 +484,7 @@ static int svq1_motion_inter_4v_block (MpegEncContext *s, GetBitContext *bitbuf,
static int svq1_decode_delta_block (MpegEncContext *s, GetBitContext *bitbuf, static int svq1_decode_delta_block (MpegEncContext *s, GetBitContext *bitbuf,
uint8_t *current, uint8_t *previous, int pitch, uint8_t *current, uint8_t *previous, int pitch,
svq1_pmv_t *motion, int x, int y) { svq1_pmv *motion, int x, int y) {
uint32_t block_type; uint32_t block_type;
int result = 0; int result = 0;
...@@ -727,9 +727,9 @@ static int svq1_decode_frame(AVCodecContext *avctx, ...@@ -727,9 +727,9 @@ static int svq1_decode_frame(AVCodecContext *avctx,
current += 16*linesize; current += 16*linesize;
} }
} else { } else {
svq1_pmv_t pmv[width/8+3]; svq1_pmv pmv[width/8+3];
/* delta frame */ /* delta frame */
memset (pmv, 0, ((width / 8) + 3) * sizeof(svq1_pmv_t)); memset (pmv, 0, ((width / 8) + 3) * sizeof(svq1_pmv));
for (y=0; y < height; y+=16) { for (y=0; y < height; y+=16) {
for (x=0; x < width; x+=16) { for (x=0; x < width; x+=16) {
......
...@@ -164,7 +164,8 @@ static void select_delta_tables(TrueMotion1Context *s, int delta_table_index) ...@@ -164,7 +164,8 @@ static void select_delta_tables(TrueMotion1Context *s, int delta_table_index)
} }
} }
#ifdef WORDS_BIGENDIAN #if 0
//#ifdef WORDS_BIGENDIAN
static int make_ydt15_entry(int p2, int p1, int16_t *ydt) static int make_ydt15_entry(int p2, int p1, int16_t *ydt)
#else #else
static int make_ydt15_entry(int p1, int p2, int16_t *ydt) static int make_ydt15_entry(int p1, int p2, int16_t *ydt)
...@@ -179,7 +180,8 @@ static int make_ydt15_entry(int p1, int p2, int16_t *ydt) ...@@ -179,7 +180,8 @@ static int make_ydt15_entry(int p1, int p2, int16_t *ydt)
return (lo + (hi << 16)) << 1; return (lo + (hi << 16)) << 1;
} }
#ifdef WORDS_BIGENDIAN #if 0
//#ifdef WORDS_BIGENDIAN
static int make_cdt15_entry(int p2, int p1, int16_t *cdt) static int make_cdt15_entry(int p2, int p1, int16_t *cdt)
#else #else
static int make_cdt15_entry(int p1, int p2, int16_t *cdt) static int make_cdt15_entry(int p1, int p2, int16_t *cdt)
...@@ -193,7 +195,8 @@ static int make_cdt15_entry(int p1, int p2, int16_t *cdt) ...@@ -193,7 +195,8 @@ static int make_cdt15_entry(int p1, int p2, int16_t *cdt)
return (lo + (lo << 16)) << 1; return (lo + (lo << 16)) << 1;
} }
#ifdef WORDS_BIGENDIAN #if 0
//#ifdef WORDS_BIGENDIAN
static int make_ydt16_entry(int p2, int p1, int16_t *ydt) static int make_ydt16_entry(int p2, int p1, int16_t *ydt)
#else #else
static int make_ydt16_entry(int p1, int p2, int16_t *ydt) static int make_ydt16_entry(int p1, int p2, int16_t *ydt)
...@@ -208,7 +211,8 @@ static int make_ydt16_entry(int p1, int p2, int16_t *ydt) ...@@ -208,7 +211,8 @@ static int make_ydt16_entry(int p1, int p2, int16_t *ydt)
return (lo + (hi << 16)) << 1; return (lo + (hi << 16)) << 1;
} }
#ifdef WORDS_BIGENDIAN #if 0
//#ifdef WORDS_BIGENDIAN
static int make_cdt16_entry(int p2, int p1, int16_t *cdt) static int make_cdt16_entry(int p2, int p1, int16_t *cdt)
#else #else
static int make_cdt16_entry(int p1, int p2, int16_t *cdt) static int make_cdt16_entry(int p1, int p2, int16_t *cdt)
...@@ -222,7 +226,8 @@ static int make_cdt16_entry(int p1, int p2, int16_t *cdt) ...@@ -222,7 +226,8 @@ static int make_cdt16_entry(int p1, int p2, int16_t *cdt)
return (lo + (lo << 16)) << 1; return (lo + (lo << 16)) << 1;
} }
#ifdef WORDS_BIGENDIAN #if 0
//#ifdef WORDS_BIGENDIAN
static int make_ydt24_entry(int p2, int p1, int16_t *ydt) static int make_ydt24_entry(int p2, int p1, int16_t *ydt)
#else #else
static int make_ydt24_entry(int p1, int p2, int16_t *ydt) static int make_ydt24_entry(int p1, int p2, int16_t *ydt)
...@@ -235,7 +240,8 @@ static int make_ydt24_entry(int p1, int p2, int16_t *ydt) ...@@ -235,7 +240,8 @@ static int make_ydt24_entry(int p1, int p2, int16_t *ydt)
return (lo + (hi << 8) + (hi << 16)) << 1; return (lo + (hi << 8) + (hi << 16)) << 1;
} }
#ifdef WORDS_BIGENDIAN #if 0
//#ifdef WORDS_BIGENDIAN
static int make_cdt24_entry(int p2, int p1, int16_t *cdt) static int make_cdt24_entry(int p2, int p1, int16_t *cdt)
#else #else
static int make_cdt24_entry(int p1, int p2, int16_t *cdt) static int make_cdt24_entry(int p1, int p2, int16_t *cdt)
......
...@@ -40,7 +40,7 @@ typedef struct { ...@@ -40,7 +40,7 @@ typedef struct {
unsigned int sample_size; unsigned int sample_size;
int64_t pts; int64_t pts;
int keyframe; int keyframe;
} film_sample_t; } film_sample;
typedef struct FilmDemuxContext { typedef struct FilmDemuxContext {
int video_stream_index; int video_stream_index;
...@@ -53,7 +53,7 @@ typedef struct FilmDemuxContext { ...@@ -53,7 +53,7 @@ typedef struct FilmDemuxContext {
enum CodecID video_type; enum CodecID video_type;
unsigned int sample_count; unsigned int sample_count;
film_sample_t *sample_table; film_sample *sample_table;
unsigned int current_sample; unsigned int current_sample;
unsigned int base_clock; unsigned int base_clock;
...@@ -163,9 +163,9 @@ static int film_read_header(AVFormatContext *s, ...@@ -163,9 +163,9 @@ static int film_read_header(AVFormatContext *s,
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
film->base_clock = AV_RB32(&scratch[8]); film->base_clock = AV_RB32(&scratch[8]);
film->sample_count = AV_RB32(&scratch[12]); film->sample_count = AV_RB32(&scratch[12]);
if(film->sample_count >= UINT_MAX / sizeof(film_sample_t)) if(film->sample_count >= UINT_MAX / sizeof(film_sample))
return -1; return -1;
film->sample_table = av_malloc(film->sample_count * sizeof(film_sample_t)); film->sample_table = av_malloc(film->sample_count * sizeof(film_sample));
for(i=0; i<s->nb_streams; i++) for(i=0; i<s->nb_streams; i++)
av_set_pts_info(s->streams[i], 33, 1, film->base_clock); av_set_pts_info(s->streams[i], 33, 1, film->base_clock);
...@@ -205,7 +205,7 @@ static int film_read_packet(AVFormatContext *s, ...@@ -205,7 +205,7 @@ static int film_read_packet(AVFormatContext *s,
{ {
FilmDemuxContext *film = s->priv_data; FilmDemuxContext *film = s->priv_data;
ByteIOContext *pb = s->pb; ByteIOContext *pb = s->pb;
film_sample_t *sample; film_sample *sample;
int ret = 0; int ret = 0;
int i; int i;
int left, right; int left, right;
......
...@@ -39,7 +39,7 @@ typedef struct { ...@@ -39,7 +39,7 @@ typedef struct {
int64_t pts; int64_t pts;
int keyframe; int keyframe;
unsigned char frame_record[BYTES_PER_FRAME_RECORD]; unsigned char frame_record[BYTES_PER_FRAME_RECORD];
} vmd_frame_t; } vmd_frame;
typedef struct VmdDemuxContext { typedef struct VmdDemuxContext {
int video_stream_index; int video_stream_index;
...@@ -47,7 +47,7 @@ typedef struct VmdDemuxContext { ...@@ -47,7 +47,7 @@ typedef struct VmdDemuxContext {
unsigned int frame_count; unsigned int frame_count;
unsigned int frames_per_block; unsigned int frames_per_block;
vmd_frame_t *frame_table; vmd_frame *frame_table;
unsigned int current_frame; unsigned int current_frame;
int sample_rate; int sample_rate;
...@@ -146,12 +146,12 @@ static int vmd_read_header(AVFormatContext *s, ...@@ -146,12 +146,12 @@ static int vmd_read_header(AVFormatContext *s,
vmd->frame_table = NULL; vmd->frame_table = NULL;
sound_buffers = AV_RL16(&vmd->vmd_header[808]); sound_buffers = AV_RL16(&vmd->vmd_header[808]);
raw_frame_table_size = vmd->frame_count * 6; raw_frame_table_size = vmd->frame_count * 6;
if(vmd->frame_count * vmd->frames_per_block >= UINT_MAX / sizeof(vmd_frame_t)){ if(vmd->frame_count * vmd->frames_per_block >= UINT_MAX / sizeof(vmd_frame)){
av_log(s, AV_LOG_ERROR, "vmd->frame_count * vmd->frames_per_block too large\n"); av_log(s, AV_LOG_ERROR, "vmd->frame_count * vmd->frames_per_block too large\n");
return -1; return -1;
} }
raw_frame_table = av_malloc(raw_frame_table_size); raw_frame_table = av_malloc(raw_frame_table_size);
vmd->frame_table = av_malloc((vmd->frame_count * vmd->frames_per_block + sound_buffers) * sizeof(vmd_frame_t)); vmd->frame_table = av_malloc((vmd->frame_count * vmd->frames_per_block + sound_buffers) * sizeof(vmd_frame));
if (!raw_frame_table || !vmd->frame_table) { if (!raw_frame_table || !vmd->frame_table) {
av_free(raw_frame_table); av_free(raw_frame_table);
av_free(vmd->frame_table); av_free(vmd->frame_table);
...@@ -248,7 +248,7 @@ static int vmd_read_packet(AVFormatContext *s, ...@@ -248,7 +248,7 @@ static int vmd_read_packet(AVFormatContext *s,
VmdDemuxContext *vmd = s->priv_data; VmdDemuxContext *vmd = s->priv_data;
ByteIOContext *pb = s->pb; ByteIOContext *pb = s->pb;
int ret = 0; int ret = 0;
vmd_frame_t *frame; vmd_frame *frame;
if (vmd->current_frame >= vmd->frame_count) if (vmd->current_frame >= vmd->frame_count)
return AVERROR(EIO); return AVERROR(EIO);
......
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