Browse code

spelling cosmetics

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

Diego Biurrun authored on 2008/10/03 01:28:58
Showing 10 changed files
... ...
@@ -894,7 +894,7 @@ motion estimation completely (you have only I-frames, which means it
894 894
 is about as good as JPEG compression).
895 895
 
896 896
 @item To have very low audio bitrates, reduce the sampling frequency
897
-(down to 22050 kHz for MPEG audio, 22050 or 11025 for AC3).
897
+(down to 22050kHz for MPEG audio, 22050 or 11025 for AC-3).
898 898
 
899 899
 @item To have a constant quality (but a variable bitrate), use the option
900 900
 '-qscale n' when 'n' is between 1 (excellent quality) and 31 (worst
... ...
@@ -284,7 +284,7 @@ static inline int put_bits_left(PutBitContext* s)
284 284
     return (s->buf_end - s->buf) * 8 - put_bits_count(s);
285 285
 }
286 286
 
287
-/* decode ac coefs */
287
+/* decode ac coefficients */
288 288
 static void dv_decode_ac(GetBitContext *gb, BlockInfo *mb, DCTELEM *block)
289 289
 {
290 290
     int last_index = gb->size_in_bits;
... ...
@@ -493,7 +493,7 @@ static inline void dv_decode_video_segment(DVVideoContext *s,
493 493
         mb_y = v >> 8;
494 494
         /* We work with 720p frames split in half. The odd half-frame (chan==2,3) is displaced :-( */
495 495
         if (s->sys->height == 720 && ((s->buf[1]>>2)&0x3) == 0) {
496
-               mb_y -= (mb_y>17)?18:-72; /* shifting the Y coordinate down by 72/2 macro blocks */
496
+               mb_y -= (mb_y>17)?18:-72; /* shifting the Y coordinate down by 72/2 macroblocks */
497 497
         }
498 498
 
499 499
         /* idct_put'ting luminance */
... ...
@@ -663,7 +663,7 @@ static av_always_inline void dv_set_class_number(DCTELEM* blk, EncBlockInfo* bi,
663 663
        method suggested in SMPTE 314M Table 22, and an improved
664 664
        method. The SMPTE method is very conservative; it assigns class
665 665
        3 (i.e. severe quantization) to any block where the largest AC
666
-       component is greater than 36. ffmpeg's DV encoder tracks AC bit
666
+       component is greater than 36. FFmpeg's DV encoder tracks AC bit
667 667
        consumption precisely, so there is no need to bias most blocks
668 668
        towards strongly lossy compression. Instead, we assign class 2
669 669
        to most blocks, and use class 3 only when strictly necessary
... ...
@@ -671,7 +671,7 @@ static av_always_inline void dv_set_class_number(DCTELEM* blk, EncBlockInfo* bi,
671 671
 
672 672
 #if 0 /* SMPTE spec method */
673 673
     static const int classes[] = {12, 24, 36, 0xffff};
674
-#else /* improved ffmpeg method */
674
+#else /* improved FFmpeg method */
675 675
     static const int classes[] = {-1, -1, 255, 0xffff};
676 676
 #endif
677 677
     int max=classes[0];
... ...
@@ -1176,7 +1176,7 @@ static void dv_format_frame(DVVideoContext* c, uint8_t* buf)
1176 1176
                     buf += 77; /* audio control & shuffled PCM audio */
1177 1177
                 }
1178 1178
                 buf += dv_write_dif_id(dv_sect_video, chan, i, j, buf);
1179
-                buf += 77; /* 1 video macro block: 1 bytes control
1179
+                buf += 77; /* 1 video macroblock: 1 bytes control
1180 1180
                               4 * 14 bytes Y 8x8 data
1181 1181
                               10 bytes Cr 8x8 data
1182 1182
                               10 bytes Cb 8x8 data */
... ...
@@ -48,13 +48,13 @@ typedef struct DVprofile {
48 48
     int              height;              /* picture height in pixels */
49 49
     int              width;               /* picture width in pixels */
50 50
     AVRational       sar[2];              /* sample aspect ratios for 4:3 and 16:9 */
51
-    const uint16_t  *video_place;         /* positions of all DV macro blocks */
51
+    const uint16_t  *video_place;         /* positions of all DV macroblocks */
52 52
     enum PixelFormat pix_fmt;             /* picture pixel format */
53 53
     int              bpm;                 /* blocks per macroblock */
54 54
     const uint8_t   *block_sizes;         /* AC block sizes, in bits */
55 55
     int              audio_stride;        /* size of audio_shuffle table */
56
-    int              audio_min_samples[3];/* min ammount of audio samples */
57
-                                          /* for 48Khz, 44.1Khz and 32Khz */
56
+    int              audio_min_samples[3];/* min amount of audio samples */
57
+                                          /* for 48kHz, 44.1kHz and 32kHz */
58 58
     int              audio_samples_dist[5];/* how many samples are supposed to be */
59 59
                                          /* in each frame in a 5 frames window */
60 60
     const uint8_t  (*audio_shuffle)[9];  /* PCM shuffling table */
... ...
@@ -323,7 +323,7 @@ static const uint8_t dv100_qstep[16] = {
323 323
     2, 3, 4, 5, 6, 7, 8, 16, 18, 20, 22, 24, 28, 52
324 324
 };
325 325
 
326
-/* NOTE: I prefer hardcoding the positioning of dv blocks, it is
326
+/* NOTE: I prefer hardcoding the positioning of DV blocks, it is
327 327
    simpler :-) */
328 328
 
329 329
 static const uint16_t dv_place_420[1620] = {
... ...
@@ -6175,7 +6175,7 @@ static const DVprofile dv_profiles[] = {
6175 6175
       .bpm = 6,
6176 6176
       .block_sizes = block_sizes_dv2550,
6177 6177
       .audio_stride = 90,
6178
-      .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32Khz */
6178
+      .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32kHz */
6179 6179
       .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 }, /* per SMPTE-314M */
6180 6180
       .audio_shuffle = dv_audio_shuffle525,
6181 6181
     },
... ...
@@ -6195,7 +6195,7 @@ static const DVprofile dv_profiles[] = {
6195 6195
       .bpm = 6,
6196 6196
       .block_sizes = block_sizes_dv2550,
6197 6197
       .audio_stride = 108,
6198
-      .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32Khz */
6198
+      .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32kHz */
6199 6199
       .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 },
6200 6200
       .audio_shuffle = dv_audio_shuffle625,
6201 6201
     },
... ...
@@ -6215,7 +6215,7 @@ static const DVprofile dv_profiles[] = {
6215 6215
       .bpm = 6,
6216 6216
       .block_sizes = block_sizes_dv2550,
6217 6217
       .audio_stride = 108,
6218
-      .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32Khz */
6218
+      .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32kHz */
6219 6219
       .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 },
6220 6220
       .audio_shuffle = dv_audio_shuffle625,
6221 6221
     },
... ...
@@ -6235,7 +6235,7 @@ static const DVprofile dv_profiles[] = {
6235 6235
       .bpm = 6,
6236 6236
       .block_sizes = block_sizes_dv2550,
6237 6237
       .audio_stride = 90,
6238
-      .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32Khz */
6238
+      .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32kHz */
6239 6239
       .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 }, /* per SMPTE-314M */
6240 6240
       .audio_shuffle = dv_audio_shuffle525,
6241 6241
     },
... ...
@@ -6255,7 +6255,7 @@ static const DVprofile dv_profiles[] = {
6255 6255
       .bpm = 6,
6256 6256
       .block_sizes = block_sizes_dv2550,
6257 6257
       .audio_stride = 108,
6258
-      .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32Khz */
6258
+      .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32kHz */
6259 6259
       .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 },
6260 6260
       .audio_shuffle = dv_audio_shuffle625,
6261 6261
     },
