changeset 8318:bc36a075bf35 libavcodec

The POSIX namespace shall be held sacrosanct. To that end, continue eliminating _t from structure names in FFmpeg.
author melanson
date Sun, 14 Dec 2008 03:29:33 +0000
parents 08b0f63a91c5
children 3e7dd8cfa97f
files cinepak.c idcinvideo.c svq1dec.c truemotion1.c
diffstat 4 files changed, 37 insertions(+), 31 deletions(-) [+]
line wrap: on
line diff
--- a/cinepak.c	Sun Dec 14 00:48:16 2008 +0000
+++ b/cinepak.c	Sun Dec 14 03:29:33 2008 +0000
@@ -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 @@
     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 @@
     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 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_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;
--- a/idcinvideo.c	Sun Dec 14 00:48:16 2008 +0000
+++ b/idcinvideo.c	Sun Dec 14 03:29:33 2008 +0000
@@ -60,7 +60,7 @@
   int count;
   unsigned char used;
   int children[2];
-} hnode_t;
+} hnode;
 
 typedef struct IdcinContext {
 
@@ -70,7 +70,7 @@
     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 @@
  * 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 @@
  *    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 void idcin_decode_vlcs(IdcinContext *s)
 {
-    hnode_t *hnodes;
+    hnode *hnodes;
     long x, y;
     int prev;
     unsigned char v = 0;
--- a/svq1dec.c	Sun Dec 14 00:48:16 2008 +0000
+++ b/svq1dec.c	Sun Dec 14 03:29:33 2008 +0000
@@ -56,7 +56,7 @@
 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 @@
   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 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_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_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 @@
         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) {
--- a/truemotion1.c	Sun Dec 14 00:48:16 2008 +0000
+++ b/truemotion1.c	Sun Dec 14 03:29:33 2008 +0000
@@ -164,7 +164,8 @@
     }
 }
 
-#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 @@
     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 @@
     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 @@
     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 @@
     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 @@
     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)