[FFmpeg-cvslog] r16118 - in trunk: libavcodec/cinepak.c libavcodec/idcinvideo.c libavcodec/svq1dec.c libavcodec/truemotion1.c libavformat/segafilm.c libavformat/sierravmd.c

melanson subversion
Sun Dec 14 04:29:33 CET 2008


Author: melanson
Date: Sun Dec 14 04:29:33 2008
New Revision: 16118

Log:
The POSIX namespace shall be held sacrosanct. To that end, 
continue eliminating _t from structure names in FFmpeg.


Modified:
   trunk/libavcodec/cinepak.c
   trunk/libavcodec/idcinvideo.c
   trunk/libavcodec/svq1dec.c
   trunk/libavcodec/truemotion1.c
   trunk/libavformat/segafilm.c
   trunk/libavformat/sierravmd.c

Modified: trunk/libavcodec/cinepak.c
==============================================================================
--- trunk/libavcodec/cinepak.c	(original)
+++ trunk/libavcodec/cinepak.c	Sun Dec 14 04:29:33 2008
@@ -40,7 +40,7 @@
 typedef struct {
     uint8_t  y0, y1, y2, y3;
     uint8_t  u, v;
-} cvid_codebook_t;
+} cvid_codebook;
 
 #define MAX_STRIPS      32
 
@@ -48,9 +48,9 @@ typedef struct {
     uint16_t          id;
     uint16_t          x1, y1;
     uint16_t          x2, y2;
-    cvid_codebook_t   v4_codebook[256];
-    cvid_codebook_t   v1_codebook[256];
-} cvid_strip_t;
+    cvid_codebook     v4_codebook[256];
+    cvid_codebook     v1_codebook[256];
+} cvid_strip;
 
 typedef struct CinepakContext {
 
@@ -63,13 +63,13 @@ typedef struct CinepakContext {
     int width, height;
 
     int palette_video;
-    cvid_strip_t strips[MAX_STRIPS];
+    cvid_strip strips[MAX_STRIPS];
 
     int sega_film_skip_bytes;
 
 } 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)
 {
     const uint8_t *eod = (data + size);
@@ -118,12 +118,12 @@ static void cinepak_decode_codebook (cvi
     }
 }
 
-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)
 {
     const uint8_t   *eod = (data + size);
     uint32_t         flag, mask;
-    cvid_codebook_t *codebook;
+    cvid_codebook   *codebook;
     unsigned int     x, y;
     uint32_t         iy[4];
     uint32_t         iu[2];
@@ -262,7 +262,7 @@ static int cinepak_decode_vectors (Cinep
 }
 
 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);
     int      chunk_id, chunk_size;

Modified: trunk/libavcodec/idcinvideo.c
==============================================================================
--- trunk/libavcodec/idcinvideo.c	(original)
+++ trunk/libavcodec/idcinvideo.c	Sun Dec 14 04:29:33 2008
@@ -60,7 +60,7 @@ typedef struct
   int count;
   unsigned char used;
   int children[2];