... ...
@@ -6275,7 +6275,7 @@ static const DVprofile dv_profiles[] = {
6275 6275
       .bpm = 8,
6276 6276
       .block_sizes = block_sizes_dv100,
6277 6277
       .audio_stride = 90,
6278
-      .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32Khz */
6278
+      .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32kHz */
6279 6279
       .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 }, /* per SMPTE-314M */
6280 6280
       .audio_shuffle = dv_audio_shuffle525,
6281 6281
     },
... ...
@@ -6295,7 +6295,7 @@ static const DVprofile dv_profiles[] = {
6295 6295
       .bpm = 8,
6296 6296
       .block_sizes = block_sizes_dv100,
6297 6297
       .audio_stride = 108,
6298
-      .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32Khz */
6298
+      .audio_min_samples = { 1896, 1742, 1264 }, /* for 48, 44.1 and 32kHz */
6299 6299
       .audio_samples_dist = { 1920, 1920, 1920, 1920, 1920 },
6300 6300
       .audio_shuffle = dv_audio_shuffle625,
6301 6301
     },
... ...
@@ -6315,7 +6315,7 @@ static const DVprofile dv_profiles[] = {
6315 6315
       .bpm = 8,
6316 6316
       .block_sizes = block_sizes_dv100,
6317 6317
       .audio_stride = 90,
6318
-      .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32Khz */
6318
+      .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32kHz */
6319 6319
       .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 }, /* per SMPTE-314M */
