Browse code

spelling cosmetics

Originally committed as revision 15681 to svn://svn.ffmpeg.org/ffmpeg/trunk

Diego Biurrun authored on 2008/10/25 06:37:06
Showing 4 changed files
... ...
@@ -138,7 +138,7 @@ static av_cold int dvvideo_init(AVCodecContext *avctx)
138 138
 
139 139
         done = 1;
140 140
 
141
-        /* dv_anchor lets each thread know its Id */
141
+        /* dv_anchor lets each thread know its ID */
142 142
         for (i=0; i<DV_ANCHOR_SIZE; i++)
143 143
             dv_anchor[i] = (void*)(size_t)i;
144 144
 
... ...
@@ -967,7 +967,7 @@ static inline void dv_encode_video_segment(DVVideoContext *s,
967 967
         }
968 968
     }
969 969
 
970
-    /* Third and final pass over the whole vides segment space */
970
+    /* Third and final pass over the whole video segment space */
971 971
     pb= &pbs[0];
972 972
     for (j=0; j<5*6; j++) {
973 973
        if (enc_blks[j].partial_bit_count)
... ...
@@ -1119,7 +1119,7 @@ static inline int dv_write_pack(enum dv_pack_type pack_id, DVVideoContext *c, ui
1119 1119
           buf[1] = 0xff; /* reserved -- always 1 */
1120 1120
           buf[2] = (1 << 7) | /* B/W: 0 - b/w, 1 - color */
1121 1121
                    (1 << 6) | /* following CLF is valid - 0, invalid - 1 */
1122
-                   (3 << 4) | /* CLF: color frames id (see ITU-R BT.470-4) */
1122
+                   (3 << 4) | /* CLF: color frames ID (see ITU-R BT.470-4) */
1123 1123
                    0xf; /* reserved -- always 1 */
1124 1124
           buf[3] = (3 << 6) | /* reserved -- always 1 */
1125 1125
                    (c->sys->dsf << 5) | /*  system: 60fields/50fields */
... ...
@@ -1131,9 +1131,9 @@ static inline int dv_write_pack(enum dv_pack_type pack_id, DVVideoContext *c, ui
1131 1131
                    0x3f; /* reserved -- always 1 */
1132 1132
           buf[2] = 0xc8 | /* reserved -- always b11001xxx */
1133 1133
                    aspect;
1134
-          buf[3] = (1 << 7) | /* Frame/field flag 1 -- frame, 0 -- field */
1135
-                   (1 << 6) | /* First/second field flag 0 -- field 2, 1 -- field 1 */
1136
-                   (1 << 5) | /* Frame change flag 0 -- same picture as before, 1 -- different */
1134
+          buf[3] = (1 << 7) | /* frame/field flag 1 -- frame, 0 -- field */
1135
+                   (1 << 6) | /* first/second field flag 0 -- field 2, 1 -- field 1 */
1136
+                   (1 << 5) | /* frame change flag 0 -- same picture as before, 1 -- different */
1137 1137
                    (1 << 4) | /* 1 - interlaced, 0 - noninterlaced */
1138 1138
                    0xc; /* reserved -- always b1100 */
1139 1139
           buf[4] = 0xff; /* reserved -- always 1 */
... ...
@@ -1151,7 +1151,7 @@ static void dv_format_frame(DVVideoContext* c, uint8_t* buf)
1151 1151
 
1152 1152
     for (chan = 0; chan < c->sys->n_difchan; chan++) {
1153 1153
         for (i = 0; i < c->sys->difseg_size; i++) {
1154
-            memset(buf, 0xff, 80 * 6); /* First 6 DIF blocks are for control data */
1154
+            memset(buf, 0xff, 80 * 6); /* first 6 DIF blocks are for control data */
1155 1155
 
1156 1156
             /* DV header: 1DIF */
1157 1157
             buf += dv_write_dif_id(dv_sect_header, chan, i, 0, buf);
... ...
@@ -6073,7 +6073,7 @@ static const int dv_iweight_248[64] = {
6073 6073
 };
6074 6074
 
6075 6075
 /**
6076
- * the "inverse" DV100 weights are actually just the spec weights (zig-zagged)
6076
+ * The "inverse" DV100 weights are actually just the spec weights (zig-zagged).
6077 6077
  */
6078 6078
 static const int dv_iweight_1080_y[64] = {
6079 6079
     128,  16,  16,  17,  17,  17,  18,  18,
... ...
@@ -116,12 +116,13 @@ static int dv_extract_audio(uint8_t* frame, uint8_t* ppcm[4],
116 116
     quant = as_pack[4] & 0x07; /* 0 - 16bit linear, 1 - 12bit nonlinear */
117 117
 
118 118
     if (quant > 1)
119
-        return -1; /* Unsupported quantization */
119
+        return -1; /* unsupported quantization */
120 120
 
121 121
     size = (sys->audio_min_samples[freq] + smpls) * 4; /* 2ch, 2bytes */
122 122
     half_ch = sys->difseg_size/2;
123 123
 
124
-    /* We work with 720p frames split in half, thus even frames have channels 0,1 and odd 2,3 */
124
+    /* We work with 720p frames split in half, thus even frames have
125
+     * channels 0,1 and odd 2,3 */
125 126
     ipcm = (sys->height == 720 && !(frame[1]&0x0C))?2:0;
126 127
     pcm = ppcm[ipcm++];
127 128
 
... ...
@@ -335,7 +336,8 @@ int dv_produce_packet(DVDemuxContext *c, AVPacket *pkt,
335 335
     dv_extract_audio(buf, ppcm, c->sys);
336 336
     c->abytes += size;
337 337
 
338
-    /* We work with 720p frames split in half, thus even frames have channels 0,1 and odd 2,3 */
338
+    /* We work with 720p frames split in half, thus even frames have
339
+     * channels 0,1 and odd 2,3. */
339 340
     if (c->sys->height == 720) {
340 341
         if (buf[1]&0x0C)
341 342
             c->audio_pkt[2].size = c->audio_pkt[3].size = 0;
... ...
@@ -35,12 +35,12 @@
35 35
 #include "libavutil/fifo.h"
36 36
 
37 37
 struct DVMuxContext {
38
-    const DVprofile*  sys;    /* Current DV profile. E.g.: 525/60, 625/50 */
39
-    int         n_ast;        /* Number of stereo audio streams (up to 2) */
40
-    AVStream   *ast[2];       /* Stereo audio streams */
38
+    const DVprofile*  sys;           /* current DV profile, e.g.: 525/60, 625/50 */
39
+    int               n_ast;         /* number of stereo audio streams (up to 2) */
40
+    AVStream         *ast[2];        /* stereo audio streams */
41 41
     AVFifoBuffer  audio_data[2]; /* FIFO for storing excessive amounts of PCM */
42
-    int         frames;       /* Number of a current frame */
43
-    time_t      start_time;   /* Start time of recording */
42
+    int               frames;        /* current frame number */
43
+    time_t            start_time;    /* recording start time */
44 44
     int         has_audio;    /* frame under contruction has audio */
45 45
     int         has_video;    /* frame under contruction has video */
46 46
     uint8_t     frame_buf[DV_MAX_FRAME_SIZE]; /* frame under contruction */
... ...
@@ -85,20 +85,20 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu
85 85
          * minute, unless it is exactly divisible by 10
86 86
          */
87 87
         ltc_frame = (c->frames + 2*ct/60 - 2*ct/600) % c->sys->ltc_divisor;
88
-        buf[1] = (0 << 7) | /* Color fame: 0 - unsync; 1 - sync mode */
89
-                 (1 << 6) | /* Drop frame timecode: 0 - nondrop; 1 - drop */
90
-                 ((ltc_frame / 10) << 4) | /* Tens of frames */
91
-                 (ltc_frame % 10);         /* Units of frames */
92
-        buf[2] = (1 << 7) | /* Biphase mark polarity correction: 0 - even; 1 - odd */
93
-                 ((tc.tm_sec / 10) << 4) | /* Tens of seconds */
94
-                 (tc.tm_sec % 10);         /* Units of seconds */
95
-        buf[3] = (1 << 7) | /* Binary group flag BGF0 */
96
-                 ((tc.tm_min / 10) << 4) | /* Tens of minutes */
97
-                 (tc.tm_min % 10);         /* Units of minutes */
98
-        buf[4] = (1 << 7) | /* Binary group flag BGF2 */
99
-                 (1 << 6) | /* Binary group flag BGF1 */
100
-                 ((tc.tm_hour / 10) << 4) | /* Tens of hours */
101
-                 (tc.tm_hour % 10);         /* Units of hours */
88
+        buf[1] = (0                 << 7) | /* color frame: 0 - unsync; 1 - sync mode */
89
+                 (1                 << 6) | /* drop frame timecode: 0 - nondrop; 1 - drop */
90
+                 ((ltc_frame / 10)  << 4) | /* tens of frames */
91
+                 (ltc_frame % 10);          /* units of frames */
92
+        buf[2] = (1                 << 7) | /* biphase mark polarity correction: 0 - even; 1 - odd */
93
+                 ((tc.tm_sec / 10)  << 4) | /* tens of seconds */
94
+                 (tc.tm_sec % 10);          /* units of seconds */
95
+        buf[3] = (1                 << 7) | /* binary group flag BGF0 */
96
+                 ((tc.tm_min / 10)  << 4) | /* tens of minutes */
97
+                 (tc.tm_min % 10);          /* units of minutes */
98
+        buf[4] = (1                 << 7) | /* binary group flag BGF2 */
99
+                 (1                 << 6) | /* binary group flag BGF1 */
100
+                 ((tc.tm_hour / 10) << 4) | /* tens of hours */
101
+                 (tc.tm_hour % 10);         /* units of hours */
102 102
         break;
103 103
     case dv_audio_source:  /* AAUX source pack */
104 104
         va_start(ap, buf);