-} hnode_t;
+} hnode;
 
 typedef struct IdcinContext {
 
@@ -70,7 +70,7 @@ typedef struct IdcinContext {
     const unsigned char *buf;
     int size;
 
-    hnode_t huff_nodes[256][HUF_TOKENS*2];
+    hnode huff_nodes[256][HUF_TOKENS*2];
     int num_huff_nodes[256];
 
 } IdcinContext;
@@ -81,7 +81,7 @@ typedef struct IdcinContext {
  * Returns the node index of the lowest unused node, or -1 if all nodes
  * 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 best, best_node;
 
@@ -114,7 +114,7 @@ static int huff_smallest_node(hnode_t *h
  *    That is: huff_nodes[prev][num_huff_nodes[prev]] is the root node.
  */
 static av_cold void huff_build_tree(IdcinContext *s, int prev) {
-    hnode_t *node, *hnodes;
+    hnode *node, *hnodes;
      int num_hnodes, i;
 
     num_hnodes = HUF_TOKENS;
@@ -173,7 +173,7 @@ static av_cold int idcin_decode_init(AVC
 
 static void idcin_decode_vlcs(IdcinContext *s)
 {
-    hnode_t *hnodes;
+    hnode *hnodes;
     long x, y;
     int prev;
     unsigned char v = 0;

Modified: trunk/libavcodec/svq1dec.c
==============================================================================
--- trunk/libavcodec/svq1dec.c	(original)
+++ trunk/libavcodec/svq1dec.c	Sun Dec 14 04:29:33 2008
@@ -56,7 +56,7 @@ static VLC svq1_inter_mean;
 typedef struct svq1_pmv_s {
   int           x;
   int           y;
-} svq1_pmv_t;
+} svq1_pmv;
 
 static const uint16_t checksum_table[256] = {
   0x0000, 0x1021, 0x2042, 0x3063, 0x4084, 0x50A5, 0x60C6, 0x70E7,
@@ -301,7 +301,7 @@ static int svq1_decode_block_non_intra (
   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        i;
 
@@ -342,11 +342,11 @@ static void svq1_skip_block (uint8_t *cu
 
 static int svq1_motion_inter_block (MpegEncContext *s, GetBitContext *bitbuf,
                                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    *dst;
-  svq1_pmv_t  mv;
-  svq1_pmv_t *pmv[3];
+  svq1_pmv    mv;
+  svq1_pmv   *pmv[3];
   int         result;
 
   /* predict and decode motion vector */
@@ -394,11 +394,11 @@ static int svq1_motion_inter_block (Mpeg
 
 static int svq1_motion_inter_4v_block (MpegEncContext *s, GetBitContext *bitbuf,
                                   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    *dst;
-  svq1_pmv_t  mv;
-  svq1_pmv_t *pmv[4];
+  svq1_pmv    mv;
+  svq1_pmv   *pmv[4];
   int         i, result;
 
   /* predict and decode motion vector (0) */
@@ -484,7 +484,7 @@ static int svq1_motion_inter_4v_block (M
 
 static int svq1_decode_delta_block (MpegEncContext *s, GetBitContext *bitbuf,
                         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;
   int      result = 0;
 
@@ -727,9 +727,9 @@ static int svq1_decode_frame(AVCodecCont
         current += 16*linesize;
       }
     } else {
-      svq1_pmv_t pmv[width/8+3];
+      svq1_pmv pmv[width/8+3];
       /* 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 (x=0; x < width; x+=16) {

Modified: trunk/libavcodec/truemotion1.c
==============================================================================
--- trunk/libavcodec/truemotion1.c	(original)
+++ trunk/libavcodec/truemotion1.c	Sun Dec 14 04:29:33 2008
@@ -164,7 +164,8 @@ static void select_delta_tables(TrueMoti
     }
 }
 
-#ifdef WORDS_BIGENDIAN
+#if 0
+//#ifdef WORDS_BIGENDIAN
 static int make_ydt15_entry(int p2, int p1, int16_t *ydt)
 #else
 static int make_ydt15_entry(int p1, int p2, int16_t *ydt)
@@ -179,7 +180,8 @@ static int make_ydt15_entry(int p1, int 
     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)
 #else
 static int make_cdt15_entry(int p1, int p2, int16_t *cdt)
@@ -193,7 +195,8 @@ static int make_cdt15_entry(int p1, int 
     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)
 #else
 static int make_ydt16_entry(int p1, int p2, int16_t *ydt)
@@ -208,7 +211,8 @@ static int make_ydt16_entry(int p1, int 
     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)
 #else
 static int make_cdt16_entry(int p1, int p2, int16_t *cdt)
@@ -222,7 +226,8 @@ static int make_cdt16_entry(int p1, int 
     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)
 #else
 static int make_ydt24_entry(int p1, int p2, int16_t *ydt)
@@ -235,7 +240,8 @@ static int make_ydt24_entry(int p1, int 
     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)
 #else
 static int make_cdt24_entry(int p1, int p2, int16_t *cdt)

Modified: trunk/libavformat/segafilm.c
==============================================================================
--- trunk/libavformat/segafilm.c	(original)
+++ trunk/libavformat/segafilm.c	Sun Dec 14 04:29:33 2008
@@ -40,7 +40,7 @@ typedef struct {
   unsigned int sample_size;
   int64_t pts;
   int keyframe;
-} film_sample_t;
+} film_sample;
 
 typedef struct FilmDemuxContext {
     int video_stream_index;
@@ -53,7 +53,7 @@ typedef struct FilmDemuxContext {
 
     enum CodecID video_type;
     unsigned int sample_count;
-    film_sample_t *sample_table;
+    film_sample *sample_table;
     unsigned int current_sample;
 
     unsigned int base_clock;
@@ -163,9 +163,9 @@ static int film_read_header(AVFormatCont
         return AVERROR_INVALIDDATA;
     film->base_clock = AV_RB32(&scratch[8]);
     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;
-    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++)
         av_set_pts_info(s->streams[i], 33, 1, film->base_clock);
@@ -205,7 +205,7 @@ static int film_read_packet(AVFormatCont
 {
     FilmDemuxContext *film = s->priv_data;
     ByteIOContext *pb = s->pb;
-    film_sample_t *sample;
+    film_sample *sample;
     int ret = 0;
     int i;
     int left, right;

Modified: trunk/libavformat/sierravmd.c
==============================================================================
--- trunk/libavformat/sierravmd.c	(original)
+++ trunk/libavformat/sierravmd.c	Sun Dec 14 04:29:33 2008
@@ -39,7 +39,7 @@ typedef struct {
   int64_t pts;
   int keyframe;
   unsigned char frame_record[BYTES_PER_FRAME_RECORD];
-} vmd_frame_t;
+} vmd_frame;
 
 typedef struct VmdDemuxContext {
     int video_stream_index;
@@ -47,7 +47,7 @@ typedef struct VmdDemuxContext {
 
     unsigned int frame_count;
     unsigned int frames_per_block;
-    vmd_frame_t *frame_table;
+    vmd_frame *frame_table;
     unsigned int current_frame;
 
     int sample_rate;
@@ -146,12 +146,12 @@ static int vmd_read_header(AVFormatConte
     vmd->frame_table = NULL;
     sound_buffers = AV_RL16(&vmd->vmd_header[808]);
     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");
         return -1;
     }
     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) {
         av_free(raw_frame_table);
         av_free(vmd->frame_table);
@@ -248,7 +248,7 @@ static int vmd_read_packet(AVFormatConte
     VmdDemuxContext *vmd = s->priv_data;
     ByteIOContext *pb = s->pb;
     int ret = 0;
-    vmd_frame_t *frame;
+    vmd_frame *frame;
 
     if (vmd->current_frame >= vmd->frame_count)
         return AVERROR(EIO);




More information about the ffmpeg-cvslog mailing list