6320 6320
       .audio_shuffle = dv_audio_shuffle525,
6321 6321
     },
... ...
@@ -6335,7 +6335,7 @@ static const DVprofile dv_profiles[] = {
6335 6335
       .bpm = 8,
6336 6336
       .block_sizes = block_sizes_dv100,
6337 6337
       .audio_stride = 90,
6338
-      .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32Khz */
6338
+      .audio_min_samples = { 1580, 1452, 1053 }, /* for 48, 44.1 and 32kHz */
6339 6339
       .audio_samples_dist = { 1600, 1602, 1602, 1602, 1602 }, /* per SMPTE-314M */
6340 6340
       .audio_shuffle = dv_audio_shuffle525,
6341 6341
     }
... ...
@@ -33,7 +33,7 @@ VLC ff_msmp4_mb_i_vlc;
33 33
 VLC ff_msmp4_dc_luma_vlc[2];
34 34
 VLC ff_msmp4_dc_chroma_vlc[2];
35 35
 
36
-/* intra picture macro block coded block pattern */
36
+/* intra picture macroblock coded block pattern */
37 37
 const uint16_t ff_msmp4_mb_i_table[64][2] = {
38 38
 { 0x1, 1 },{ 0x17, 6 },{ 0x9, 5 },{ 0x5, 5 },
39 39
 { 0x6, 5 },{ 0x47, 9 },{ 0x20, 7 },{ 0x10, 7 },
... ...
@@ -53,7 +53,7 @@ const uint16_t ff_msmp4_mb_i_table[64][2] = {
53 53
 { 0xd, 8 },{ 0x713, 13 },{ 0x1da, 10 },{ 0x169, 10 },
54 54
 };
55 55
 
56
-/* non intra picture macro block coded block pattern + mb type */
56
+/* non intra picture macroblock coded block pattern + mb type */
57 57
 const uint32_t table_mb_non_intra[128][2] = {
58 58
 {   0x40,  7 },{   0x13c9, 13 },{   0x9fd, 12 },{   0x1fc, 15 },
59 59
 {  0x9fc, 12 },{    0xa83, 18 },{ 0x12d34, 17 },{  0x83bc, 16 },
... ...
@@ -304,7 +304,7 @@ static const int8_t table0_run[132] = {
304 304
  23, 24, 25, 26,
305 305
 };
306 306
 
307
-/* vlc table 1, for intra chroma and P macro blocks */
307
+/* vlc table 1, for intra chroma and P macroblocks */
308 308
 
309 309
 static const uint16_t table1_vlc[149][2] = {
310 310
 {    0x4,  3 },{   0x14,  5 },{   0x17,  7 },{   0x7f,  8 },
... ...
@@ -49,7 +49,7 @@ extern VLC ff_msmp4_mb_i_vlc;
49 49
 extern VLC ff_msmp4_dc_luma_vlc[2];
50 50
 extern VLC ff_msmp4_dc_chroma_vlc[2];
51 51
 
52
-/* intra picture macro block coded block pattern */
52
+/* intra picture macroblock coded block pattern */
53 53
 extern const uint16_t ff_msmp4_mb_i_table[64][2];
54 54
 
55 55
 extern const uint8_t cbpy_tab[16][2];
... ...
@@ -250,7 +250,7 @@ void rv10_encode_picture_header(MpegEncContext *s, int picture_number)
250 250
         /* specific MPEG like DC coding not used */
251 251
     }
252 252
     /* if multiple packets per frame are sent, the position at which
253
-       to display the macro blocks is coded here */
253
+       to display the macroblocks is coded here */
254 254
     if(!full_frame){
255 255
         put_bits(&s->pb, 6, 0); /* mb_x */
256 256
         put_bits(&s->pb, 6, 0); /* mb_y */
... ...
@@ -352,7 +352,7 @@ static int rv10_decode_picture_header(MpegEncContext *s)
352 352
         }
353 353
     }
354 354
     /* if multiple packets per frame are sent, the position at which
355
-       to display the macro blocks is coded here */
355
+       to display the macroblocks is coded here */
356 356
 
357 357
     mb_xy= s->mb_x + s->mb_y*s->mb_width;
358 358
     if(show_bits(&s->gb, 12)==0 || (mb_xy && mb_xy < s->mb_num)){
... ...
@@ -112,7 +112,7 @@ static int dv_extract_audio(uint8_t* frame, uint8_t* ppcm[4],
112 112
         return 0;
113 113
 
114 114
     smpls = as_pack[1] & 0x3f; /* samples in this frame - min. samples */
115
-    freq = (as_pack[4] >> 3) & 0x07; /* 0 - 48KHz, 1 - 44,1kHz, 2 - 32 kHz */
115
+    freq = (as_pack[4] >> 3) & 0x07; /* 0 - 48kHz, 1 - 44,1kHz, 2 - 32kHz */
116 116
     quant = as_pack[4] & 0x07; /* 0 - 16bit linear, 1 - 12bit nonlinear */
117 117
 
118 118
     if (quant > 1)
... ...
@@ -145,8 +145,8 @@ static int dv_extract_audio(uint8_t* frame, uint8_t* ppcm[4],
145 145
                         if (of*2 >= size)
146 146
                             continue;
147 147
 
148
-                        pcm[of*2] = frame[d+1]; // FIXME: may be we have to admit
149
-                        pcm[of*2+1] = frame[d]; //        that DV is a big endian PCM
148
+                        pcm[of*2]   = frame[d+1]; // FIXME: maybe we have to admit
149
+                        pcm[of*2+1] = frame[d];   //        that DV is a big-endian PCM
150 150
                         if (pcm[of*2+1] == 0x80 && pcm[of*2] == 0x00)
151 151
                             pcm[of*2+1] = 0;
152 152
                     } else {           /* 12bit quantization */
... ...
@@ -161,12 +161,12 @@ static int dv_extract_audio(uint8_t* frame, uint8_t* ppcm[4],
161 161
                         if (of*2 >= size)
162 162
                             continue;
163 163
 
164
-                        pcm[of*2] = lc & 0xff; // FIXME: may be we have to admit
165
-                        pcm[of*2+1] = lc >> 8; //        that DV is a big endian PCM
164
+                        pcm[of*2]   = lc & 0xff; // FIXME: maybe we have to admit
165
+                        pcm[of*2+1] = lc >> 8;   //        that DV is a big-endian PCM
166 166
                         of = sys->audio_shuffle[i%half_ch+half_ch][j] +
167 167
                             (d - 8)/3 * sys->audio_stride;
168
-                        pcm[of*2] = rc & 0xff; // FIXME: may be we have to admit
169
-                        pcm[of*2+1] = rc >> 8; //        that DV is a big endian PCM
168
+                        pcm[of*2]   = rc & 0xff; // FIXME: maybe we have to admit
169
+                        pcm[of*2+1] = rc >> 8;   //        that DV is a big-endian PCM
170 170
                         ++d;
171 171
                     }
172 172
                 }
... ...
@@ -196,7 +196,7 @@ static int dv_extract_audio_info(DVDemuxContext* c, uint8_t* frame)
196 196
     }
197 197
 
198 198
     smpls = as_pack[1] & 0x3f; /* samples in this frame - min. samples */
199
-    freq = (as_pack[4] >> 3) & 0x07; /* 0 - 48KHz, 1 - 44,1kHz, 2 - 32 kHz */
199
+    freq = (as_pack[4] >> 3) & 0x07; /* 0 - 48kHz, 1 - 44,1kHz, 2 - 32kHz */
200 200
     stype = (as_pack[3] & 0x1f); /* 0 - 2CH, 2 - 4CH, 3 - 8CH */
201 201
     quant = as_pack[4] & 0x07; /* 0 - 16bit linear, 1 - 12bit nonlinear */
202 202
 
... ...
@@ -38,7 +38,7 @@ struct DVMuxContext {
38 38
     const DVprofile*  sys;    /* Current DV profile. E.g.: 525/60, 625/50 */
39 39
     int         n_ast;        /* Number of stereo audio streams (up to 2) */
40 40
     AVStream   *ast[2];       /* Stereo audio streams */
41
-    AVFifoBuffer  audio_data[2]; /* Fifo for storing excessive amounts of PCM */
41
+    AVFifoBuffer  audio_data[2]; /* FIFO for storing excessive amounts of PCM */
42 42
     int         frames;       /* Number of a current frame */
43 43
     time_t      start_time;   /* Start time of recording */
44 44
     int         has_audio;    /* frame under contruction has audio */
... ...
@@ -117,7 +117,7 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu
117 117
                  (c->sys->n_difchan & 2); /* definition: 0 -- 25Mbps, 2 -- 50Mbps */
118 118
         buf[4] = (1 << 7) | /* emphasis: 1 -- off */
119 119
                  (0 << 6) | /* emphasis time constant: 0 -- reserved */
120
-                 (0 << 3) | /* frequency: 0 -- 48Khz, 1 -- 44,1Khz, 2 -- 32Khz */
120
+                 (0 << 3) | /* frequency: 0 -- 48kHz, 1 -- 44,1kHz, 2 -- 32kHz */
121 121
                   0;        /* quantization: 0 -- 16bit linear, 1 -- 12bit nonlinear */
122 122
         va_end(ap);
123 123
         break;
... ...
@@ -189,8 +189,8 @@ static void dv_inject_audio(DVMuxContext *c, int channel, uint8_t* frame_ptr)
189 189
                 if (of*2 >= size)
190 190
                     continue;
191 191
 
192
-                frame_ptr[d] = av_fifo_peek(&c->audio_data[channel], of*2+1); // FIXME: may be we have to admit
193
-                frame_ptr[d+1] = av_fifo_peek(&c->audio_data[channel], of*2); //        that DV is a big endian PCM
192
+                frame_ptr[d]   = av_fifo_peek(&c->audio_data[channel], of*2+1); // FIXME: maybe we have to admit
193
+                frame_ptr[d+1] = av_fifo_peek(&c->audio_data[channel], of*2);   //        that DV is a big-endian PCM
194 194
             }
195 195
             frame_ptr += 16 * 80; /* 15 Video DIFs + 1 Audio DIF */
196 196
         }
... ...
@@ -365,7 +365,7 @@ static int dv_write_header(AVFormatContext *s)
365 365
     if (!dv_init_mux(s)) {
366 366
         av_log(s, AV_LOG_ERROR, "Can't initialize DV format!\n"
367 367
                     "Make sure that you supply exactly two streams:\n"
368
-                    "     video: 25fps or 29.97fps, audio: 2ch/48Khz/PCM\n"
368
+                    "     video: 25fps or 29.97fps, audio: 2ch/48kHz/PCM\n"
369 369
                     "     (50Mbps allows an optional second audio stream)\n");
370 370
         return -1;
371 371
     }
... ...
@@ -1201,7 +1201,7 @@ static int mpegts_probe(AVProbeData *p)
1201 1201
 #endif
1202 1202
 }
1203 1203
 
1204
-/* return the 90 kHz PCR and the extension for the 27 MHz PCR. return
1204
+/* return the 90kHz PCR and the extension for the 27MHz PCR. return
1205 1205
    (-1) if not available */
1206 1206
 static int parse_pcr(int64_t *ppcr_high, int *ppcr_low,
1207 1207
                      const uint8_t *packet)
... ...
@@ -104,7 +104,7 @@ void ff_rtp_send_mpegvideo(AVFormatContext *s1, const uint8_t *buf1, int size)
104 104
         memcpy(q, buf1, len);
105 105
         q += len;
106 106
 
107
-        /* 90 KHz time stamp */
107
+        /* 90kHz time stamp */
108 108
         s->timestamp = s->cur_timestamp;
109 109
         ff_rtp_send_data(s1, s->buf, q - s->buf, (len == size));
110 110