Browse code

Merge commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb'

* commit '41ed7ab45fc693f7d7fc35664c0233f4c32d69bb':
cosmetics: Fix spelling mistakes

Merged-by: Clément Bœsch <u@pkh.me>

Clément Bœsch authored on 2016/06/22 04:55:20
Showing 320 changed files
... ...
@@ -914,8 +914,8 @@ version 0.8:
914 914
 - showinfo filter added
915 915
 - SMPTE 302M AES3 audio decoder
916 916
 - Apple Core Audio Format muxer
917
-- 9bit and 10bit per sample support in the H.264 decoder
918
-- 9bit and 10bit FFV1 encoding / decoding
917
+- 9 bits and 10 bits per sample support in the H.264 decoder
918
+- 9 bits and 10 bits FFV1 encoding / decoding
919 919
 - split filter added
920 920
 - select filter added
921 921
 - sdl output device added
... ...
@@ -1208,7 +1208,7 @@ version 0.4.9-pre1:
1208 1208
 - rate distorted optimal lambda->qp support
1209 1209
 - AAC encoding with libfaac
1210 1210
 - Sunplus JPEG codec (SP5X) support
1211
-- use Lagrange multipler instead of QP for ratecontrol
1211
+- use Lagrange multiplier instead of QP for ratecontrol
1212 1212
 - Theora/VP3 decoding support
1213 1213
 - XA and ADX ADPCM codecs
1214 1214
 - export MPEG-2 active display area / pan scan
... ...
@@ -1175,7 +1175,7 @@ lavd 54.4.100 / 54.0.0, lavfi 3.5.0
1175 1175
                 * base -- is now stored in AVBufferRef
1176 1176
                 * reference, type, buffer_hints -- are unnecessary in the new API
1177 1177
                 * hwaccel_picture_private, owner, thread_opaque -- should not
1178
-                  have been acessed from outside of lavc
1178
+                  have been accessed from outside of lavc
1179 1179
                 * qscale_table, qstride, qscale_type, mbskip_table, motion_val,
1180 1180
                   mb_type, dct_coeff, ref_index -- mpegvideo-specific tables,
1181 1181
                   which are not exported anymore.
... ...
@@ -25,9 +25,9 @@
25 25
  * libavcodec API use example.
26 26
  *
27 27
  * @example decoding_encoding.c
28
- * Note that libavcodec only handles codecs (mpeg, mpeg4, etc...),
29
- * not file formats (avi, vob, mp4, mov, mkv, mxf, flv, mpegts, mpegps, etc...). See library 'libavformat' for the
30
- * format handling
28
+ * Note that libavcodec only handles codecs (MPEG, MPEG-4, etc...),
29
+ * not file formats (AVI, VOB, MP4, MOV, MKV, MXF, FLV, MPEG-TS, MPEG-PS, etc...).
30
+ * See library 'libavformat' for the format handling
31 31
  */
32 32
 
33 33
 #include <math.h>
... ...
@@ -253,7 +253,7 @@ static void audio_decode_example(const char *outfilename, const char *filename)
253 253
 
254 254
     printf("Decode audio file %s to %s\n", filename, outfilename);
255 255
 
256
-    /* find the mpeg audio decoder */
256
+    /* find the MPEG audio decoder */
257 257
     codec = avcodec_find_decoder(AV_CODEC_ID_MP2);
258 258
     if (!codec) {
259 259
         fprintf(stderr, "Codec not found\n");
... ...
@@ -356,7 +356,7 @@ static void video_encode_example(const char *filename, int codec_id)
356 356
 
357 357
     printf("Encode video file %s\n", filename);
358 358
 
359
-    /* find the mpeg1 video encoder */
359
+    /* find the video encoder */
360 360
     codec = avcodec_find_encoder(codec_id);
361 361
     if (!codec) {
362 362
         fprintf(stderr, "Codec not found\n");
... ...
@@ -475,7 +475,7 @@ static void video_encode_example(const char *filename, int codec_id)
475 475
         }
476 476
     }
477 477
 
478
-    /* add sequence end code to have a real mpeg file */
478
+    /* add sequence end code to have a real MPEG file */
479 479
     fwrite(endcode, 1, sizeof(endcode), f);
480 480
     fclose(f);
481 481
 
... ...
@@ -543,12 +543,12 @@ static void video_decode_example(const char *outfilename, const char *filename)
543 543
 
544 544
     av_init_packet(&avpkt);
545 545
 
546
-    /* set end of buffer to 0 (this ensures that no overreading happens for damaged mpeg streams) */
546
+    /* set end of buffer to 0 (this ensures that no overreading happens for damaged MPEG streams) */
547 547
     memset(inbuf + INBUF_SIZE, 0, AV_INPUT_BUFFER_PADDING_SIZE);
548 548
 
549 549
     printf("Decode video file %s to %s\n", filename, outfilename);
550 550
 
551
-    /* find the mpeg1 video decoder */
551
+    /* find the MPEG-1 video decoder */
552 552
     codec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO);
553 553
     if (!codec) {
554 554
         fprintf(stderr, "Codec not found\n");
... ...
@@ -613,9 +613,9 @@ static void video_decode_example(const char *outfilename, const char *filename)
613 613
                 exit(1);
614 614
     }
615 615
 
616
-    /* some codecs, such as MPEG, transmit the I and P frame with a
616
+    /* Some codecs, such as MPEG, transmit the I- and P-frame with a
617 617
        latency of one frame. You must do the following to have a
618
-       chance to get the last frame of the video */
618
+       chance to get the last frame of the video. */
619 619
     avpkt.data = NULL;
620 620
     avpkt.size = 0;
621 621
     decode_write_frame(outfilename, c, frame, &frame_count, &avpkt, 1);
... ...
@@ -161,7 +161,7 @@ static void add_stream(OutputStream *ost, AVFormatContext *oc,
161 161
         c->gop_size      = 12; /* emit one intra frame every twelve frames at most */
162 162
         c->pix_fmt       = STREAM_PIX_FMT;
163 163
         if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
164
-            /* just for testing, we also add B frames */
164
+            /* just for testing, we also add B-frames */
165 165
             c->max_b_frames = 2;
166 166
         }
167 167
         if (c->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
... ...
@@ -720,7 +720,7 @@ For DXVA2, this option should contain the number of the display adapter to use.
720 720
 If this option is not specified, the default adapter is used.
721 721
 
722 722
 @item qsv
723
-For QSV, this option corresponds to the valus of MFX_IMPL_* . Allowed values
723
+For QSV, this option corresponds to the values of MFX_IMPL_* . Allowed values
724 724
 are:
725 725
 @table @option
726 726
 @item auto
... ...
@@ -5667,7 +5667,7 @@ It accepts the following parameters:
5667 5667
 
5668 5668
 @item limit
5669 5669
 Set higher black value threshold, which can be optionally specified
5670
-from nothing (0) to everything (255 for 8bit based formats). An intensity
5670
+from nothing (0) to everything (255 for 8-bit based formats). An intensity
5671 5671
 value greater to the set value is considered non-black. It defaults to 24.
5672 5672
 You can also specify a value between 0.0 and 1.0 which will be scaled depending
5673 5673
 on the bitdepth of the pixel format.
... ...
@@ -8305,7 +8305,7 @@ geq=lum=255*gauss((X/W-0.5)*3)*gauss((Y/H-0.5)*3)/gauss(0)/gauss(0),format=gray
8305 8305
 @section gradfun
8306 8306
 
8307 8307
 Fix the banding artifacts that are sometimes introduced into nearly flat
8308
-regions by truncation to 8bit color depth.
8308
+regions by truncation to 8-bit color depth.
8309 8309
 Interpolate the gradients that should go where the bands are, and
8310 8310
 dither them.
8311 8311
 
... ...
@@ -15588,7 +15588,7 @@ select=between(t\,10\,20)
15588 15588
 @end example
15589 15589
 
15590 15590
 @item
15591
-Select only I frames contained in the 10-20 time interval:
15591
+Select only I-frames contained in the 10-20 time interval:
15592 15592
 @example
15593 15593
 select=between(t\,10\,20)*eq(pict_type\,I)
15594 15594
 @end example
... ...
@@ -408,7 +408,7 @@ with @option{--dry-run} first. And then inspecting the commits listed with
408 408
 @command{git log -p 1234567..987654}. The @command{git status} command
409 409
 may help in finding local changes that have been forgotten to be added.
410 410
 
411
-Next let the code pass through a full run of our testsuite.
411
+Next let the code pass through a full run of our test suite.
412 412
 
413 413
 @itemize
414 414
 @item @command{make distclean}
... ...
@@ -418,7 +418,7 @@ Next let the code pass through a full run of our testsuite.
418 418
 @end itemize
419 419
 
420 420
 Make sure all your changes have been checked before pushing them, the
421
-testsuite only checks against regressions and that only to some extend. It does
421
+test suite only checks against regressions and that only to some extend. It does
422 422
 obviously not check newly added features/code to be working unless you have
423 423
 added a test for that (which is recommended).
424 424
 
... ...
@@ -34,7 +34,7 @@ NUT has some variants signaled by using the flags field in its main header.
34 34
 
35 35
 The BROADCAST variant provides a secondary time reference to facilitate
36 36
 detecting endpoint latency and network delays.
37
-It assumes all the endpoint clocks are syncronized.
37
+It assumes all the endpoint clocks are synchronized.
38 38
 To be used in real-time scenarios.
39 39
 
40 40
 @section PIPE
... ...
@@ -7,7 +7,7 @@ If you plan to do non-x86 architecture specific optimizations (SIMD normally),
7 7
 then take a look in the x86/ directory, as most important functions are
8 8
 already optimized for MMX.
9 9
 
10
-If you want to do x86 optimizations then you can either try to finetune the
10
+If you want to do x86 optimizations then you can either try to fine-tune the
11 11
 stuff in the x86 directory or find some other functions in the C source to
12 12
 optimize, but there aren't many left.
13 13
 
... ...
@@ -163,7 +163,7 @@ general x86 registers (e.g. eax) as well as XMM registers. This last one is
163 163
 particularly important on Win64, where xmm6-15 are callee-save, and not
164 164
 restoring their contents leads to undefined results. In external asm (e.g.
165 165
 yasm), you do this by using:
166
-cglobal functon_name, num_args, num_regs, num_xmm_regs
166
+cglobal function_name, num_args, num_regs, num_xmm_regs
167 167
 In inline asm, you specify clobbered registers at the end of your asm:
168 168
 __asm__(".." ::: "%eax").
169 169
 If gcc is not set to support sse (-msse) it will not accept xmm registers
... ...
@@ -63,7 +63,7 @@ bash ./configure
63 63
 @section Darwin (Mac OS X, iPhone)
64 64
 
65 65
 The toolchain provided with Xcode is sufficient to build the basic
66
-unacelerated code.
66
+unaccelerated code.
67 67
 
68 68
 Mac OS X on PowerPC or ARM (iPhone) requires a preprocessor from
69 69
 @url{https://github.com/FFmpeg/gas-preprocessor} or
... ...
@@ -144,7 +144,7 @@ pacman -S make pkgconf diffutils
144 144
 pacman -S mingw-w64-x86_64-yasm mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL
145 145
 @end example
146 146
 
147
-To target 32bit replace the @code{x86_64} with @code{i686} in the command above.
147
+To target 32 bits replace @code{x86_64} with @code{i686} in the command above.
148 148
 
149 149
 @section Microsoft Visual C++ or Intel C++ Compiler for Windows
150 150
 
... ...
@@ -10,12 +10,12 @@ Current (simplified) Architecture:
10 10
                /                       \
11 11
        special converter     [Input to YUV converter]
12 12
               |                         |
13
-              |          (8bit YUV 4:4:4 / 4:2:2 / 4:2:0 / 4:0:0 )
13
+              |         (8-bit YUV 4:4:4 / 4:2:2 / 4:2:0 / 4:0:0 )
14 14
               |                         |
15 15
               |                         v
16 16
               |                  Horizontal scaler
17 17
               |                         |
18
-              |      (15bit YUV 4:4:4 / 4:2:2 / 4:2:0 / 4:1:1 / 4:0:0 )
18
+              |     (15-bit YUV 4:4:4 / 4:2:2 / 4:2:0 / 4:1:1 / 4:0:0 )
19 19
               |                         |
20 20
               |                         v
21 21
               |          Vertical scaler and output converter
... ...
@@ -1922,7 +1922,7 @@ int guess_input_channel_layout(InputStream *ist)
1922 1922
             return 0;
1923 1923
         av_get_channel_layout_string(layout_name, sizeof(layout_name),
1924 1924
                                      dec->channels, dec->channel_layout);
1925
-        av_log(NULL, AV_LOG_WARNING, "Guessed Channel Layout for  Input Stream "
1925
+        av_log(NULL, AV_LOG_WARNING, "Guessed Channel Layout for Input Stream "
1926 1926
                "#%d.%d : %s\n", ist->file_index, ist->st->index, layout_name);
1927 1927
     }
1928 1928
     return 1;
... ...
@@ -2745,7 +2745,7 @@ static int stream_component_open(VideoState *is, int stream_index)
2745 2745
         /* init averaging filter */
2746 2746
         is->audio_diff_avg_coef  = exp(log(0.01) / AUDIO_DIFF_AVG_NB);
2747 2747
         is->audio_diff_avg_count = 0;
2748
-        /* since we do not have a precise anough audio fifo fullness,
2748
+        /* since we do not have a precise anough audio FIFO fullness,
2749 2749
            we correct audio sync only if larger than this threshold */
2750 2750
         is->audio_diff_threshold = (double)(is->audio_hw_buf_size) / is->audio_tgt.bytes_per_sec;
2751 2751
 
... ...
@@ -142,7 +142,7 @@ function ff_mpadsp_apply_window_\type\()_neon, export=1
142 142
         sub             x10, x10, #4<<2
143 143
         b.gt            1b
144 144
 
145
-// comuting samples[16]
145
+// computing samples[16]
146 146
         add             x6,  x1,  #32<<2
147 147
         ld1             {v0.2s},  [x6],  x9
148 148
         ld1             {v1.2s},  [x0],  x9
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Autodesk RLE Decoder
3
- * Copyright (c) 2005 The FFmpeg Project
3
+ * Copyright (C) 2005 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2001-2003 The FFmpeg Project
2
+ * Copyright (c) 2001-2003 The FFmpeg project
3 3
  *
4 4
  * first version by Francois Revol (revol@free.fr)
5 5
  * fringe ADPCM codecs (e.g., DK3, DK4, Westwood)
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2001-2003 The FFmpeg Project
2
+ * Copyright (c) 2001-2003 The FFmpeg project
3 3
  *
4 4
  * This file is part of FFmpeg.
5 5
  *
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2001-2003 The FFmpeg Project
2
+ * Copyright (c) 2001-2003 The FFmpeg project
3 3
  *
4 4
  * This file is part of FFmpeg.
5 5
  *
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2001-2003 The FFmpeg Project
2
+ * Copyright (c) 2001-2003 The FFmpeg project
3 3
  *
4 4
  * This file is part of FFmpeg.
5 5
  *
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2001-2003 The FFmpeg Project
2
+ * Copyright (c) 2001-2003 The FFmpeg project
3 3
  *
4 4
  * first version by Francois Revol (revol@free.fr)
5 5
  * fringe ADPCM codecs (e.g., DK3, DK4, Westwood)
... ...
@@ -29,20 +29,20 @@
29 29
  * passed through the extradata[_size] fields. This atom is tacked onto
30 30
  * the end of an 'alac' stsd atom and has the following format:
31 31
  *
32
- * 32bit  atom size
33
- * 32bit  tag                  ("alac")
34
- * 32bit  tag version          (0)
35
- * 32bit  samples per frame    (used when not set explicitly in the frames)
36
- *  8bit  compatible version   (0)
37
- *  8bit  sample size
38
- *  8bit  history mult         (40)
39
- *  8bit  initial history      (10)
40
- *  8bit  rice param limit     (14)
41
- *  8bit  channels
42
- * 16bit  maxRun               (255)
43
- * 32bit  max coded frame size (0 means unknown)
44
- * 32bit  average bitrate      (0 means unknown)
45
- * 32bit  samplerate
32
+ * 32 bits  atom size
33
+ * 32 bits  tag                  ("alac")
34
+ * 32 bits  tag version          (0)
35
+ * 32 bits  samples per frame    (used when not set explicitly in the frames)
36
+ *  8 bits  compatible version   (0)
37
+ *  8 bits  sample size
38
+ *  8 bits  history mult         (40)
39
+ *  8 bits  initial history      (10)
40
+ *  8 bits  rice param limit     (14)
41
+ *  8 bits  channels
42
+ * 16 bits  maxRun               (255)
43
+ * 32 bits  max coded frame size (0 means unknown)
44
+ * 32 bits  average bitrate      (0 means unknown)
45
+ * 32 bits  samplerate
46 46
  */
47 47
 
48 48
 #include <inttypes.h>
... ...
@@ -547,13 +547,13 @@ static void decode_fixed_sparse(AMRFixed *fixed_sparse, const uint16_t *pulses,
547 547
  * @param p the context
548 548
  * @param subframe unpacked amr subframe
549 549
  * @param mode mode of the current frame
550
- * @param fixed_sparse sparse respresentation of the fixed vector
550
+ * @param fixed_sparse sparse representation of the fixed vector
551 551
  */
552 552
 static void pitch_sharpening(AMRContext *p, int subframe, enum Mode mode,
553 553
                              AMRFixed *fixed_sparse)
554 554
 {
555 555
     // The spec suggests the current pitch gain is always used, but in other
556
-    // modes the pitch and codebook gains are joinly quantized (sec 5.8.2)
556
+    // modes the pitch and codebook gains are jointly quantized (sec 5.8.2)
557 557
     // so the codebook gain cannot depend on the quantized pitch gain.
558 558
     if (mode == MODE_12k2)
559 559
         p->beta = FFMIN(p->pitch_gain[4], 1.0);
... ...
@@ -38,7 +38,7 @@
38 38
 
39 39
 #define MIN_ISF_SPACING     (128.0 / 32768.0) ///< minimum isf gap
40 40
 #define PRED_FACTOR         (1.0 / 3.0)
41
-#define MIN_ENERGY         -14.0              ///< initial innnovation energy (dB)
41
+#define MIN_ENERGY         -14.0              ///< initial innovation energy (dB)
42 42
 #define ENERGY_MEAN         30.0              ///< mean innovation energy (dB) in all modes
43 43
 #define PREEMPH_FAC         0.68              ///< factor used to de-emphasize synthesis
44 44
 
... ...
@@ -206,7 +206,7 @@ static int execute_code(AVCodecContext * avctx, int c)
206 206
         s->y = s->nb_args > 0 ? av_clip((s->args[0] - 1)*s->font_height, 0, avctx->height - s->font_height) : 0;
207 207
         s->x = s->nb_args > 1 ? av_clip((s->args[1] - 1)*FONT_WIDTH,     0, avctx->width  - FONT_WIDTH) : 0;
208 208
         break;
209
-    case 'h': //set creen mode
209
+    case 'h': //set screen mode
210 210
     case 'l': //reset screen mode
211 211
         if (s->nb_args < 2)
212 212
             s->args[0] = DEFAULT_SCREEN_MODE;
... ...
@@ -339,10 +339,10 @@ static inline void range_dec_normalize(APEContext *ctx)
339 339
 }
340 340
 
341 341
 /**
342
- * Calculate culmulative frequency for next symbol. Does NO update!
342
+ * Calculate cumulative frequency for next symbol. Does NO update!
343 343
  * @param ctx decoder context
344 344
  * @param tot_f is the total frequency or (code_value)1<<shift
345
- * @return the culmulative frequency
345
+ * @return the cumulative frequency
346 346
  */
347 347
 static inline int range_decode_culfreq(APEContext *ctx, int tot_f)
348 348
 {
... ...
@@ -240,7 +240,7 @@ DAT3    .req    v4
240 240
 DAT4    .req    v5
241 241
 DAT5    .req    v6
242 242
 DAT6    .req    sl // use these rather than the otherwise unused
243
-DAT7    .req    fp // ip and lr so that we can load them usinf LDRD
243
+DAT7    .req    fp // ip and lr so that we can load them using LDRD
244 244
 
245 245
  .macro output4words  tail, head, r0, r1, r2, r3, r4, r5, r6, r7, pointer_dead=0
246 246
   .if \head
... ...
@@ -29,7 +29,7 @@ void ff_dct_unquantize_h263_armv5te(int16_t *block, int qmul, int qadd, int coun
29 29
 
30 30
 #ifdef ENABLE_ARM_TESTS
31 31
 /**
32
- * h263 dequantizer supplementary function, it is performance critical and needs to
32
+ * H.263 dequantizer supplementary function, it is performance critical and needs to
33 33
  * have optimized implementations for each architecture. Is also used as a reference
34 34
  * implementation in regression tests
35 35
  */
... ...
@@ -64,7 +64,7 @@ function ff_simple_idct_arm, export=1
64 64
 
65 65
 
66 66
 __row_loop:
67
-        @@ read the row and check if it is null, almost null, or not, according to strongarm specs, it is not necessary to optimize ldr accesses (i.e. split 32bits in 2 16bits words), at least it gives more usable registers :)
67
+        @@ read the row and check if it is null, almost null, or not, according to strongarm specs, it is not necessary to optimize ldr accesses (i.e. split 32 bits in two 16-bit words), at least it gives more usable registers :)
68 68
         ldr r1, [r14, #0]        @ R1=(int32)(R12)[0]=ROWr32[0] (relative row cast to a 32b pointer)
69 69
         ldr r2, [r14, #4]        @ R2=(int32)(R12)[1]=ROWr32[1]
70 70
         ldr r3, [r14, #8]        @ R3=ROWr32[2]
... ...
@@ -234,8 +234,8 @@ __end_a_evaluation:
234 234
         @@ row[7] = (a0 - b0) >> ROW_SHIFT;
235 235
         add r8, r6, r0           @ R8=a0+b0
236 236
         add r9, r2, r1           @ R9=a1+b1
237
-        @@ put 2 16 bits half-words in a 32bits word
238
-        @@ ROWr32[0]=ROWr16[0] | (ROWr16[1]<<16) (only Little Endian compliant then!!!)
237
+        @@ put two 16-bit half-words in a 32-bit word
238
+        @@ ROWr32[0]=ROWr16[0] | (ROWr16[1]<<16) (only little-endian compliant then!!!)
239 239
         ldr r10, =MASK_MSHW      @ R10=0xFFFF0000
240 240
         and r9, r10, r9, lsl #ROW_SHIFT2MSHW @ R9=0xFFFF0000 & ((a1+b1)<<5)
241 241
         mvn r11, r10             @ R11= NOT R10= 0x0000FFFF
... ...
@@ -322,7 +322,7 @@ endfunc
322 322
 
323 323
         vmov.i16        q12, #3
324 324
         vsubl.s8        q10, d8,  d6            @ QS0 - PS0
325
-        vsubl.s8        q11, d9,  d7            @   (widened to 16bit)
325
+        vsubl.s8        q11, d9,  d7            @   (widened to 16 bits)
326 326
         veor            q2,  q2,  q13           @ PS1 = P1 ^ 0x80
327 327
         veor            q5,  q5,  q13           @ QS1 = Q1 ^ 0x80
328 328
         vmul.i16        q10, q10, q12           @ w = 3 * (QS0 - PS0)
... ...
@@ -880,7 +880,7 @@ typedef struct RcOverride{
880 880
  * Use only bitexact stuff (except (I)DCT).
881 881
  */
882 882
 #define AV_CODEC_FLAG_BITEXACT        (1 << 23)
883
-/* Fx : Flag for h263+ extra options */
883
+/* Fx : Flag for H.263+ extra options */
884 884
 /**
885 885
  * H.263 advanced intra coding / MPEG-4 AC prediction
886 886
  */
... ...
@@ -997,7 +997,7 @@ typedef struct RcOverride{
997 997
  * are connected to a parser to split what they return into proper frames.
998 998
  * This flag is reserved to the very rare category of codecs which have a
999 999
  * bitstream that cannot be split into frames without timeconsuming
1000
- * operations like full decoding. Demuxers carring such bitstreams thus
1000
+ * operations like full decoding. Demuxers carrying such bitstreams thus
1001 1001
  * may return multiple frames in a packet. This has many disadvantages like
1002 1002
  * prohibiting stream copy in many cases thus it should only be considered
1003 1003
  * as a last resort.
... ...
@@ -1177,7 +1177,7 @@ typedef struct RcOverride{
1177 1177
  * are connected to a parser to split what they return into proper frames.
1178 1178
  * This flag is reserved to the very rare category of codecs which have a
1179 1179
  * bitstream that cannot be split into frames without timeconsuming
1180
- * operations like full decoding. Demuxers carring such bitstreams thus
1180
+ * operations like full decoding. Demuxers carrying such bitstreams thus
1181 1181
  * may return multiple frames in a packet. This has many disadvantages like
1182 1182
  * prohibiting stream copy in many cases thus it should only be considered
1183 1183
  * as a last resort.
... ...
@@ -1257,7 +1257,7 @@ typedef struct RcOverride{
1257 1257
 #define MB_TYPE_L0L1       (MB_TYPE_L0   | MB_TYPE_L1)
1258 1258
 #define MB_TYPE_QUANT      0x00010000
1259 1259
 #define MB_TYPE_CBP        0x00020000
1260
-//Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...)
1260
+// Note bits 24-31 are reserved for codec specific use (H.264 ref0, MPEG-1 0mv, ...)
1261 1261
 #endif
1262 1262
 
1263 1263
 /**
... ...
@@ -1751,9 +1751,9 @@ typedef struct AVCodecContext {
1751 1751
 
1752 1752
     /**
1753 1753
      * some codecs need / can use extradata like Huffman tables.
1754
-     * mjpeg: Huffman tables
1754
+     * MJPEG: Huffman tables
1755 1755
      * rv10: additional flags
1756
-     * mpeg4: global headers (they can be in the bitstream or here)
1756
+     * MPEG-4: global headers (they can be in the bitstream or here)
1757 1757
      * The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger
1758 1758
      * than extradata_size to avoid problems if it is read with the bitstream reader.
1759 1759
      * The bytewise contents of extradata must not depend on the architecture or CPU endianness.
... ...
@@ -1823,7 +1823,7 @@ typedef struct AVCodecContext {
1823 1823
      * picture width / height.
1824 1824
      *
1825 1825
      * @note Those fields may not match the values of the last
1826
-     * AVFrame outputted by avcodec_decode_video2 due frame
1826
+     * AVFrame output by avcodec_decode_video2 due frame
1827 1827
      * reordering.
1828 1828
      *
1829 1829
      * - encoding: MUST be set by user.
... ...
@@ -1839,7 +1839,7 @@ typedef struct AVCodecContext {
1839 1839
      * the decoded frame is cropped before being output or lowres is enabled.
1840 1840
      *
1841 1841
      * @note Those field may not match the value of the last
1842
-     * AVFrame outputted by avcodec_receive_frame() due frame
1842
+     * AVFrame output by avcodec_receive_frame() due frame
1843 1843
      * reordering.
1844 1844
      *
1845 1845
      * - encoding: unused
... ...
@@ -1866,7 +1866,7 @@ typedef struct AVCodecContext {
1866 1866
      * May be overridden by the decoder if it knows better.
1867 1867
      *
1868 1868
      * @note This field may not match the value of the last
1869
-     * AVFrame outputted by avcodec_receive_frame() due frame
1869
+     * AVFrame output by avcodec_receive_frame() due frame
1870 1870
      * reordering.
1871 1871
      *
1872 1872
      * - encoding: Set by user.
... ...
@@ -1976,8 +1976,8 @@ typedef struct AVCodecContext {
1976 1976
 #endif
1977 1977
 
1978 1978
     /**
1979
-     * qscale factor between P and I-frames
1980
-     * If > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset).
1979
+     * qscale factor between P- and I-frames
1980
+     * If > 0 then the last P-frame quantizer will be used (q = lastp_q * factor + offset).
1981 1981
      * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset).
1982 1982
      * - encoding: Set by user.
1983 1983
      * - decoding: unused
... ...
@@ -2189,7 +2189,7 @@ typedef struct AVCodecContext {
2189 2189
      */
2190 2190
     int slice_flags;
2191 2191
 #define SLICE_FLAG_CODED_ORDER    0x0001 ///< draw_horiz_band() is called in coded order instead of display
2192
-#define SLICE_FLAG_ALLOW_FIELD    0x0002 ///< allow draw_horiz_band() with field slices (MPEG2 field pics)
2192
+#define SLICE_FLAG_ALLOW_FIELD    0x0002 ///< allow draw_horiz_band() with field slices (MPEG-2 field pics)
2193 2193
 #define SLICE_FLAG_ALLOW_PLANE    0x0004 ///< allow draw_horiz_band() with 1 component at a time (SVQ1)
2194 2194
 
2195 2195
 #if FF_API_XVMC
... ...
@@ -2280,14 +2280,14 @@ typedef struct AVCodecContext {
2280 2280
 #endif
2281 2281
 
2282 2282
     /**
2283
-     * minimum MB lagrange multipler
2283
+     * minimum MB Lagrange multiplier
2284 2284
      * - encoding: Set by user.
2285 2285
      * - decoding: unused
2286 2286
      */
2287 2287
     int mb_lmin;
2288 2288
 
2289 2289
     /**
2290
-     * maximum MB lagrange multipler
2290
+     * maximum MB Lagrange multiplier
2291 2291
      * - encoding: Set by user.
2292 2292
      * - decoding: unused
2293 2293
      */
... ...
@@ -2507,7 +2507,7 @@ typedef struct AVCodecContext {
2507 2507
      *     to all data planes. data[] must hold as many pointers as it can.
2508 2508
      *     extended_data must be allocated with av_malloc() and will be freed in
2509 2509
      *     av_frame_unref().
2510
-     *   * otherwise exended_data must point to data
2510
+     *   * otherwise extended_data must point to data
2511 2511
      * - buf[] must contain one or more pointers to AVBufferRef structures. Each of
2512 2512
      *   the frame's data and extended_data pointers must be contained in these. That
2513 2513
      *   is, one AVBufferRef for each allocated chunk of memory, not necessarily one
... ...
@@ -2851,7 +2851,7 @@ typedef struct AVCodecContext {
2851 2851
 #define FF_BUG_TRUNCATED       16384
2852 2852
 
2853 2853
     /**
2854
-     * strictly follow the standard (MPEG4, ...).
2854
+     * strictly follow the standard (MPEG-4, ...).
2855 2855
      * - encoding: Set by user.
2856 2856
      * - decoding: Set by user.
2857 2857
      * Setting this to STRICT or higher means the encoder and decoder will
... ...
@@ -2922,9 +2922,9 @@ typedef struct AVCodecContext {
2922 2922
      * - decoding: Set by user.
2923 2923
      */
2924 2924
     int debug_mv;
2925
-#define FF_DEBUG_VIS_MV_P_FOR  0x00000001 //visualize forward predicted MVs of P frames
2926
-#define FF_DEBUG_VIS_MV_B_FOR  0x00000002 //visualize forward predicted MVs of B frames
2927
-#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
2925
+#define FF_DEBUG_VIS_MV_P_FOR  0x00000001 // visualize forward predicted MVs of P-frames
2926
+#define FF_DEBUG_VIS_MV_B_FOR  0x00000002 // visualize forward predicted MVs of B-frames
2927
+#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 // visualize backward predicted MVs of B-frames
2928 2928
 #endif
2929 2929
 
2930 2930
     /**
... ...
@@ -2952,7 +2952,7 @@ typedef struct AVCodecContext {
2952 2952
 
2953 2953
 
2954 2954
     /**
2955
-     * opaque 64bit number (generally a PTS) that will be reordered and
2955
+     * opaque 64-bit number (generally a PTS) that will be reordered and
2956 2956
      * output in AVFrame.reordered_opaque
2957 2957
      * - encoding: unused
2958 2958
      * - decoding: Set by user.
... ...
@@ -5950,7 +5950,7 @@ unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
5950 5950
  * a pointer to an AVClass struct
5951 5951
  * @param[in] feature string containing the name of the missing feature
5952 5952
  * @param[in] want_sample indicates if samples are wanted which exhibit this feature.
5953
- * If want_sample is non-zero, additional verbage will be added to the log
5953
+ * If want_sample is non-zero, additional verbiage will be added to the log
5954 5954
  * message which tells the user how to report samples to the development
5955 5955
  * mailing list.
5956 5956
  * @deprecated Use avpriv_report_missing_feature() instead.
... ...
@@ -1240,7 +1240,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
1240 1240
 }
1241 1241
 
1242 1242
 /**
1243
- * Caclulate quantization tables for version b
1243
+ * Calculate quantization tables for version b
1244 1244
  */
1245 1245
 static av_cold void binkb_calc_quant(void)
1246 1246
 {
... ...
@@ -150,7 +150,7 @@ static int compare_vlcspec(const void *a, const void *b)
150 150
 /**
151 151
  * Build VLC decoding tables suitable for use with get_vlc().
152 152
  *
153
- * @param vlc            the context to be initted
153
+ * @param vlc            the context to be initialized
154 154
  *
155 155
  * @param table_nb_bits  max length of vlc codes to store directly in this table
156 156
  *                       (Longer codes are delegated to subtables.)
... ...
@@ -248,7 +248,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
248 248
 
249 249
 /* Build VLC decoding tables suitable for use with get_vlc().
250 250
 
251
-   'nb_bits' set the decoding table size (2^nb_bits) entries. The
251
+   'nb_bits' sets the decoding table size (2^nb_bits) entries. The
252 252
    bigger it is, the faster is the decoding. But it should not be too
253 253
    big to save memory and L1 cache. '9' is a good compromise.
254 254
 
... ...
@@ -22,7 +22,7 @@
22 22
 #include "avcodec.h"
23 23
 
24 24
 /**
25
- * Called by the biststream filters to get the next packet for filtering.
25
+ * Called by the bitstream filters to get the next packet for filtering.
26 26
  * The filter is responsible for either freeing the packet or passing it to the
27 27
  * caller.
28 28
  */
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Cinepak Video Decoder
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (C) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -141,7 +141,7 @@ typedef struct cook {
141 141
     VLC                 envelope_quant_index[13];
142 142
     VLC                 sqvh[7];          // scalar quantization
143 143
 
144
-    /* generatable tables and related variables */
144
+    /* generate tables and related variables */
145 145
     int                 gain_size_factor;
146 146
     float               gain_table[23];
147 147
 
... ...
@@ -1187,7 +1187,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
1187 1187
         /* Initialize variable relations */
1188 1188
         q->subpacket[s].numvector_size = (1 << q->subpacket[s].log2_numvector_size);
1189 1189
 
1190
-        /* Try to catch some obviously faulty streams, othervise it might be exploitable */
1190
+        /* Try to catch some obviously faulty streams, otherwise it might be exploitable */
1191 1191
         if (q->subpacket[s].total_subbands > 53) {
1192 1192
             avpriv_request_sample(avctx, "total_subbands > 53");
1193 1193
             return AVERROR_PATCHWELCOME;
... ...
@@ -1260,7 +1260,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
1260 1260
         q->saturate_output = saturate_output_float;
1261 1261
     }
1262 1262
 
1263
-    /* Try to catch some obviously faulty streams, othervise it might be exploitable */
1263
+    /* Try to catch some obviously faulty streams, otherwise it might be exploitable */
1264 1264
     if (q->samples_per_channel != 256 && q->samples_per_channel != 512 &&
1265 1265
         q->samples_per_channel != 1024) {
1266 1266
         avpriv_request_sample(avctx, "samples_per_channel = %d",
... ...
@@ -22,7 +22,7 @@
22 22
 
23 23
 /**
24 24
  * @file
25
- * Cook AKA RealAudio G2 compatible decoderdata
25
+ * Cook AKA RealAudio G2 compatible decoder data
26 26
  */
27 27
 
28 28
 #ifndef AVCODEC_COOKDATA_H
... ...
@@ -4,7 +4,7 @@
4 4
  * based on "Creative YUV (CYUV) stream format for AVI":
5 5
  *   http://www.csse.monash.edu.au/~timf/videocodec/cyuv.txt
6 6
  *
7
- * Copyright (c) 2003 The FFmpeg Project
7
+ * Copyright (C) 2003 The FFmpeg project
8 8
  *
9 9
  * This file is part of FFmpeg.
10 10
  *
... ...
@@ -52,7 +52,7 @@ const uint8_t ff_dca_dmix_primary_nch[8] = {
52 52
 
53 53
 /* ADPCM data */
54 54
 
55
-/* 16bits signed fractional Q13 binary codes */
55
+/* 16 bits signed fractional Q13 binary codes */
56 56
 const int16_t ff_dca_adpcm_vb[4096][4] = {
57 57
     {   9928,  -2618,  -1093, -1263 },
58 58
     {  11077,  -2876,  -1747,  -308 },
... ...
@@ -4215,7 +4215,7 @@ const uint32_t ff_dca_quant_levels[32] = {
4215 4215
     2097152, 4194304, 8388608,     0,      0,      0,      0,       0
4216 4216
 };
4217 4217
 
4218
-/* 20bits unsigned fractional binary codes */
4218
+/* 20 bits unsigned fractional binary codes */
4219 4219
 const uint32_t ff_dca_lossy_quant[32] = {
4220 4220
          0, 6710886, 4194304, 3355443, 2474639, 2097152, 1761608, 1426063,
4221 4221
     796918,  461373,  251658,  146801,   79692,   46137,   27263,   16777,
... ...
@@ -4223,7 +4223,7 @@ const uint32_t ff_dca_lossy_quant[32] = {
4223 4223
         84,      42,      21,       0,       0,       0,       0,       0
4224 4224
 };
4225 4225
 
4226
-/* 20bits unsigned fractional binary codes */
4226
+/* 20 bits unsigned fractional binary codes */
4227 4227
 const uint32_t ff_dca_lossless_quant[32] = {
4228 4228
          0, 4194304, 2097152, 1384120, 1048576, 696254, 524288, 348127,
4229 4229
     262144,  131072,   65431,   33026,   16450,   8208,   4100,   2049,
... ...
@@ -442,7 +442,7 @@ static void help(void)
442 442
     printf("dct-test [-i] [<test-number>] [<bits>]\n"
443 443
            "test-number 0 -> test with random matrixes\n"
444 444
            "            1 -> test with random sparse matrixes\n"
445
-           "            2 -> do 3. test from mpeg4 std\n"
445
+           "            2 -> do 3. test from MPEG-4 std\n"
446 446
            "bits        Number of time domain bits to use, 8 is default\n"
447 447
            "-i          test IDCT implementations\n"
448 448
            "-4          test IDCT248 implementations\n"
... ...
@@ -36,8 +36,7 @@
36 36
 #include "pixblockdsp.h"
37 37
 #include "dnxhdenc.h"
38 38
 
39
-
40
-// The largest value that will not lead to overflow for 10bit samples.
39
+// The largest value that will not lead to overflow for 10-bit samples.
41 40
 #define DNX10BIT_QMAT_SHIFT 18
42 41
 #define RC_VARIANCE 1 // use variance or ssd for fast rc
43 42
 #define LAMBDA_FRAC_BITS 10
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Assorted DPCM codecs
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * DXVA2 H264 HW acceleration.
2
+ * DXVA2 H.264 HW acceleration.
3 3
  *
4 4
  * copyright (c) 2009 Laurent Aimar
5 5
  *
... ...
@@ -41,8 +41,8 @@
41 41
 #include "mpeg12vlc.h"
42 42
 
43 43
 #define EA_PREAMBLE_SIZE    8
44
-#define MADk_TAG MKTAG('M', 'A', 'D', 'k')    /* MAD i-frame */
45
-#define MADm_TAG MKTAG('M', 'A', 'D', 'm')    /* MAD p-frame */
44
+#define MADk_TAG MKTAG('M', 'A', 'D', 'k')    /* MAD I-frame */
45
+#define MADm_TAG MKTAG('M', 'A', 'D', 'm')    /* MAD P-frame */
46 46
 #define MADe_TAG MKTAG('M', 'A', 'D', 'e')    /* MAD lqp-frame */
47 47
 
48 48
 typedef struct MadContext {
... ...
@@ -31,7 +31,7 @@
31 31
 #include "elbg.h"
32 32
 #include "avcodec.h"
33 33
 
34
-#define DELTA_ERR_MAX 0.1  ///< Precision of the ELBG algorithm (as percentual error)
34
+#define DELTA_ERR_MAX 0.1  ///< Precision of the ELBG algorithm (as percentage error)
35 35
 
36 36
 /**
37 37
  * In the ELBG jargon, a cell is the set of points that are closest to a
... ...
@@ -199,7 +199,7 @@ static void get_new_centroids(elbg_data *elbg, int huc, int *newcentroid_i,
199 199
 
200 200
 /**
201 201
  * Add the points in the low utility cell to its closest cell. Split the high
202
- * utility cell, putting the separate points in the (now empty) low utility
202
+ * utility cell, putting the separated points in the (now empty) low utility
203 203
  * cell.
204 204
  *
205 205
  * @param elbg         Internal elbg data
... ...
@@ -1136,7 +1136,7 @@ void ff_er_frame_end(ERContext *s)
1136 1136
                 s->mv[0][0][1] = s->cur_pic.motion_val[dir][mb_x * 2 + mb_y * 2 * s->b8_stride][1];
1137 1137
             }
1138 1138
 
1139
-            s->decode_mb(s->opaque, 0 /* FIXME h264 partitioned slices need this set */,
1139
+            s->decode_mb(s->opaque, 0 /* FIXME H.264 partitioned slices need this set */,
1140 1140
                          mv_dir, mv_type, &s->mv, mb_x, mb_y, 0, 0);
1141 1141
         }
1142 1142
     }
... ...
@@ -41,7 +41,7 @@ typedef struct ERPicture {
41 41
     AVFrame *f;
42 42
     ThreadFrame *tf;
43 43
 
44
-    // it's the caller's responsibility to allocate these buffers
44
+    // it is the caller's responsibility to allocate these buffers
45 45
     int16_t (*motion_val[2])[2];
46 46
     int8_t *ref_index[2];
47 47
 
... ...
@@ -191,13 +191,13 @@ static union av_intfloat32 exr_half2float(uint16_t hf)
191 191
                 mantissa <<= 1;
192 192
                 exp -= (1 << 23);
193 193
             }
194
-            // clamp the mantissa to 10-bits
194
+            // clamp the mantissa to 10 bits
195 195
             mantissa &= ((1 << 10) - 1);
196
-            // shift left to generate single-precision mantissa of 23-bits
196
+            // shift left to generate single-precision mantissa of 23 bits
197 197
             mantissa <<= 13;
198 198
         }
199 199
     } else {
200
-        // shift left to generate single-precision mantissa of 23-bits
200
+        // shift left to generate single-precision mantissa of 23 bits
201 201
         mantissa <<= 13;
202 202
         // generate single precision biased exponent value
203 203
         exp = (exp << 13) + HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP;
... ...
@@ -1706,7 +1706,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
1706 1706
         }
1707 1707
     }
1708 1708
 
1709
-    // allocate thread data, used for non EXR_RAW compreesion types
1709
+    // allocate thread data, used for non EXR_RAW compression types
1710 1710
     s->thread_data = av_mallocz_array(avctx->thread_count, sizeof(EXRThreadData));
1711 1711
     if (!s->thread_data)
1712 1712
         return AVERROR_INVALIDDATA;
... ...
@@ -1718,7 +1718,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
1718 1718
 static int decode_init_thread_copy(AVCodecContext *avctx)
1719 1719
 {    EXRContext *s = avctx->priv_data;
1720 1720
 
1721
-    // allocate thread data, used for non EXR_RAW compreesion types
1721
+    // allocate thread data, used for non EXR_RAW compression types
1722 1722
     s->thread_data = av_mallocz_array(avctx->thread_count, sizeof(EXRThreadData));
1723 1723
     if (!s->thread_data)
1724 1724
         return AVERROR_INVALIDDATA;
... ...
@@ -31,7 +31,7 @@
31 31
 #include "tiff.h"
32 32
 
33 33
 /**
34
- * initialize upacker code
34
+ * initialize unpacker code
35 35
  */
36 36
 void ff_ccitt_unpack_init(void);
37 37
 
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FLI/FLC Animation Video Decoder
3
- * Copyright (c) 2003, 2004 The FFmpeg Project
3
+ * Copyright (C) 2003, 2004 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -133,7 +133,7 @@ static av_cold int flic_decode_init(AVCodecContext *avctx)
133 133
         case 8  : avctx->pix_fmt = AV_PIX_FMT_PAL8; break;
134 134
         case 15 : avctx->pix_fmt = AV_PIX_FMT_RGB555; break;
135 135
         case 16 : avctx->pix_fmt = AV_PIX_FMT_RGB565; break;
136
-        case 24 : avctx->pix_fmt = AV_PIX_FMT_BGR24; /* Supposedly BGR, but havent any files to test with */
136
+        case 24 : avctx->pix_fmt = AV_PIX_FMT_BGR24; /* Supposedly BGR, but no files to test with */
137 137
                   avpriv_request_sample(avctx, "24Bpp FLC/FLX");
138 138
                   return AVERROR_PATCHWELCOME;
139 139
         default :
... ...
@@ -793,7 +793,7 @@ static int flic_decode_frame(AVCodecContext *avctx,
793 793
 
794 794
     /* Should not get  here, ever as the pix_fmt is processed */
795 795
     /* in flic_decode_init and the above if should deal with */
796
-    /* the finite set of possibilites allowable by here. */
796
+    /* the finite set of possibilities allowable by here. */
797 797
     /* But in case we do, just error out. */
798 798
     av_log(avctx, AV_LOG_ERROR, "Unknown FLC format, my science cannot explain how this happened.\n");
799 799
     return AVERROR_BUG;
... ...
@@ -31,7 +31,7 @@ void ff_flv_encode_picture_header(MpegEncContext *s, int picture_number)
31 31
     avpriv_align_put_bits(&s->pb);
32 32
 
33 33
     put_bits(&s->pb, 17, 1);
34
-    /* 0: h263 escape codes 1: 11-bit escape codes */
34
+    /* 0: H.263 escape codes 1: 11-bit escape codes */
35 35
     put_bits(&s->pb, 5, (s->h263_flv - 1));
36 36
     put_bits(&s->pb, 8,
37 37
              (((int64_t) s->picture_number * 30 * s->avctx->time_base.num) /   // FIXME use timestamp
... ...
@@ -466,7 +466,7 @@ static int comp_interp_index(G723_1_Context *p, int pitch_lag,
466 466
 }
467 467
 
468 468
 /**
469
- * Peform residual interpolation based on frame classification.
469
+ * Perform residual interpolation based on frame classification.
470 470
  *
471 471
  * @param buf   decoded excitation vector
472 472
  * @param out   output vector
... ...
@@ -914,7 +914,7 @@ static int g723_1_decode_frame(AVCodecContext *avctx, void *data,
914 914
             p->interp_index = comp_interp_index(p, p->pitch_lag[1],
915 915
                                                 &p->sid_gain, &p->cur_gain);
916 916
 
917
-            /* Peform pitch postfiltering */
917
+            /* Perform pitch postfiltering */
918 918
             if (p->postfilter) {
919 919
                 i = PITCH_MAX;
920 920
                 for (j = 0; j < SUBFRAMES; i += SUBFRAME_LEN, j++)
... ...
@@ -31,15 +31,15 @@
31 31
 #include "put_bits.h"
32 32
 
33 33
 /**
34
- * G.726 11bit float.
35
- * G.726 Standard uses rather odd 11bit floating point arithmetic for
34
+ * G.726 11-bit float.
35
+ * G.726 Standard uses rather odd 11-bit floating point arithmetic for
36 36
  * numerous occasions. It's a mystery to me why they did it this way
37
- * instead of simply using 32bit integer arithmetic.
37
+ * instead of simply using 32-bit integer arithmetic.
38 38
  */
39 39
 typedef struct Float11 {
40
-    uint8_t sign;   /**< 1bit sign */
41
-    uint8_t exp;    /**< 4bit exponent */
42
-    uint8_t mant;   /**< 6bit mantissa */
40
+    uint8_t sign;   /**< 1 bit sign */
41
+    uint8_t exp;    /**< 4 bits exponent */
42
+    uint8_t mant;   /**< 6 bits mantissa */
43 43
 } Float11;
44 44
 
45 45
 static inline Float11* i2f(int i, Float11* f)
... ...
@@ -98,7 +98,7 @@ typedef struct G726Context {
98 98
     int little_endian;  /**< little-endian bitstream as used in aiff and Sun AU */
99 99
 } G726Context;
100 100
 
101
-static const int quant_tbl16[] =                  /**< 16kbit/s 2bits per sample */
101
+static const int quant_tbl16[] =                  /**< 16kbit/s 2 bits per sample */
102 102
            { 260, INT_MAX };
103 103
 static const int16_t iquant_tbl16[] =
104 104
            { 116, 365, 365, 116 };
... ...
@@ -107,7 +107,7 @@ static const int16_t W_tbl16[] =
107 107
 static const uint8_t F_tbl16[] =
108 108
            { 0, 7, 7, 0 };
109 109
 
110
-static const int quant_tbl24[] =                  /**< 24kbit/s 3bits per sample */
110
+static const int quant_tbl24[] =                  /**< 24kbit/s 3 bits per sample */
111 111
            {  7, 217, 330, INT_MAX };
112 112
 static const int16_t iquant_tbl24[] =
113 113
            { INT16_MIN, 135, 273, 373, 373, 273, 135, INT16_MIN };
... ...
@@ -116,7 +116,7 @@ static const int16_t W_tbl24[] =
116 116
 static const uint8_t F_tbl24[] =
117 117
            { 0, 1, 2, 7, 7, 2, 1, 0 };
118 118
 
119
-static const int quant_tbl32[] =                  /**< 32kbit/s 4bits per sample */
119
+static const int quant_tbl32[] =                  /**< 32kbit/s 4 bits per sample */
120 120
            { -125,  79, 177, 245, 299, 348, 399, INT_MAX };
121 121
 static const int16_t iquant_tbl32[] =
122 122
          { INT16_MIN,   4, 135, 213, 273, 323, 373, 425,
... ...
@@ -127,7 +127,7 @@ static const int16_t W_tbl32[] =
127 127
 static const uint8_t F_tbl32[] =
128 128
            { 0, 0, 0, 1, 1, 1, 3, 7, 7, 3, 1, 1, 1, 0, 0, 0 };
129 129
 
130
-static const int quant_tbl40[] =                  /**< 40kbit/s 5bits per sample */
130
+static const int quant_tbl40[] =                  /**< 40kbit/s 5 bits per sample */
131 131
            { -122, -16,  67, 138, 197, 249, 297, 338,
132 132
               377, 412, 444, 474, 501, 527, 552, INT_MAX };
133 133
 static const int16_t iquant_tbl40[] =
... ...
@@ -152,7 +152,7 @@ static const G726Tables G726Tables_pool[] =
152 152
 
153 153
 
154 154
 /**
155
- * Para 4.2.2 page 18: Adaptive quantizer.
155
+ * Paragraph 4.2.2 page 18: Adaptive quantizer.
156 156
  */
157 157
 static inline uint8_t quant(G726Context* c, int d)
158 158
 {
... ...
@@ -178,14 +178,14 @@ static inline uint8_t quant(G726Context* c, int d)
178 178
 }
179 179
 
180 180
 /**
181
- * Para 4.2.3 page 22: Inverse adaptive quantizer.
181
+ * Paragraph 4.2.3 page 22: Inverse adaptive quantizer.
182 182
  */
183 183
 static inline int16_t inverse_quant(G726Context* c, int i)
184 184
 {
185 185
     int dql, dex, dqt;
186 186
 
187 187
     dql = c->tbls.iquant[i] + (c->y >> 2);
188
-    dex = (dql>>7) & 0xf;        /* 4bit exponent */
188
+    dex = (dql>>7) & 0xf;        /* 4-bit exponent */
189 189
     dqt = (1<<7) + (dql & 0x7f); /* log2 -> linear */
190 190
     return (dql < 0) ? 0 : ((dqt<<dex) >> 7);
191 191
 }
... ...
@@ -91,7 +91,7 @@ typedef struct RL_VLC_ELEM {
91 91
  *
92 92
  * GET_CACHE(name, gb)
93 93
  *   Will output the contents of the internal cache,
94
- *   next bit is MSB of 32 or 64 bit (FIXME 64bit).
94
+ *   next bit is MSB of 32 or 64 bits (FIXME 64 bits).
95 95
  *
96 96
  * SHOW_UBITS(name, gb, num)
97 97
  *   Will return the next num bits.
... ...
@@ -224,7 +224,7 @@ static inline void skip_bits_long(GetBitContext *s, int n)
224 224
 }
225 225
 
226 226
 /**
227
- * read mpeg1 dc style vlc (sign bit + mantissa with no MSB).
227
+ * Read MPEG-1 dc-style VLC (sign bit + mantissa with no MSB).
228 228
  * if MSB not set it is negative
229 229
  * @param n length in bits
230 230
  */
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * H261 common code
2
+ * H.261 common code
3 3
  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
4 4
  * Copyright (c) 2004 Maarten Daniels
5 5
  *
... ...
@@ -22,7 +22,7 @@
22 22
 
23 23
 /**
24 24
  * @file
25
- * h261codec.
25
+ * H.261 codec
26 26
  */
27 27
 
28 28
 #include "avcodec.h"
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * H261 decoder
2
+ * H.261 codec
3 3
  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
4 4
  * Copyright (c) 2004 Maarten Daniels
5 5
  *
... ...
@@ -22,7 +22,7 @@
22 22
 
23 23
 /**
24 24
  * @file
25
- * h261codec.
25
+ * H.261 codec.
26 26
  */
27 27
 
28 28
 #ifndef AVCODEC_H261_H
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * H261 parser
2
+ * H.261 parser
3 3
  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
4 4
  * Copyright (c) 2004 Maarten Daniels
5 5
  *
... ...
@@ -22,7 +22,7 @@
22 22
 
23 23
 /**
24 24
  * @file
25
- * h261codec.
25
+ * H.261 parser
26 26
  */
27 27
 
28 28
 #include "parser.h"
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * H261 decoder
2
+ * H.261 decoder
3 3
  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
4 4
  * Copyright (c) 2004 Maarten Daniels
5 5
  *
... ...
@@ -601,7 +601,7 @@ retry:
601 601
     init_get_bits(&s->gb, buf, buf_size * 8);
602 602
 
603 603
     if (!s->context_initialized)
604
-        // we need the IDCT permutaton for reading a custom matrix
604
+        // we need the IDCT permutation for reading a custom matrix
605 605
         ff_mpv_idct_init(s);
606 606
 
607 607
     ret = h261_decode_picture_header(h);
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * H261 encoder
2
+ * H.261 encoder
3 3
  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
4 4
  * Copyright (c) 2004 Maarten Daniels
5 5
  *
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2
- * H263/MPEG4 backend for encoder and decoder
2
+ * H.263/MPEG-4 backend for encoder and decoder
3 3
  * Copyright (c) 2000,2001 Fabrice Bellard
4
- * H263+ support.
4
+ * H.263+ support.
5 5
  * Copyright (c) 2001 Juan J. Sierralta P
6 6
  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
7 7
  *
... ...
@@ -24,7 +24,7 @@
24 24
 
25 25
 /**
26 26
  * @file
27
- * h263/mpeg4 codec.
27
+ * H.263/MPEG-4 codec.
28 28
  */
29 29
 
30 30
 #include <limits.h>
... ...
@@ -320,7 +320,7 @@ int16_t *ff_h263_pred_motion(MpegEncContext * s, int block, int dir,
320 320
     A = mot_val[ - 1];
321 321
     /* special case for first (slice) line */
322 322
     if (s->first_slice_line && block<3) {
323
-        // we can't just change some MVs to simulate that as we need them for the B frames (and ME)
323
+        // we can't just change some MVs to simulate that as we need them for the B-frames (and ME)
324 324
         // and if we ever support non rectangular objects than we need to do a few ifs here anyway :(
325 325
         if(block==0){ //most common case
326 326
             if(s->mb_x  == s->resync_mb_x){ //rare
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * H263 internal header
2
+ * H.263 internal header
3 3
  *
4 4
  * This file is part of FFmpeg.
5 5
  *
... ...
@@ -87,7 +87,7 @@ int ff_h263_decode_mb(MpegEncContext *s,
87 87
                       int16_t block[6][64]);
88 88
 
89 89
 /**
90
- * Return the value of the 3bit "source format" syntax element.
90
+ * Return the value of the 3-bit "source format" syntax element.
91 91
  * This represents some standard picture dimensions or indicates that
92 92
  * width&height are explicitly stored later.
93 93
  */
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * H263+ tables
2
+ * H.263+ tables
3 3
  *
4 4
  * This file is part of FFmpeg.
5 5
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * copyright (c) 2000,2001 Fabrice Bellard
3
- * H263+ support
3
+ * H.263+ support
4 4
  * copyright (c) 2001 Juan J. Sierralta P
5 5
  * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
6 6
  *
... ...
@@ -129,7 +129,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
129 129
         if (avctx->extradata_size == 56 && avctx->extradata[0] == 1)
130 130
             s->ehc_mode = 1;
131 131
 
132
-    /* for h263, we allocate the images after having read the header */
132
+    /* for H.263, we allocate the images after having read the header */
133 133
     if (avctx->codec->id != AV_CODEC_ID_H263 &&
134 134
         avctx->codec->id != AV_CODEC_ID_H263P &&
135 135
         avctx->codec->id != AV_CODEC_ID_MPEG4) {
... ...
@@ -475,7 +475,7 @@ retry:
475 475
         return ret;
476 476
 
477 477
     if (!s->context_initialized)
478
-        // we need the idct permutaton for reading a custom matrix
478
+        // we need the idct permutation for reading a custom matrix
479 479
         ff_mpv_idct_init(s);
480 480
 
481 481
     /* let's go :-) */
... ...
@@ -536,9 +536,9 @@ retry:
536 536
             goto retry;
537 537
     }
538 538
 
539
-    /* After H263 & mpeg4 header decode we have the height, width,
539
+    /* After H.263 & MPEG-4 header decode we have the height, width,
540 540
      * and other parameters. So then we could init the picture.
541
-     * FIXME: By the way H263 decoder is evolving it should have
541
+     * FIXME: By the way H.263 decoder is evolving it should have
542 542
      * an H263EncContext */
543 543
     if (s->width  != avctx->coded_width  ||
544 544
         s->height != avctx->coded_height ||
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 codec.
24
+ * H.264 / AVC / MPEG-4 part10 codec.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 codec.
24
+ * H.264 / AVC / MPEG-4 part10 codec.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -433,7 +433,7 @@ typedef struct H264SliceContext {
433 433
 
434 434
     DECLARE_ALIGNED(8, uint16_t, sub_mb_type)[4];
435 435
 
436
-    ///< as a dct coefficient is int32_t in high depth, we need to reserve twice the space.
436
+    ///< as a DCT coefficient is int32_t in high depth, we need to reserve twice the space.
437 437
     DECLARE_ALIGNED(16, int16_t, mb)[16 * 48 * 2];
438 438
     DECLARE_ALIGNED(16, int16_t, mb_luma_dc)[3][16 * 2];
439 439
     ///< as mb is addressed by scantable[i] and scantable is uint8_t we can either
... ...
@@ -472,7 +472,7 @@ typedef struct H264Context {
472 472
 
473 473
     H2645Packet pkt;
474 474
 
475
-    int pixel_shift;    ///< 0 for 8-bit H264, 1 for high-bit-depth H264
475
+    int pixel_shift;    ///< 0 for 8-bit H.264, 1 for high-bit-depth H.264
476 476
 
477 477
     /* coded dimensions -- 16 * mb w/h */
478 478
     int width, height;
... ...
@@ -563,7 +563,7 @@ typedef struct H264Context {
563 563
     int nal_unit_type;
564 564
 
565 565
     /**
566
-     * Used to parse AVC variant of h264
566
+     * Used to parse AVC variant of H.264
567 567
      */
568 568
     int is_avc;           ///< this flag is != 0 if codec is avc1
569 569
     int nal_length_size;  ///< Number of bytes used for nal length (1, 2 or 4)
... ...
@@ -58,7 +58,7 @@ typedef struct H2645NAL {
58 58
     int skipped_bytes_pos_size;
59 59
     int *skipped_bytes_pos;
60 60
     /**
61
-     * H264 only, nal_ref_idc
61
+     * H.264 only, nal_ref_idc
62 62
      */
63 63
     int ref_idc;
64 64
 } H2645NAL;
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 cabac decoding.
24
+ * H.264 / AVC / MPEG-4 part10 cabac decoding.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -56,7 +56,7 @@ static const int8_t cabac_context_init_I[1024][2] =
56 56
     {  2,  54 }, {  3, 74 },  { -28,127 }, { -23, 104 },
57 57
     { -6,  53 }, { -1, 54 },  {  7,  51 },
58 58
 
59
-    /* 11 - 23 unsused for I */
59
+    /* 11 - 23 unused for I */
60 60
     { 0, 0 },    { 0, 0 },    { 0, 0 },      { 0, 0 },
61 61
     { 0, 0 },    { 0, 0 },    { 0, 0 },      { 0, 0 },
62 62
     { 0, 0 },    { 0, 0 },    { 0, 0 },      { 0, 0 },
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 cavlc bitstream decoding.
24
+ * H.264 / AVC / MPEG-4 part10 cavlc bitstream decoding.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 direct mb/block decoding.
24
+ * H.264 / AVC / MPEG-4 part10 direct mb/block decoding.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 loop filter.
24
+ * H.264 / AVC / MPEG-4 part10 loop filter.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 macroblock decoding
24
+ * H.264 / AVC / MPEG-4 part10 macroblock decoding
25 25
  */
26 26
 
27 27
 #include <stdint.h>
... ...
@@ -90,7 +90,7 @@ static inline void get_lowest_part_y(const H264Context *h, H264SliceContext *sl,
90 90
 /**
91 91
  * Wait until all reference frames are available for MC operations.
92 92
  *
93
- * @param h the H264 context
93
+ * @param h the H.264 context
94 94
  */
95 95
 static void await_references(const H264Context *h, H264SliceContext *sl)
96 96
 {
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * H.26L/H.264/AVC/JVT/14496-10/... motion vector predicion
2
+ * H.26L/H.264/AVC/JVT/14496-10/... motion vector prediction
3 3
  * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
4 4
  *
5 5
  * This file is part of FFmpeg.
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 motion vector predicion.
24
+ * H.264 / AVC / MPEG-4 part10 motion vector prediction.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -33,7 +33,7 @@ typedef struct H264PredWeightTable {
33 33
     int chroma_log2_weight_denom;
34 34
     int luma_weight_flag[2];    ///< 7.4.3.2 luma_weight_lX_flag
35 35
     int chroma_weight_flag[2];  ///< 7.4.3.2 chroma_weight_lX_flag
36
-    // The following 2 can be changed to int8_t but that causes 10cpu cycles speedloss
36
+    // The following 2 can be changed to int8_t but that causes a 10 CPU cycles speed loss
37 37
     int luma_weight[48][2][2];
38 38
     int chroma_weight[48][2][2][2];
39 39
     int implicit_weight[48][48][2];
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 parser.
24
+ * H.264 / AVC / MPEG-4 part10 parser.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 codec.
24
+ * H.264 / AVC / MPEG-4 part10 codec.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 parameter set decoding.
24
+ * H.264 / AVC / MPEG-4 part10 parameter set decoding.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10  reference picture handling.
24
+ * H.264 / AVC / MPEG-4 part10  reference picture handling.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -674,7 +674,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count)
674 674
                 av_log(h->avctx, AV_LOG_DEBUG, "mmco: unref long failure\n");
675 675
             break;
676 676
         case MMCO_LONG:
677
-                    // Comment below left from previous code as it is an interresting note.
677
+                    // Comment below left from previous code as it is an interesting note.
678 678
                     /* First field in pair is in short term list or
679 679
                      * at a different long term index.
680 680
                      * This is not allowed; see 7.4.3.3, notes 2 and 3.
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * H.26L/H.264/AVC/JVT/14496-10/... sei decoding
2
+ * H.26L/H.264/AVC/JVT/14496-10/... SEI decoding
3 3
  * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
4 4
  *
5 5
  * This file is part of FFmpeg.
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 sei decoding.
24
+ * H.264 / AVC / MPEG-4 part10 SEI decoding.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 codec.
24
+ * H.264 / AVC / MPEG-4 part10 codec.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -128,7 +128,7 @@ static int alloc_scratch_buffers(H264SliceContext *sl, int linesize)
128 128
 
129 129
     av_fast_malloc(&sl->bipred_scratchpad, &sl->bipred_scratchpad_allocated, 16 * 6 * alloc_size);
130 130
     // edge emu needs blocksize + filter length - 1
131
-    // (= 21x21 for  h264)
131
+    // (= 21x21 for  H.264)
132 132
     av_fast_malloc(&sl->edge_emu_buffer, &sl->edge_emu_buffer_allocated, alloc_size * 2 * 21);
133 133
 
134 134
     av_fast_mallocz(&sl->top_borders[0], &sl->top_borders_allocated[0],
... ...
@@ -1022,7 +1022,7 @@ static enum AVPixelFormat non_j_pixfmt(enum AVPixelFormat a)
1022 1022
 
1023 1023
 /**
1024 1024
  * Decode a slice header.
1025
- * This will (re)intialize the decoder and call h264_frame_start() as needed.
1025
+ * This will (re)initialize the decoder and call h264_frame_start() as needed.
1026 1026
  *
1027 1027
  * @param h h264context
1028 1028
  *
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 DSP functions.
24
+ * H.264 / AVC / MPEG-4 part10 DSP functions.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * H26L/H264/AVC/JVT/14496-10/... encoder/decoder
2
+ * H.26L/H.264/AVC/JVT/14496-10/... encoder/decoder
3 3
  * Copyright (c) 2003 Michael Niedermayer <michaelni@gmx.at>
4 4
  *
5 5
  * This file is part of FFmpeg.
... ...
@@ -22,7 +22,7 @@
22 22
 /**
23 23
  * @file
24 24
  * @brief
25
- *     H264 / AVC / MPEG4 part10 codec data table
25
+ *     H.264 / AVC / MPEG-4 part10 codec data table
26 26
  * @author Michael Niedermayer <michaelni@gmx.at>
27 27
  */
28 28
 
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 DSP functions.
24
+ * H.264 / AVC / MPEG-4 part10 DSP functions.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -70,7 +70,7 @@ typedef struct H264DSPContext {
70 70
                                             int stride, int alpha, int beta);
71 71
     void (*h264_h_loop_filter_chroma_mbaff_intra)(uint8_t *pix /*align 8*/,
72 72
                                                   int stride, int alpha, int beta);
73
-    // h264_loop_filter_strength: simd only. the C version is inlined in h264.c
73
+    // h264_loop_filter_strength: simd only. the C version is inlined in h264_loopfilter.c
74 74
     void (*h264_loop_filter_strength)(int16_t bS[2][4][4], uint8_t nnz[40],
75 75
                                       int8_t ref[2][40], int16_t mv[2][40][2],
76 76
                                       int bidir, int edges, int step,
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 DSP functions.
24
+ * H.264 / AVC / MPEG-4 part10 DSP functions.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 prediction functions.
24
+ * H.264 / AVC / MPEG-4 part10 prediction functions.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -556,7 +556,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id,
556 556
     h->pred16x16[TOP_DC_PRED8x8 ]= FUNCC(pred16x16_top_dc                 , depth);\
557 557
     h->pred16x16[DC_128_PRED8x8 ]= FUNCC(pred16x16_128_dc                 , depth);\
558 558
 \
559
-    /* special lossless h/v prediction for h264 */ \
559
+    /* special lossless h/v prediction for H.264 */ \
560 560
     h->pred4x4_add  [VERT_PRED   ]= FUNCC(pred4x4_vertical_add            , depth);\
561 561
     h->pred4x4_add  [ HOR_PRED   ]= FUNCC(pred4x4_horizontal_add          , depth);\
562 562
     h->pred8x8l_add [VERT_PRED   ]= FUNCC(pred8x8l_vertical_add           , depth);\
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 prediction functions.
24
+ * H.264 / AVC / MPEG-4 prediction functions.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -75,7 +75,7 @@
75 75
 #define TOP_DC_PRED8x8         5
76 76
 #define DC_128_PRED8x8         6
77 77
 
78
-// H264/SVQ3 (8x8) specific
78
+// H.264/SVQ3 (8x8) specific
79 79
 #define ALZHEIMER_DC_L0T_PRED8x8  7
80 80
 #define ALZHEIMER_DC_0LT_PRED8x8  8
81 81
 #define ALZHEIMER_DC_L00_PRED8x8  9
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 prediction functions.
24
+ * H.264 / AVC / MPEG-4 part10 prediction functions.
25 25
  * @author Michael Niedermayer <michaelni@gmx.at>
26 26
  */
27 27
 
... ...
@@ -81,7 +81,7 @@ static av_always_inline int z_scan_block_avail(HEVCContext *s, int xCurr, int yC
81 81
     }
82 82
 }
83 83
 
84
-//check if the two luma locations belong to the same mostion estimation region
84
+//check if the two luma locations belong to the same motion estimation region
85 85
 static av_always_inline int is_diff_mer(HEVCContext *s, int xN, int yN, int xP, int yP)
86 86
 {
87 87
     uint8_t plevel = s->ps.pps->log2_parallel_merge_level;
... ...
@@ -122,7 +122,7 @@ static int decode_nal_sei_frame_packing_arrangement(HEVCContext *s)
122 122
         if (!s->quincunx_subsampling && s->frame_packing_arrangement_type != 5)
123 123
             skip_bits(gb, 16);  // frame[01]_grid_position_[xy]
124 124
         skip_bits(gb, 8);       // frame_packing_arrangement_reserved_byte
125
-        skip_bits1(gb);         // frame_packing_arrangement_persistance_flag
125
+        skip_bits1(gb);         // frame_packing_arrangement_persistence_flag
126 126
     }
127 127
     skip_bits1(gb);             // upsampled_aspect_ratio_flag
128 128
     return 0;
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * id Quake II CIN Video Decoder
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (C) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -70,7 +70,7 @@ typedef struct IMCChannel {
70 70
     int sumLenArr[BANDS];      ///< bits for all coeffs in band
71 71
     int skipFlagRaw[BANDS];    ///< skip flags are stored in raw form or not
72 72
     int skipFlagBits[BANDS];   ///< bits used to code skip flags
73
-    int skipFlagCount[BANDS];  ///< skipped coeffients per band
73
+    int skipFlagCount[BANDS];  ///< skipped coefficients per band
74 74
     int skipFlags[COEFFS];     ///< skip coefficient decoding or not
75 75
     int codewords[COEFFS];     ///< raw codewords read from bitstream
76 76
 
... ...
@@ -53,7 +53,7 @@ enum {
53 53
 
54 54
 
55 55
 /* Some constants for parsing frame bitstream flags. */
56
-#define BS_8BIT_PEL     (1 << 1) ///< 8bit pixel bitdepth indicator
56
+#define BS_8BIT_PEL     (1 << 1) ///< 8-bit pixel bitdepth indicator
57 57
 #define BS_KEYFRAME     (1 << 2) ///< intra frame indicator
58 58
 #define BS_MV_Y_HALF    (1 << 4) ///< vertical mv halfpel resolution indicator
59 59
 #define BS_MV_X_HALF    (1 << 5) ///< horizontal mv halfpel resolution indicator
... ...
@@ -317,7 +317,7 @@ static inline uint32_t replicate32(uint32_t a) {
317 317
 }
318 318
 
319 319
 
320
-/* Fill n lines with 64bit pixel value pix */
320
+/* Fill n lines with 64-bit pixel value pix */
321 321
 static inline void fill_64(uint8_t *dst, const uint64_t pix, int32_t n,
322 322
                            int32_t row_offset)
323 323
 {
... ...
@@ -234,7 +234,7 @@
234 234
 
235 235
 
236 236
 /**
237
- * Pack two delta values (a,b) into one 16bit word
237
+ * Pack two delta values (a,b) into one 16-bit word
238 238
  * according with endianness of the host machine.
239 239
  */
240 240
 #if HAVE_BIGENDIAN
... ...
@@ -281,7 +281,7 @@ static const int16_t delta_tab_3_5[79]  = { TAB_3_5 };
281 281
 #undef PD
282 282
 
283 283
 /**
284
- * Pack four delta values (a,a,b,b) into one 32bit word
284
+ * Pack four delta values (a,a,b,b) into one 32-bit word
285 285
  * according with endianness of the host machine.
286 286
  */
287 287
 #if HAVE_BIGENDIAN
... ...
@@ -43,8 +43,8 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
43 43
         return -1;      /* marker */
44 44
     }
45 45
     if (get_bits1(&s->gb) != 0) {
46
-        av_log(s->avctx, AV_LOG_ERROR, "Bad H263 id\n");
47
-        return -1;      /* h263 id */
46
+        av_log(s->avctx, AV_LOG_ERROR, "Bad H.263 id\n");
47
+        return -1;      /* H.263 id */
48 48
     }
49 49
     skip_bits1(&s->gb);         /* split screen off */
50 50
     skip_bits1(&s->gb);         /* camera  off */
... ...
@@ -52,7 +52,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
52 52
 
53 53
     format = get_bits(&s->gb, 3);
54 54
     if (format == 0 || format == 6) {
55
-        av_log(s->avctx, AV_LOG_ERROR, "Intel H263 free format not supported\n");
55
+        av_log(s->avctx, AV_LOG_ERROR, "Intel H.263 free format not supported\n");
56 56
         return -1;
57 57
     }
58 58
     s->h263_plus = 0;
... ...
@@ -77,7 +77,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
77 77
     } else {
78 78
         format = get_bits(&s->gb, 3);
79 79
         if(format == 0 || format == 7){
80
-            av_log(s->avctx, AV_LOG_ERROR, "Wrong Intel H263 format\n");
80
+            av_log(s->avctx, AV_LOG_ERROR, "Wrong Intel H.263 format\n");
81 81
             return -1;
82 82
         }
83 83
         if(get_bits(&s->gb, 2))
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Interplay MVE Video Decoder
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (C) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -215,7 +215,7 @@ static void x8_get_ac_rlf(IntraX8Context *const w, const int mode,
215 215
         int t, l;
216 216
         if (i < 0) {
217 217
             *level =
218
-            *final =      // prevent 'may be used unilitialized'
218
+            *final =      // prevent 'may be used uninitialized'
219 219
             *run   = 64;  // this would cause error exit in the ac loop
220 220
             return;
221 221
         }
... ...
@@ -249,12 +249,12 @@ static void x8_get_ac_rlf(IntraX8Context *const w, const int mode,
249 249
         sm = ac_decode_table[i];
250 250
 
251 251
         e    = get_bits(w->gb, sm & 0xF);
252
-        sm >>= 8;                               // 3bits
252
+        sm >>= 8;                               // 3 bits
253 253
         mask = sm & 0xff;
254
-        sm >>= 8;                               // 1bit
254
+        sm >>= 8;                               // 1 bit
255 255
 
256
-        *run   = (sm &  0xff) + (e &  mask);    // 6bits
257
-        *level = (sm >>    8) + (e & ~mask);    // 5bits
256
+        *run   = (sm &  0xff) + (e &  mask);    // 6 bits
257
+        *level = (sm >>    8) + (e & ~mask);    // 5 bits
258 258
         *final = i > (58 - 46);
259 259
     } else if (i < 75) { // [73-74]
260 260
         static const uint8_t crazy_mix_runlevel[32] = {
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2
- * ITU H263 bitstream decoder
2
+ * ITU H.263 bitstream decoder
3 3
  * Copyright (c) 2000,2001 Fabrice Bellard
4
- * H263+ support.
4
+ * H.263+ support.
5 5
  * Copyright (c) 2001 Juan J. Sierralta P
6 6
  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
7 7
  *
... ...
@@ -24,7 +24,7 @@
24 24
 
25 25
 /**
26 26
  * @file
27
- * h263 decoder.
27
+ * H.263 decoder.
28 28
  */
29 29
 
30 30
 #define UNCHECKED_BITSTREAM_READER 1
... ...
@@ -277,7 +277,7 @@ int ff_h263_decode_motion(MpegEncContext * s, int pred, int f_code)
277 277
     if (!s->h263_long_vectors) {
278 278
         val = sign_extend(val, 5 + f_code);
279 279
     } else {
280
-        /* horrible h263 long vector mode */
280
+        /* horrible H.263 long vector mode */
281 281
         if (pred < -31 && val < -63)
282 282
             val += 64;
283 283
         if (pred > 32 && val > 63)
... ...
@@ -872,7 +872,7 @@ end:
872 872
     return SLICE_OK;
873 873
 }
874 874
 
875
-/* most is hardcoded. should extend to handle all h263 streams */
875
+/* Most is hardcoded; should extend to handle all H.263 streams. */
876 876
 int ff_h263_decode_picture_header(MpegEncContext *s)
877 877
 {
878 878
     int format, width, height, i, ret;
... ...
@@ -908,8 +908,8 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
908 908
         return -1;
909 909
     }
910 910
     if (get_bits1(&s->gb) != 0) {
911
-        av_log(s->avctx, AV_LOG_ERROR, "Bad H263 id\n");
912
-        return -1;      /* h263 id */
911
+        av_log(s->avctx, AV_LOG_ERROR, "Bad H.263 id\n");
912
+        return -1;      /* H.263 id */
913 913
     }
914 914
     skip_bits1(&s->gb);         /* split screen off */
915 915
     skip_bits1(&s->gb);         /* camera  off */
... ...
@@ -936,7 +936,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
936 936
         s->h263_long_vectors = get_bits1(&s->gb);
937 937
 
938 938
         if (get_bits1(&s->gb) != 0) {
939
-            av_log(s->avctx, AV_LOG_ERROR, "H263 SAC not supported\n");
939
+            av_log(s->avctx, AV_LOG_ERROR, "H.263 SAC not supported\n");
940 940
             return -1; /* SAC: off */
941 941
         }
942 942
         s->obmc= get_bits1(&s->gb); /* Advanced prediction mode */
... ...
@@ -1029,7 +1029,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
1029 1029
                 height = get_bits(&s->gb, 9) * 4;
1030 1030
                 ff_dlog(s->avctx, "\nH.263+ Custom picture: %dx%d\n",width,height);
1031 1031
                 if (s->aspect_ratio_info == FF_ASPECT_EXTENDED) {
1032
-                    /* aspected dimensions */
1032
+                    /* expected dimensions */
1033 1033
                     s->avctx->sample_aspect_ratio.num= get_bits(&s->gb, 8);
1034 1034
                     s->avctx->sample_aspect_ratio.den= get_bits(&s->gb, 8);
1035 1035
                 }else{
... ...
@@ -1,7 +1,7 @@
1 1
 /*
2
- * ITU H263 bitstream encoder
2
+ * ITU H.263 bitstream encoder
3 3
  * Copyright (c) 2000,2001 Fabrice Bellard
4
- * H263+ support.
4
+ * H.263+ support.
5 5
  * Copyright (c) 2001 Juan J. Sierralta P
6 6
  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
7 7
  *
... ...
@@ -24,7 +24,7 @@
24 24
 
25 25
 /**
26 26
  * @file
27
- * h263 bitstream encoder.
27
+ * H.263 bitstream encoder.
28 28
  */
29 29
 
30 30
 #include <limits.h>
... ...
@@ -135,7 +135,7 @@ void ff_h263_encode_picture_header(MpegEncContext * s, int picture_number)
135 135
     put_sbits(&s->pb, 8, temp_ref); /* TemporalReference */
136 136
 
137 137
     put_bits(&s->pb, 1, 1);     /* marker */
138
-    put_bits(&s->pb, 1, 0);     /* h263 id */
138
+    put_bits(&s->pb, 1, 0);     /* H.263 id */
139 139
     put_bits(&s->pb, 1, 0);     /* split screen off */
140 140
     put_bits(&s->pb, 1, 0);     /* camera  off */
141 141
     put_bits(&s->pb, 1, 0);     /* freeze picture release off */
... ...
@@ -151,7 +151,7 @@ void ff_h263_encode_picture_header(MpegEncContext * s, int picture_number)
151 151
         put_bits(&s->pb, 1, 0);         /* Unrestricted Motion Vector: off */
152 152
         put_bits(&s->pb, 1, 0);         /* SAC: off */
153 153
         put_bits(&s->pb, 1, s->obmc);   /* Advanced Prediction */
154
-        put_bits(&s->pb, 1, 0);         /* only I/P frames, no PB frame */
154
+        put_bits(&s->pb, 1, 0);         /* only I/P-frames, no PB-frame */
155 155
         put_bits(&s->pb, 5, s->qscale);
156 156
         put_bits(&s->pb, 1, 0);         /* Continuous Presence Multipoint mode: off */
157 157
     } else {
... ...
@@ -262,7 +262,7 @@ void ff_h263_encode_gob_header(MpegEncContext * s, int mb_line)
262 262
 }
263 263
 
264 264
 /**
265
- * modify qscale so that encoding is actually possible in h263 (limit difference to -2..2)
265
+ * modify qscale so that encoding is actually possible in H.263 (limit difference to -2..2)
266 266
  */
267 267
 void ff_clean_h263_qscales(MpegEncContext *s){
268 268
     int i;
... ...
@@ -774,7 +774,7 @@ av_cold void ff_h263_encode_init(MpegEncContext *s)
774 774
 
775 775
         init_mv_penalty_and_fcode(s);
776 776
     }
777
-    s->me.mv_penalty= mv_penalty; //FIXME exact table for msmpeg4 & h263p
777
+    s->me.mv_penalty= mv_penalty; // FIXME exact table for MSMPEG4 & H.263+
778 778
 
779 779
     s->intra_ac_vlc_length     =s->inter_ac_vlc_length     = uni_h263_inter_rl_len;
780 780
     s->intra_ac_vlc_last_length=s->inter_ac_vlc_last_length= uni_h263_inter_rl_len + 128*64;
... ...
@@ -784,7 +784,7 @@ av_cold void ff_h263_encode_init(MpegEncContext *s)
784 784
     }
785 785
     s->ac_esc_length= 7+1+6+8;
786 786
 
787
-    // use fcodes >1 only for mpeg4 & h263 & h263p FIXME
787
+    // use fcodes >1 only for MPEG-4 & H.263 & H.263+ FIXME
788 788
     switch(s->codec_id){
789 789
     case AV_CODEC_ID_MPEG4:
790 790
         s->fcode_tab= fcode_tab;
... ...
@@ -800,7 +800,7 @@ av_cold void ff_h263_encode_init(MpegEncContext *s)
800 800
             s->max_qcoeff=  127;
801 801
         }
802 802
         break;
803
-        //Note for mpeg4 & h263 the dc-scale table will be set per frame as needed later
803
+        // Note for MPEG-4 & H.263 the dc-scale table will be set per frame as needed later
804 804
     case AV_CODEC_ID_FLV1:
805 805
         if (s->h263_flv > 1) {
806 806
             s->min_qcoeff= -1023;
... ...
@@ -22,7 +22,7 @@
22 22
 
23 23
 /**
24 24
  * @file
25
- * DSP functions (inverse transforms, motion compensation, wavelet recompostions)
25
+ * DSP functions (inverse transforms, motion compensation, wavelet recompositions)
26 26
  * for Indeo Video Interactive codecs.
27 27
  */
28 28
 
... ...
@@ -22,7 +22,7 @@
22 22
 
23 23
 /**
24 24
  * @file
25
- * DSP functions (inverse transforms, motion compensations, wavelet recompostion)
25
+ * DSP functions (inverse transforms, motion compensations, wavelet recomposition)
26 26
  * for Indeo Video Interactive codecs.
27 27
  */
28 28
 
... ...
@@ -249,7 +249,7 @@ static void init_band_stepsize(AVCodecContext *avctx,
249 249
 
250 250
     band->i_stepsize = band->f_stepsize * (1 << 15);
251 251
 
252
-    /* FIXME: In openjepg code stespize = stepsize * 0.5. Why?
252
+    /* FIXME: In OpenJPEG code stepsize = stepsize * 0.5. Why?
253 253
      * If not set output of entropic decoder is not correct. */
254 254
     if (!av_codec_is_encoder(avctx->codec))
255 255
         band->f_stepsize *= 0.5;
... ...
@@ -386,7 +386,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
386 386
     av_freep(&state);
387 387
 
388 388
     /* the specification says that after doing 0xff escaping unused bits in
389
-     * the last byte must be set to 0, so just append 7 "optional" zero-bits
389
+     * the last byte must be set to 0, so just append 7 "optional" zero bits
390 390
      * to avoid special-casing. */
391 391
     put_bits(&pb2, 7, 0);
392 392
     size = put_bits_count(&pb2);
... ...
@@ -59,11 +59,11 @@ typedef struct LagarithContext {
59 59
 } LagarithContext;
60 60
 
61 61
 /**
62
- * Compute the 52bit mantissa of 1/(double)denom.
62
+ * Compute the 52-bit mantissa of 1/(double)denom.
63 63
  * This crazy format uses floats in an entropy coder and we have to match x86
64 64
  * rounding exactly, thus ordinary floats aren't portable enough.
65 65
  * @param denom denominator
66
- * @return 52bit mantissa
66
+ * @return 52-bit mantissa
67 67
  * @see softfloat_mul
68 68
  */
69 69
 static uint64_t softfloat_reciprocal(uint32_t denom)
... ...
@@ -80,9 +80,9 @@ static uint64_t softfloat_reciprocal(uint32_t denom)
80 80
 /**
81 81
  * (uint32_t)(x*f), where f has the given mantissa, and exponent 0
82 82
  * Used in combination with softfloat_reciprocal computes x/(double)denom.
83
- * @param x 32bit integer factor
83
+ * @param x 32-bit integer factor
84 84
  * @param mantissa mantissa of f with exponent 0
85
- * @return 32bit integer value (x*f)
85
+ * @return 32-bit integer value (x*f)
86 86
  * @see softfloat_reciprocal
87 87
  */
88 88
 static uint32_t softfloat_mul(uint32_t x, uint64_t mantissa)
... ...
@@ -234,7 +234,7 @@ static void add_lag_median_prediction(uint8_t *dst, uint8_t *src1,
234 234
                                       int *left_top)
235 235
 {
236 236
     /* This is almost identical to add_hfyu_median_pred in huffyuvdsp.h.
237
-     * However the &0xFF on the gradient predictor yealds incorrect output
237
+     * However the &0xFF on the gradient predictor yields incorrect output
238 238
      * for lagarith.
239 239
      */
240 240
     int i;
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * AMR Audio decoder stub
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -151,7 +151,7 @@ typedef struct AMR_bitrates {
151 151
 /* Match desired bitrate */
152 152
 static int get_bitrate_mode(int bitrate, void *log_ctx)
153 153
 {
154
-    /* make the correspondance between bitrate and mode */
154
+    /* make the correspondence between bitrate and mode */
155 155
     static const AMR_bitrates rates[] = {
156 156
         { 4750, MR475 }, { 5150, MR515 }, {  5900, MR59  }, {  6700, MR67  },
157 157
         { 7400, MR74 },  { 7950, MR795 }, { 10200, MR102 }, { 12200, MR122 }
... ...
@@ -79,7 +79,7 @@ static av_cold int libopus_decode_init(AVCodecContext *avc)
79 79
         const uint8_t *vorbis_offset = ff_vorbis_channel_layout_offsets[avc->channels - 1];
80 80
         int ch;
81 81
 
82
-        /* Remap channels from vorbis order to ffmpeg order */
82
+        /* Remap channels from Vorbis order to ffmpeg order */
83 83
         for (ch = 0; ch < avc->channels; ch++)
84 84
             mapping_arr[ch] = mapping[vorbis_offset[ch]];
85 85
         mapping = mapping_arr;
... ...
@@ -354,7 +354,7 @@ static int libschroedinger_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
354 354
                 p_frame_output->key_frame = 1;
355 355
 
356 356
             /* Parse the coded frame number from the bitstream. Bytes 14
357
-             * through 17 represesent the frame number. */
357
+             * through 17 represent the frame number. */
358 358
             p_frame_output->frame_num = AV_RB32(enc_buf->data + 13);
359 359
 
360 360
             ff_schro_queue_push_back(&p_schro_params->enc_frame_queue,
... ...
@@ -216,7 +216,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
216 216
     if (s->vad)
217 217
         speex_encoder_ctl(s->enc_state, SPEEX_SET_VAD, &s->vad);
218 218
 
219
-    /* Activiting Discontinuous Transmission */
219
+    /* Activating Discontinuous Transmission */
220 220
     if (s->dtx) {
221 221
         speex_encoder_ctl(s->enc_state, SPEEX_SET_DTX, &s->dtx);
222 222
         if (!(s->abr || s->vad || s->header.vbr))
... ...
@@ -253,7 +253,7 @@ static av_cold int encode_init(AVCodecContext* avc_context)
253 253
         Output first header packet consisting of theora
254 254
         header, comment, and tables.
255 255
 
256
-        Each one is prefixed with a 16bit size, then they
256
+        Each one is prefixed with a 16-bit size, then they
257 257
         are concatenated together into libavcodec's extradata.
258 258
     */
259 259
     offset = 0;
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * AMR Audio encoder stub
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -51,7 +51,7 @@ static const AVClass amrwb_class = {
51 51
 
52 52
 static int get_wb_bitrate_mode(int bitrate, void *log_ctx)
53 53
 {
54
-    /* make the correspondance between bitrate and mode */
54
+    /* make the correspondence between bitrate and mode */
55 55
     static const int rates[] = {  6600,  8850, 12650, 14250, 15850, 18250,
56 56
                                  19850, 23050, 23850 };
57 57
     int i, best = -1, min_diff = 0;
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Interface to xvidcore for mpeg4 encoding
2
+ * Interface to xvidcore for MPEG-4 encoding
3 3
  * Copyright (c) 2004 Adam Thayer <krevnik@comcast.net>
4 4
  *
5 5
  * This file is part of FFmpeg.
... ...
@@ -84,7 +84,7 @@ struct xvid_context {
84 84
     int ssim_acc;                  /**< SSIM accuracy. 0: accurate. 4: fast. */
85 85
     int gmc;
86 86
     int me_quality;                /**< Motion estimation quality. 0: fast 6: best. */
87
-    int mpeg_quant;                /**< Quantization type. 0: H263, 1: MPEG */
87
+    int mpeg_quant;                /**< Quantization type. 0: H.263, 1: MPEG */
88 88
 };
89 89
 
90 90
 /**
... ...
@@ -145,7 +145,7 @@ static int xvid_ff_2pass_create(xvid_plg_create_t *param, void **handle)
145 145
  * Destroy the two-pass plugin context.
146 146
  *
147 147
  * @param ref Context pointer for the plugin
148
- * @param param Destrooy context
148
+ * @param param Destroy context
149 149
  * @return Returns 0, success guaranteed
150 150
  */
151 151
 static int xvid_ff_2pass_destroy(struct xvid_context *ref,
... ...
@@ -691,7 +691,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
691 691
     avctx->extradata      = NULL;
692 692
     avctx->extradata_size = 0;
693 693
     if (xvid_flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
694
-        /* In this case, we are claiming to be MPEG4 */
694
+        /* In this case, we are claiming to be MPEG-4 */
695 695
         x->quicktime_format = 1;
696 696
         avctx->codec_id     = AV_CODEC_ID_MPEG4;
697 697
     } else {
... ...
@@ -34,7 +34,7 @@ void ff_acelp_reorder_lsf(int16_t* lsfq, int lsfq_min_distance, int lsfq_min, in
34 34
 {
35 35
     int i, j;
36 36
 
37
-    /* sort lsfq in ascending order. float bubble agorithm,
37
+    /* sort lsfq in ascending order. float bubble algorithm,
38 38
        O(n) if data already sorted, O(n^2) - otherwise */
39 39
     for(i=0; i<lp_order-1; i++)
40 40
         for(j=i; j>=0 && lsfq[j] > lsfq[j+1]; j--)
... ...
@@ -102,7 +102,7 @@ void ff_acelp_lp_decode(int16_t* lp_1st, int16_t* lp_2nd, const int16_t* lsp_2nd
102 102
  * @param lp_half_order half the number of the amount of LPCs to be
103 103
  *        reconstructed, need to be smaller or equal to MAX_LP_HALF_ORDER
104 104
  *
105
- * @note buffers should have a minimux size of 2*lp_half_order elements.
105
+ * @note buffers should have a minimum size of 2*lp_half_order elements.
106 106
  *
107 107
  * TIA/EIA/IS-733 2.4.3.3.5
108 108
  */
... ...
@@ -190,7 +190,7 @@ int ff_mjpeg_decode_dqt(MJpegDecodeContext *s)
190 190
             s->quant_matrixes[index][i] = get_bits(&s->gb, pr ? 16 : 8);
191 191
         }
192 192
 
193
-        // XXX FIXME finetune, and perhaps add dc too
193
+        // XXX FIXME fine-tune, and perhaps add dc too
194 194
         s->qscale[index] = FFMAX(s->quant_matrixes[index][1],
195 195
                                  s->quant_matrixes[index][8]) >> 1;
196 196
         av_log(s->avctx, AV_LOG_DEBUG, "qscale[%d]: %d\n",
... ...
@@ -40,7 +40,7 @@
40 40
 #include "put_bits.h"
41 41
 
42 42
 typedef struct MJpegContext {
43
-    uint8_t huff_size_dc_luminance[12]; //FIXME use array [3] instead of lumi / chrom, for easier addressing
43
+    uint8_t huff_size_dc_luminance[12]; //FIXME use array [3] instead of lumi / chroma, for easier addressing
44 44
     uint16_t huff_code_dc_luminance[12];
45 45
     uint8_t huff_size_dc_chrominance[12];
46 46
     uint16_t huff_code_dc_chrominance[12];
... ...
@@ -42,9 +42,9 @@ typedef struct MLPHeaderInfo
42 42
 
43 43
     int channel_arrangement;
44 44
 
45
-    int channel_modifier_thd_stream0;       ///< Channel modifier for substream 0 of TrueHD sreams ("2-channel presentation")
46
-    int channel_modifier_thd_stream1;       ///< Channel modifier for substream 1 of TrueHD sreams ("6-channel presentation")
47
-    int channel_modifier_thd_stream2;       ///< Channel modifier for substream 2 of TrueHD sreams ("8-channel presentation")
45
+    int channel_modifier_thd_stream0;       ///< Channel modifier for substream 0 of TrueHD streams ("2-channel presentation")
46
+    int channel_modifier_thd_stream1;       ///< Channel modifier for substream 1 of TrueHD streams ("6-channel presentation")
47
+    int channel_modifier_thd_stream2;       ///< Channel modifier for substream 2 of TrueHD streams ("8-channel presentation")
48 48
 
49 49
     int channels_mlp;                       ///< Channel count for MLP streams
50 50
     int channels_thd_stream1;               ///< Channel count for substream 1 of TrueHD streams ("6-channel presentation")
... ...
@@ -205,7 +205,7 @@ static av_always_inline int cmp_inline(MpegEncContext *s, const int x, const int
205 205
                     cx= (cx>>1)|(cx&1);
206 206
                     cy= (cy>>1)|(cy&1);
207 207
                     uvdxy= (cx&1) + 2*(cy&1);
208
-                    //FIXME x/y wrong, but mpeg4 qpel is sick anyway, we should drop as much of it as possible in favor for h264
208
+                    // FIXME x/y wrong, but MPEG-4 qpel is sick anyway, we should drop as much of it as possible in favor for H.264
209 209
                 }
210 210
             }else{
211 211
                 c->hpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride, h);
... ...
@@ -556,7 +556,7 @@ static inline void get_limits(MpegEncContext *s, int x, int y)
556 556
         c->xmax = - x + s->width;
557 557
         c->ymax = - y + s->height;
558 558
     } else if (s->out_format == FMT_H261){
559
-        // Search range of H261 is different from other codec standards
559
+        // Search range of H.261 is different from other codec standards
560 560
         c->xmin = (x > 15) ? - 15 : 0;
561 561
         c->ymin = (y > 15) ? - 15 : 0;
562 562
         c->xmax = (x < s->mb_width * 16 - 16) ? 15 : 0;
... ...
@@ -966,7 +966,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s,
966 966
             if (s->out_format == FMT_H263) {
967 967
                 c->pred_x = P_MEDIAN[0];
968 968
                 c->pred_y = P_MEDIAN[1];
969
-            } else { /* mpeg1 at least */
969
+            } else { /* MPEG-1 at least */
970 970
                 c->pred_x = P_LEFT[0];
971 971
                 c->pred_y = P_LEFT[1];
972 972
             }
... ...
@@ -1536,7 +1536,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s,
1536 1536
         dmin= direct_search(s, mb_x, mb_y);
1537 1537
     else
1538 1538
         dmin= INT_MAX;
1539
-//FIXME penalty stuff for non mpeg4
1539
+// FIXME penalty stuff for non-MPEG-4
1540 1540
     c->skip=0;
1541 1541
     fmin = estimate_motion_b(s, mb_x, mb_y, s->b_forw_mv_table, 0, s->f_code) +
1542 1542
            3 * penalty_factor;
... ...
@@ -429,7 +429,7 @@ static av_always_inline int small_diamond_search(MpegEncContext * s, int *best,
429 429
     { /* ensure that the best point is in the MAP as h/qpel refinement needs it */
430 430
         const unsigned key = ((unsigned)best[1]<<ME_MAP_MV_BITS) + best[0] + map_generation;
431 431
         const int index= (((unsigned)best[1]<<ME_MAP_SHIFT) + best[0])&(ME_MAP_SIZE-1);
432
-        if(map[index]!=key){ //this will be executed only very rarey
432
+        if (map[index] != key) { // this will be executed only very rarely
433 433
             score_map[index]= cmp(s, best[0], best[1], 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);
434 434
             map[index]= key;
435 435
         }
... ...
@@ -758,7 +758,7 @@ static int sab_diamond_search(MpegEncContext * s, int *best, int dmin,
758 758
     if(   best[0] < xmax && best[0] > xmin
759 759
        && best[1] < ymax && best[1] > ymin){
760 760
         int d;
761
-        //ensure that the refernece samples for hpel refinement are in the map
761
+        // ensure that the reference samples for hpel refinement are in the map
762 762
         CHECK_MV(best[0]-1, best[1])
763 763
         CHECK_MV(best[0]+1, best[1])
764 764
         CHECK_MV(best[0], best[1]-1)
... ...
@@ -871,7 +871,7 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int
871 871
     unsigned map_generation;
872 872
     int penalty_factor;
873 873
     const int ref_mv_stride= s->mb_stride; //pass as arg  FIXME
874
-    const int ref_mv_xy= s->mb_x + s->mb_y*ref_mv_stride; //add to last_mv beforepassing FIXME
874
+    const int ref_mv_xy = s->mb_x + s->mb_y * ref_mv_stride; // add to last_mv before passing FIXME
875 875
     me_cmp_func cmpf, chroma_cmpf;
876 876
 
877 877
     LOAD_COMMON
... ...
@@ -972,7 +972,7 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int
972 972
     return dmin;
973 973
 }
974 974
 
975
-//this function is dedicated to the braindamaged gcc
975
+//this function is dedicated to the brain damaged gcc
976 976
 int ff_epzs_motion_search(MpegEncContext *s, int *mx_ptr, int *my_ptr,
977 977
                           int P[10][2], int src_index, int ref_index,
978 978
                           int16_t (*last_mv)[2], int ref_mv_scale,
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Generate a header file for hardcoded motionpixels RGB to YUV table
2
+ * Generate a header file for hardcoded motion pixels RGB to YUV table
3 3
  *
4 4
  * Copyright (c) 2009 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
5 5
  *
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Header file for hardcoded motionpixels RGB to YUV table
2
+ * Header file for hardcoded motion pixels RGB to YUV table
3 3
  *
4 4
  * Copyright (c) 2009 Reimar Döffinger <Reimar.Doeffinger@gmx.de>
5 5
  *
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG1/2 common code
2
+ * MPEG-1/2 common code
3 3
  * Copyright (c) 2007 Aurelien Jacobs <aurel@gnuage.org>
4 4
  *
5 5
  * This file is part of FFmpeg.
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG1/2 tables
2
+ * MPEG-1/2 tables
3 3
  * copyright (c) 2000,2001 Fabrice Bellard
4 4
  * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 5
  *
... ...
@@ -22,7 +22,7 @@
22 22
 
23 23
 /**
24 24
  * @file
25
- * MPEG1/2 tables.
25
+ * MPEG-1/2 tables.
26 26
  */
27 27
 
28 28
 #include "mpeg12data.h"
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG1/2 tables
2
+ * MPEG-1/2 tables
3 3
  * copyright (c) 2000,2001 Fabrice Bellard
4 4
  * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 5
  *
... ...
@@ -22,7 +22,7 @@
22 22
 
23 23
 /**
24 24
  * @file
25
- * MPEG1/2 tables.
25
+ * MPEG-1/2 tables.
26 26
  */
27 27
 
28 28
 #ifndef AVCODEC_MPEG12DATA_H
... ...
@@ -708,7 +708,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
708 708
         if (get_bits1(&s->gb) == 0) {
709 709
             if (get_bits1(&s->gb) == 0) {
710 710
                 av_log(s->avctx, AV_LOG_ERROR,
711
-                       "invalid mb type in I Frame at %d %d\n",
711
+                       "Invalid mb type in I-frame at %d %d\n",
712 712
                        s->mb_x, s->mb_y);
713 713
                 return AVERROR_INVALIDDATA;
714 714
             }
... ...
@@ -721,7 +721,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
721 721
         mb_type = get_vlc2(&s->gb, ff_mb_ptype_vlc.table, MB_PTYPE_VLC_BITS, 1);
722 722
         if (mb_type < 0) {
723 723
             av_log(s->avctx, AV_LOG_ERROR,
724
-                   "invalid mb type in P Frame at %d %d\n", s->mb_x, s->mb_y);
724
+                   "Invalid mb type in P-frame at %d %d\n", s->mb_x, s->mb_y);
725 725
             return AVERROR_INVALIDDATA;
726 726
         }
727 727
         mb_type = ptype2mb_type[mb_type];
... ...
@@ -730,7 +730,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
730 730
         mb_type = get_vlc2(&s->gb, ff_mb_btype_vlc.table, MB_BTYPE_VLC_BITS, 1);
731 731
         if (mb_type < 0) {
732 732
             av_log(s->avctx, AV_LOG_ERROR,
733
-                   "invalid mb type in B Frame at %d %d\n", s->mb_x, s->mb_y);
733
+                   "Invalid mb type in B-frame at %d %d\n", s->mb_x, s->mb_y);
734 734
             return AVERROR_INVALIDDATA;
735 735
         }
736 736
         mb_type = btype2mb_type[mb_type];
... ...
@@ -1958,7 +1958,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y,
1958 1958
                 int i;
1959 1959
                 if (s->pict_type == AV_PICTURE_TYPE_I) {
1960 1960
                     av_log(s->avctx, AV_LOG_ERROR,
1961
-                           "skipped MB in I frame at %d %d\n", s->mb_x, s->mb_y);
1961
+                           "skipped MB in I-frame at %d %d\n", s->mb_x, s->mb_y);
1962 1962
                     return AVERROR_INVALIDDATA;
1963 1963
                 }
1964 1964
 
... ...
@@ -2266,7 +2266,7 @@ static int mpeg_decode_a53_cc(AVCodecContext *avctx,
2266 2266
         int cc_count = 0;
2267 2267
         int i;
2268 2268
         // There is a caption count field in the data, but it is often
2269
-        // incorect.  So count the number of captions present.
2269
+        // incorrect.  So count the number of captions present.
2270 2270
         for (i = 5; i + 6 <= buf_size && ((p[i] & 0xfe) == 0xfe); i += 6)
2271 2271
             cc_count++;
2272 2272
         // Transform the DVD format into A53 Part 4 format
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG1/2 encoder
2
+ * MPEG-1/2 encoder
3 3
  * Copyright (c) 2000,2001 Fabrice Bellard
4 4
  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 5
  *
... ...
@@ -22,7 +22,7 @@
22 22
 
23 23
 /**
24 24
  * @file
25
- * MPEG1/2 encoder
25
+ * MPEG-1/2 encoder
26 26
  */
27 27
 
28 28
 #include <stdint.h>
... ...
@@ -144,12 +144,12 @@ static av_cold int encode_init(AVCodecContext *avctx)
144 144
 
145 145
     if (find_frame_rate_index(s) < 0) {
146 146
         if (s->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
147
-            av_log(avctx, AV_LOG_ERROR, "MPEG1/2 does not support %d/%d fps\n",
147
+            av_log(avctx, AV_LOG_ERROR, "MPEG-1/2 does not support %d/%d fps\n",
148 148
                    avctx->time_base.den, avctx->time_base.num);
149 149
             return -1;
150 150
         } else {
151 151
             av_log(avctx, AV_LOG_INFO,
152
-                   "MPEG1/2 does not support %d/%d fps, there may be AV sync issues\n",
152
+                   "MPEG-1/2 does not support %d/%d fps, there may be AV sync issues\n",
153 153
                    avctx->time_base.den, avctx->time_base.num);
154 154
         }
155 155
     }
... ...
@@ -249,7 +249,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s)
249 249
     if (s->current_picture.f->key_frame) {
250 250
         AVRational framerate = ff_mpeg12_frame_rate_tab[s->frame_rate_index];
251 251
 
252
-        /* mpeg1 header repeated every gop */
252
+        /* MPEG-1 header repeated every GOP */
253 253
         put_header(s, SEQ_START_CODE);
254 254
 
255 255
         put_sbits(&s->pb, 12, s->width  & 0xFFF);
... ...
@@ -423,7 +423,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number)
423 423
     AVFrameSideData *side_data;
424 424
     mpeg1_encode_sequence_header(s);
425 425
 
426
-    /* mpeg1 picture header */
426
+    /* MPEG-1 picture header */
427 427
     put_header(s, PICTURE_START_CODE);
428 428
     /* temporal reference */
429 429
 
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG1/2 VLC
2
+ * MPEG-1/2 VLC
3 3
  * copyright (c) 2000,2001 Fabrice Bellard
4 4
  * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 5
  *
... ...
@@ -22,7 +22,7 @@
22 22
 
23 23
 /**
24 24
  * @file
25
- * MPEG1/2 VLC.
25
+ * MPEG-1/2 VLC.
26 26
  */
27 27
 
28 28
 #ifndef AVCODEC_MPEG12VLC_H
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * copyright (c) 2000,2001 Fabrice Bellard
3
- * H263+ support
3
+ * H.263+ support
4 4
  * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 5
  *
6 6
  * This file is part of FFmpeg.
... ...
@@ -22,7 +22,7 @@
22 22
 
23 23
 /**
24 24
  * @file
25
- * mpeg4 tables.
25
+ * MPEG-4 tables.
26 26
  */
27 27
 
28 28
 #ifndef AVCODEC_MPEG4DATA_H
... ...
@@ -31,7 +31,7 @@
31 31
 #include <stdint.h>
32 32
 #include "mpegvideo.h"
33 33
 
34
-/* dc encoding for mpeg4 */
34
+/* dc encoding for MPEG-4 */
35 35
 const uint8_t ff_mpeg4_DCtab_lum[13][2] =
36 36
 {
37 37
     {3,3}, {3,2}, {2,2}, {2,3}, {1,3}, {1,4}, {1,5}, {1,6}, {1,7},
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG4 decoder / encoder common code.
2
+ * MPEG-4 decoder / encoder common code
3 3
  * Copyright (c) 2000,2001 Fabrice Bellard
4 4
  * Copyright (c) 2002-2010 Michael Niedermayer <michaelni@gmx.at>
5 5
  *
... ...
@@ -57,7 +57,7 @@ void ff_mpeg4_clean_buffers(MpegEncContext *s)
57 57
     memset(s->ac_val[2] + c_xy, 0, (c_wrap     + 1) * 16 * sizeof(int16_t));
58 58
 
59 59
     /* clean MV */
60
-    // we can't clear the MVs as they might be needed by a b frame
60
+    // we can't clear the MVs as they might be needed by a B-frame
61 61
     s->last_mv[0][0][0] =
62 62
     s->last_mv[0][0][1] =
63 63
     s->last_mv[1][0][0] =
... ...
@@ -67,7 +67,7 @@ void ff_mpeg4_clean_buffers(MpegEncContext *s)
67 67
 #define tab_size ((signed)FF_ARRAY_ELEMS(s->direct_scale_mv[0]))
68 68
 #define tab_bias (tab_size / 2)
69 69
 
70
-// used by mpeg4 and rv10 decoder
70
+// used by MPEG-4 and rv10 decoder
71 71
 void ff_mpeg4_init_direct_mv(MpegEncContext *s)
72 72
 {
73 73
     int i;
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG4 encoder/decoder internal header.
2
+ * MPEG-4 encoder/decoder internal header.
3 3
  * Copyright (c) 2000,2001 Fabrice Bellard
4 4
  * Copyright (c) 2002-2010 Michael Niedermayer <michaelni@gmx.at>
5 5
  *
... ...
@@ -107,7 +107,7 @@ typedef struct Mpeg4DecContext {
107 107
     int cplx_estimation_trash_b;
108 108
 } Mpeg4DecContext;
109 109
 
110
-/* dc encoding for mpeg4 */
110
+/* dc encoding for MPEG-4 */
111 111
 extern const uint8_t ff_mpeg4_DCtab_lum[13][2];
112 112
 extern const uint8_t ff_mpeg4_DCtab_chrom[13][2];
113 113
 
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG4 Video frame extraction
2
+ * MPEG-4 video frame extraction
3 3
  * Copyright (c) 2003 Fabrice Bellard
4 4
  * Copyright (c) 2003 Michael Niedermayer
5 5
  *
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG4 video parser prototypes
2
+ * MPEG-4 video parser prototypes
3 3
  * Copyright (c) 2003 Fabrice Bellard
4 4
  * Copyright (c) 2003 Michael Niedermayer
5 5
  *
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG4 decoder.
2
+ * MPEG-4 decoder
3 3
  * Copyright (c) 2000,2001 Fabrice Bellard
4 4
  * Copyright (c) 2002-2010 Michael Niedermayer <michaelni@gmx.at>
5 5
  *
... ...
@@ -212,7 +212,7 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g
212 212
     while ((1 << alpha) < w)
213 213
         alpha++;
214 214
     while ((1 << beta) < h)
215
-        beta++;  /* typo in the mpeg4 std for the definition of w' and h' */
215
+        beta++;  /* typo in the MPEG-4 std for the definition of w' and h' */
216 216
     w2 = 1 << alpha;
217 217
     h2 = 1 << beta;
218 218
 
... ...
@@ -235,7 +235,7 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g
235 235
     /* sprite_ref[3][0] = (a >> 1) * (2 * vop_ref[3][0] + d[0][0] + d[1][0] + d[2][0] + d[3][0]);
236 236
      * sprite_ref[3][1] = (a >> 1) * (2 * vop_ref[3][1] + d[0][1] + d[1][1] + d[2][1] + d[3][1]); */
237 237
 
238
-    /* this is mostly identical to the mpeg4 std (and is totally unreadable
238
+    /* This is mostly identical to the MPEG-4 std (and is totally unreadable
239 239
      * because of that...). Perhaps it should be reordered to be more readable.
240 240
      * The idea behind this virtual_ref mess is to be able to use shifts later
241 241
      * per pixel instead of divides so the distance between points is converted
... ...
@@ -1459,7 +1459,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64])
1459 1459
             ff_thread_await_progress(&s->next_picture_ptr->tf, s->mb_y, 0);
1460 1460
         }
1461 1461
 
1462
-        /* if we skipped it in the future P Frame than skip it now too */
1462
+        /* if we skipped it in the future P-frame than skip it now too */
1463 1463
         s->mb_skipped = s->next_picture.mbskip_table[s->mb_y * s->mb_stride + s->mb_x];  // Note, skiptab=0 if last was GMC
1464 1464
 
1465 1465
         if (s->mb_skipped) {
... ...
@@ -1753,7 +1753,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
1753 1753
         }
1754 1754
     } else {
1755 1755
         /* is setting low delay flag only once the smartest thing to do?
1756
-         * low delay detection won't be overridden. */
1756
+         * low delay detection will not be overridden. */
1757 1757
         if (s->picture_number == 0) {
1758 1758
             switch(s->vo_type) {
1759 1759
             case SIMPLE_VO_TYPE:
... ...
@@ -1819,7 +1819,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
1819 1819
         s->interlaced_dct        = 0;
1820 1820
         if (!get_bits1(gb) && (s->avctx->debug & FF_DEBUG_PICT_INFO))
1821 1821
             av_log(s->avctx, AV_LOG_INFO,           /* OBMC Disable */
1822
-                   "MPEG4 OBMC not supported (very likely buggy encoder)\n");
1822
+                   "MPEG-4 OBMC not supported (very likely buggy encoder)\n");
1823 1823
         if (vo_ver_id == 1)
1824 1824
             ctx->vol_sprite_usage = get_bits1(gb);    /* vol_sprite_usage */
1825 1825
         else
... ...
@@ -1962,7 +1962,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
1962 1962
                     ctx->cplx_estimation_trash_i += 8 * get_bits1(gb);  /* intra_cae */
1963 1963
                     ctx->cplx_estimation_trash_i += 8 * get_bits1(gb);  /* inter_cae */
1964 1964
                     ctx->cplx_estimation_trash_i += 8 * get_bits1(gb);  /* no_update */
1965
-                    ctx->cplx_estimation_trash_i += 8 * get_bits1(gb);  /* upampling */
1965
+                    ctx->cplx_estimation_trash_i += 8 * get_bits1(gb);  /* upsampling */
1966 1966
                 }
1967 1967
                 if (!get_bits1(gb)) {
1968 1968
                     ctx->cplx_estimation_trash_i += 8 * get_bits1(gb);  /* intra_blocks */
... ...
@@ -2314,7 +2314,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
2314 2314
         if (s->pp_time <= s->pb_time ||
2315 2315
             s->pp_time <= s->pp_time - s->pb_time ||
2316 2316
             s->pp_time <= 0) {
2317
-            /* messed up order, maybe after seeking? skipping current b-frame */
2317
+            /* messed up order, maybe after seeking? skipping current B-frame */
2318 2318
             return FRAME_SKIPPED;
2319 2319
         }
2320 2320
         ff_mpeg4_init_direct_mv(s);
... ...
@@ -2428,7 +2428,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
2428 2428
         s->chroma_qscale = s->qscale = get_bits(gb, s->quant_precision);
2429 2429
         if (s->qscale == 0) {
2430 2430
             av_log(s->avctx, AV_LOG_ERROR,
2431
-                   "Error, header damaged or not MPEG4 header (qscale=0)\n");
2431
+                   "Error, header damaged or not MPEG-4 header (qscale=0)\n");
2432 2432
             return AVERROR_INVALIDDATA;  // makes no sense to continue, as there is nothing left from the image then
2433 2433
         }
2434 2434
 
... ...
@@ -2436,7 +2436,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
2436 2436
             s->f_code = get_bits(gb, 3);        /* fcode_for */
2437 2437
             if (s->f_code == 0) {
2438 2438
                 av_log(s->avctx, AV_LOG_ERROR,
2439
-                       "Error, header damaged or not MPEG4 header (f_code=0)\n");
2439
+                       "Error, header damaged or not MPEG-4 header (f_code=0)\n");
2440 2440
                 s->f_code = 1;
2441 2441
                 return AVERROR_INVALIDDATA;  // makes no sense to continue, as there is nothing left from the image then
2442 2442
             }
... ...
@@ -2486,7 +2486,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
2486 2486
         }
2487 2487
     }
2488 2488
     /* detect buggy encoders which don't set the low_delay flag
2489
-     * (divx4/xvid/opendivx). Note we cannot detect divx5 without b-frames
2489
+     * (divx4/xvid/opendivx). Note we cannot detect divx5 without B-frames
2490 2490
      * easily (although it's buggy too) */
2491 2491
     if (s->vo_type == 0 && ctx->vol_control_parameters == 0 &&
2492 2492
         ctx->divx_version == -1 && s->picture_number == 0) {
... ...
@@ -2509,7 +2509,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
2509 2509
 }
2510 2510
 
2511 2511
 /**
2512
- * Decode mpeg4 headers.
2512
+ * Decode MPEG-4 headers.
2513 2513
  * @return <0 if no VOP found (or a damaged one)
2514 2514
  *         FRAME_SKIPPED if a not coded VOP is found
2515 2515
  *         0 if a VOP is found
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG4 encoder.
2
+ * MPEG-4 encoder
3 3
  * Copyright (c) 2000,2001 Fabrice Bellard
4 4
  * Copyright (c) 2002-2010 Michael Niedermayer <michaelni@gmx.at>
5 5
  *
... ...
@@ -29,7 +29,7 @@
29 29
 #include "mpeg4video.h"
30 30
 
31 31
 /* The uni_DCtab_* tables below contain unified bits+length tables to encode DC
32
- * differences in mpeg4. Unified in the sense that the specification specifies
32
+ * differences in MPEG-4. Unified in the sense that the specification specifies
33 33
  * this encoding in several steps. */
34 34
 static uint8_t  uni_DCtab_lum_len[512];
35 35
 static uint8_t  uni_DCtab_chrom_len[512];
... ...
@@ -47,7 +47,7 @@ static uint8_t  uni_mpeg4_inter_rl_len[64 * 64 * 2 * 2];
47 47
 //#define UNI_MPEG4_ENC_INDEX(last, run, level) ((last) * 128 * 64 + (run) + (level) * 64)
48 48
 #define UNI_MPEG4_ENC_INDEX(last, run, level) ((last) * 128 * 64 + (run) * 128 + (level))
49 49
 
50
-/* mpeg4
50
+/* MPEG-4
51 51
  * inter
52 52
  * max level: 24/6
53 53
  * max run: 53/63
... ...
@@ -120,7 +120,7 @@ static inline void restore_ac_coeffs(MpegEncContext *s, int16_t block[6][64],
120 120
 }
121 121
 
122 122
 /**
123
- * Return the optimal value (0 or 1) for the ac_pred element for the given MB in mpeg4.
123
+ * Return the optimal value (0 or 1) for the ac_pred element for the given MB in MPEG-4.
124 124
  * This function will also update s->block_last_index and s->ac_val.
125 125
  * @param[in,out] block MB coefficients, these will be updated if 1 is returned
126 126
  * @param[in] dir ac prediction direction for each 8x8 block
... ...
@@ -208,7 +208,7 @@ static inline int decide_ac_pred(MpegEncContext *s, int16_t block[6][64],
208 208
 }
209 209
 
210 210
 /**
211
- * modify mb_type & qscale so that encoding is actually possible in mpeg4
211
+ * modify mb_type & qscale so that encoding is actually possible in MPEG-4
212 212
  */
213 213
 void ff_clean_mpeg4_qscales(MpegEncContext *s)
214 214
 {
... ...
@@ -220,7 +220,7 @@ void ff_clean_mpeg4_qscales(MpegEncContext *s)
220 220
     if (s->pict_type == AV_PICTURE_TYPE_B) {
221 221
         int odd = 0;
222 222
         /* ok, come on, this isn't funny anymore, there's more code for
223
-         * handling this mpeg4 mess than for the actual adaptive quantization */
223
+         * handling this MPEG-4 mess than for the actual adaptive quantization */
224 224
 
225 225
         for (i = 0; i < s->mb_num; i++) {
226 226
             int mb_xy = s->mb_index2xy[i];
... ...
@@ -318,7 +318,7 @@ static inline void mpeg4_encode_block(MpegEncContext *s,
318 318
     const int last_index = s->block_last_index[n];
319 319
 
320 320
     if (s->mb_intra) {  // Note gcc (3.2.1 at least) will optimize this away
321
-        /* mpeg4 based DC predictor */
321
+        /* MPEG-4 based DC predictor */
322 322
         mpeg4_encode_dc(dc_pb, intra_dc, n);
323 323
         if (last_index < 1)
324 324
             return;
... ...
@@ -378,7 +378,7 @@ static int mpeg4_get_block_length(MpegEncContext *s,
378 378
     int len = 0;
379 379
 
380 380
     if (s->mb_intra) {  // Note gcc (3.2.1 at least) will optimize this away
381
-        /* mpeg4 based DC predictor */
381
+        /* MPEG-4 based DC predictor */
382 382
         len += mpeg4_get_dc_length(intra_dc, n);
383 383
         if (last_index < 1)
384 384
             return len;
... ...
@@ -529,7 +529,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
529 529
             av_assert2((s->dquant & 1) == 0);
530 530
             av_assert2(mb_type >= 0);
531 531
 
532
-            /* nothing to do if this MB was skipped in the next P Frame */
532
+            /* nothing to do if this MB was skipped in the next P-frame */
533 533
             if (s->next_picture.mbskip_table[s->mb_y * s->mb_stride + s->mb_x]) {  // FIXME avoid DCT & ...
534 534
                 s->skip_count++;
535 535
                 s->mv[0][0][0] =
... ...
@@ -659,7 +659,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
659 659
 
660 660
             if ((cbp | motion_x | motion_y | s->dquant) == 0 &&
661 661
                 s->mv_type == MV_TYPE_16X16) {
662
-                /* check if the B frames can skip it too, as we must skip it
662
+                /* Check if the B-frames can skip it too, as we must skip it
663 663
                  * if we skip here why didn't they just compress
664 664
                  * the skip-mb bits instead of reusing them ?! */
665 665
                 if (s->max_b_frames > 0) {
... ...
@@ -886,7 +886,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
886 886
 }
887 887
 
888 888
 /**
889
- * add mpeg4 stuffing bits (01...1)
889
+ * add MPEG-4 stuffing bits (01...1)
890 890
  */
891 891
 void ff_mpeg4_stuffing(PutBitContext *pbc)
892 892
 {
... ...
@@ -1054,7 +1054,7 @@ static void mpeg4_encode_vol_header(MpegEncContext *s,
1054 1054
         put_bits(&s->pb, 2, 0);       /* sprite enable */
1055 1055
 
1056 1056
     put_bits(&s->pb, 1, 0);             /* not 8 bit == false */
1057
-    put_bits(&s->pb, 1, s->mpeg_quant); /* quant type= (0=h263 style)*/
1057
+    put_bits(&s->pb, 1, s->mpeg_quant); /* quant type = (0 = H.263 style) */
1058 1058
 
1059 1059
     if (s->mpeg_quant) {
1060 1060
         ff_write_quant_matrix(&s->pb, s->avctx->intra_matrix);
... ...
@@ -1085,7 +1085,7 @@ static void mpeg4_encode_vol_header(MpegEncContext *s,
1085 1085
     }
1086 1086
 }
1087 1087
 
1088
-/* write mpeg4 VOP header */
1088
+/* write MPEG-4 VOP header */
1089 1089
 int ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number)
1090 1090
 {
1091 1091
     uint64_t time_incr;
... ...
@@ -1429,7 +1429,7 @@ static int mp_decode_layer3(MPADecodeContext *s)
1429 1429
                 uint8_t *sc;
1430 1430
                 int slen, slen1, slen2;
1431 1431
 
1432
-                /* MPEG1 scale factors */
1432
+                /* MPEG-1 scale factors */
1433 1433
                 slen1 = slen_table[0][g->scalefac_compress];
1434 1434
                 slen2 = slen_table[1][g->scalefac_compress];
1435 1435
                 ff_dlog(s->avctx, "slen1=%d slen2=%d\n", slen1, slen2);
... ...
@@ -52,7 +52,7 @@ typedef struct MPADecodeHeader {
52 52
    that the frame size must be computed externally */
53 53
 int avpriv_mpegaudio_decode_header(MPADecodeHeader *s, uint32_t header);
54 54
 
55
-/* useful helper to get mpeg audio stream infos. Return -1 if error in
55
+/* useful helper to get MPEG audio stream info. Return -1 if error in
56 56
    header, otherwise the coded frame size in bytes */
57 57
 int ff_mpa_decode_header(uint32_t head, int *sample_rate,
58 58
                          int *channels, int *frame_size, int *bitrate, enum AVCodecID *codec_id);
... ...
@@ -599,7 +599,7 @@ static void compute_bit_allocation(MpegAudioContext *s,
599 599
 }
600 600
 
601 601
 /*
602
- * Output the mpeg audio layer 2 frame. Note how the code is small
602
+ * Output the MPEG audio layer 2 frame. Note how the code is small
603 603
  * compared to other encoders :-)
604 604
  */
605 605
 static void encode_frame(MpegAudioContext *s,
... ...
@@ -614,7 +614,7 @@ static void encode_frame(MpegAudioContext *s,
614 614
     /* header */
615 615
 
616 616
     put_bits(p, 12, 0xfff);
617
-    put_bits(p, 1, 1 - s->lsf); /* 1 = mpeg1 ID, 0 = mpeg2 lsf ID */
617
+    put_bits(p, 1, 1 - s->lsf); /* 1 = MPEG-1 ID, 0 = MPEG-2 lsf ID */
618 618
     put_bits(p, 2, 4-2);  /* layer 2 */
619 619
     put_bits(p, 1, 1); /* no error protection */
620 620
     put_bits(p, 4, s->bitrate_index);
... ...
@@ -71,8 +71,8 @@ int ff_mpeg_framesize_alloc(AVCodecContext *avctx, MotionEstContext *me,
71 71
     }
72 72
 
73 73
     // edge emu needs blocksize + filter length - 1
74
-    // (= 17x17 for  halfpel / 21x21 for  h264)
75
-    // VC1 computes luma and chroma simultaneously and needs 19X19 + 9x9
74
+    // (= 17x17 for  halfpel / 21x21 for H.264)
75
+    // VC-1 computes luma and chroma simultaneously and needs 19X19 + 9x9
76 76
     // at uvlinesize. It supports only YUV420 so 24x24 is enough
77 77
     // linesize * interlaced * MBsize
78 78
     // we also use this buffer for encoding in encode_mb_internal() needig an additional 32 lines
... ...
@@ -59,7 +59,7 @@ static void dct_unquantize_mpeg1_intra_c(MpegEncContext *s,
59 59
     nCoeffs= s->block_last_index[n];
60 60
 
61 61
     block[0] *= n < 4 ? s->y_dc_scale : s->c_dc_scale;
62
-    /* XXX: only mpeg1 */
62
+    /* XXX: only MPEG-1 */
63 63
     quant_matrix = s->intra_matrix;
64 64
     for(i=1;i<=nCoeffs;i++) {
65 65
         int j= s->intra_scantable.permutated[i];
... ...
@@ -567,7 +567,7 @@ do {\
567 567
     s->workaround_bugs      = s1->workaround_bugs;
568 568
     s->padding_bug_score    = s1->padding_bug_score;
569 569
 
570
-    // MPEG4 timing info
570
+    // MPEG-4 timing info
571 571
     memcpy(&s->last_time_base, &s1->last_time_base,
572 572
            (char *) &s1->pb_field_time + sizeof(s1->pb_field_time) -
573 573
            (char *) &s1->last_time_base);
... ...
@@ -598,7 +598,7 @@ do {\
598 598
                AV_INPUT_BUFFER_PADDING_SIZE);
599 599
     }
600 600
 
601
-    // linesize dependend scratch buffer allocation
601
+    // linesize-dependent scratch buffer allocation
602 602
     if (!s->sc.edge_emu_buffer)
603 603
         if (s1->linesize) {
604 604
             if (ff_mpeg_framesize_alloc(s->avctx, &s->me,
... ...
@@ -612,7 +612,7 @@ do {\
612 612
                    "be allocated due to unknown size.\n");
613 613
         }
614 614
 
615
-    // MPEG2/interlacing info
615
+    // MPEG-2/interlacing info
616 616
     memcpy(&s->progressive_sequence, &s1->progressive_sequence,
617 617
            (char *) &s1->rtp_mode - (char *) &s1->progressive_sequence);
618 618
 
... ...
@@ -705,7 +705,8 @@ static int init_context_frame(MpegEncContext *s)
705 705
     if (s->mb_height & 1)
706 706
         yc_size += 2*s->b8_stride + 2*s->mb_stride;
707 707
 
708
-    FF_ALLOCZ_OR_GOTO(s->avctx, s->mb_index2xy, (s->mb_num + 1) * sizeof(int), fail); // error ressilience code looks cleaner with this
708
+    FF_ALLOCZ_OR_GOTO(s->avctx, s->mb_index2xy, (s->mb_num + 1) * sizeof(int),
709
+                      fail); // error resilience code looks cleaner with this
709 710
     for (y = 0; y < s->mb_height; y++)
710 711
         for (x = 0; x < s->mb_width; x++)
711 712
             s->mb_index2xy[x + y * s->mb_width] = x + y * s->mb_stride;
... ...
@@ -787,7 +788,7 @@ static int init_context_frame(MpegEncContext *s)
787 787
 
788 788
     /* init macroblock skip table */
789 789
     FF_ALLOCZ_OR_GOTO(s->avctx, s->mbskip_table, mb_array_size + 2, fail);
790
-    // Note the + 1 is for a quicker mpeg4 slice_end detection
790
+    // Note the + 1 is for a quicker MPEG-4 slice_end detection
791 791
 
792 792
     return ff_mpeg_er_init(s);
793 793
 fail:
... ...
@@ -1204,7 +1205,7 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
1204 1204
     }
1205 1205
 
1206 1206
     /* release forgotten pictures */
1207
-    /* if (mpeg124/h263) */
1207
+    /* if (MPEG-124 / H.263) */
1208 1208
     for (i = 0; i < MAX_PICTURE_COUNT; i++) {
1209 1209
         if (&s->picture[i] != s->last_picture_ptr &&
1210 1210
             &s->picture[i] != s->next_picture_ptr &&
... ...
@@ -1396,8 +1397,8 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
1396 1396
     }
1397 1397
 
1398 1398
     /* set dequantizer, we can't do it during init as
1399
-     * it might change for mpeg4 and we can't do it in the header
1400
-     * decode as init is not called for mpeg4 there yet */
1399
+     * it might change for MPEG-4 and we can't do it in the header
1400
+     * decode as init is not called for MPEG-4 there yet */
1401 1401
     if (s->mpeg_quant || s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
1402 1402
         s->dct_unquantize_intra = s->dct_unquantize_mpeg2_intra;
1403 1403
         s->dct_unquantize_inter = s->dct_unquantize_mpeg2_inter;
... ...
@@ -81,16 +81,16 @@ typedef struct MpegEncContext {
81 81
     int y_dc_scale, c_dc_scale;
82 82
     int ac_pred;
83 83
     int block_last_index[12];  ///< last non zero coefficient in block
84
-    int h263_aic;              ///< Advanded INTRA Coding (AIC)
84
+    int h263_aic;              ///< Advanced INTRA Coding (AIC)
85 85
 
86 86
     /* scantables */
87
-    ScanTable inter_scantable; ///< if inter == intra then intra should be used to reduce tha cache usage
87
+    ScanTable inter_scantable; ///< if inter == intra then intra should be used to reduce the cache usage
88 88
     ScanTable intra_scantable;
89 89
     ScanTable intra_h_scantable;
90 90
     ScanTable intra_v_scantable;
91 91
 
92 92
     /* WARNING: changes above this line require updates to hardcoded
93
-     *          offsets used in asm. */
93
+     *          offsets used in ASM. */
94 94
 
95 95
     struct AVCodecContext *avctx;
96 96
     /* the following parameters must be initialized before encoding */
... ...
@@ -99,20 +99,20 @@ typedef struct MpegEncContext {
99 99
     int intra_only;   ///< if true, only intra pictures are generated
100 100
     int64_t bit_rate; ///< wanted bit rate
101 101
     enum OutputFormat out_format; ///< output format
102
-    int h263_pred;    ///< use mpeg4/h263 ac/dc predictions
103
-    int pb_frame;     ///< PB frame mode (0 = none, 1 = base, 2 = improved)
102
+    int h263_pred;    ///< use MPEG-4/H.263 ac/dc predictions
103
+    int pb_frame;     ///< PB-frame mode (0 = none, 1 = base, 2 = improved)
104 104
 
105 105
 /* the following codec id fields are deprecated in favor of codec_id */
106
-    int h263_plus;    ///< h263 plus headers
107
-    int h263_flv;     ///< use flv h263 header
106
+    int h263_plus;    ///< H.263+ headers
107
+    int h263_flv;     ///< use flv H.263 header
108 108
 
109 109
     enum AVCodecID codec_id;     /* see AV_CODEC_ID_xxx */
110 110
     int fixed_qscale; ///< fixed qscale if non zero
111 111
     int encoding;     ///< true if we are encoding (vs decoding)
112
-    int max_b_frames; ///< max number of b-frames for encoding
112
+    int max_b_frames; ///< max number of B-frames for encoding
113 113
     int luma_elim_threshold;
114 114
     int chroma_elim_threshold;
115
-    int strict_std_compliance; ///< strictly follow the std (MPEG4, ...)
115
+    int strict_std_compliance; ///< strictly follow the std (MPEG-4, ...)
116 116
     int workaround_bugs;       ///< workaround bugs in encoders which cannot be detected automatically
117 117
     int codec_tag;             ///< internal codec_tag upper case converted from avctx codec_tag
118 118
     /* the following fields are managed internally by the encoder */
... ...
@@ -132,7 +132,7 @@ typedef struct MpegEncContext {
132 132
     ptrdiff_t uvlinesize;      ///< line size, for chroma in bytes, may be different from width
133 133
     Picture *picture;          ///< main picture buffer
134 134
     Picture **input_picture;   ///< next pictures on display order for encoding
135
-    Picture **reordered_input_picture; ///< pointer to the next pictures in codedorder for encoding
135
+    Picture **reordered_input_picture; ///< pointer to the next pictures in coded order for encoding
136 136
 
137 137
     int64_t user_specified_pts; ///< last non-zero pts from AVFrame which was passed into avcodec_encode_video2()
138 138
     /**
... ...
@@ -179,19 +179,19 @@ typedef struct MpegEncContext {
179 179
     Picture *last_picture_ptr;     ///< pointer to the previous picture.
180 180
     Picture *next_picture_ptr;     ///< pointer to the next picture (for bidir pred)
181 181
     Picture *current_picture_ptr;  ///< pointer to the current picture
182
-    int last_dc[3];                ///< last DC values for MPEG1
182
+    int last_dc[3];                ///< last DC values for MPEG-1
183 183
     int16_t *dc_val_base;
184
-    int16_t *dc_val[3];            ///< used for mpeg4 DC prediction, all 3 arrays must be continuous
184
+    int16_t *dc_val[3];            ///< used for MPEG-4 DC prediction, all 3 arrays must be continuous
185 185
     const uint8_t *y_dc_scale_table;     ///< qscale -> y_dc_scale table
186 186
     const uint8_t *c_dc_scale_table;     ///< qscale -> c_dc_scale table
187
-    const uint8_t *chroma_qscale_table;  ///< qscale -> chroma_qscale (h263)
187
+    const uint8_t *chroma_qscale_table;  ///< qscale -> chroma_qscale (H.263)
188 188
     uint8_t *coded_block_base;
189 189
     uint8_t *coded_block;          ///< used for coded block pattern prediction (msmpeg4v3, wmv1)
190 190
     int16_t (*ac_val_base)[16];
191
-    int16_t (*ac_val[3])[16];      ///< used for mpeg4 AC prediction, all 3 arrays must be continuous
191
+    int16_t (*ac_val[3])[16];      ///< used for MPEG-4 AC prediction, all 3 arrays must be continuous
192 192
     int mb_skipped;                ///< MUST BE SET only during DECODING
193 193
     uint8_t *mbskip_table;        /**< used to avoid copy if macroblock skipped (for black regions for example)
194
-                                   and used for b-frame encoding & decoding (contains skip table of next P Frame) */
194
+                                   and used for B-frame encoding & decoding (contains skip table of next P-frame) */
195 195
     uint8_t *mbintra_table;       ///< used to avoid setting {ac, dc, cbp}-pred stuff to zero on inter MB decoding
196 196
     uint8_t *cbp_table;           ///< used to store cbp, ac_pred for partitioned decoding
197 197
     uint8_t *pred_dir_table;      ///< used to store pred_dir for partitioned decoding
... ...
@@ -200,7 +200,7 @@ typedef struct MpegEncContext {
200 200
 
201 201
     int qscale;                 ///< QP
202 202
     int chroma_qscale;          ///< chroma QP
203
-    unsigned int lambda;        ///< lagrange multipler used in rate distortion
203
+    unsigned int lambda;        ///< Lagrange multiplier used in rate distortion
204 204
     unsigned int lambda2;       ///< (lambda*lambda) >> FF_LAMBDA_SHIFT
205 205
     int *lambda_table;
206 206
     int adaptive_quant;         ///< use adaptive quantization
... ...
@@ -209,7 +209,7 @@ typedef struct MpegEncContext {
209 209
     int pict_type;              ///< AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
210 210
     int vbv_delay;
211 211
     int last_pict_type; //FIXME removes
212
-    int last_non_b_pict_type;   ///< used for mpeg4 gmc b-frames & ratecontrol
212
+    int last_non_b_pict_type;   ///< used for MPEG-4 gmc B-frames & ratecontrol
213 213
     int droppable;
214 214
     int frame_rate_index;
215 215
     AVRational mpeg2_frame_rate_ext;
... ...
@@ -218,7 +218,7 @@ typedef struct MpegEncContext {
218 218
 
219 219
     /* motion compensation */
220 220
     int unrestricted_mv;        ///< mv can point outside of the coded picture
221
-    int h263_long_vectors;      ///< use horrible h263v1 long vector mode
221
+    int h263_long_vectors;      ///< use horrible H.263v1 long vector mode
222 222
 
223 223
     BlockDSPContext bdsp;
224 224
     FDCTDSPContext fdsp;
... ...
@@ -233,7 +233,7 @@ typedef struct MpegEncContext {
233 233
     VideoDSPContext vdsp;
234 234
     H263DSPContext h263dsp;
235 235
     int f_code;                 ///< forward MV resolution
236
-    int b_code;                 ///< backward MV resolution for B Frames (mpeg4)
236
+    int b_code;                 ///< backward MV resolution for B-frames (MPEG-4)
237 237
     int16_t (*p_mv_table_base)[2];
238 238
     int16_t (*b_forw_mv_table_base)[2];
239 239
     int16_t (*b_back_mv_table_base)[2];
... ...
@@ -242,14 +242,14 @@ typedef struct MpegEncContext {
242 242
     int16_t (*b_direct_mv_table_base)[2];
243 243
     int16_t (*p_field_mv_table_base[2][2])[2];
244 244
     int16_t (*b_field_mv_table_base[2][2][2])[2];
245
-    int16_t (*p_mv_table)[2];            ///< MV table (1MV per MB) p-frame encoding
246
-    int16_t (*b_forw_mv_table)[2];       ///< MV table (1MV per MB) forward mode b-frame encoding
247
-    int16_t (*b_back_mv_table)[2];       ///< MV table (1MV per MB) backward mode b-frame encoding
248
-    int16_t (*b_bidir_forw_mv_table)[2]; ///< MV table (1MV per MB) bidir mode b-frame encoding
249
-    int16_t (*b_bidir_back_mv_table)[2]; ///< MV table (1MV per MB) bidir mode b-frame encoding
250
-    int16_t (*b_direct_mv_table)[2];     ///< MV table (1MV per MB) direct mode b-frame encoding
251
-    int16_t (*p_field_mv_table[2][2])[2];   ///< MV table (2MV per MB) interlaced p-frame encoding
252
-    int16_t (*b_field_mv_table[2][2][2])[2];///< MV table (4MV per MB) interlaced b-frame encoding
245
+    int16_t (*p_mv_table)[2];            ///< MV table (1MV per MB) P-frame encoding
246
+    int16_t (*b_forw_mv_table)[2];       ///< MV table (1MV per MB) forward mode B-frame encoding
247
+    int16_t (*b_back_mv_table)[2];       ///< MV table (1MV per MB) backward mode B-frame encoding
248
+    int16_t (*b_bidir_forw_mv_table)[2]; ///< MV table (1MV per MB) bidir mode B-frame encoding
249
+    int16_t (*b_bidir_back_mv_table)[2]; ///< MV table (1MV per MB) bidir mode B-frame encoding
250
+    int16_t (*b_direct_mv_table)[2];     ///< MV table (1MV per MB) direct mode B-frame encoding
251
+    int16_t (*p_field_mv_table[2][2])[2];   ///< MV table (2MV per MB) interlaced P-frame encoding
252
+    int16_t (*b_field_mv_table[2][2][2])[2];///< MV table (4MV per MB) interlaced B-frame encoding
253 253
     uint8_t (*p_field_select_table[2]);
254 254
     uint8_t (*b_field_select_table[2][2]);
255 255
 #if FF_API_MOTION_EST
... ...
@@ -261,10 +261,10 @@ typedef struct MpegEncContext {
261 261
     int mv_dir;
262 262
 #define MV_DIR_FORWARD   1
263 263
 #define MV_DIR_BACKWARD  2
264
-#define MV_DIRECT        4 ///< bidirectional mode where the difference equals the MV of the last P/S/I-Frame (mpeg4)
264
+#define MV_DIRECT        4 ///< bidirectional mode where the difference equals the MV of the last P/S/I-Frame (MPEG-4)
265 265
     int mv_type;
266 266
 #define MV_TYPE_16X16       0   ///< 1 vector for the whole mb
267
-#define MV_TYPE_8X8         1   ///< 4 vectors (h263, mpeg4 4MV)
267
+#define MV_TYPE_8X8         1   ///< 4 vectors (H.263, MPEG-4 4MV)
268 268
 #define MV_TYPE_16X8        2   ///< 2 vectors, one per 16x8 block
269 269
 #define MV_TYPE_FIELD       3   ///< 2 vectors, one per field
270 270
 #define MV_TYPE_DMV         4   ///< 2 vectors, special mpeg2 Dual Prime Vectors
... ...
@@ -275,14 +275,14 @@ typedef struct MpegEncContext {
275 275
     */
276 276
     int mv[2][4][2];
277 277
     int field_select[2][2];
278
-    int last_mv[2][2][2];             ///< last MV, used for MV prediction in MPEG1 & B-frame MPEG4
278
+    int last_mv[2][2][2];             ///< last MV, used for MV prediction in MPEG-1 & B-frame MPEG-4
279 279
     uint8_t *fcode_tab;               ///< smallest fcode needed for each MV
280 280
     int16_t direct_scale_mv[2][64];   ///< precomputed to avoid divisions in ff_mpeg4_set_direct_mv
281 281
 
282 282
     MotionEstContext me;
283 283
 
284
-    int no_rounding;  /**< apply no rounding to motion compensation (MPEG4, msmpeg4, ...)
285
-                        for b-frames rounding mode is always 0 */
284
+    int no_rounding;  /**< apply no rounding to motion compensation (MPEG-4, msmpeg4, ...)
285
+                        for B-frames rounding mode is always 0 */
286 286
 
287 287
     /* macroblock layer */
288 288
     int mb_x, mb_y;
... ...
@@ -357,7 +357,7 @@ typedef struct MpegEncContext {
357 357
     int resync_mb_y;                 ///< y position of last resync marker
358 358
     GetBitContext last_resync_gb;    ///< used to search for the next resync marker
359 359
     int mb_num_left;                 ///< number of MBs left in this video packet (for partitioned Slices only)
360
-    int next_p_frame_damaged;        ///< set if the next p frame is damaged, to avoid showing trashed b frames
360
+    int next_p_frame_damaged;        ///< set if the next p frame is damaged, to avoid showing trashed B-frames
361 361
 
362 362
     ParseContext parse_context;
363 363
 
... ...
@@ -372,7 +372,7 @@ typedef struct MpegEncContext {
372 372
     int rc_strategy;
373 373
 
374 374
     /* H.263+ specific */
375
-    int umvplus;                    ///< == H263+ && unrestricted_mv
375
+    int umvplus;                    ///< == H.263+ && unrestricted_mv
376 376
     int h263_aic_dir;               ///< AIC direction: 0 = left, 1 = top
377 377
     int h263_slice_structured;
378 378
     int alt_inter_vlc;              ///< alternative inter vlc
... ...
@@ -380,7 +380,7 @@ typedef struct MpegEncContext {
380 380
     int loop_filter;
381 381
     int custom_pcf;
382 382
 
383
-    /* mpeg4 specific */
383
+    /* MPEG-4 specific */
384 384
     ///< number of bits to represent the fractional part of time (encoder only)
385 385
     int time_increment_bits;
386 386
     int last_time_base;
... ...
@@ -401,12 +401,12 @@ typedef struct MpegEncContext {
401 401
     int sprite_warping_accuracy;
402 402
     int data_partitioning;           ///< data partitioning flag from header
403 403
     int partitioned_frame;           ///< is current frame partitioned
404
-    int low_delay;                   ///< no reordering needed / has no b-frames
404
+    int low_delay;                   ///< no reordering needed / has no B-frames
405 405
     int vo_type;
406 406
     PutBitContext tex_pb;            ///< used for data partitioned VOPs
407 407
     PutBitContext pb2;               ///< used for data partitioned VOPs
408 408
     int mpeg_quant;
409
-    int padding_bug_score;             ///< used to detect the VERY common padding bug in MPEG4
409
+    int padding_bug_score;             ///< used to detect the VERY common padding bug in MPEG-4
410 410
 
411 411
     /* divx specific, used to workaround (many) bugs in divx5 */
412 412
     int divx_packed;
... ...
@@ -430,7 +430,7 @@ typedef struct MpegEncContext {
430 430
     int dc_table_index;
431 431
     int use_skip_mb_code;
432 432
     int slice_height;      ///< in macroblocks
433
-    int first_slice_line;  ///< used in mpeg4 too to handle resync markers
433
+    int first_slice_line;  ///< used in MPEG-4 too to handle resync markers
434 434
     int flipflop_rounding;
435 435
     int msmpeg4_version;   ///< 0=not msmpeg4, 1=mp41, 2=mp42, 3=mp43/divx3 4=wmv1/7 5=wmv2/8
436 436
     int per_mb_rl_table;
... ...
@@ -444,9 +444,9 @@ typedef struct MpegEncContext {
444 444
     /* decompression specific */
445 445
     GetBitContext gb;
446 446
 
447
-    /* Mpeg1 specific */
448
-    int gop_picture_number;  ///< index of the first picture of a GOP based on fake_pic_num & mpeg1 specific
449
-    int last_mv_dir;         ///< last mv_dir, used for b frame encoding
447
+    /* MPEG-1 specific */
448
+    int gop_picture_number;  ///< index of the first picture of a GOP based on fake_pic_num & MPEG-1 specific
449
+    int last_mv_dir;         ///< last mv_dir, used for B-frame encoding
450 450
     uint8_t *vbv_delay_ptr;  ///< pointer to vbv_delay in the bitstream
451 451
 
452 452
     /* MPEG-2-specific - I wished not to have to support this mess. */
... ...
@@ -514,9 +514,9 @@ typedef struct MpegEncContext {
514 514
                            int16_t *block/*align 16*/, int n, int qscale);
515 515
     void (*dct_unquantize_h263_inter)(struct MpegEncContext *s,
516 516
                            int16_t *block/*align 16*/, int n, int qscale);
517
-    void (*dct_unquantize_intra)(struct MpegEncContext *s, // unquantizer to use (mpeg4 can use both)
517
+    void (*dct_unquantize_intra)(struct MpegEncContext *s, // unquantizer to use (MPEG-4 can use both)
518 518
                            int16_t *block/*align 16*/, int n, int qscale);
519
-    void (*dct_unquantize_inter)(struct MpegEncContext *s, // unquantizer to use (mpeg4 can use both)
519
+    void (*dct_unquantize_inter)(struct MpegEncContext *s, // unquantizer to use (MPEG-4 can use both)
520 520
                            int16_t *block/*align 16*/, int n, int qscale);
521 521
     int (*dct_quantize)(struct MpegEncContext *s, int16_t *block/*align 16*/, int n, int qscale, int *overflow);
522 522
     int (*fast_dct_quantize)(struct MpegEncContext *s, int16_t *block/*align 16*/, int n, int qscale, int *overflow);
... ...
@@ -538,7 +538,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
538 538
         s->codec_id != AV_CODEC_ID_MPEG4      &&
539 539
         s->codec_id != AV_CODEC_ID_MPEG1VIDEO &&
540 540
         s->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
541
-        av_log(avctx, AV_LOG_ERROR, "b frames not supported by codec\n");
541
+        av_log(avctx, AV_LOG_ERROR, "B-frames not supported by codec\n");
542 542
         return -1;
543 543
     }
544 544
     if (s->max_b_frames < 0) {
... ...
@@ -664,7 +664,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
664 664
         }
665 665
         if (s->max_b_frames != 0) {
666 666
             av_log(avctx, AV_LOG_ERROR,
667
-                   "b frames cannot be used with low delay\n");
667
+                   "B-frames cannot be used with low delay\n");
668 668
             return -1;
669 669
         }
670 670
     }
... ...
@@ -1005,7 +1005,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
1005 1005
             s->intra_matrix[j] =
1006 1006
             s->inter_matrix[j] = ff_mpeg1_default_non_intra_matrix[i];
1007 1007
         } else {
1008
-            /* mpeg1/2 */
1008
+            /* MPEG-1/2 */
1009 1009
             s->chroma_intra_matrix[j] =
1010 1010
             s->intra_matrix[j] = ff_mpeg1_default_intra_matrix[i];
1011 1011
             s->inter_matrix[j] = ff_mpeg1_default_non_intra_matrix[i];
... ...
@@ -1327,7 +1327,7 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
1327 1327
             return ret;
1328 1328
 
1329 1329
         pic->f->display_picture_number = display_picture_number;
1330
-        pic->f->pts = pts; // we set this here to avoid modifiying pic_arg
1330
+        pic->f->pts = pts; // we set this here to avoid modifying pic_arg
1331 1331
     } else {
1332 1332
         /* Flushing: When we have not received enough input frames,
1333 1333
          * ensure s->input_picture[0] contains the first picture */
... ...
@@ -1537,7 +1537,7 @@ static int select_input_picture(MpegEncContext *s)
1537 1537
             if (s->picture_in_gop_number < s->gop_size &&
1538 1538
                 s->next_picture_ptr &&
1539 1539
                 skip_check(s, s->input_picture[0], s->next_picture_ptr)) {
1540
-                // FIXME check that te gop check above is +-1 correct
1540
+                // FIXME check that the gop check above is +-1 correct
1541 1541
                 av_frame_unref(s->input_picture[0]->f);
1542 1542
 
1543 1543
                 ff_vbv_update(s, 0);
... ...
@@ -1613,7 +1613,7 @@ static int select_input_picture(MpegEncContext *s)
1613 1613
             if (s->input_picture[b_frames]->f->pict_type == AV_PICTURE_TYPE_B &&
1614 1614
                 b_frames == s->max_b_frames) {
1615 1615
                 av_log(s->avctx, AV_LOG_ERROR,
1616
-                       "warning, too many b frames in a row\n");
1616
+                       "warning, too many B-frames in a row\n");
1617 1617
             }
1618 1618
 
1619 1619
             if (s->picture_in_gop_number + b_frames >= s->gop_size) {
... ...
@@ -1657,7 +1657,7 @@ no_output_pic:
1657 1657
             return ret;
1658 1658
 
1659 1659
         if (s->reordered_input_picture[0]->shared || s->avctx->rc_buffer_size) {
1660
-            // input is a shared pix, so we can't modifiy it -> alloc a new
1660
+            // input is a shared pix, so we can't modify it -> allocate a new
1661 1661
             // one & ensure that the shared one is reuseable
1662 1662
 
1663 1663
             Picture *pic;
... ...
@@ -2008,7 +2008,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
2008 2008
             s->frame_bits  = put_bits_count(&s->pb);
2009 2009
         }
2010 2010
 
2011
-        /* update mpeg1/2 vbv_delay for CBR */
2011
+        /* update MPEG-1/2 vbv_delay for CBR */
2012 2012
         if (s->avctx->rc_max_rate                          &&
2013 2013
             s->avctx->rc_min_rate == s->avctx->rc_max_rate &&
2014 2014
             s->out_format == FMT_MPEG1                     &&
... ...
@@ -2606,7 +2606,7 @@ static inline void copy_context_before_encode(MpegEncContext *d, MpegEncContext
2606 2606
 
2607 2607
     memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster than a loop?
2608 2608
 
2609
-    /* mpeg1 */
2609
+    /* MPEG-1 */
2610 2610
     d->mb_skip_run= s->mb_skip_run;
2611 2611
     for(i=0; i<3; i++)
2612 2612
         d->last_dc[i] = s->last_dc[i];
... ...
@@ -2635,7 +2635,7 @@ static inline void copy_context_after_encode(MpegEncContext *d, MpegEncContext *
2635 2635
     memcpy(d->mv, s->mv, 2*4*2*sizeof(int));
2636 2636
     memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster than a loop?
2637 2637
 
2638
-    /* mpeg1 */
2638
+    /* MPEG-1 */
2639 2639
     d->mb_skip_run= s->mb_skip_run;
2640 2640
     for(i=0; i<3; i++)
2641 2641
         d->last_dc[i] = s->last_dc[i];
... ...
@@ -3526,7 +3526,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
3526 3526
                 ff_mpv_decode_mb(s, s->block);
3527 3527
             }
3528 3528
 
3529
-            /* clean the MV table in IPS frames for direct mode in B frames */
3529
+            /* clean the MV table in IPS frames for direct mode in B-frames */
3530 3530
             if(s->mb_intra /* && I,P,S_TYPE */){
3531 3531
                 s->p_mv_table[xy][0]=0;
3532 3532
                 s->p_mv_table[xy][1]=0;
... ...
@@ -3682,7 +3682,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
3682 3682
     s->me.mb_var_sum_temp    =
3683 3683
     s->me.mc_mb_var_sum_temp = 0;
3684 3684
 
3685
-    /* we need to initialize some time vars before we can encode b-frames */
3685
+    /* we need to initialize some time vars before we can encode B-frames */
3686 3686
     // RAL: Condition added for MPEG1VIDEO
3687 3687
     if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO || s->codec_id == AV_CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->msmpeg4_version))
3688 3688
         set_frame_distances(s);
... ...
@@ -4120,7 +4120,7 @@ static int dct_quantize_trellis_c(MpegEncContext *s,
4120 4120
             } else if(s->out_format == FMT_MJPEG) {
4121 4121
                 j = s->idsp.idct_permutation[scantable[i]];
4122 4122
                 unquant_coeff = alevel * matrix[j] * 8;
4123
-            }else{ //MPEG1
4123
+            }else{ // MPEG-1
4124 4124
                 j = s->idsp.idct_permutation[scantable[i]]; // FIXME: optimize
4125 4125
                 if(s->mb_intra){
4126 4126
                         unquant_coeff = (int)(  alevel  * mpeg2_qscale * matrix[j]) >> 4;
... ...
@@ -4190,7 +4190,7 @@ static int dct_quantize_trellis_c(MpegEncContext *s,
4190 4190
 
4191 4191
         score_tab[i+1]= best_score;
4192 4192
 
4193
-        //Note: there is a vlc code in mpeg4 which is 1 bit shorter then another one with a shorter run and the same level
4193
+        // Note: there is a vlc code in MPEG-4 which is 1 bit shorter then another one with a shorter run and the same level
4194 4194
         if(last_non_zero <= 27){
4195 4195
             for(; survivor_count; survivor_count--){
4196 4196
                 if(score_tab[ survivor[survivor_count-1] ] <= best_score)
... ...
@@ -4210,7 +4210,8 @@ static int dct_quantize_trellis_c(MpegEncContext *s,
4210 4210
         last_score= 256*256*256*120;
4211 4211
         for(i= survivor[0]; i<=last_non_zero + 1; i++){
4212 4212
             int score= score_tab[i];
4213
-            if(i) score += lambda*2; //FIXME exacter?
4213
+            if (i)
4214
+                score += lambda * 2; // FIXME more exact?
4214 4215
 
4215 4216
             if(score < last_score){
4216 4217
                 last_score= score;
... ...
@@ -4241,7 +4242,7 @@ static int dct_quantize_trellis_c(MpegEncContext *s,
4241 4241
 
4242 4242
             if(s->out_format == FMT_H263 || s->out_format == FMT_H261){
4243 4243
                     unquant_coeff= (alevel*qmul + qadd)>>3;
4244
-            }else{ //MPEG1
4244
+            } else{ // MPEG-1
4245 4245
                     unquant_coeff = (((  alevel  << 1) + 1) * mpeg2_qscale * ((int) matrix[0])) >> 5;
4246 4246
                     unquant_coeff =   (unquant_coeff - 1) | 1;
4247 4247
             }
... ...
@@ -4369,7 +4370,7 @@ static int messed_sign=0;
4369 4369
 #endif
4370 4370
     dc += (1<<(RECON_SHIFT-1));
4371 4371
     for(i=0; i<64; i++){
4372
-        rem[i]= dc - (orig[i]<<RECON_SHIFT); //FIXME  use orig dirrectly instead of copying to rem[]
4372
+        rem[i] = dc - (orig[i] << RECON_SHIFT); // FIXME use orig directly instead of copying to rem[]
4373 4373
     }
4374 4374
 #ifdef REFINE_STATS
4375 4375
 STOP_TIMER("memset rem[]")}
... ...
@@ -4680,7 +4681,7 @@ STOP_TIMER("iterative search")
4680 4680
 }
4681 4681
 
4682 4682
 /**
4683
- * Permute an 8x8 block according to permuatation.
4683
+ * Permute an 8x8 block according to permutation.
4684 4684
  * @param block the block which will be permuted according to
4685 4685
  *              the given permutation vector
4686 4686
  * @param permutation the permutation vector
... ...
@@ -591,7 +591,7 @@ static inline void qpel_motion(MpegEncContext *s,
591 591
 }
592 592
 
593 593
 /**
594
- * h263 chroma 4mv motion compensation.
594
+ * H.263 chroma 4mv motion compensation.
595 595
  */
596 596
 static void chroma_4mv_motion(MpegEncContext *s,
597 597
                               uint8_t *dest_cb, uint8_t *dest_cr,
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG1 / MPEG2 video parser
2
+ * MPEG-1 / MPEG-2 video parser
3 3
  * Copyright (c) 2000,2001 Fabrice Bellard
4 4
  * Copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5 5
  *
... ...
@@ -66,7 +66,7 @@ int ff_mqc_flush_to(MqcState *mqc, uint8_t *dst, int *dst_len);
66 66
 /**
67 67
  * Initialize MQ-decoder.
68 68
  * @param mqc   MQ decoder state
69
- * @param bp    byte poiter
69
+ * @param bp    byte pointer
70 70
  * @param raw   raw mode
71 71
  * @param reset reset states
72 72
  */
... ...
@@ -76,7 +76,7 @@ void ff_mqc_initdec(MqcState *mqc, uint8_t *bp, int raw, int reset);
76 76
  * MQ decoder.
77 77
  * @param mqc       MQ decoder state
78 78
  * @param cxstate   Context
79
- * @return          Decision (0 ot 1)
79
+ * @return          Decision (0 to 1)
80 80
  */
81 81
 int ff_mqc_decode(MqcState *mqc, uint8_t *cxstate);
82 82
 
... ...
@@ -40,14 +40,14 @@
40 40
 #include "libavutil/imgutils.h"
41 41
 
42 42
 /*
43
- * You can also call this codec : MPEG4 with a twist !
43
+ * You can also call this codec: MPEG-4 with a twist!
44 44
  *
45 45
  * TODO:
46 46
  *        - (encoding) select best mv table (two choices)
47 47
  *        - (encoding) select best vlc/dc table
48 48
  */
49 49
 
50
-/* This table is practically identical to the one from h263
50
+/* This table is practically identical to the one from H.263
51 51
  * except that it is inverted. */
52 52
 static av_cold void init_h263_dc_for_msmpeg4(void)
53 53
 {
... ...
@@ -71,7 +71,7 @@ static av_cold void init_h263_dc_for_msmpeg4(void)
71 71
             else
72 72
                 l= level;
73 73
 
74
-            /* luminance h263 */
74
+            /* luminance H.263 */
75 75
             uni_code= ff_mpeg4_DCtab_lum[size][0];
76 76
             uni_len = ff_mpeg4_DCtab_lum[size][1];
77 77
             uni_code ^= (1<<uni_len)-1; //M$ does not like compatibility
... ...
@@ -87,7 +87,7 @@ static av_cold void init_h263_dc_for_msmpeg4(void)
87 87
             ff_v2_dc_lum_table[level + 256][0] = uni_code;
88 88
             ff_v2_dc_lum_table[level + 256][1] = uni_len;
89 89
 
90
-            /* chrominance h263 */
90
+            /* chrominance H.263 */
91 91
             uni_code= ff_mpeg4_DCtab_chrom[size][0];
92 92
             uni_len = ff_mpeg4_DCtab_chrom[size][1];
93 93
             uni_code ^= (1<<uni_len)-1; //M$ does not like compatibility
... ...
@@ -252,7 +252,7 @@ int ff_msmpeg4_pred_dc(MpegEncContext *s, int n,
252 252
         c = FASTDIV((c + (scale >> 1)), scale);
253 253
     }
254 254
 #endif
255
-    /* XXX: WARNING: they did not choose the same test as MPEG4. This
255
+    /* XXX: WARNING: they did not choose the same test as MPEG-4. This
256 256
        is very important ! */
257 257
     if(s->msmpeg4_version>3){
258 258
         if(s->inter_intra_pred){
... ...
@@ -70,7 +70,7 @@ static VLC v2_mb_type_vlc;
70 70
 static VLC v2_mv_vlc;
71 71
 VLC ff_inter_intra_vlc;
72 72
 
73
-/* This is identical to h263 except that its range is multiplied by 2. */
73
+/* This is identical to H.263 except that its range is multiplied by 2. */
74 74
 static int msmpeg4v2_decode_motion(MpegEncContext * s, int pred, int f_code)
75 75
 {
76 76
     int code, val, sign, shift;
... ...
@@ -572,7 +572,7 @@ int ff_msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size)
572 572
     }
573 573
     else
574 574
     {
575
-        av_log(s->avctx, AV_LOG_ERROR, "I frame too long, ignoring ext header\n");
575
+        av_log(s->avctx, AV_LOG_ERROR, "I-frame too long, ignoring ext header\n");
576 576
     }
577 577
 
578 578
     return 0;
... ...
@@ -235,8 +235,8 @@ void ff_msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number)
235 235
     }
236 236
 
237 237
     s->dc_table_index = 1;
238
-    s->mv_table_index = 1; /* only if P frame */
239
-    s->use_skip_mb_code = 1; /* only if P frame */
238
+    s->mv_table_index = 1; /* only if P-frame */
239
+    s->use_skip_mb_code = 1; /* only if P-frame */
240 240
     s->per_mb_rl_table = 0;
241 241
     if(s->msmpeg4_version==4)
242 242
         s->inter_intra_pred= (s->width*s->height < 320*240 && s->bit_rate<=II_BITRATE && s->pict_type==AV_PICTURE_TYPE_P);
... ...
@@ -577,9 +577,8 @@ static void msmpeg4_encode_dc(MpegEncContext * s, int level, int n, int *dir_ptr
577 577
     }
578 578
 }
579 579
 
580
-/* Encoding of a block. Very similar to MPEG4 except for a different
581
-   escape coding (same as H263) and more vlc tables.
582
- */
580
+/* Encoding of a block; very similar to MPEG-4 except for a different
581
+ * escape coding (same as H.263) and more VLC tables. */
583 582
 void ff_msmpeg4_encode_block(MpegEncContext * s, int16_t * block, int n)
584 583
 {
585 584
     int level, run, last, i, j, last_index;
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Microsoft RLE video decoder
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (C) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Microsoft Video-1 Decoder
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (C) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -179,7 +179,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
179 179
     // codec data (rtjpeg quant tables)
180 180
     if (buf[0] == 'D' && buf[1] == 'R') {
181 181
         int ret;
182
-        // skip rest of the frameheader.
182
+        // Skip the rest of the frame header.
183 183
         buf       = &buf[12];
184 184
         buf_size -= 12;
185 185
         ret       = get_quant(avctx, c, buf, buf_size);
... ...
@@ -207,7 +207,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
207 207
         break;
208 208
     }
209 209
 retry:
210
-    // skip rest of the frameheader.
210
+    // Skip the rest of the frame header.
211 211
     buf       = &buf[12];
212 212
     buf_size -= 12;
213 213
     if (comptype == NUV_RTJPEG_IN_LZO || comptype == NUV_LZO) {
... ...
@@ -300,7 +300,7 @@ static int nvenc_check_capabilities(AVCodecContext *avctx)
300 300
 
301 301
     ret = nvenc_check_cap(avctx, NV_ENC_CAPS_NUM_MAX_BFRAMES);
302 302
     if (ret < avctx->max_b_frames) {
303
-        av_log(avctx, AV_LOG_VERBOSE, "Max b-frames %d exceed %d\n",
303
+        av_log(avctx, AV_LOG_VERBOSE, "Max B-frames %d exceed %d\n",
304 304
                avctx->max_b_frames, ret);
305 305
 
306 306
         return AVERROR(ENOSYS);
... ...
@@ -893,7 +893,7 @@ static av_cold int nvenc_setup_encoder(AVCodecContext *avctx)
893 893
 
894 894
     if (avctx->gop_size > 0) {
895 895
         if (avctx->max_b_frames >= 0) {
896
-            /* 0 is intra-only, 1 is I/P only, 2 is one B Frame, 3 two B frames, and so on. */
896
+            /* 0 is intra-only, 1 is I/P only, 2 is one B-Frame, 3 two B-frames, and so on. */
897 897
             ctx->encode_config.frameIntervalP = avctx->max_b_frames + 1;
898 898
         }
899 899
 
... ...
@@ -991,7 +991,8 @@ static av_cold int nvenc_alloc_surface(AVCodecContext *avctx, int idx)
991 991
 
992 992
     ctx->surfaces[idx].lockCount = 0;
993 993
 
994
-    /* 1MB is large enough to hold most output frames. NVENC increases this automaticaly if it's not enough. */
994
+    /* 1MB is large enough to hold most output frames.
995
+     * NVENC increases this automaticaly if it is not enough. */
995 996
     allocOut.size = 1024 * 1024;
996 997
 
997 998
     allocOut.memoryHeap = NV_ENC_MEMORY_HEAP_SYSMEM_CACHED;
... ...
@@ -108,7 +108,7 @@ static const AVClass nvenc_class = {
108 108
 
109 109
 AVCodec ff_nvenc_encoder = {
110 110
     .name           = "nvenc",
111
-    .long_name      = NULL_IF_CONFIG_SMALL("NVIDIA NVENC h264 encoder"),
111
+    .long_name      = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H.264 encoder"),
112 112
     .type           = AVMEDIA_TYPE_VIDEO,
113 113
     .id             = AV_CODEC_ID_H264,
114 114
     .init           = ff_nvenc_encode_init,
... ...
@@ -134,7 +134,7 @@ static const AVClass nvenc_h264_class = {
134 134
 
135 135
 AVCodec ff_nvenc_h264_encoder = {
136 136
     .name           = "nvenc_h264",
137
-    .long_name      = NULL_IF_CONFIG_SMALL("NVIDIA NVENC h264 encoder"),
137
+    .long_name      = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H.264 encoder"),
138 138
     .type           = AVMEDIA_TYPE_VIDEO,
139 139
     .id             = AV_CODEC_ID_H264,
140 140
     .init           = ff_nvenc_encode_init,
... ...
@@ -690,7 +690,7 @@ static av_cold int omx_encode_init(AVCodecContext *avctx)
690 690
                 goto fail;
691 691
             }
692 692
             if (avctx->codec->id == AV_CODEC_ID_H264) {
693
-                // For H264, the extradata can be returned in two separate buffers
693
+                // For H.264, the extradata can be returned in two separate buffers
694 694
                 // (the videocore encoder on raspberry pi does this);
695 695
                 // therefore check that we have got both SPS and PPS before continuing.
696 696
                 int nals[32] = { 0 };
... ...
@@ -847,7 +847,7 @@ static int omx_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
847 847
             if (buffer->nFlags & OMX_BUFFERFLAG_ENDOFFRAME) {
848 848
                 ret = pkt->size;
849 849
                 pkt->pts = av_rescale_q(from_omx_ticks(buffer->nTimeStamp), AV_TIME_BASE_Q, avctx->time_base);
850
-                // We don't currently enable b-frames for the encoders, so set
850
+                // We don't currently enable B-frames for the encoders, so set
851 851
                 // pkt->dts = pkt->pts. (The calling code behaves worse if the encoder
852 852
                 // doesn't set the dts).
853 853
                 pkt->dts = pkt->pts;
... ...
@@ -897,7 +897,7 @@ static const AVClass omx_mpeg4enc_class = {
897 897
 };
898 898
 AVCodec ff_mpeg4_omx_encoder = {
899 899
     .name             = "mpeg4_omx",
900
-    .long_name        = NULL_IF_CONFIG_SMALL("OpenMAX IL MPEG4 video encoder"),
900
+    .long_name        = NULL_IF_CONFIG_SMALL("OpenMAX IL MPEG-4 video encoder"),
901 901
     .type             = AVMEDIA_TYPE_VIDEO,
902 902
     .id               = AV_CODEC_ID_MPEG4,
903 903
     .priv_data_size   = sizeof(OMXCodecContext),
... ...
@@ -918,7 +918,7 @@ static const AVClass omx_h264enc_class = {
918 918
 };
919 919
 AVCodec ff_h264_omx_encoder = {
920 920
     .name             = "h264_omx",
921
-    .long_name        = NULL_IF_CONFIG_SMALL("OpenMAX IL H264 video encoder"),
921
+    .long_name        = NULL_IF_CONFIG_SMALL("OpenMAX IL H.264 video encoder"),
922 922
     .type             = AVMEDIA_TYPE_VIDEO,
923 923
     .id               = AV_CODEC_ID_H264,
924 924
     .priv_data_size   = sizeof(OMXCodecContext),
... ...
@@ -121,7 +121,7 @@ static const AVOption avcodec_options[] = {
121 121
 {"qmin", "minimum video quantizer scale (VBR)", OFFSET(qmin), AV_OPT_TYPE_INT, {.i64 = 2 }, -1, 69, V|E},
122 122
 {"qmax", "maximum video quantizer scale (VBR)", OFFSET(qmax), AV_OPT_TYPE_INT, {.i64 = 31 }, -1, 1024, V|E},
123 123
 {"qdiff", "maximum difference between the quantizer scales (VBR)", OFFSET(max_qdiff), AV_OPT_TYPE_INT, {.i64 = 3 }, INT_MIN, INT_MAX, V|E},
124
-{"bf", "set maximum number of B frames between non-B-frames", OFFSET(max_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, -1, INT_MAX, V|E},
124
+{"bf", "set maximum number of B-frames between non-B-frames", OFFSET(max_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, -1, INT_MAX, V|E},
125 125
 {"b_qfactor", "QP factor between P- and B-frames", OFFSET(b_quant_factor), AV_OPT_TYPE_FLOAT, {.dbl = 1.25 }, -FLT_MAX, FLT_MAX, V|E},
126 126
 #if FF_API_RC_STRATEGY
127 127
 {"rc_strategy", "ratecontrol method", OFFSET(rc_strategy), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
... ...
@@ -265,7 +265,7 @@ int ff_opus_parse_packet(OpusPacket *pkt, const uint8_t *buf, int buf_size,
265 265
     } else {
266 266
         pkt->mode = OPUS_MODE_CELT;
267 267
         pkt->bandwidth = (pkt->config - 16) >> 2;
268
-        /* skip mediumband */
268
+        /* skip medium band */
269 269
         if (pkt->bandwidth)
270 270
             pkt->bandwidth++;
271 271
     }
... ...
@@ -397,7 +397,7 @@ av_cold int ff_opus_parse_extradata(AVCodecContext *avctx,
397 397
             return AVERROR_INVALIDDATA;
398 398
         }
399 399
 
400
-        /* check that we din't see this index yet */
400
+        /* check that we did not see this index yet */
401 401
         map->copy = 0;
402 402
         for (j = 0; j < i; j++)
403 403
             if (channel_map[channel_reorder(channels, j)] == idx) {
... ...
@@ -33,7 +33,7 @@ typedef struct PCMDVDContext {
33 33
     int block_size;          // Size of a block of samples in bytes
34 34
     int last_block_size;     // Size of the last block of samples in bytes
35 35
     int samples_per_block;   // Number of samples per channel per block
36
-    int groups_per_block;    // Number of 20/24bit sample groups per block
36
+    int groups_per_block;    // Number of 20/24-bit sample groups per block
37 37
     uint8_t *extra_samples;  // Pointer to leftover samples from a frame
38 38
     int extra_sample_count;  // Number of leftover samples in the buffer
39 39
 } PCMDVDContext;
... ...
@@ -106,7 +106,7 @@ static int pcm_dvd_parse_header(AVCodecContext *avctx, const uint8_t *header)
106 106
                       avctx->sample_rate *
107 107
                       avctx->bits_per_coded_sample;
108 108
 
109
-    /* 4 samples form a group in 20/24bit PCM on DVD Video.
109
+    /* 4 samples form a group in 20/24-bit PCM on DVD Video.
110 110
      * A block is formed by the number of groups that are
111 111
      * needed to complete a set of samples for each channel. */
112 112
     if (avctx->bits_per_coded_sample == 16) {
... ...
@@ -1258,7 +1258,7 @@ exit_loop:
1258 1258
         }
1259 1259
     }
1260 1260
 
1261
-    /* handle p-frames only if a predecessor frame is available */
1261
+    /* handle P-frames only if a predecessor frame is available */
1262 1262
     if (s->last_picture.f->data[0]) {
1263 1263
         if (   !(avpkt->flags & AV_PKT_FLAG_KEY) && avctx->codec_tag != AV_RL32("MPNG")
1264 1264
             && s->last_picture.f->width == p->width
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 #include "avcodec.h"
23 23
 
24
-/* H264 slice threading seems to be buggy with more than 16 threads,
24
+/* H.264 slice threading seems to be buggy with more than 16 threads,
25 25
  * limit the number of threads to 16 for automatic detection */
26 26
 #define MAX_AUTO_THREADS 16
27 27
 
... ...
@@ -603,7 +603,7 @@ static qcelp_packet_rate buf_size2bitrate(const int buf_size)
603 603
  *
604 604
  * @param avctx the AV codec context
605 605
  * @param buf_size length of the buffer
606
- * @param buf the bufffer
606
+ * @param buf the buffer
607 607
  *
608 608
  * @return the bitrate on success,
609 609
  *         I_F_Q  if the bitrate cannot be satisfactorily determined
... ...
@@ -235,7 +235,7 @@ static int qdm2_get_se_vlc(const VLC *vlc, GetBitContext *gb, int depth)
235 235
 /**
236 236
  * QDM2 checksum
237 237
  *
238
- * @param data      pointer to data to be checksum'ed
238
+ * @param data      pointer to data to be checksummed
239 239
  * @param length    data length
240 240
  * @param value     checksum value
241 241
  *
... ...
@@ -1831,7 +1831,7 @@ static int qdm2_decode(QDM2Context *q, const uint8_t *in, int16_t *out)
1831 1831
 
1832 1832
     q->sub_packet = (q->sub_packet + 1) % 16;
1833 1833
 
1834
-    /* clip and convert output float[] to 16bit signed samples */
1834
+    /* clip and convert output float[] to 16-bit signed samples */
1835 1835
     for (i = 0; i < frame_size; i++) {
1836 1836
         int value = (int)q->output_buffer[i];
1837 1837
 
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Intel MediaSDK QSV based MPEG2 video decoder
2
+ * Intel MediaSDK QSV based MPEG-2 video decoder
3 3
  *
4 4
  * This file is part of FFmpeg.
5 5
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Quicktime Animation (RLE) Video Decoder
3
- * Copyright (c) 2004 The FFmpeg Project
3
+ * Copyright (C) 2004 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -138,7 +138,7 @@ static void qtrle_encode_line(QtrleEncContext *s, const AVFrame *p, int line, ui
138 138
     int i;
139 139
     signed char rlecode;
140 140
 
141
-    /* This will be the number of pixels equal to the preivous frame one's
141
+    /* This will be the number of pixels equal to the previous frame one's
142 142
      * starting from the ith pixel */
143 143
     unsigned int skipcount;
144 144
     /* This will be the number of consecutive equal pixels in the current
... ...
@@ -264,7 +264,7 @@ static void qtrle_encode_line(QtrleEncContext *s, const AVFrame *p, int line, ui
264 264
         prev_line -= s->pixel_size;
265 265
     }
266 266
 
267
-    /* Good ! Now we have the best sequence for this line, let's output it */
267
+    /* Good! Now we have the best sequence for this line, let's output it. */
268 268
 
269 269
     /* We do a special case for the first pixel so that we avoid testing it in
270 270
      * the whole loop */
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Real Audio 1.0 (14.4K)
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Real Audio 1.0 (14.4K)
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -128,7 +128,7 @@ static void orthogonalize(float *v, const float *u)
128 128
 
129 129
 /**
130 130
  * Calculate match score and gain of an LPC-filtered vector with respect to
131
- * input data, possibly othogonalizing it to up to 2 other vectors
131
+ * input data, possibly orthogonalizing it to up to two other vectors.
132 132
  *
133 133
  * @param work array used to calculate the filtered vector
134 134
  * @param coefs coefficients of the LPC filter
... ...
@@ -229,8 +229,8 @@ static int adaptive_cb_search(const int16_t *adapt_cb, float *work,
229 229
 
230 230
 /**
231 231
  * Find the best vector of a fixed codebook by applying an LPC filter to
232
- * codebook entries, possibly othogonalizing them to up to 2 other vectors and
233
- * matching the results with input data
232
+ * codebook entries, possibly orthogonalizing them to up to two other vectors
233
+ * and matching the results with input data.
234 234
  *
235 235
  * @param work array used to calculate the filtered vectors
236 236
  * @param coefs coefficients of the LPC filter
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * RealAudio 2.0 (28.8K)
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * RealAudio 2.0 (28.8K)
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -182,8 +182,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
182 182
             return AVERROR(ENOMEM);
183 183
         rcc->num_entries = i;
184 184
 
185
-        /* init all to skipped p frames
186
-         * (with b frames we might have a not encoded frame at the end FIXME) */
185
+        /* init all to skipped P-frames
186
+         * (with B-frames we might have a not encoded frame at the end FIXME) */
187 187
         for (i = 0; i < rcc->num_entries; i++) {
188 188
             RateControlEntry *rce = &rcc->entry[i];
189 189
 
... ...
@@ -203,7 +203,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
203 203
 
204 204
             next = strchr(p, ';');
205 205
             if (next) {
206
-                (*next) = 0; // sscanf in unbelievably slow on looong strings // FIXME copy / do not write
206
+                (*next) = 0; // sscanf is unbelievably slow on looong strings // FIXME copy / do not write
207 207
                 next++;
208 208
             }
209 209
             e = sscanf(p, " in:%d ", &picture_number);
... ...
@@ -652,9 +652,9 @@ static void adaptive_quantization(MpegEncContext *s, double q)
652 652
         int mb_distance;
653 653
         float mb_factor = 0.0;
654 654
         if (spat_cplx < 4)
655
-            spat_cplx = 4;              // FIXME finetune
655
+            spat_cplx = 4;              // FIXME fine-tune
656 656
         if (temp_cplx < 4)
657
-            temp_cplx = 4;              // FIXME finetune
657
+            temp_cplx = 4;              // FIXME fine-tune
658 658
 
659 659
         if ((s->mb_type[mb_xy] & CANDIDATE_MB_TYPE_INTRA)) { // FIXME hq mode
660 660
             cplx   = spat_cplx;
... ...
@@ -68,7 +68,7 @@ typedef struct RateControlContext{
68 68
     double short_term_qsum;       ///< sum of recent qscales
69 69
     double short_term_qcount;     ///< count of recent qscales
70 70
     double pass1_rc_eq_output_sum;///< sum of the output of the rc equation, this is used for normalization
71
-    double pass1_wanted_bits;     ///< bits which should have been outputed by the pass1 code (including complexity init)
71
+    double pass1_wanted_bits;     ///< bits which should have been output by the pass1 code (including complexity init)
72 72
     double last_qscale;
73 73
     double last_qscale_for[5];    ///< last qscale for a specific pict type, used for max_diff & ipb factor stuff
74 74
     int64_t last_mc_mb_var_sum;
... ...
@@ -65,7 +65,7 @@ static av_always_inline void fill_rectangle(void *vp, int w, int h, int stride,
65 65
         *(uint32_t*)(p + 2*stride)= v;
66 66
         *(uint32_t*)(p + 3*stride)= v;
67 67
     }else if(w==8){
68
-    //gcc can't optimize 64bit math on x86_32
68
+    // gcc cannot optimize 64-bit math on x86_32
69 69
 #if HAVE_FAST_64BIT
70 70
         const uint64_t v=  size==2 ? val*0x0001000100010001ULL : val*0x0100000001ULL;
71 71
         *(uint64_t*)(p + 0*stride)= v;
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2003 The FFmpeg Project
2
+ * Copyright (C) 2003 The FFmpeg project
3 3
  *
4 4
  * This file is part of FFmpeg.
5 5
  *
... ...
@@ -1094,7 +1094,7 @@ static int roq_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
1094 1094
         return ret;
1095 1095
     enc->out_buf = pkt->data;
1096 1096
 
1097
-    /* Check for I frame */
1097
+    /* Check for I-frame */
1098 1098
     if (enc->framesSinceKeyframe == avctx->gop_size)
1099 1099
         enc->framesSinceKeyframe = 0;
1100 1100
 
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Quicktime Video (RPZA) Video Decoder
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (C) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -92,7 +92,7 @@ static int rpza_decode_stream(RpzaContext *s)
92 92
         av_log(s->avctx, AV_LOG_ERROR, "First chunk byte is 0x%02x instead of 0xe1\n",
93 93
                bytestream2_peek_byte(&s->gb));
94 94
 
95
-    /* Get chunk size, ingnoring first byte */
95
+    /* Get chunk size, ignoring first byte */
96 96
     chunk_size = bytestream2_get_be32(&s->gb) & 0x00FFFFFF;
97 97
 
98 98
     /* If length mismatch use size from MOV file and try to decode anyway */
... ...
@@ -265,7 +265,7 @@ static int rv10_decode_picture_header(MpegEncContext *s)
265 265
     ff_dlog(s->avctx, "pict_type=%d pb_frame=%d\n", s->pict_type, pb_frame);
266 266
 
267 267
     if (pb_frame) {
268
-        avpriv_request_sample(s->avctx, "pb frame");
268
+        avpriv_request_sample(s->avctx, "PB-frame");
269 269
         return AVERROR_PATCHWELCOME;
270 270
     }
271 271
 
... ...
@@ -431,7 +431,7 @@ static int rv20_decode_picture_header(RVDecContext *rv)
431 431
     if (s->pict_type == AV_PICTURE_TYPE_B) {
432 432
         if (s->pp_time <=s->pb_time || s->pp_time <= s->pp_time - s->pb_time || s->pp_time<=0) {
433 433
             av_log(s->avctx, AV_LOG_DEBUG,
434
-                   "messed up order, possible from seeking? skipping current b frame\n");
434
+                   "messed up order, possible from seeking? skipping current B-frame\n");
435 435
 #define ERROR_SKIP_FRAME -123
436 436
             return ERROR_SKIP_FRAME;
437 437
         }
... ...
@@ -39,7 +39,7 @@ int ff_rv10_encode_picture_header(MpegEncContext *s, int picture_number)
39 39
 
40 40
     put_bits(&s->pb, 1, (s->pict_type == AV_PICTURE_TYPE_P));
41 41
 
42
-    put_bits(&s->pb, 1, 0);     /* not PB frame */
42
+    put_bits(&s->pb, 1, 0);     /* not PB-mframe */
43 43
 
44 44
     put_bits(&s->pb, 5, s->qscale);
45 45
 
... ...
@@ -1478,7 +1478,7 @@ static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int
1478 1478
     return s->mb_y == s->mb_height;
1479 1479
 }
1480 1480
 
1481
-/** @} */ // recons group end
1481
+/** @} */ // reconstruction group end
1482 1482
 
1483 1483
 /**
1484 1484
  * Initialize decoder.
... ...
@@ -101,12 +101,12 @@ typedef struct RV34DecContext{
101 101
     int is16;                ///< current block has additional 16x16 specific features or not
102 102
     int dmv[4][2];           ///< differential motion vectors for the current macroblock
103 103
 
104
-    int rv30;                ///< indicates which RV variasnt is currently decoded
104
+    int rv30;                ///< indicates which RV variant is currently decoded
105 105
     int max_rpr;
106 106
 
107 107
     int cur_pts, last_pts, next_pts;
108 108
     int scaled_weight;
109
-    int weight1, weight2;    ///< B frame distance fractions (0.14) used in motion compensation
109
+    int weight1, weight2;    ///< B-frame distance fractions (0.14) used in motion compensation
110 110
     int mv_weight1, mv_weight2;
111 111
 
112 112
     int orig_width, orig_height;
... ...
@@ -47,7 +47,7 @@
47 47
 typedef struct ScreenpressoContext {
48 48
     AVFrame *current;
49 49
 
50
-    /* zlib interation */
50
+    /* zlib interaction */
51 51
     uint8_t *inflated_buf;
52 52
     uLongf inflated_size;
53 53
 } ScreenpressoContext;
... ...
@@ -25,10 +25,8 @@
25 25
  * simpleidct in C.
26 26
  */
27 27
 
28
-/*
29
-  based upon some outcommented c code from mpeg2dec (idct_mmx.c
30
-  written by Aaron Holtzman <aholtzma@ess.engr.uvic.ca>)
31
- */
28
+/* Based upon some commented-out C code from mpeg2dec (idct_mmx.c
29
+ * written by Aaron Holtzman <aholtzma@ess.engr.uvic.ca>). */
32 30
 
33 31
 #include "simple_idct.h"
34 32
 
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Quicktime Graphics (SMC) Video Decoder
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (C) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Sunplus JPEG tables
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -3,8 +3,8 @@
3 3
  * ported to MPlayer by Arpi <arpi@thot.banki.hu>
4 4
  * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>
5 5
  *
6
- * Copyright (c) 2002 The Xine Project
7
- * Copyright (c) 2002 The FFmpeg Project
6
+ * Copyright (c) 2002 The Xine project
7
+ * Copyright (c) 2002 The FFmpeg project
8 8
  *
9 9
  * SVQ1 Encoder (c) 2004 Mike Melanson <melanson@pcisys.net>
10 10
  *
... ...
@@ -3,8 +3,8 @@
3 3
  * ported to MPlayer by Arpi <arpi@thot.banki.hu>
4 4
  * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>
5 5
  *
6
- * Copyright (c) 2002 The Xine Project
7
- * Copyright (c) 2002 The FFmpeg Project
6
+ * Copyright (c) 2002 The Xine project
7
+ * Copyright (c) 2002 The FFmpeg project
8 8
  *
9 9
  * SVQ1 Encoder (c) 2004 Mike Melanson <melanson@pcisys.net>
10 10
  *
... ...
@@ -3,8 +3,8 @@
3 3
  * ported to MPlayer by Arpi <arpi@thot.banki.hu>
4 4
  * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>
5 5
  *
6
- * Copyright (c) 2002 The Xine Project
7
- * Copyright (c) 2002 The FFmpeg Project
6
+ * Copyright (c) 2002 The Xine project
7
+ * Copyright (c) 2002 The FFmpeg project
8 8
  *
9 9
  * This file is part of FFmpeg.
10 10
  *
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2003 The FFmpeg Project
2
+ * Copyright (C) 2003 The FFmpeg project
3 3
  *
4 4
  * This file is part of FFmpeg.
5 5
  *
... ...
@@ -3,8 +3,8 @@
3 3
  * ported to MPlayer by Arpi <arpi@thot.banki.hu>
4 4
  * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>
5 5
  *
6
- * Copyright (c) 2002 The Xine Project
7
- * Copyright (c) 2002 The FFmpeg Project
6
+ * Copyright (c) 2002 The Xine project
7
+ * Copyright (c) 2002 The FFmpeg project
8 8
  *
9 9
  * SVQ1 Encoder (c) 2004 Mike Melanson <melanson@pcisys.net>
10 10
  *
... ...
@@ -152,7 +152,7 @@ static int encode_block(SVQ1EncContext *s, uint8_t *src, uint8_t *ref,
152 152
                 vector = codebook + stage * size * 16 + i * size;
153 153
                 sqr    = s->ssd_int8_vs_int16(vector, block[stage], size);
154 154
                 diff   = block_sum[stage] - sum;
155
-                score  = sqr - (diff * (int64_t)diff >> (level + 3)); // FIXME: 64bit slooow
155
+                score  = sqr - (diff * (int64_t)diff >> (level + 3)); // FIXME: 64 bits slooow
156 156
                 if (score < best_vector_score) {
157 157
                     int mean = diff + (size >> 1) >> (level + 3);
158 158
                     av_assert2(mean > -300 && mean < 300);
... ...
@@ -138,7 +138,7 @@ typedef struct SVQ3Context {
138 138
 #define THIRDPEL_MODE 3
139 139
 #define PREDICT_MODE  4
140 140
 
141
-/* dual scan (from some older h264 draft)
141
+/* dual scan (from some older H.264 draft)
142 142
  * o-->o-->o   o
143 143
  *         |  /|
144 144
  * o   o   o / o
... ...
@@ -56,7 +56,7 @@ typedef struct TDSCContext {
56 56
     AVFrame *jpgframe;          // decoded JPEG tile
57 57
     uint8_t *tilebuffer;        // buffer containing tile data
58 58
 
59
-    /* zlib interation */
59
+    /* zlib interaction */
60 60
     uint8_t *deflatebuffer;
61 61
     uLongf deflatelen;
62 62
 
... ...
@@ -365,7 +365,7 @@ static int tdsc_decode_jpeg_tile(AVCodecContext *avctx, int tile_size,
365 365
             return 0;
366 366
     }
367 367
 
368
-    /* Let's paint ont the buffer */
368
+    /* Let's paint onto the buffer */
369 369
     tdsc_blit(ctx->refframe->data[0] + x * 3 + ctx->refframe->linesize[0] * y,
370 370
               ctx->refframe->linesize[0],
371 371
               ctx->jpgframe->data[0], ctx->jpgframe->linesize[0],
... ...
@@ -167,7 +167,7 @@ static inline void dxt3_block_internal(uint8_t *dst, ptrdiff_t stride,
167 167
     }
168 168
 }
169 169
 
170
-/** Convert a premultiplied alpha pixel to a straigth alpha pixel. */
170
+/** Convert a premultiplied alpha pixel to a straight alpha pixel. */
171 171
 static av_always_inline void premult2straight(uint8_t *src)
172 172
 {
173 173
     int r = src[0];
... ...
@@ -213,7 +213,7 @@ static unsigned int match_colors(const uint8_t *block, ptrdiff_t stride,
213 213
      * the same inside that subinterval.
214 214
      *
215 215
      * Relying on this 1d approximation isn't always optimal in terms of
216
-     * euclidean distance, but it's very close and a lot faster.
216
+     * Euclidean distance, but it's very close and a lot faster.
217 217
      *
218 218
      * http://cbloomrants.blogspot.com/2008/12/12-08-08-dxtc-summary.html */
219 219
     c0_point   = (stops[1] + stops[3]) >> 1;
... ...
@@ -309,7 +309,7 @@ static void optimize_colors(const uint8_t *block, ptrdiff_t stride,
309 309
     if (fabs(vfb) > magn)
310 310
         magn = fabs(vfb);
311 311
 
312
-    /* if magnitudo is too small, default to luminance */
312
+    /* if magnitude is too small, default to luminance */
313 313
     if (magn < 4.0f) {
314 314
         /* JPEG YCbCr luma coefs, scaled by 1000 */
315 315
         v_r = 299;
... ...
@@ -109,7 +109,7 @@ typedef struct TwinVQFrameData {
109 109
  * bitrate/sample rate
110 110
  */
111 111
 typedef struct TwinVQModeTab {
112
-    struct TwinVQFrameMode fmode[3]; ///< frame type-dependant parameters
112
+    struct TwinVQFrameMode fmode[3]; ///< frame type-dependent parameters
113 113
 
114 114
     uint16_t     size;        ///< frame size in samples
115 115
     uint8_t      n_lsp;       ///< number of lsp coefficients
... ...
@@ -149,7 +149,7 @@ static int very_broken_op(int a, int b)
149 149
 /**
150 150
  * Sum to data a periodic peak of a given period, width and shape.
151 151
  *
152
- * @param period the period of the peak divised by 400.0
152
+ * @param period the period of the peak divided by 400.0
153 153
  */
154 154
 static void add_peak(int period, int width, const float *shape,
155 155
                      float ppc_gain, float *speech, int len)
... ...
@@ -160,7 +160,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
160 160
         return AVERROR(EINVAL);
161 161
     }
162 162
 
163
-    /* extradata size is 4 * 32bit */
163
+    /* extradata size is 4 * 32 bits */
164 164
     avctx->extradata_size = 16;
165 165
 
166 166
     avctx->extradata = av_mallocz(avctx->extradata_size +
... ...
@@ -371,7 +371,7 @@ static int write_huff_codes(uint8_t *src, uint8_t *dst, int dst_size,
371 371
         src += width;
372 372
     }
373 373
 
374
-    /* Pad output to a 32bit boundary */
374
+    /* Pad output to a 32-bit boundary */
375 375
     count = put_bits_count(&pb) & 0x1F;
376 376
 
377 377
     if (count)
... ...
@@ -609,7 +609,7 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
609 609
     }
610 610
 
611 611
     /*
612
-     * Write frame information (LE 32bit unsigned)
612
+     * Write frame information (LE 32-bit unsigned)
613 613
      * into the output packet.
614 614
      * Contains the prediction method.
615 615
      */
... ...
@@ -636,7 +636,7 @@ static int vaapi_encode_get_next(AVCodecContext *avctx,
636 636
     start = end = pic;
637 637
 
638 638
     if (pic->type != PICTURE_TYPE_IDR) {
639
-        // If that was not an IDR frame, add B frames display-before and
639
+        // If that was not an IDR frame, add B-frames display-before and
640 640
         // encode-after it.
641 641
 
642 642
         for (i = 0; i < ctx->b_per_p; i++) {
... ...
@@ -708,7 +708,7 @@ static int vaapi_encode_mangle_end(AVCodecContext *avctx)
708 708
 
709 709
         if (last_pic->type == PICTURE_TYPE_B) {
710 710
             // Some fixing up is required.  Change the type of this
711
-            // picture to P, then modify preceeding B references which
711
+            // picture to P, then modify preceding B references which
712 712
             // point beyond it to point at it instead.
713 713
 
714 714
             last_pic->type = PICTURE_TYPE_P;
... ...
@@ -697,7 +697,7 @@ static int vaapi_encode_h264_init_slice_params(AVCodecContext *avctx,
697 697
 
698 698
     av_assert0(pic->nb_refs <= 2);
699 699
     if (pic->nb_refs >= 1) {
700
-        // Backward reference for P or B frame.
700
+        // Backward reference for P- or B-frame.
701 701
         av_assert0(pic->type == PICTURE_TYPE_P ||
702 702
                    pic->type == PICTURE_TYPE_B);
703 703
 
... ...
@@ -705,7 +705,7 @@ static int vaapi_encode_h264_init_slice_params(AVCodecContext *avctx,
705 705
         vslice->RefPicList0[0] = vpic->ReferenceFrames[0];
706 706
     }
707 707
     if (pic->nb_refs >= 2) {
708
-        // Forward reference for B frame.
708
+        // Forward reference for B-frame.
709 709
         av_assert0(pic->type == PICTURE_TYPE_B);
710 710
 
711 711
         vslice->num_ref_idx_l1_active_minus1 = 0;
... ...
@@ -799,7 +799,7 @@ static av_cold int vaapi_encode_h264_init_fixed_qp(AVCodecContext *avctx)
799 799
         priv->fixed_qp_b = priv->fixed_qp_p;
800 800
 
801 801
     av_log(avctx, AV_LOG_DEBUG, "Using fixed QP = "
802
-           "%d / %d / %d for IDR / P / B frames.\n",
802
+           "%d / %d / %d for IDR- / P- / B-frames.\n",
803 803
            priv->fixed_qp_idr, priv->fixed_qp_p, priv->fixed_qp_b);
804 804
     return 0;
805 805
 }
... ...
@@ -936,7 +936,7 @@ static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx)
936 936
                    offsetof(VAAPIEncodeH264Options, x))
937 937
 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
938 938
 static const AVOption vaapi_encode_h264_options[] = {
939
-    { "qp", "Constant QP (for P frames; scaled by qfactor/qoffset for I/B)",
939
+    { "qp", "Constant QP (for P-frames; scaled by qfactor/qoffset for I/B)",
940 940
       OFFSET(qp), AV_OPT_TYPE_INT, { .i64 = 20 }, 0, 52, FLAGS },
941 941
     { "quality", "Set encode quality (trades off against speed, higher is faster)",
942 942
       OFFSET(quality), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, FLAGS },
... ...
@@ -1075,7 +1075,7 @@ static int vaapi_encode_h265_init_slice_params(AVCodecContext *avctx,
1075 1075
 
1076 1076
     av_assert0(pic->nb_refs <= 2);
1077 1077
     if (pic->nb_refs >= 1) {
1078
-        // Backward reference for P or B frame.
1078
+        // Backward reference for P- or B-frame.
1079 1079
         av_assert0(pic->type == PICTURE_TYPE_P ||
1080 1080
                    pic->type == PICTURE_TYPE_B);
1081 1081
 
... ...
@@ -1083,7 +1083,7 @@ static int vaapi_encode_h265_init_slice_params(AVCodecContext *avctx,
1083 1083
         vslice->ref_pic_list0[0] = vpic->reference_frames[0];
1084 1084
     }
1085 1085
     if (pic->nb_refs >= 2) {
1086
-        // Forward reference for B frame.
1086
+        // Forward reference for B-frame.
1087 1087
         av_assert0(pic->type == PICTURE_TYPE_B);
1088 1088
 
1089 1089
         vslice->num_ref_idx_l1_active_minus1 = 0;
... ...
@@ -1226,7 +1226,7 @@ static av_cold int vaapi_encode_h265_init_fixed_qp(AVCodecContext *avctx)
1226 1226
         priv->fixed_qp_b = priv->fixed_qp_p;
1227 1227
 
1228 1228
     av_log(avctx, AV_LOG_DEBUG, "Using fixed QP = "
1229
-           "%d / %d / %d for IDR / P / B frames.\n",
1229
+           "%d / %d / %d for IDR- / P- / B-frames.\n",
1230 1230
            priv->fixed_qp_idr, priv->fixed_qp_p, priv->fixed_qp_b);
1231 1231
     return 0;
1232 1232
 }
... ...
@@ -1327,7 +1327,7 @@ static av_cold int vaapi_encode_h265_init(AVCodecContext *avctx)
1327 1327
                    offsetof(VAAPIEncodeH265Options, x))
1328 1328
 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
1329 1329
 static const AVOption vaapi_encode_h265_options[] = {
1330
-    { "qp", "Constant QP (for P frames; scaled by qfactor/qoffset for I/B)",
1330
+    { "qp", "Constant QP (for P-frames; scaled by qfactor/qoffset for I/B)",
1331 1331
       OFFSET(qp), AV_OPT_TYPE_INT, { .i64 = 25 }, 0, 52, FLAGS },
1332 1332
     { NULL },
1333 1333
 };
... ...
@@ -391,7 +391,7 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo
391 391
            "Profile %i:\nfrmrtq_postproc=%i, bitrtq_postproc=%i\n"
392 392
            "LoopFilter=%i, MultiRes=%i, FastUVMC=%i, Extended MV=%i\n"
393 393
            "Rangered=%i, VSTransform=%i, Overlap=%i, SyncMarker=%i\n"
394
-           "DQuant=%i, Quantizer mode=%i, Max B frames=%i\n",
394
+           "DQuant=%i, Quantizer mode=%i, Max B-frames=%i\n",
395 395
            v->profile, v->frmrtq_postproc, v->bitrtq_postproc,
396 396
            v->s.loop_filter, v->multires, v->fastuvmc, v->extended_mv,
397 397
            v->rangered, v->vstransform, v->overlap, v->resync_marker,
... ...
@@ -764,7 +764,7 @@ int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
764 764
         av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: "
765 765
                "Imode: %i, Invert: %i\n", status>>1, status&1);
766 766
 
767
-        /* Hopefully this is correct for P frames */
767
+        /* Hopefully this is correct for P-frames */
768 768
         v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables
769 769
         v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)];
770 770
 
... ...
@@ -1152,7 +1152,7 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
1152 1152
             av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: "
1153 1153
                    "Imode: %i, Invert: %i\n", status>>1, status&1);
1154 1154
 
1155
-            /* Hopefully this is correct for P frames */
1155
+            /* Hopefully this is correct for P-frames */
1156 1156
             v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables
1157 1157
             v->cbpcy_vlc        = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)];
1158 1158
         } else if (v->fcm == ILACE_FRAME) { // frame interlaced
... ...
@@ -73,7 +73,7 @@ enum DQDoubleEdge {
73 73
 };
74 74
 //@}
75 75
 
76
-/** MV modes for P frames */
76
+/** MV modes for P-frames */
77 77
 //@{
78 78
 enum MVModes {
79 79
     MV_PMODE_1MV_HPEL_BILIN,
... ...
@@ -96,7 +96,7 @@ enum MBModesIntfr {
96 96
 };
97 97
 //@}
98 98
 
99
-/** @name MV types for B frames */
99
+/** @name MV types for B-frames */
100 100
 //@{
101 101
 enum BMVTypes {
102 102
     BMV_TYPE_BACKWARD,
... ...
@@ -106,7 +106,7 @@ enum BMVTypes {
106 106
 };
107 107
 //@}
108 108
 
109
-/** @name Block types for P/B frames */
109
+/** @name Block types for P/B-frames */
110 110
 //@{
111 111
 enum TransformTypes {
112 112
     TT_8X8,
... ...
@@ -194,18 +194,18 @@ typedef struct VC1Context{
194 194
 
195 195
     /** Advanced Profile */
196 196
     //@{
197
-    int level;            ///< 3bits, for Advanced/Simple Profile, provided by TS layer
198
-    int chromaformat;     ///< 2bits, 2=4:2:0, only defined
197
+    int level;            ///< 3 bits, for Advanced/Simple Profile, provided by TS layer
198
+    int chromaformat;     ///< 2 bits, 2=4:2:0, only defined
199 199
     int postprocflag;     ///< Per-frame processing suggestion flag present
200 200
     int broadcast;        ///< TFF/RFF present
201 201
     int interlace;        ///< Progressive/interlaced (RPTFTM syntax element)
202 202
     int tfcntrflag;       ///< TFCNTR present
203 203
     int panscanflag;      ///< NUMPANSCANWIN, TOPLEFT{X,Y}, BOTRIGHT{X,Y} present
204 204
     int refdist_flag;     ///< REFDIST syntax element present in II, IP, PI or PP field picture headers
205
-    int extended_dmv;     ///< Additional extended dmv range at P/B frame-level
206
-    int color_prim;       ///< 8bits, chroma coordinates of the color primaries
207
-    int transfer_char;    ///< 8bits, Opto-electronic transfer characteristics
208
-    int matrix_coef;      ///< 8bits, Color primaries->YCbCr transform matrix
205
+    int extended_dmv;     ///< Additional extended dmv range at P/B-frame-level
206
+    int color_prim;       ///< 8 bits, chroma coordinates of the color primaries
207
+    int transfer_char;    ///< 8 bits, Opto-electronic transfer characteristics
208
+    int matrix_coef;      ///< 8 bits, Color primaries->YCbCr transform matrix
209 209
     int hrd_param_flag;   ///< Presence of Hypothetical Reference
210 210
                           ///< Decoder parameters
211 211
     int psf;              ///< Progressive Segmented Frame
... ...
@@ -215,23 +215,23 @@ typedef struct VC1Context{
215 215
      * TODO: choose between ints, uint8_ts and monobit flags
216 216
      */
217 217
     //@{
218
-    int profile;          ///< 2bits, Profile
219
-    int frmrtq_postproc;  ///< 3bits,
220
-    int bitrtq_postproc;  ///< 5bits, quantized framerate-based postprocessing strength
218
+    int profile;          ///< 2 bits, Profile
219
+    int frmrtq_postproc;  ///< 3 bits,
220
+    int bitrtq_postproc;  ///< 5 bits, quantized framerate-based postprocessing strength
221 221
     int max_coded_width, max_coded_height;
222 222
     int fastuvmc;         ///< Rounding of qpel vector to hpel ? (not in Simple)
223 223
     int extended_mv;      ///< Ext MV in P/B (not in Simple)
224
-    int dquant;           ///< How qscale varies with MBs, 2bits (not in Simple)
224
+    int dquant;           ///< How qscale varies with MBs, 2 bits (not in Simple)
225 225
     int vstransform;      ///< variable-size [48]x[48] transform type + info
226 226
     int overlap;          ///< overlapped transforms in use
227
-    int quantizer_mode;   ///< 2bits, quantizer mode used for sequence, see QUANT_*
227
+    int quantizer_mode;   ///< 2 bits, quantizer mode used for sequence, see QUANT_*
228 228
     int finterpflag;      ///< INTERPFRM present
229 229
     //@}
230 230
 
231 231
     /** Frame decoding info for all profiles */
232 232
     //@{
233
-    uint8_t mv_mode;             ///< MV coding monde
234
-    uint8_t mv_mode2;            ///< Secondary MV coding mode (B frames)
233
+    uint8_t mv_mode;             ///< MV coding mode
234
+    uint8_t mv_mode2;            ///< Secondary MV coding mode (B-frames)
235 235
     int k_x;                     ///< Number of bits for MVs (depends on MV range)
236 236
     int k_y;                     ///< Number of bits for MVs (depends on MV range)
237 237
     int range_x, range_y;        ///< MV range
... ...
@@ -2492,7 +2492,7 @@ static void vc1_decode_i_blocks(VC1Context *v)
2492 2492
     uint8_t *coded_val;
2493 2493
     int mb_pos;
2494 2494
 
2495
-    /* select codingmode used for VLC tables selection */
2495
+    /* select coding mode used for VLC tables selection */
2496 2496
     switch (v->y_ac_table_index) {
2497 2497
     case 0:
2498 2498
         v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
... ...
@@ -2640,7 +2640,7 @@ static void vc1_decode_i_blocks_adv(VC1Context *v)
2640 2640
     int mqdiff;
2641 2641
     GetBitContext *gb = &s->gb;
2642 2642
 
2643
-    /* select codingmode used for VLC tables selection */
2643
+    /* select coding mode used for VLC tables selection */
2644 2644
     switch (v->y_ac_table_index) {
2645 2645
     case 0:
2646 2646
         v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
... ...
@@ -2768,7 +2768,7 @@ static void vc1_decode_p_blocks(VC1Context *v)
2768 2768
     MpegEncContext *s = &v->s;
2769 2769
     int apply_loop_filter;
2770 2770
 
2771
-    /* select codingmode used for VLC tables selection */
2771
+    /* select coding mode used for VLC tables selection */
2772 2772
     switch (v->c_ac_table_index) {
2773 2773
     case 0:
2774 2774
         v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
... ...
@@ -2844,7 +2844,7 @@ static void vc1_decode_b_blocks(VC1Context *v)
2844 2844
 {
2845 2845
     MpegEncContext *s = &v->s;
2846 2846
 
2847
-    /* select codingmode used for VLC tables selection */
2847
+    /* select coding mode used for VLC tables selection */
2848 2848
     switch (v->c_ac_table_index) {
2849 2849
     case 0:
2850 2850
         v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
... ...
@@ -188,7 +188,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir)
188 188
     mx = s->mv[dir][0][0];
189 189
     my = s->mv[dir][0][1];
190 190
 
191
-    // store motion vectors for further use in B frames
191
+    // store motion vectors for further use in B-frames
192 192
     if (s->pict_type == AV_PICTURE_TYPE_P) {
193 193
         for (i = 0; i < 4; i++) {
194 194
             s->current_picture.motion_val[1][s->block_index[i] + v->blocks_off][0] = mx;
... ...
@@ -867,7 +867,7 @@ void ff_vc1_interp_mc(VC1Context *v)
867 867
 
868 868
     if (CONFIG_GRAY && s->avctx->flags & AV_CODEC_FLAG_GRAY)
869 869
         return;
870
-    /* Chroma MC always uses qpel blilinear */
870
+    /* Chroma MC always uses qpel bilinear */
871 871
     uvmx = (uvmx & 3) << 1;
872 872
     uvmy = (uvmy & 3) << 1;
873 873
     if (!v->rnd) {
... ...
@@ -468,7 +468,7 @@ void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y,
468 468
     int A[2], B[2], C[2];
469 469
     int px = 0, py = 0;
470 470
     int a_valid = 0, b_valid = 0, c_valid = 0;
471
-    int field_a, field_b, field_c; // 0: same, 1: opposit
471
+    int field_a, field_b, field_c; // 0: same, 1: opposite
472 472
     int total_valid, num_samefield, num_oppfield;
473 473
     int pos_c, pos_b, n_adj;
474 474
 
... ...
@@ -417,7 +417,7 @@ av_cold void ff_vc1_init_transposed_scantables(VC1Context *v)
417 417
 
418 418
 /** Initialize a VC1/WMV3 decoder
419 419
  * @todo TODO: Handle VC-1 IDUs (Transport level?)
420
- * @todo TODO: Decypher remaining bits in extra_data
420
+ * @todo TODO: Decipher remaining bits in extra_data
421 421
  */
422 422
 static av_cold int vc1_decode_init(AVCodecContext *avctx)
423 423
 {
... ...
@@ -239,8 +239,8 @@ static int vdpau_h264_init(AVCodecContext *avctx)
239 239
         break;
240 240
 #endif
241 241
     case FF_PROFILE_H264_HIGH_10:
242
-        /* XXX: High 10 can be treated as High so long as only 8-bits per
243
-         * formats are supported. */
242
+        /* XXX: High 10 can be treated as High so long as only 8 bits per
243
+         * format are supported. */
244 244
         profile = VDP_DECODER_PROFILE_H264_HIGH;
245 245
         break;
246 246
 #ifdef VDP_DECODER_PROFILE_H264_HIGH_444_PREDICTIVE
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2003-2004 The FFmpeg Project
2
+ * Copyright (C) 2003-2004 The FFmpeg project
3 3
  *
4 4
  * This file is part of FFmpeg.
5 5
  *
... ...
@@ -946,14 +946,14 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
946 946
     int num_coeffs      = s->num_coded_frags[plane][coeff_index];
947 947
     int16_t *dct_tokens = s->dct_tokens[plane][coeff_index];
948 948
 
949
-    /* local references to structure members to avoid repeated deferences */
949
+    /* local references to structure members to avoid repeated dereferences */
950 950
     int *coded_fragment_list   = s->coded_fragment_list[plane];
951 951
     Vp3Fragment *all_fragments = s->all_fragments;
952 952
     VLC_TYPE(*vlc_table)[2] = table->table;
953 953
 
954 954
     if (num_coeffs < 0)
955 955
         av_log(s->avctx, AV_LOG_ERROR,
956
-               "Invalid number of coefficents at level %d\n", coeff_index);
956
+               "Invalid number of coefficients at level %d\n", coeff_index);
957 957
 
958 958
     if (eob_run > num_coeffs) {
959 959
         coeff_i      =
... ...
@@ -1124,7 +1124,7 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
1124 1124
         c_tables[i] = &s->ac_vlc_4[ac_c_table];
1125 1125
     }
1126 1126
 
1127
-    /* decode all AC coefficents */
1127
+    /* decode all AC coefficients */
1128 1128
     for (i = 1; i <= 63; i++) {
1129 1129
         residual_eob_run = unpack_vlcs(s, gb, y_tables[i], i,
1130 1130
                                        0, residual_eob_run);
... ...
@@ -1322,7 +1322,7 @@ static void apply_loop_filter(Vp3DecodeContext *s, int plane,
1322 1322
         for (x = 0; x < width; x++) {
1323 1323
             /* This code basically just deblocks on the edges of coded blocks.
1324 1324
              * However, it has to be much more complicated because of the
1325
-             * braindamaged deblock ordering used in VP3/Theora. Order matters
1325
+             * brain damaged deblock ordering used in VP3/Theora. Order matters
1326 1326
              * because some pixels get filtered twice. */
1327 1327
             if (s->all_fragments[fragment].coding_method != MODE_COPY) {
1328 1328
                 /* do not perform left edge filter for left columns frags */
... ...
@@ -1595,7 +1595,7 @@ static void render_slice(Vp3DecodeContext *s, int slice)
1595 1595
                             /* Note, it is possible to implement all MC cases
1596 1596
                              * with put_no_rnd_pixels_l2 which would look more
1597 1597
                              * like the VP3 source but this would be slower as
1598
-                             * put_no_rnd_pixels_tab is better optimzed */
1598
+                             * put_no_rnd_pixels_tab is better optimized */
1599 1599
                             if (motion_halfpel_index != 3) {
1600 1600
                                 s->hdsp.put_no_rnd_pixels_tab[1][motion_halfpel_index](
1601 1601
                                     output_plane + first_pixel,
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * copyright (C) 2003 The FFmpeg Project
2
+ * Copyright (C) 2003 The FFmpeg project
3 3
  *
4 4
  * This file is part of FFmpeg.
5 5
  *
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Copyright (c) 2004 The FFmpeg Project
2
+ * Copyright (C) 2004 The FFmpeg project
3 3
  *
4 4
  * This file is part of FFmpeg.
5 5
  *
... ...
@@ -223,7 +223,7 @@ typedef struct VP8Context {
223 223
 
224 224
     /**
225 225
      * These are all of the updatable probabilities for binary decisions.
226
-     * They are only implictly reset on keyframes, making it quite likely
226
+     * They are only implicitly reset on keyframes, making it quite likely
227 227
      * for an interframe to desync if a prior frame's header was corrupt
228 228
      * or missing outright!
229 229
      */
... ...
@@ -271,7 +271,7 @@ typedef struct VP8Context {
271 271
     /**
272 272
      * This describes the macroblock memory layout.
273 273
      * 0 -> Only width+height*2+1 macroblocks allocated (frame/single thread).
274
-     * 1 -> Macroblocks for entire frame alloced (sliced thread).
274
+     * 1 -> Macroblocks for entire frame allocated (sliced thread).
275 275
      */
276 276
     int mb_layout;
277 277
 
... ...
@@ -47,7 +47,7 @@ typedef struct VP9DSPContext {
47 47
      */
48 48
     // FIXME(rbultje) maybe replace left/top pointers with HAVE_TOP/
49 49
     // HAVE_LEFT/HAVE_TOPRIGHT flags instead, and then handle it in-place?
50
-    // also needs to fit in with what h264/vp8/etc do
50
+    // also needs to fit in with what H.264/VP8/etc do
51 51
     void (*intra_pred[N_TXFM_SIZES][N_INTRA_PRED_MODES])(uint8_t *dst,
52 52
                                                          ptrdiff_t stride,
53 53
                                                          const uint8_t *left,
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Westwood Studios VQA Video Decoder
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (C) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -429,7 +429,7 @@ unsigned int ff_wma_get_large_val(GetBitContext *gb)
429 429
  * @param version 0 for wma1,2 1 for wmapro
430 430
  * @param ptr output buffer
431 431
  * @param offset offset in the output buffer
432
- * @param num_coefs number of input coefficents
432
+ * @param num_coefs number of input coefficients
433 433
  * @param block_len input buffer length (2^n)
434 434
  * @param frame_len_bits number of bits for escaped run codes
435 435
  * @param coef_nb_bits number of bits for escaped level codes
... ...
@@ -80,7 +80,7 @@ static av_cold int wma_decode_init(AVCodecContext *avctx)
80 80
 
81 81
     s->avctx = avctx;
82 82
 
83
-    /* extract flag infos */
83
+    /* extract flag info */
84 84
     flags2    = 0;
85 85
     extradata = avctx->extradata;
86 86
     if (avctx->codec->id == AV_CODEC_ID_WMAV1 && avctx->extradata_size >= 4)
... ...
@@ -349,7 +349,7 @@ static int decode_exp_vlc(WMACodecContext *s, int ch)
349 349
             av_log(s->avctx, AV_LOG_ERROR, "Exponent vlc invalid\n");
350 350
             return -1;
351 351
         }
352
-        /* NOTE: this offset is the same as MPEG4 AAC ! */
352
+        /* NOTE: this offset is the same as MPEG-4 AAC! */
353 353
         last_exp += code - 60;
354 354
         if ((unsigned) last_exp + 60 >= FF_ARRAY_ELEMS(pow_tab)) {
355 355
             av_log(s->avctx, AV_LOG_ERROR, "Exponent out of range: %d\n",
... ...
@@ -426,7 +426,7 @@ static void wma_window(WMACodecContext *s, float *out)
426 426
 
427 427
 /**
428 428
  * @return 0 if OK. 1 if last block of frame. return -1 if
429
- * unrecorrable error.
429
+ * unrecoverable error.
430 430
  */
431 431
 static int wma_decode_block(WMACodecContext *s)
432 432
 {
... ...
@@ -57,7 +57,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
57 57
         return AVERROR(EINVAL);
58 58
     }
59 59
 
60
-    /* extract flag infos */
60
+    /* extract flag info */
61 61
     flags1 = 0;
62 62
     flags2 = 1;
63 63
     if (avctx->codec->id == AV_CODEC_ID_WMAV1) {
... ...
@@ -105,8 +105,8 @@ typedef struct WmallDecodeCtx {
105 105
     uint32_t        frame_num;                      ///< current frame number (not used for decoding)
106 106
     GetBitContext   gb;                             ///< bitstream reader context
107 107
     int             buf_bit_size;                   ///< buffer size in bits
108
-    int16_t         *samples_16[WMALL_MAX_CHANNELS]; ///< current samplebuffer pointer (16-bit)
109
-    int32_t         *samples_32[WMALL_MAX_CHANNELS]; ///< current samplebuffer pointer (24-bit)
108
+    int16_t         *samples_16[WMALL_MAX_CHANNELS]; ///< current sample buffer pointer (16-bit)
109
+    int32_t         *samples_32[WMALL_MAX_CHANNELS]; ///< current sample buffer pointer (24-bit)
110 110
     uint8_t         drc_gain;                       ///< gain for the DRC tool
111 111
     int8_t          skip_frame;                     ///< skip output step
112 112
     int8_t          parsed_all_subframes;           ///< all subframes decoded?
... ...
@@ -1200,7 +1200,7 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr,
1200 1200
         /* parse packet header */
1201 1201
         init_get_bits(gb, buf, s->buf_bit_size);
1202 1202
         packet_sequence_number = get_bits(gb, 4);
1203
-        skip_bits(gb, 1);   // Skip seekable_frame_in_packet, currently ununused
1203
+        skip_bits(gb, 1);   // Skip seekable_frame_in_packet, currently unused
1204 1204
         spliced_packet = get_bits1(gb);
1205 1205
         if (spliced_packet)
1206 1206
             avpriv_request_sample(avctx, "Bitstream splicing");
... ...
@@ -1193,7 +1193,7 @@ static void aw_pulse_set1(WMAVoiceContext *s, GetBitContext *gb,
1193 1193
 /**
1194 1194
  * @}
1195 1195
  *
1196
- * Generate a random number from frame_cntr and block_idx, which will lief
1196
+ * Generate a random number from frame_cntr and block_idx, which will live
1197 1197
  * in the range [0, 1000 - block_size] (so it can be used as an index in a
1198 1198
  * table of size 1000 of which you want to read block_size entries).
1199 1199
  *
... ...
@@ -1516,7 +1516,7 @@ static int synth_frame(AVCodecContext *ctx, GetBitContext *gb, int frame_idx,
1516 1516
             /* Pitch is given per block. Per-block pitches are encoded as an
1517 1517
              * absolute value for the first block, and then delta values
1518 1518
              * relative to this value) for all subsequent blocks. The scale of
1519
-             * this pitch value is semi-logaritmic compared to its use in the
1519
+             * this pitch value is semi-logarithmic compared to its use in the
1520 1520
              * decoder, so we convert it to normal scale also. */
1521 1521
             int block_pitch,
1522 1522
                 t1 = (s->block_conv_table[1] - s->block_conv_table[0]) << 2,
... ...
@@ -81,7 +81,7 @@ int ff_wmv2_encode_picture_header(MpegEncContext *s, int picture_number)
81 81
     put_bits(&s->pb, 5, s->qscale);
82 82
 
83 83
     s->dc_table_index  = 1;
84
-    s->mv_table_index  = 1; /* only if P frame */
84
+    s->mv_table_index  = 1; /* only if P-frame */
85 85
     s->per_mb_rl_table = 0;
86 86
     s->mspel           = 0;
87 87
     w->per_mb_abt      = 0;
... ...
@@ -62,7 +62,7 @@
62 62
         "sub    "tmp"       , "low"                        \n\t"
63 63
 #else /* HAVE_FAST_CMOV */
64 64
 #define BRANCHLESS_GET_CABAC_UPDATE(ret, retq, low, range, tmp) \
65
-/* P4 Prescott has crappy cmov,sbb,64bit shift so avoid them */ \
65
+/* P4 Prescott has crappy cmov,sbb,64-bit shift so avoid them */ \
66 66
         "sub    "low"       , "tmp"                        \n\t"\
67 67
         "sar    $31         , "tmp"                        \n\t"\
68 68
         "sub    %%ecx       , "range"                      \n\t"\
... ...
@@ -1,5 +1,5 @@
1 1
 ;******************************************************************************
2
-;* MMX/SSSE3-optimized functions for H264 chroma MC
2
+;* MMX/SSSE3-optimized functions for H.264 chroma MC
3 3
 ;* Copyright (c) 2005 Zoltan Hidvegi <hzoli -a- hzoli -d- com>,
4 4
 ;*               2005-2008 Loren Merritt
5 5
 ;*
... ...
@@ -21,7 +21,7 @@
21 21
 
22 22
 /**
23 23
  * @file
24
- * H.264 / AVC / MPEG4 part10 codec.
24
+ * H.264 / AVC / MPEG-4 part10 codec.
25 25
  * non-MMX i386-specific optimizations for H.264
26 26
  * @author Michael Niedermayer <michaelni@gmx.at>
27 27
  */
... ...
@@ -50,7 +50,7 @@
50 50
 #endif
51 51
 
52 52
 // using regr as temporary and for the output result
53
-// first argument is unmodifed and second is trashed
53
+// first argument is unmodified and second is trashed
54 54
 // regfe is supposed to contain 0xfefefefefefefefe
55 55
 #define PAVGB_MMX_NO_RND(rega, regb, regr, regfe)                \
56 56
     "movq   "#rega", "#regr"            \n\t"                    \
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Optimized for ia32 CPUs by Nick Kurshev <nickols_k@mail.ru>
3
- * h263, mpeg1, mpeg2 dequantizer & draw_edges by Michael Niedermayer <michaelni@gmx.at>
3
+ * H.263, MPEG-1, MPEG-2 dequantizer & draw_edges by Michael Niedermayer <michaelni@gmx.at>
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -180,7 +180,7 @@ static void dct_unquantize_mpeg1_intra_mmx(MpegEncContext *s,
180 180
         block0 = block[0] * s->y_dc_scale;
181 181
     else
182 182
         block0 = block[0] * s->c_dc_scale;
183
-    /* XXX: only mpeg1 */
183
+    /* XXX: only MPEG-1 */
184 184
     quant_matrix = s->intra_matrix;
185 185
 __asm__ volatile(
186 186
                 "pcmpeqw %%mm7, %%mm7           \n\t"
... ...
@@ -335,14 +335,14 @@ INIT_XMM ssse3
335 335
 FILTER_SSSE3  put
336 336
 FILTER_SSSE3  avg
337 337
 
338
-; %1=5bits weights?, %2=dst %3=src1 %4=src3 %5=stride if sse2
338
+; %1=5-bit weights?, %2=dst %3=src1 %4=src3 %5=stride if SSE2
339 339
 %macro RV40_WCORE  4-5
340 340
     movh       m4, [%3 + r6 + 0]
341 341
     movh       m5, [%4 + r6 + 0]
342 342
 %if %0 == 4
343 343
 %define OFFSET r6 + mmsize / 2
344 344
 %else
345
-    ; 8x8 block and sse2, stride was provided
345
+    ; 8x8 block and SSE2, stride was provided
346 346
 %define OFFSET r6
347 347
     add        r6, r5
348 348
 %endif
... ...
@@ -350,7 +350,7 @@ FILTER_SSSE3  avg
350 350
     movh       m7, [%4 + OFFSET]
351 351
 
352 352
 %if %1 == 0
353
-    ; 14bits weights
353
+    ; 14-bit weights
354 354
     punpcklbw  m4, m0
355 355
     punpcklbw  m5, m0
356 356
     punpcklbw  m6, m0
... ...
@@ -368,7 +368,7 @@ FILTER_SSSE3  avg
368 368
     paddw      m4, m5
369 369
     paddw      m6, m7
370 370
 %else
371
-    ; 5bits weights
371
+    ; 5-bit weights
372 372
 %if cpuflag(ssse3)
373 373
     punpcklbw  m4, m5
374 374
     punpcklbw  m6, m7
... ...
@@ -404,7 +404,7 @@ FILTER_SSSE3  avg
404 404
 
405 405
     packuswb   m4, m6
406 406
 %if %0 == 5
407
-    ; Only called for 8x8 blocks and sse2
407
+    ; Only called for 8x8 blocks and SSE2
408 408
     sub        r6, r5
409 409
     movh       [%2 + r6], m4
410 410
     add        r6, r5
... ...
@@ -76,7 +76,7 @@ void ff_vc1_avg_hor_16b_shift2_mmxext(uint8_t *dst, x86_reg stride,
76 76
 
77 77
 /**
78 78
  * Purely vertical or horizontal 1/2 shift interpolation.
79
- * Sacrify mm6 for *9 factor.
79
+ * Sacrifice mm6 for *9 factor.
80 80
  */
81 81
 #define VC1_SHIFT2(OP, OPNAME)\
82 82
 static void OPNAME ## vc1_shift2_mmx(uint8_t *dst, const uint8_t *src,\
... ...
@@ -135,7 +135,7 @@ VC1_SHIFT2(OP_AVG, avg_)
135 135
 /**
136 136
  * Core of the 1/4 and 3/4 shift bicubic interpolation.
137 137
  *
138
- * @param UNPACK  Macro unpacking arguments from 8 to 16bits (can be empty).
138
+ * @param UNPACK  Macro unpacking arguments from 8 to 16 bits (can be empty).
139 139
  * @param MOVQ    "movd 1" or "movq 2", if data read is already unpacked.
140 140
  * @param A1      Address of 1st tap (beware of unpacked/packed).
141 141
  * @param A2      Address of 2nd tap
... ...
@@ -175,7 +175,7 @@ VC1_SHIFT2(OP_AVG, avg_)
175 175
      "paddw     %%mm2, %%mm4    \n\t" /* 4,53,18,-3 */
176 176
 
177 177
 /**
178
- * Macro to build the vertical 16bits version of vc1_put_shift[13].
178
+ * Macro to build the vertical 16 bits version of vc1_put_shift[13].
179 179
  * Here, offset=src_stride. Parameters passed A1 to A4 must use
180 180
  * %3 (src_stride) and %4 (3*src_stride).
181 181
  *
... ...
@@ -233,8 +233,8 @@ vc1_put_ver_16b_ ## NAME ## _mmx(int16_t *dst, const uint8_t *src,      \
233 233
 }
234 234
 
235 235
 /**
236
- * Macro to build the horizontal 16bits version of vc1_put_shift[13].
237
- * Here, offset=16bits, so parameters passed A1 to A4 should be simple.
236
+ * Macro to build the horizontal 16 bits version of vc1_put_shift[13].
237
+ * Here, offset=16 bits, so parameters passed A1 to A4 should be simple.
238 238
  *
239 239
  * @param  NAME   Either 1 or 3
240 240
  * @see MSPEL_FILTER13_CORE for information on A1->A4
... ...
@@ -271,7 +271,7 @@ OPNAME ## vc1_hor_16b_ ## NAME ## _mmx(uint8_t *dst, x86_reg stride,    \
271 271
 }
272 272
 
273 273
 /**
274
- * Macro to build the 8bits, any direction, version of vc1_put_shift[13].
274
+ * Macro to build the 8 bits, any direction, version of vc1_put_shift[13].
275 275
  * Here, offset=src_stride. Parameters passed A1 to A4 must use
276 276
  * %3 (offset) and %4 (3*offset).
277 277
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Wing Commander/Xan Video Decoder
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (C) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -513,7 +513,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
513 513
     if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
514 514
         return ret;
515 515
 
516
-    if (c->comp == 0) { //Uncompressed data
516
+    if (c->comp == 0) { // uncompressed data
517 517
         if (c->decomp_size < len) {
518 518
             av_log(avctx, AV_LOG_ERROR, "Buffer too small\n");
519 519
             return AVERROR_INVALIDDATA;
... ...
@@ -77,7 +77,7 @@ typedef struct X11GrabContext {
77 77
     Display *dpy;            /**< X11 display from which x11grab grabs frames */
78 78
     XImage *image;           /**< X11 image holding the grab */
79 79
     int use_shm;             /**< !0 when using XShm extension */
80
-    XShmSegmentInfo shminfo; /**< When using XShm, keeps track of XShm infos */
80
+    XShmSegmentInfo shminfo; /**< When using XShm, keeps track of XShm info */
81 81
     int draw_mouse;          /**< Set by a private option. */
82 82
     int follow_mouse;        /**< Set by a private option. */
83 83
     int show_region;         /**< set by a private option. */
... ...
@@ -47,7 +47,7 @@ enum FieldType {
47 47
 typedef struct InterlaceContext {
48 48
     const AVClass *class;
49 49
     enum ScanMode scan;    // top or bottom field first scanning
50
-    int lowpass;           // enable or disable low pass filterning
50
+    int lowpass;           // enable or disable low pass filtering
51 51
     AVFrame *cur, *next;   // the two frames from which the new one is obtained
52 52
     void (*lowpass_line)(uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp,
53 53
                          const uint8_t *srcp_above, const uint8_t *srcp_below);
... ...
@@ -26,9 +26,9 @@
26 26
  *
27 27
  * Apply a boxblur debanding algorithm (based on the gradfun2db
28 28
  * AviSynth filter by prunedtree).
29
- * Foreach pixel, if it's within threshold of the blurred value, make it closer.
30
- * So now we have a smoothed and higher bitdepth version of all the shallow
31
- * gradients, while leaving detailed areas untouched.
29
+ * For each pixel, if it is within the threshold of the blurred value, make it
30
+ * closer. So now we have a smoothed and higher bitdepth version of all the
31
+ * shallow gradients, while leaving detailed areas untouched.
32 32
  * Dither it back to 8bit.
33 33
  */
34 34
 
... ...
@@ -127,7 +127,7 @@ static int denoise_depth(HQDN3DContext *s,
127 127
                          int w, int h, int sstride, int dstride,
128 128
                          int16_t *spatial, int16_t *temporal, int depth)
129 129
 {
130
-    // FIXME: For 16bit depth, frame_ant could be a pointer to the previous
130
+    // FIXME: For 16-bit depth, frame_ant could be a pointer to the previous
131 131
     // filtered frame rather than a separate buffer.
132 132
     long x, y;
133 133
     uint16_t *frame_ant = *frame_ant_ptr;
... ...
@@ -108,7 +108,7 @@ enum OverlayFormat {
108 108
 
109 109
 typedef struct OverlayContext {
110 110
     const AVClass *class;
111
-    int x, y;                   ///< position of overlayed picture
111
+    int x, y;                   ///< position of overlaid picture
112 112
 
113 113
     int allow_packed_rgb;
114 114
     uint8_t main_is_packed_rgb;
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * 4X Technologies .4xm File Demuxer (no muxer)
3
- * Copyright (c) 2003  The FFmpeg Project
3
+ * Copyright (c) 2003  The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -32,7 +32,7 @@ static int aea_read_probe(AVProbeData *p)
32 32
     if (p->buf_size <= 2048+212)
33 33
         return 0;
34 34
 
35
-    /* Magic is '00 08 00 00' in Little Endian*/
35
+    /* Magic is '00 08 00 00' in little-endian*/
36 36
     if (AV_RL32(p->buf)==0x800) {
37 37
         int ch, i;
38 38
         ch = p->buf[264];
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * amr file format
3
- * Copyright (c) 2001 ffmpeg project
3
+ * Copyright (c) 2001 FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -121,7 +121,7 @@ static int amr_read_packet(AVFormatContext *s, AVPacket *pkt)
121 121
         return AVERROR(EIO);
122 122
     }
123 123
 
124
-    // FIXME this is wrong, this should rather be in a AVParser
124
+    // FIXME this is wrong, this should rather be in an AVParser
125 125
     toc  = avio_r8(s->pb);
126 126
     mode = (toc >> 3) & 0x0F;
127 127
 
... ...
@@ -48,7 +48,7 @@ typedef struct ASFMainHeader {
48 48
                                  *   invalid if broadcasting (could be ignored) */
49 49
     uint32_t preroll;           /**< timestamp of the first packet, in milliseconds
50 50
                                  *   if nonzero - subtract from time */
51
-    uint32_t ignore;            ///< preroll is 64bit - but let's just ignore it
51
+    uint32_t ignore;            ///< preroll is 64 bits - but let's just ignore it
52 52
     uint32_t flags;             /**< 0x01 - broadcast
53 53
                                  *   0x02 - seekable
54 54
                                  *   rest is reserved should be 0 */
... ...
@@ -121,8 +121,8 @@ typedef struct ASFContext {
121 121
 
122 122
     int stream_index; // from packet header, for the subpayload case
123 123
 
124
-    // packet parameteres
125
-    uint64_t sub_header_offset; // offset of subplayload header
124
+    // packet parameters
125
+    uint64_t sub_header_offset; // offset of subpayload header
126 126
     int64_t sub_dts;
127 127
     uint8_t dts_delta; // for subpayloads
128 128
     uint32_t packet_size_internal; // packet size stored inside ASFPacket, can be 0
... ...
@@ -227,7 +227,7 @@ typedef struct ASFContext {
227 227
     const char *languages[128];
228 228
     int nb_languages;
229 229
     int64_t creation_time;
230
-    /* non streamed additonnal info */
230
+    /* non-streamed additional info */
231 231
     uint64_t nb_packets;                 ///< how many packets are there in the file, invalid if broadcasting
232 232
     int64_t duration;                    ///< in 100ns units
233 233
     /* packet filling */
... ...
@@ -578,7 +578,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size,
578 578
     }
579 579
     end_header(pb, hpos);
580 580
 
581
-    /* title and other infos */
581
+    /* title and other info */
582 582
     if (has_title) {
583 583
         int len;
584 584
         uint8_t *buf;
... ...
@@ -106,7 +106,7 @@ int ff_avc_parse_nal_units_buf(const uint8_t *buf_in, uint8_t **buf, int *size)
106 106
 int ff_isom_write_avcc(AVIOContext *pb, const uint8_t *data, int len)
107 107
 {
108 108
     if (len > 6) {
109
-        /* check for h264 start code */
109
+        /* check for H.264 start code */
110 110
         if (AV_RB32(data) == 0x00000001 ||
111 111
             AV_RB24(data) == 0x000001) {
112 112
             uint8_t *buf=NULL, *end, *start;
... ...
@@ -670,7 +670,7 @@ static int avi_read_header(AVFormatContext *s)
670 670
                 av_log(s, AV_LOG_ERROR, "crazy start time, iam scared, giving up\n");
671 671
                 ast->cum_len = 0;
672 672
             }
673
-            ast->sample_size = avio_rl32(pb); /* sample ssize */
673
+            ast->sample_size = avio_rl32(pb);
674 674
             ast->cum_len    *= FFMAX(1, ast->sample_size);
675 675
             av_log(s, AV_LOG_TRACE, "%"PRIu32" %"PRIu32" %d\n",
676 676
                     ast->rate, ast->scale, ast->sample_size);
... ...
@@ -414,14 +414,14 @@ int avio_put_str16le(AVIOContext *s, const char *str);
414 414
 int avio_put_str16be(AVIOContext *s, const char *str);
415 415
 
416 416
 /**
417
- * Passing this as the "whence" parameter to a seek function causes it to
417
+ * ORing this as the "whence" parameter to a seek function causes it to
418 418
  * return the filesize without seeking anywhere. Supporting this is optional.
419 419
  * If it is not supported then the seek function will return <0.
420 420
  */
421 421
 #define AVSEEK_SIZE 0x10000
422 422
 
423 423
 /**
424
- * Oring this flag as into the "whence" parameter to a seek function causes it to
424
+ * Passing this flag as the "whence" parameter to a seek function causes it to
425 425
  * seek by any means (like reopening and linear reading) or other normally unreasonable
426 426
  * means that can be extremely slow.
427 427
  * This may be ignored by the seek code.
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * AviSynth/AvxSynth support
3
- * Copyright (c) 2012 AvxSynth Team.
3
+ * Copyright (c) 2012 AvxSynth Team
4 4
  *
5 5
  * This file is part of FFmpeg
6 6
  * FFmpeg is free software; you can redistribute it and/or
... ...
@@ -26,7 +26,7 @@
26 26
  */
27 27
 enum AVLangCodespace {
28 28
     AV_LANG_ISO639_2_BIBL, /** 3-char bibliographic language codes as per ISO-IEC 639-2 */
29
-    AV_LANG_ISO639_2_TERM, /** 3-char terminologic language codes as per ISO-IEC 639-2 */
29
+    AV_LANG_ISO639_2_TERM, /** 3-char terminological language codes as per ISO-IEC 639-2 */
30 30
     AV_LANG_ISO639_1       /** 2-char code of language as per ISO/IEC 639-1 */
31 31
 };
32 32
 
... ...
@@ -264,7 +264,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
264 264
             pkt->pts = bink->audio_pts[bink->current_track - 1];
265 265
 
266 266
             /* Each audio packet reports the number of decompressed samples
267
-               (in bytes). We use this value to calcuate the audio PTS */
267
+               (in bytes). We use this value to calculate the audio PTS */
268 268
             if (pkt->size >= 4)
269 269
                 bink->audio_pts[bink->current_track -1] +=
270 270
                     AV_RL32(pkt->data) / (2 * s->streams[bink->current_track]->codecpar->channels);
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Discworld II BMV demuxer
3
- * Copyright (c) 2011 Konstantin Shishkov.
3
+ * Copyright (c) 2011 Konstantin Shishkov
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -393,7 +393,7 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
393 393
             dump_paramchange(ctx, &sd);
394 394
             break;
395 395
         case AV_PKT_DATA_H263_MB_INFO:
396
-            av_log(ctx, AV_LOG_INFO, "h263 macroblock info");
396
+            av_log(ctx, AV_LOG_INFO, "H.263 macroblock info");
397 397
             break;
398 398
         case AV_PKT_DATA_REPLAYGAIN:
399 399
             av_log(ctx, AV_LOG_INFO, "replaygain: ");
... ...
@@ -110,11 +110,11 @@ static const int dv_audio_frequency[3] = {
110 110
 
111 111
 /*
112 112
  * There's a couple of assumptions being made here:
113
- * 1. By default we silence erroneous (0x8000/16bit 0x800/12bit) audio samples.
113
+ * 1. By default we silence erroneous (0x8000/16-bit 0x800/12-bit) audio samples.
114 114
  *    We can pass them upwards when libavcodec will be ready to deal with them.
115 115
  * 2. We don't do software emphasis.
116
- * 3. Audio is always returned as 16bit linear samples: 12bit nonlinear samples
117
- *    are converted into 16bit linear ones.
116
+ * 3. Audio is always returned as 16-bit linear samples: 12-bit nonlinear samples
117
+ *    are converted into 16-bit linear ones.
118 118
  */
119 119
 static int dv_extract_audio(const uint8_t *frame, uint8_t **ppcm,
120 120
                             const AVDVProfile *sys)
... ...
@@ -130,7 +130,7 @@ static int dv_extract_audio(const uint8_t *frame, uint8_t **ppcm,
130 130
 
131 131
     smpls = as_pack[1]      & 0x3f; /* samples in this frame - min. samples */
132 132
     freq  = as_pack[4] >> 3 & 0x07; /* 0 - 48kHz, 1 - 44,1kHz, 2 - 32kHz */
133
-    quant = as_pack[4]      & 0x07; /* 0 - 16bit linear, 1 - 12bit nonlinear */
133
+    quant = as_pack[4]      & 0x07; /* 0 - 16-bit linear, 1 - 12-bit nonlinear */
134 134
 
135 135
     if (quant > 1)
136 136
         return -1;  /* unsupported quantization */
... ...
@@ -161,7 +161,7 @@ static int dv_extract_audio(const uint8_t *frame, uint8_t **ppcm,
161 161
         for (i = 0; i < sys->difseg_size; i++) {
162 162
             frame += 6 * 80; /* skip DIF segment header */
163 163
             if (quant == 1 && i == half_ch) {
164
-                /* next stereo channel (12bit mode only) */
164
+                /* next stereo channel (12-bit mode only) */
165 165
                 av_assert0(ipcm<4);
166 166
                 pcm = ppcm[ipcm++];
167 167
                 if (!pcm)
... ...
@@ -171,7 +171,7 @@ static int dv_extract_audio(const uint8_t *frame, uint8_t **ppcm,
171 171
             /* for each AV sequence */
172 172
             for (j = 0; j < 9; j++) {
173 173
                 for (d = 8; d < 80; d += 2) {
174
-                    if (quant == 0) {  /* 16bit quantization */
174
+                    if (quant == 0) {  /* 16-bit quantization */
175 175
                         of = sys->audio_shuffle[i][j] +
176 176
                              (d - 8) / 2 * sys->audio_stride;
177 177
                         if (of * 2 >= size)
... ...
@@ -184,7 +184,7 @@ static int dv_extract_audio(const uint8_t *frame, uint8_t **ppcm,
184 184
 
185 185
                         if (pcm[of * 2 + 1] == 0x80 && pcm[of * 2] == 0x00)
186 186
                             pcm[of * 2 + 1] = 0;
187
-                    } else {           /* 12bit quantization */
187
+                    } else {           /* 12-bit quantization */
188 188
                         lc = ((uint16_t)frame[d]     << 4) |
189 189
                              ((uint16_t)frame[d + 2] >> 4);
190 190
                         rc = ((uint16_t)frame[d + 1] << 4) |
... ...
@@ -233,7 +233,7 @@ static int dv_extract_audio_info(DVDemuxContext *c, const uint8_t *frame)
233 233
     smpls = as_pack[1]      & 0x3f; /* samples in this frame - min. samples */
234 234
     freq  = as_pack[4] >> 3 & 0x07; /* 0 - 48kHz, 1 - 44,1kHz, 2 - 32kHz */
235 235
     stype = as_pack[3]      & 0x1f; /* 0 - 2CH, 2 - 4CH, 3 - 8CH */
236
-    quant = as_pack[4]      & 0x07; /* 0 - 16bit linear, 1 - 12bit nonlinear */
236
+    quant = as_pack[4]      & 0x07; /* 0 - 16-bit linear, 1 - 12-bit nonlinear */
237 237
 
238 238
     if (freq >= FF_ARRAY_ELEMS(dv_audio_frequency)) {
239 239
         av_log(c->fctx, AV_LOG_ERROR,
... ...
@@ -41,7 +41,7 @@
41 41
 #include "libavutil/opt.h"
42 42
 #include "libavutil/timecode.h"
43 43
 
44
-#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
44
+#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32-bit audio
45 45
 
46 46
 struct DVMuxContext {
47 47
     AVClass          *av_class;
... ...
@@ -125,7 +125,7 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu
125 125
         buf[4] = (1 << 7) | /* emphasis: 1 -- off */
126 126
                  (0 << 6) | /* emphasis time constant: 0 -- reserved */
127 127
                  (audio_type << 3) | /* frequency: 0 -- 48kHz, 1 -- 44,1kHz, 2 -- 32kHz */
128
-                  0;        /* quantization: 0 -- 16bit linear, 1 -- 12bit nonlinear */
128
+                  0;        /* quantization: 0 -- 16-bit linear, 1 -- 12-bit nonlinear */
129 129
 
130 130
         va_end(ap);
131 131
         break;
... ...
@@ -1,5 +1,5 @@
1 1
 /* Electronic Arts Multimedia File Demuxer
2
- * Copyright (c) 2004 The FFmpeg Project
2
+ * Copyright (c) 2004  The FFmpeg project
3 3
  * Copyright (c) 2006-2008 Peter Ross
4 4
  *
5 5
  * This file is part of FFmpeg.
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * FLI/FLC Animation File Demuxer
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -4,8 +4,8 @@
4 4
  *
5 5
  * This demuxer will generate a 1 byte extradata for VP6F content.
6 6
  * It is composed of:
7
- *  - upper 4bits: difference between encoded width and visible width
8
- *  - lower 4bits: difference between encoded height and visible height
7
+ *  - upper 4 bits: difference between encoded width and visible width
8
+ *  - lower 4 bits: difference between encoded height and visible height
9 9
  *
10 10
  * This file is part of FFmpeg.
11 11
  *
... ...
@@ -57,7 +57,7 @@ typedef struct GXFStreamContext {
57 57
     int pframes;
58 58
     int bframes;
59 59
     int p_per_gop;
60
-    int b_per_i_or_p; ///< number of B frames per I frame or P frame
60
+    int b_per_i_or_p; ///< number of B-frames per I-frame or P-frame
61 61
     int first_gop_closed;
62 62
     unsigned order;   ///< interleaving order
63 63
 } GXFStreamContext;
... ...
@@ -62,7 +62,7 @@ typedef struct HTTPAuthState {
62 62
      */
63 63
     char realm[200];
64 64
     /**
65
-     * The parameters specifiec to digest authentication.
65
+     * The parameters specific to digest authentication.
66 66
      */
67 67
     DigestParams digest_params;
68 68
     /**
... ...
@@ -84,7 +84,7 @@ static int id3v2_put_ttag(ID3v2EncContext *id3, AVIOContext *avioc, const char *
84 84
     len = avio_close_dyn_buf(dyn_buf, &pb);
85 85
 
86 86
     avio_wb32(avioc, tag);
87
-    /* ID3v2.3 frame size is not synchsafe */
87
+    /* ID3v2.3 frame size is not sync-safe */
88 88
     if (id3->version == 3)
89 89
         avio_wb32(avioc, len);
90 90
     else
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * id Quake II CIN File Demuxer
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -33,7 +33,7 @@
33 33
  * types. However, a CIN file does start with 5 32-bit numbers that
34 34
  * specify audio and video parameters. This demuxer gets around the lack
35 35
  * of file signature by performing sanity checks on those parameters.
36
- * Probabalistically, this is a reasonable solution since the number of
36
+ * Probabilistically, this is a reasonable solution since the number of
37 37
  * valid combinations of the 5 parameters is a very small subset of the
38 38
  * total 160-bit number space.
39 39
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * id RoQ (.roq) File Demuxer
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -564,7 +564,7 @@ int ffio_open2_wrapper(struct AVFormatContext *s, AVIOContext **pb, const char *
564 564
 
565 565
 /*
566 566
  * A wrapper around AVFormatContext.io_close that should be used
567
- * intead of calling the pointer directly.
567
+ * instead of calling the pointer directly.
568 568
  */
569 569
 void ff_format_io_close(AVFormatContext *s, AVIOContext **pb);
570 570
 
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Interplay MVE File Demuxer
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -38,15 +38,15 @@ const AVCodecTag ff_mp4_obj_type[] = {
38 38
     { AV_CODEC_ID_HEVC        , 0x23 },
39 39
     { AV_CODEC_ID_AAC         , 0x40 },
40 40
     { AV_CODEC_ID_MP4ALS      , 0x40 }, /* 14496-3 ALS */
41
-    { AV_CODEC_ID_MPEG2VIDEO  , 0x61 }, /* MPEG2 Main */
42
-    { AV_CODEC_ID_MPEG2VIDEO  , 0x60 }, /* MPEG2 Simple */
43
-    { AV_CODEC_ID_MPEG2VIDEO  , 0x62 }, /* MPEG2 SNR */
44
-    { AV_CODEC_ID_MPEG2VIDEO  , 0x63 }, /* MPEG2 Spatial */
45
-    { AV_CODEC_ID_MPEG2VIDEO  , 0x64 }, /* MPEG2 High */
46
-    { AV_CODEC_ID_MPEG2VIDEO  , 0x65 }, /* MPEG2 422 */
47
-    { AV_CODEC_ID_AAC         , 0x66 }, /* MPEG2 AAC Main */
48
-    { AV_CODEC_ID_AAC         , 0x67 }, /* MPEG2 AAC Low */
49
-    { AV_CODEC_ID_AAC         , 0x68 }, /* MPEG2 AAC SSR */
41
+    { AV_CODEC_ID_MPEG2VIDEO  , 0x61 }, /* MPEG-2 Main */
42
+    { AV_CODEC_ID_MPEG2VIDEO  , 0x60 }, /* MPEG-2 Simple */
43
+    { AV_CODEC_ID_MPEG2VIDEO  , 0x62 }, /* MPEG-2 SNR */
44
+    { AV_CODEC_ID_MPEG2VIDEO  , 0x63 }, /* MPEG-2 Spatial */
45
+    { AV_CODEC_ID_MPEG2VIDEO  , 0x64 }, /* MPEG-2 High */
46
+    { AV_CODEC_ID_MPEG2VIDEO  , 0x65 }, /* MPEG-2 422 */
47
+    { AV_CODEC_ID_AAC         , 0x66 }, /* MPEG-2 AAC Main */
48
+    { AV_CODEC_ID_AAC         , 0x67 }, /* MPEG-2 AAC Low */
49
+    { AV_CODEC_ID_AAC         , 0x68 }, /* MPEG-2 AAC SSR */
50 50
     { AV_CODEC_ID_MP3         , 0x69 }, /* 13818-3 */
51 51
     { AV_CODEC_ID_MP2         , 0x69 }, /* 11172-3 */
52 52
     { AV_CODEC_ID_MPEG1VIDEO  , 0x6A }, /* 11172-2 */
... ...
@@ -59,10 +59,10 @@ const AVCodecTag ff_mp4_obj_type[] = {
59 59
     { AV_CODEC_ID_AC3         , 0xA5 },
60 60
     { AV_CODEC_ID_EAC3        , 0xA6 },
61 61
     { AV_CODEC_ID_DTS         , 0xA9 }, /* mp4ra.org */
62
-    { AV_CODEC_ID_VP9         , 0xC0 }, /* non standard, update when there is a standard value */
63
-    { AV_CODEC_ID_TSCC2       , 0xD0 }, /* non standard, camtasia uses it */
64
-    { AV_CODEC_ID_VORBIS      , 0xDD }, /* non standard, gpac uses it */
65
-    { AV_CODEC_ID_DVD_SUBTITLE, 0xE0 }, /* non standard, see unsupported-embedded-subs-2.mp4 */
62
+    { AV_CODEC_ID_VP9         , 0xC0 }, /* nonstandard, update when there is a standard value */
63
+    { AV_CODEC_ID_TSCC2       , 0xD0 }, /* nonstandard, camtasia uses it */
64
+    { AV_CODEC_ID_VORBIS      , 0xDD }, /* nonstandard, gpac uses it */
65
+    { AV_CODEC_ID_DVD_SUBTITLE, 0xE0 }, /* nonstandard, see unsupported-embedded-subs-2.mp4 */
66 66
     { AV_CODEC_ID_QCELP       , 0xE1 },
67 67
     { AV_CODEC_ID_MPEG4SYSTEMS, 0x01 },
68 68
     { AV_CODEC_ID_MPEG4SYSTEMS, 0x02 },
... ...
@@ -72,10 +72,10 @@ const AVCodecTag ff_mp4_obj_type[] = {
72 72
 const AVCodecTag ff_codec_movvideo_tags[] = {
73 73
 /*  { AV_CODEC_ID_, MKTAG('I', 'V', '5', '0') }, *//* Indeo 5.0 */
74 74
 
75
-    { AV_CODEC_ID_RAWVIDEO, MKTAG('r', 'a', 'w', ' ') }, /* Uncompressed RGB */
76
-    { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') }, /* Uncompressed YUV422 */
77
-    { AV_CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') }, /* UNCOMPRESSED 8BIT 4:2:2 */
78
-    { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') }, /* same as 2vuy but byte swapped */
75
+    { AV_CODEC_ID_RAWVIDEO, MKTAG('r', 'a', 'w', ' ') }, /* uncompressed RGB */
76
+    { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') }, /* uncompressed YUV422 */
77
+    { AV_CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') }, /* uncompressed 8-bit 4:2:2 */
78
+    { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') }, /* same as 2VUY but byte-swapped */
79 79
 
80 80
     { AV_CODEC_ID_RAWVIDEO, MKTAG('L', '5', '5', '5') },
81 81
     { AV_CODEC_ID_RAWVIDEO, MKTAG('L', '5', '6', '5') },
... ...
@@ -94,18 +94,18 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
94 94
     { AV_CODEC_ID_RAWVIDEO, MKTAG('R', '4', '2', '0') }, /* Radius DV YUV PAL */
95 95
     { AV_CODEC_ID_RAWVIDEO, MKTAG('R', '4', '1', '1') }, /* Radius DV YUV NTSC */
96 96
 
97
-    { AV_CODEC_ID_R10K,   MKTAG('R', '1', '0', 'k') }, /* UNCOMPRESSED 10BIT RGB */
98
-    { AV_CODEC_ID_R10K,   MKTAG('R', '1', '0', 'g') }, /* UNCOMPRESSED 10BIT RGB */
99
-    { AV_CODEC_ID_R210,   MKTAG('r', '2', '1', '0') }, /* UNCOMPRESSED 10BIT RGB */
97
+    { AV_CODEC_ID_R10K,   MKTAG('R', '1', '0', 'k') }, /* uncompressed 10-bit RGB */
98
+    { AV_CODEC_ID_R10K,   MKTAG('R', '1', '0', 'g') }, /* uncompressed 10-bit RGB */
99
+    { AV_CODEC_ID_R210,   MKTAG('r', '2', '1', '0') }, /* uncompressed 10-bit RGB */
100 100
     { AV_CODEC_ID_AVUI,   MKTAG('A', 'V', 'U', 'I') }, /* AVID Uncompressed deinterleaved UYVY422 */
101 101
     { AV_CODEC_ID_AVRP,   MKTAG('A', 'V', 'r', 'p') }, /* Avid 1:1 10-bit RGB Packer */
102 102
     { AV_CODEC_ID_AVRP,   MKTAG('S', 'U', 'D', 'S') }, /* Avid DS Uncompressed */
103
-    { AV_CODEC_ID_V210,   MKTAG('v', '2', '1', '0') }, /* UNCOMPRESSED 10BIT 4:2:2 */
104
-    { AV_CODEC_ID_V210,   MKTAG('b', 'x', 'y', '2') }, /* BOXX 10BIT 4:2:2 */
105
-    { AV_CODEC_ID_V308,   MKTAG('v', '3', '0', '8') }, /* UNCOMPRESSED  8BIT 4:4:4 */
106
-    { AV_CODEC_ID_V408,   MKTAG('v', '4', '0', '8') }, /* UNCOMPRESSED  8BIT 4:4:4:4 */
107
-    { AV_CODEC_ID_V410,   MKTAG('v', '4', '1', '0') }, /* UNCOMPRESSED 10BIT 4:4:4 */
108
-    { AV_CODEC_ID_Y41P,   MKTAG('Y', '4', '1', 'P') }, /* UNCOMPRESSED 12BIT 4:1:1 */
103
+    { AV_CODEC_ID_V210,   MKTAG('v', '2', '1', '0') }, /* uncompressed 10-bit 4:2:2 */
104
+    { AV_CODEC_ID_V210,   MKTAG('b', 'x', 'y', '2') }, /* BOXX 10-bit 4:2:2 */
105
+    { AV_CODEC_ID_V308,   MKTAG('v', '3', '0', '8') }, /* uncompressed  8-bit 4:4:4 */
106
+    { AV_CODEC_ID_V408,   MKTAG('v', '4', '0', '8') }, /* uncompressed  8-bit 4:4:4:4 */
107
+    { AV_CODEC_ID_V410,   MKTAG('v', '4', '1', '0') }, /* uncompressed 10-bit 4:4:4 */
108
+    { AV_CODEC_ID_Y41P,   MKTAG('Y', '4', '1', 'P') }, /* uncompressed 12-bit 4:1:1 */
109 109
     { AV_CODEC_ID_YUV4,   MKTAG('y', 'u', 'v', '4') }, /* libquicktime packed yuv420p */
110 110
     { AV_CODEC_ID_TARGA_Y216, MKTAG('Y', '2', '1', '6') },
111 111
 
... ...
@@ -126,8 +126,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
126 126
     { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
127 127
     { AV_CODEC_ID_MPEG4, MKTAG('3', 'I', 'V', '2') }, /* experimental: 3IVX files before ivx D4 4.5.1 */
128 128
 
129
-    { AV_CODEC_ID_H263, MKTAG('h', '2', '6', '3') }, /* H263 */
130
-    { AV_CODEC_ID_H263, MKTAG('s', '2', '6', '3') }, /* H263 ?? works */
129
+    { AV_CODEC_ID_H263, MKTAG('h', '2', '6', '3') }, /* H.263 */
130
+    { AV_CODEC_ID_H263, MKTAG('s', '2', '6', '3') }, /* H.263 ?? works */
131 131
 
132 132
     { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', 'p') }, /* DV PAL */
133 133
     { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', ' ') }, /* DV NTSC */
... ...
@@ -177,7 +177,7 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
177 177
     { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC-Intra 100M 1080i50 */
178 178
     { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '6') }, /* AVC-Intra 100M 1080i60 */
179 179
     { AV_CODEC_ID_H264, MKTAG('A', 'V', 'i', 'n') }, /* AVC-Intra with implicit SPS/PPS */
180
-    { AV_CODEC_ID_H264, MKTAG('a', 'i', 'v', 'x') }, /* XAVC 4:2:2 10bit */
180
+    { AV_CODEC_ID_H264, MKTAG('a', 'i', 'v', 'x') }, /* XAVC 10-bit 4:2:2 */
181 181
     { AV_CODEC_ID_H264, MKTAG('r', 'v', '6', '4') }, /* X-Com Radvision */
182 182
 
183 183
     { AV_CODEC_ID_VP9,  MKTAG('v', 'p', '0', '9') }, /* VP9 */
... ...
@@ -187,22 +187,22 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
187 187
     { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */
188 188
     { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', '1', 'v') }, /* CoreMedia CMVideoCodecType */
189 189
     { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', '2', 'v', '1') }, /* Apple MPEG-2 Camcorder */
190
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '1') }, /* MPEG2 HDV 720p30 */
191
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '2') }, /* MPEG2 HDV 1080i60 */
192
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '3') }, /* MPEG2 HDV 1080i50 */
193
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '4') }, /* MPEG2 HDV 720p24 */
194
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '5') }, /* MPEG2 HDV 720p25 */
195
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '6') }, /* MPEG2 HDV 1080p24 */
196
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '7') }, /* MPEG2 HDV 1080p25 */
197
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '8') }, /* MPEG2 HDV 1080p30 */
198
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '9') }, /* MPEG2 HDV 720p60 JVC */
199
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', 'a') }, /* MPEG2 HDV 720p50 */
200
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'n') }, /* MPEG2 IMX NTSC 525/60 50mb/s produced by FCP */
201
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'p') }, /* MPEG2 IMX PAL 625/50 50mb/s produced by FCP */
202
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'n') }, /* MPEG2 IMX NTSC 525/60 40mb/s produced by FCP */
203
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'p') }, /* MPEG2 IMX PAL 625/50 40mb/s produced by FCP */
204
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'n') }, /* MPEG2 IMX NTSC 525/60 30mb/s produced by FCP */
205
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'p') }, /* MPEG2 IMX PAL 625/50 30mb/s produced by FCP */
190
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '1') }, /* MPEG-2 HDV 720p30 */
191
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '2') }, /* MPEG-2 HDV 1080i60 */
192
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '3') }, /* MPEG-2 HDV 1080i50 */
193
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '4') }, /* MPEG-2 HDV 720p24 */
194
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '5') }, /* MPEG-2 HDV 720p25 */
195
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '6') }, /* MPEG-2 HDV 1080p24 */
196
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '7') }, /* MPEG-2 HDV 1080p25 */
197
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '8') }, /* MPEG-2 HDV 1080p30 */
198
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '9') }, /* MPEG-2 HDV 720p60 JVC */
199
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', 'a') }, /* MPEG-2 HDV 720p50 */
200
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'n') }, /* MPEG-2 IMX NTSC 525/60 50mb/s produced by FCP */
201
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'p') }, /* MPEG-2 IMX PAL 625/50 50mb/s produced by FCP */
202
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'n') }, /* MPEG-2 IMX NTSC 525/60 40mb/s produced by FCP */
203
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'p') }, /* MPEG-2 IMX PAL 625/50 40mb/s produced by FCP */
204
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'n') }, /* MPEG-2 IMX NTSC 525/60 30mb/s produced by FCP */
205
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'p') }, /* MPEG-2 IMX PAL 625/50 30mb/s produced by FCP */
206 206
     { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '1') }, /* XDCAM HD422 720p30 CBR */
207 207
     { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '4') }, /* XDCAM HD422 720p24 CBR */
208 208
     { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '5') }, /* XDCAM HD422 720p25 CBR */
... ...
@@ -357,7 +357,7 @@ const AVCodecTag ff_codec_movsubtitle_tags[] = {
357 357
 /* map numeric codes from mdhd atom to ISO 639 */
358 358
 /* cf. QTFileFormat.pdf p253, qtff.pdf p205 */
359 359
 /* http://developer.apple.com/documentation/mac/Text/Text-368.html */
360
-/* deprecated by putting the code as 3*5bit ascii */
360
+/* deprecated by putting the code as 3*5 bits ASCII */
361 361
 static const char mov_mdhd_language_map[][4] = {
362 362
     /* 0-9 */
363 363
     "eng", "fra", "ger", "ita", "dut", "sve", "spa", "dan", "por", "nor",
... ...
@@ -395,7 +395,7 @@ int ff_mov_iso639_to_lang(const char lang[4], int mp4)
395 395
     /* handle undefined as such */
396 396
     if (lang[0] == '\0')
397 397
         lang = "und";
398
-    /* 5bit ascii */
398
+    /* 5 bits ASCII */
399 399
     for (i = 0; i < 3; i++) {
400 400
         uint8_t c = lang[i];
401 401
         c -= 0x60;
... ...
@@ -447,7 +447,7 @@ int ff_mp4_read_descr(AVFormatContext *fc, AVIOContext *pb, int *tag)
447 447
     int len;
448 448
     *tag = avio_r8(pb);
449 449
     len = ff_mp4_read_descr_len(pb);
450
-    av_log(fc, AV_LOG_TRACE, "MPEG4 description: tag=0x%02x len=%d\n", *tag, len);
450
+    av_log(fc, AV_LOG_TRACE, "MPEG-4 description: tag=0x%02x len=%d\n", *tag, len);
451 451
     return len;
452 452
 }
453 453
 
... ...
@@ -499,7 +499,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
499 499
     av_log(fc, AV_LOG_TRACE, "esds object type id 0x%02x\n", object_type_id);
500 500
     len = ff_mp4_read_descr(fc, pb, &tag);
501 501
     if (tag == MP4DecSpecificDescrTag) {
502
-        av_log(fc, AV_LOG_TRACE, "Specific MPEG4 header len=%d\n", len);
502
+        av_log(fc, AV_LOG_TRACE, "Specific MPEG-4 header len=%d\n", len);
503 503
         if (!len || (uint64_t)len > (1<<30))
504 504
             return -1;
505 505
         av_free(st->codecpar->extradata);
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Matroska common data
3
- * Copyright (c) 2003-2004 The FFmpeg Project
3
+ * Copyright (c) 2003-2004 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Matroska constants
3
- * Copyright (c) 2003-2004 The FFmpeg Project
3
+ * Copyright (c) 2003-2004 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -97,7 +97,7 @@ int ff_mms_asf_header_parser(MMSContext *mms)
97 97
             flags     = AV_RL16(p + sizeof(ff_asf_guid)*3 + 24);
98 98
             stream_id = flags & 0x7F;
99 99
             //The second condition is for checking CS_PKT_STREAM_ID_REQUEST packet size,
100
-            //we can calcuate the packet size by stream_num.
100
+            //we can calculate the packet size by stream_num.
101 101
             //Please see function send_stream_selection_request().
102 102
             if (mms->stream_num < MMS_MAX_STREAMS &&
103 103
                     46 + mms->stream_num * 6 < sizeof(mms->out_buffer)) {
... ...
@@ -41,7 +41,7 @@
41 41
 // see Ref 2.2.1.8
42 42
 #define USERAGENT  "User-Agent: NSPlayer/4.1.0.3856\r\n"
43 43
 // see Ref 2.2.1.4.33
44
-// the guid value can be changed to any valid value.
44
+// the GUID value can be changed to any valid value.
45 45
 #define CLIENTGUID "Pragma: xClientGUID={c77e7400-738a-11d2-9add-0020af0a3278}\r\n"
46 46
 
47 47
 // see Ref 2.2.3 for packet type define:
... ...
@@ -427,7 +427,7 @@ static int send_startup_packet(MMSTContext *mmst)
427 427
     int ret;
428 428
     MMSContext *mms = &mmst->mms;
429 429
     // SubscriberName is defined in MS specification linked below.
430
-    // The guid value can be any valid value.
430
+    // The GUID value can be any valid value.
431 431
     // http://download.microsoft.com/
432 432
     // download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/%5BMS-WMSP%5D.pdf
433 433
     snprintf(data_string, sizeof(data_string),
... ...
@@ -524,7 +524,7 @@ static int mms_open(URLContext *h, const char *uri, int flags)
524 524
             sizeof(mmst->path), uri);
525 525
 
526 526
     if(port<0)
527
-        port = 1755; // defaut mms protocol port
527
+        port = 1755; // default MMS protocol port
528 528
 
529 529
     // establish tcp connection.
530 530
     ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, mmst->host, port, NULL);
... ...
@@ -1397,7 +1397,7 @@ static int64_t mov_read_atom_into_extradata(MOVContext *c, AVIOContext *pb, MOVA
1397 1397
     return result;
1398 1398
 }
1399 1399
 
1400
-/* FIXME modify qdm2/svq3/h264 decoders to take full atom as extradata */
1400
+/* FIXME modify QDM2/SVQ3/H.264 decoders to take full atom as extradata */
1401 1401
 static int mov_read_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom,
1402 1402
                               enum AVCodecID codec_id)
1403 1403
 {
... ...
@@ -1769,7 +1769,7 @@ static int mov_codec_id(AVStream *st, uint32_t format)
1769 1769
     if (st->codecpar->codec_type != AVMEDIA_TYPE_VIDEO && id > 0) {
1770 1770
         st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
1771 1771
     } else if (st->codecpar->codec_type != AVMEDIA_TYPE_AUDIO &&
1772
-               /* skip old asf mpeg4 tag */
1772
+               /* skip old ASF MPEG-4 tag */
1773 1773
                format && format != MKTAG('m','p','4','s')) {
1774 1774
         id = ff_codec_get_id(ff_codec_movvideo_tags, format);
1775 1775
         if (id <= 0)
... ...
@@ -1831,7 +1831,7 @@ static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb,
1831 1831
         st->codecpar->width &= ~1;
1832 1832
         st->codecpar->height &= ~1;
1833 1833
     }
1834
-    /* Flash Media Server uses tag H263 with Sorenson Spark */
1834
+    /* Flash Media Server uses tag H.263 with Sorenson Spark */
1835 1835
     if (st->codecpar->codec_tag == MKTAG('H','2','6','3') &&
1836 1836
         !memcmp(codec_name, "Sorenson H263", 13))
1837 1837
         st->codecpar->codec_id = AV_CODEC_ID_FLV1;
... ...
@@ -349,7 +349,7 @@ int main(int argc, char **argv)
349 349
     finish();
350 350
     close_out();
351 351
 
352
-    // Write a similar file, but with b-frames and audio preroll, handled
352
+    // Write a similar file, but with B-frames and audio preroll, handled
353 353
     // via an edit list.
354 354
     init_out("non-empty-moov-elst");
355 355
     av_dict_set(&opts, "movflags", "frag_keyframe", 0);
... ...
@@ -359,7 +359,7 @@ int main(int argc, char **argv)
359 359
     finish();
360 360
     close_out();
361 361
 
362
-    // Use b-frames but no audio-preroll, but without an edit list.
362
+    // Use B-frames but no audio-preroll, but without an edit list.
363 363
     // Due to avoid_negative_ts == AVFMT_AVOID_NEG_TS_MAKE_ZERO, the dts
364 364
     // of the first audio packet is > 0, but it is set to zero since edit
365 365
     // lists aren't used, increasing the duration of the first packet instead.
... ...
@@ -372,7 +372,7 @@ int main(int argc, char **argv)
372 372
     close_out();
373 373
 
374 374
     format = "ismv";
375
-    // Write an ISMV, with b-frames and audio preroll.
375
+    // Write an ISMV, with B-frames and audio preroll.
376 376
     init_out("ismv");
377 377
     av_dict_set(&opts, "movflags", "frag_keyframe", 0);
378 378
     init(1, 1);
... ...
@@ -558,7 +558,7 @@ int main(int argc, char **argv)
558 558
     finish();
559 559
 
560 560
 
561
-    // Test discontinously written fragments with b-frames (where the
561
+    // Test discontinuously written fragments with B-frames (where the
562 562
     // assumption of starting at pts=0 works) but not with audio preroll
563 563
     // (which can't be guessed).
564 564
     av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0);
... ...
@@ -592,7 +592,7 @@ int main(int argc, char **argv)
592 592
     finish();
593 593
 
594 594
 
595
-    // Test discontinously written fragments with b-frames and audio preroll,
595
+    // Test discontinuously written fragments with B-frames and audio preroll,
596 596
     // properly signaled.
597 597
     av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0);
598 598
     init(1, 1);
... ...
@@ -2561,7 +2561,7 @@ static int mov_write_edts_tag(AVIOContext *pb, MOVMuxContext *mov,
2561 2561
         /* In the positive delay case, the delay includes the cts
2562 2562
          * offset, and the second edit list entry below trims out
2563 2563
          * the same amount from the actual content. This makes sure
2564
-         * that the offsetted last sample is included in the edit
2564
+         * that the offset last sample is included in the edit
2565 2565
          * list duration as well. */
2566 2566
         if (version == 1) {
2567 2567
             avio_wb64(pb, delay);
... ...
@@ -4512,8 +4512,8 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
4512 4512
         av_log(s, AV_LOG_WARNING, "aac bitstream error\n");
4513 4513
     }
4514 4514
     if (par->codec_id == AV_CODEC_ID_H264 && trk->vos_len > 0 && *(uint8_t *)trk->vos_data != 1 && !TAG_IS_AVCI(trk->tag)) {
4515
-        /* from x264 or from bytestream h264 */
4516
-        /* nal reformating needed */
4515
+        /* from x264 or from bytestream H.264 */
4516
+        /* NAL reformatting needed */
4517 4517
         if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams) {
4518 4518
             ff_avc_parse_nal_units_buf(pkt->data, &reformatted_data,
4519 4519
                                        &size);
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG1/2 demuxer
2
+ * MPEG-1/2 demuxer
3 3
  * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4 4
  *
5 5
  * This file is part of FFmpeg.
... ...
@@ -371,7 +371,7 @@ redo:
371 371
             goto error_redo;
372 372
         c = avio_r8(s->pb);
373 373
         len--;
374
-        /* XXX: for mpeg1, should test only bit 7 */
374
+        /* XXX: for MPEG-1, should test only bit 7 */
375 375
         if (c != 0xff)
376 376
             break;
377 377
     }
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG1/2 muxer and demuxer common defines
2
+ * MPEG-1/2 muxer and demuxer common defines
3 3
  * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4 4
  *
5 5
  * This file is part of FFmpeg.
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG1/2 muxer
2
+ * MPEG-1/2 muxer
3 3
  * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
4 4
  *
5 5
  * This file is part of FFmpeg.
... ...
@@ -151,7 +151,7 @@ static int put_system_header(AVFormatContext *ctx, uint8_t *buf,
151 151
         put_bits(&pb, 1, 1);
152 152
     } else {
153 153
         put_bits(&pb, 1, 0); /* variable bitrate */
154
-        put_bits(&pb, 1, 0); /* non constrainted bit stream */
154
+        put_bits(&pb, 1, 0); /* nonconstrained bitstream */
155 155
     }
156 156
 
157 157
     if (s->is_vcd || s->is_dvd) {
... ...
@@ -1190,7 +1190,7 @@ static int mpeg_mux_end(AVFormatContext *ctx)
1190 1190
             break;
1191 1191
     }
1192 1192
 
1193
-    /* End header according to MPEG1 systems standard. We do not write
1193
+    /* End header according to MPEG-1 systems standard. We do not write
1194 1194
      * it as it is usually not needed by decoders and because it
1195 1195
      * complicates MPEG stream concatenation. */
1196 1196
     // avio_wb32(ctx->pb, ISO_11172_END_CODE);
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG2 transport stream (aka DVB) demuxer
2
+ * MPEG-2 transport stream (aka DVB) demuxer
3 3
  * Copyright (c) 2002-2003 Fabrice Bellard
4 4
  *
5 5
  * This file is part of FFmpeg.
... ...
@@ -38,8 +38,8 @@
38 38
 #include "mpeg.h"
39 39
 #include "isom.h"
40 40
 
41
-/* maximum size in which we look for synchronisation if
42
- * synchronisation is lost */
41
+/* maximum size in which we look for synchronization if
42
+ * synchronization is lost */
43 43
 #define MAX_RESYNC_SIZE 65536
44 44
 
45 45
 #define MAX_PES_PAYLOAD 200 * 1024
... ...
@@ -1031,7 +1031,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
1031 1031
                  * decide */
1032 1032
                 if (pes->header[0] == 0x00 && pes->header[1] == 0x00 &&
1033 1033
                     pes->header[2] == 0x01) {
1034
-                    /* it must be an mpeg2 PES stream */
1034
+                    /* it must be an MPEG-2 PES stream */
1035 1035
                     code = pes->header[3] | 0x100;
1036 1036
                     av_log(pes->stream, AV_LOG_TRACE, "pid=%x pes_code=%#x\n", pes->pid,
1037 1037
                             code);
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG2 transport stream defines
2
+ * MPEG-2 transport stream defines
3 3
  * Copyright (c) 2003 Fabrice Bellard
4 4
  *
5 5
  * This file is part of FFmpeg.
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * MPEG2 transport stream (aka DVB) muxer
2
+ * MPEG-2 transport stream (aka DVB) muxer
3 3
  * Copyright (c) 2003 Fabrice Bellard
4 4
  *
5 5
  * This file is part of FFmpeg.
... ...
@@ -49,7 +49,7 @@ typedef struct MpegTSSection {
49 49
 } MpegTSSection;
50 50
 
51 51
 typedef struct MpegTSService {
52
-    MpegTSSection pmt; /* MPEG2 pmt table context */
52
+    MpegTSSection pmt; /* MPEG-2 PMT table context */
53 53
     int sid;           /* service ID */
54 54
     char *name;
55 55
     char *provider_name;
... ...
@@ -72,8 +72,8 @@ enum {
72 72
 };
73 73
 typedef struct MpegTSWrite {
74 74
     const AVClass *av_class;
75
-    MpegTSSection pat; /* MPEG2 pat table */
76
-    MpegTSSection sdt; /* MPEG2 sdt table context */
75
+    MpegTSSection pat; /* MPEG-2 PAT table */
76
+    MpegTSSection sdt; /* MPEG-2 SDT table context */
77 77
     MpegTSService **services;
78 78
     int sdt_packet_count;
79 79
     int sdt_packet_period;
... ...
@@ -1002,7 +1002,7 @@ fail:
1002 1002
     return ret;
1003 1003
 }
1004 1004
 
1005
-/* send SDT, PAT and PMT tables regulary */
1005
+/* send SDT, PAT and PMT tables regularly */
1006 1006
 static void retransmit_si_info(AVFormatContext *s, int force_pat, int64_t dts)
1007 1007
 {
1008 1008
     MpegTSWrite *ts = s->priv_data;
... ...
@@ -41,7 +41,7 @@ const MXFCodecUL ff_mxf_codec_uls[] = {
41 41
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x04,0x02,0x00 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* 422P@HL I-Frame */
42 42
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x03,0x04,0x01,0x02,0x02,0x01,0x20,0x02,0x03 }, 14,      AV_CODEC_ID_MPEG4 }, /* XDCAM proxy_pal030926.mxf */
43 43
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x02,0x01,0x02,0x00 }, 13,    AV_CODEC_ID_DVVIDEO }, /* DV25 IEC PAL */
44
-    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14,   AV_CODEC_ID_JPEG2000 }, /* JPEG2000 Codestream */
44
+    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14,   AV_CODEC_ID_JPEG2000 }, /* JPEG 2000 code stream */
45 45
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x04,0x01,0x00,0x00 }, 14,        AV_CODEC_ID_VC1 }, /* VC1 SP@LL */
46 46
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x04,0x02,0x00,0x00 }, 14,        AV_CODEC_ID_VC1 }, /* VC1 SP@ML */
47 47
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x04,0x03,0x00,0x00 }, 14,        AV_CODEC_ID_VC1 }, /* VC1 MP@LL */
... ...
@@ -52,8 +52,8 @@ const MXFCodecUL ff_mxf_codec_uls[] = {
52 52
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x04,0x08,0x00,0x00 }, 14,        AV_CODEC_ID_VC1 }, /* VC1 AP@L2 */
53 53
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x04,0x09,0x00,0x00 }, 14,        AV_CODEC_ID_VC1 }, /* VC1 AP@L3 */
54 54
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x04,0x0A,0x00,0x00 }, 14,        AV_CODEC_ID_VC1 }, /* VC1 AP@L4 */
55
-    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13,   AV_CODEC_ID_RAWVIDEO }, /* Uncompressed */
56
-    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x01,0x00 }, 15,   AV_CODEC_ID_RAWVIDEO }, /* Uncompressed 422 8-bit */
55
+    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13,   AV_CODEC_ID_RAWVIDEO }, /* uncompressed */
56
+    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x01,0x00 }, 15,   AV_CODEC_ID_RAWVIDEO }, /* uncompressed 422 8-bit */
57 57
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x71,0x00,0x00,0x00 }, 13,      AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */
58 58
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x03,0x02,0x00,0x00 }, 14,      AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD */
59 59
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0E,0x04,0x02,0x01,0x02,0x04,0x01,0x00 }, 16,      AV_CODEC_ID_DNXHD }, /* SMPTE VC-3/DNxHD Legacy Avid Media Composer MXF */
... ...
@@ -62,8 +62,8 @@ const MXFCodecUL ff_mxf_codec_uls[] = {
62 62
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x02,0x01 }, 16,       AV_CODEC_ID_V210 }, /* V210 */
63 63
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x0E,0x04,0x02,0x01,0x02,0x11,0x00,0x00 }, 14,     AV_CODEC_ID_PRORES }, /* Avid MC7 ProRes */
64 64
     /* SoundEssenceCompression */
65
-    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x03,0x04,0x02,0x02,0x02,0x03,0x03,0x01,0x00 }, 14,        AV_CODEC_ID_AAC }, /* MPEG2 AAC ADTS (legacy) */
66
-    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x00,0x00,0x00,0x00 }, 13,  AV_CODEC_ID_PCM_S16LE }, /* Uncompressed */
65
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x03,0x04,0x02,0x02,0x02,0x03,0x03,0x01,0x00 }, 14,        AV_CODEC_ID_AAC }, /* MPEG-2 AAC ADTS (legacy) */
66
+    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x00,0x00,0x00,0x00 }, 13,  AV_CODEC_ID_PCM_S16LE }, /* uncompressed */
67 67
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13,  AV_CODEC_ID_PCM_S16LE },
68 68
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x02,0x02,0x01,0x7E,0x00,0x00,0x00 }, 13,  AV_CODEC_ID_PCM_S16BE }, /* From Omneon MXF file */
69 69
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x04,0x04,0x02,0x02,0x02,0x03,0x01,0x01,0x00 }, 15,   AV_CODEC_ID_PCM_ALAW }, /* XDCAM Proxy C0023S01.mxf */
... ...
@@ -592,7 +592,7 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
592 592
                partition->previous_partition);
593 593
     }
594 594
 
595
-    /* some files don'thave FooterPartition set in every partition */
595
+    /* some files don't have FooterPartition set in every partition */
596 596
     if (footer_partition) {
597 597
         if (mxf->footer_partition && mxf->footer_partition != footer_partition) {
598 598
             av_log(mxf->fc, AV_LOG_ERROR,
... ...
@@ -1123,12 +1123,12 @@ static void *mxf_resolve_strong_ref(MXFContext *mxf, UID *strong_ref, enum MXFMe
1123 1123
 static const MXFCodecUL mxf_picture_essence_container_uls[] = {
1124 1124
     // video essence container uls
1125 1125
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x07,0x0d,0x01,0x03,0x01,0x02,0x0c,0x01,0x00 }, 14,   AV_CODEC_ID_JPEG2000 },
1126
-    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x10,0x60,0x01 }, 14,       AV_CODEC_ID_H264 }, /* H264 Frame wrapped */
1127
-    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x12,0x01,0x00 }, 14,        AV_CODEC_ID_VC1 }, /* VC-1 Frame wrapped */
1128
-    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x04,0x60,0x01 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* MPEG-ES Frame wrapped */
1126
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x10,0x60,0x01 }, 14,       AV_CODEC_ID_H264 }, /* H.264 frame wrapped */
1127
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x12,0x01,0x00 }, 14,        AV_CODEC_ID_VC1 }, /* VC-1 frame wrapped */
1128
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x04,0x60,0x01 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* MPEG-ES frame wrapped */
1129 1129
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x01,0x04,0x01 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* Type D-10 mapping of 40Mbps 525/60-I */
1130 1130
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x02,0x41,0x01 }, 14,    AV_CODEC_ID_DVVIDEO }, /* DV 625 25mbps */
1131
-    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x05,0x00,0x00 }, 14,   AV_CODEC_ID_RAWVIDEO }, /* Uncompressed Picture */
1131
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x05,0x00,0x00 }, 14,   AV_CODEC_ID_RAWVIDEO }, /* uncompressed picture */
1132 1132
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0a,0x0e,0x0f,0x03,0x01,0x02,0x20,0x01,0x01 }, 15,     AV_CODEC_ID_HQ_HQA },
1133 1133
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0a,0x0e,0x0f,0x03,0x01,0x02,0x20,0x02,0x01 }, 15,        AV_CODEC_ID_HQX },
1134 1134
     { { 0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0xff,0x4b,0x46,0x41,0x41,0x00,0x0d,0x4d,0x4f }, 14,   AV_CODEC_ID_RAWVIDEO }, /* Legacy ?? Uncompressed Picture */
... ...
@@ -1137,14 +1137,14 @@ static const MXFCodecUL mxf_picture_essence_container_uls[] = {
1137 1137
 
1138 1138
 /* EC ULs for intra-only formats */
1139 1139
 static const MXFCodecUL mxf_intra_only_essence_container_uls[] = {
1140
-    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x01,0x00,0x00 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* MXF-GC SMPTE D-10 Mappings */
1140
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x01,0x00,0x00 }, 14, AV_CODEC_ID_MPEG2VIDEO }, /* MXF-GC SMPTE D-10 mappings */
1141 1141
     { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,       AV_CODEC_ID_NONE },
1142 1142
 };
1143 1143
 
1144 1144
 /* intra-only PictureEssenceCoding ULs, where no corresponding EC UL exists */
1145 1145
 static const MXFCodecUL mxf_intra_only_picture_essence_coding_uls[] = {
1146 1146
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x32,0x00,0x00 }, 14,       AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC Intra Profiles */
1147
-    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14,   AV_CODEC_ID_JPEG2000 }, /* JPEG2000 Codestream */
1147
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14,   AV_CODEC_ID_JPEG2000 }, /* JPEG 2000 code stream */
1148 1148
     { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,       AV_CODEC_ID_NONE },
1149 1149
 };
1150 1150
 
... ...
@@ -1163,7 +1163,7 @@ static const MXFCodecUL mxf_sound_essence_container_uls[] = {
1163 1163
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x02,0x0d,0x01,0x03,0x01,0x02,0x04,0x40,0x01 }, 14,       AV_CODEC_ID_MP2 }, /* MPEG-ES Frame wrapped, 0x40 ??? stream id */
1164 1164
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x01,0x01,0x01 }, 14, AV_CODEC_ID_PCM_S16LE }, /* D-10 Mapping 50Mbps PAL Extended Template */
1165 1165
     { { 0x06,0x0e,0x2b,0x34,0x01,0x01,0x01,0xff,0x4b,0x46,0x41,0x41,0x00,0x0d,0x4d,0x4F }, 14, AV_CODEC_ID_PCM_S16LE }, /* 0001GL00.MXF.A1.mxf_opatom.mxf */
1166
-    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x03,0x04,0x02,0x02,0x02,0x03,0x03,0x01,0x00 }, 14,       AV_CODEC_ID_AAC }, /* MPEG2 AAC ADTS (legacy) */
1166
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x03,0x04,0x02,0x02,0x02,0x03,0x03,0x01,0x00 }, 14,       AV_CODEC_ID_AAC }, /* MPEG-2 AAC ADTS (legacy) */
1167 1167
     { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,      AV_CODEC_ID_NONE },
1168 1168
 };
1169 1169
 
... ...
@@ -1496,7 +1496,7 @@ static void mxf_write_index_table_segment(AVFormatContext *s)
1496 1496
         for (i = 0; i < mxf->edit_units_count; i++) {
1497 1497
             int temporal_offset = 0;
1498 1498
 
1499
-            if (!(mxf->index_entries[i].flags & 0x33)) { // I frame
1499
+            if (!(mxf->index_entries[i].flags & 0x33)) { // I-frame
1500 1500
                 mxf->last_key_index = key_index;
1501 1501
                 key_index = i;
1502 1502
             }
... ...
@@ -1523,7 +1523,7 @@ static void mxf_write_index_table_segment(AVFormatContext *s)
1523 1523
                     mxf->last_key_index = key_index;
1524 1524
             }
1525 1525
 
1526
-            if (!(mxf->index_entries[i].flags & 0x33) && // I frame
1526
+            if (!(mxf->index_entries[i].flags & 0x33) && // I-frame
1527 1527
                 mxf->index_entries[i].flags & 0x40 && !temporal_offset)
1528 1528
                 mxf->index_entries[i].flags |= 0x80; // random access
1529 1529
             avio_w8(pb, mxf->index_entries[i].flags);
... ...
@@ -1976,10 +1976,10 @@ static int mxf_parse_mpeg2_frame(AVFormatContext *s, AVStream *st,
1976 1976
         } else if (c == 0x100) { // pic
1977 1977
             int pict_type = (pkt->data[i+2]>>3) & 0x07;
1978 1978
             e->temporal_ref = (pkt->data[i+1]<<2) | (pkt->data[i+2]>>6);
1979
-            if (pict_type == 2) { // P frame
1979
+            if (pict_type == 2) { // P-frame
1980 1980
                 e->flags |= 0x22;
1981
-                sc->closed_gop = 0; // reset closed gop, don't matter anymore
1982
-            } else if (pict_type == 3) { // B frame
1981
+                sc->closed_gop = 0; // reset closed GOP, don't matter anymore
1982
+            } else if (pict_type == 3) { // B-frame
1983 1983
                 if (sc->closed_gop)
1984 1984
                     e->flags |= 0x13; // only backward prediction
1985 1985
                 else
... ...
@@ -2447,7 +2447,7 @@ static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt)
2447 2447
     if (st->index == 0) {
2448 2448
         if (!mxf->edit_unit_byte_count &&
2449 2449
             (!mxf->edit_units_count || mxf->edit_units_count > EDIT_UNITS_PER_BODY) &&
2450
-            !(ie.flags & 0x33)) { // I frame, Gop start
2450
+            !(ie.flags & 0x33)) { // I-frame, GOP start
2451 2451
             mxf_write_klv_fill(s);
2452 2452
             if ((err = mxf_write_partition(s, 1, 2, body_partition_key, 0)) < 0)
2453 2453
                 return err;
... ...
@@ -57,14 +57,14 @@
57 57
  * (that is the offset of the data table after the header).
58 58
  * After checking all samples from (S1) all confirms this.
59 59
  *
60
- * Then, about NSVf[12-15], faster.nsf has 179700. When veiwing it in VLC,
60
+ * Then, about NSVf[12-15], faster.nsf has 179700. When viewing it in VLC,
61 61
  * I noticed there was about 1 NVSs chunk/s, so I ran
62 62
  * strings faster.nsv | grep NSVs | wc -l
63 63
  * which gave me 180. That leads me to think that NSVf[12-15] might be the
64 64
  * file length in milliseconds.
65 65
  * Let's try that:
66 66
  * for f in *.nsv; do HTIME="$(od -t x4 "$f" | head -1 | sed 's/.* //')"; echo "'$f' $((0x$HTIME))s = $((0x$HTIME/1000/60)):$((0x$HTIME/1000%60))"; done
67
- * except for nstrailer (which doesn't have an NSVf header), it repports correct time.
67
+ * except for nsvtrailer (which doesn't have an NSVf header), it reports correct time.
68 68
  *
69 69
  * nsvtrailer.nsv (S1) does not have any NSVf header, only NSVs chunks,
70 70
  * so the header seems to not be mandatory. (for streaming).
... ...
@@ -579,7 +579,7 @@ null_chunk_retry:
579 579
               ((auxtag >> 24) & 0x0ff),
580 580
               auxsize);
581 581
         avio_skip(pb, auxsize);
582
-        vsize -= auxsize + sizeof(uint16_t) + sizeof(uint32_t); /* that's becoming braindead */
582
+        vsize -= auxsize + sizeof(uint16_t) + sizeof(uint32_t); /* that's becoming brain-dead */
583 583
     }
584 584
 
585 585
     if (avio_feof(pb))
... ...
@@ -683,7 +683,7 @@ static int nsv_read_packet(AVFormatContext *s, AVPacket *pkt)
683 683
         }
684 684
     }
685 685
 
686
-    /* this restaurant is not approvisionned :^] */
686
+    /* this restaurant is not provisioned :^] */
687 687
     return -1;
688 688
 }
689 689
 
... ...
@@ -55,14 +55,14 @@ static int dirac_header(AVFormatContext *s, int idx)
55 55
     if (av_image_check_sar(st->codecpar->width, st->codecpar->height, dsh->sample_aspect_ratio) >= 0)
56 56
         st->sample_aspect_ratio = dsh->sample_aspect_ratio;
57 57
 
58
-    // dirac in ogg always stores timestamps as though the video were interlaced
58
+    // Dirac in Ogg always stores timestamps as though the video were interlaced
59 59
     avpriv_set_pts_info(st, 64, dsh->framerate.den, 2 * dsh->framerate.num);
60 60
 
61 61
     av_freep(&dsh);
62 62
     return 1;
63 63
 }
64 64
 
65
-// various undocument things: granule is signed (only for dirac!)
65
+// various undocumented things: granule is signed (only for Dirac!)
66 66
 static uint64_t dirac_gptopts(AVFormatContext *s, int idx, uint64_t granule,
67 67
                               int64_t *dts_out)
68 68
 {
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Sony Playstation (PSX) STR File Demuxer
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -44,7 +44,7 @@ struct RDTDemuxContext {
44 44
      * in the AVFormatContext, and this variable points to the offset in
45 45
      * that array such that the first is the first stream of this set. */
46 46
     AVStream **streams;
47
-    int n_streams; /**< streams with identifical content in this set */
47
+    int n_streams; /**< streams with identical content in this set */
48 48
     void *dynamic_protocol_context;
49 49
     DynamicPayloadPacketHandlerProc parse_packet;
50 50
     uint32_t prev_timestamp;
... ...
@@ -104,7 +104,7 @@ static av_cold int rl2_read_header(AVFormatContext *s)
104 104
     if(back_size > INT_MAX/2  || frame_count > INT_MAX / sizeof(uint32_t))
105 105
         return AVERROR_INVALIDDATA;
106 106
 
107
-    avio_skip(pb, 2);         /* encoding mentod */
107
+    avio_skip(pb, 2);         /* encoding method */
108 108
     sound_rate = avio_rl16(pb);
109 109
     rate = avio_rl16(pb);
110 110
     channels = avio_rl16(pb);
... ...
@@ -258,9 +258,9 @@ static int rv10_write_header(AVFormatContext *ctx,
258 258
             avio_wb16(s, stream->frame_rate.num / stream->frame_rate.den);  /* unknown meaning */
259 259
             avio_wb32(s,0);     /* unknown meaning */
260 260
             avio_wb16(s, 8);    /* unknown meaning */
261
-            /* Seems to be the codec version: only use basic H263. The next
262
-               versions seems to add a diffential DC coding as in
263
-               MPEG... nothing new under the sun */
261
+            /* Seems to be the codec version: only use basic H.263. The next
262
+               versions seems to add a differential DC coding as in
263
+               MPEG... nothing new under the sun. */
264 264
             if(stream->par->codec_id == AV_CODEC_ID_RV10)
265 265
                 avio_wb32(s,0x10000000);
266 266
             else
... ...
@@ -402,7 +402,7 @@ static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int
402 402
     write_packet_header(s, stream, size + 7 + (size >= 0x4000)*4, key_frame);
403 403
     /* bit 7: '1' if final packet of a frame converted in several packets */
404 404
     avio_w8(pb, 0x81);
405
-    /* bit 7: '1' if I frame. bits 6..0 : sequence number in current
405
+    /* bit 7: '1' if I-frame. bits 6..0 : sequence number in current
406 406
        frame starting from 1 */
407 407
     if (key_frame) {
408 408
         avio_w8(pb, 0x81);
... ...
@@ -129,7 +129,7 @@ static int rtmp_http_read(URLContext *h, uint8_t *buf, int size)
129 129
             } else {
130 130
                 if (rt->nb_bytes_read == 0) {
131 131
                     /* Wait 50ms before retrying to read a server reply in
132
-                     * order to reduce the number of idle requets. */
132
+                     * order to reduce the number of idle requests. */
133 133
                     av_usleep(50000);
134 134
                 }
135 135
 
... ...
@@ -451,7 +451,7 @@ static int read_connect(URLContext *s, RTMPContext *rt)
451 451
                tmpstr, rt->app);
452 452
     ff_rtmp_packet_destroy(&pkt);
453 453
 
454
-    // Send Window Acknowledgement Size (as defined in speficication)
454
+    // Send Window Acknowledgement Size (as defined in specification)
455 455
     if ((ret = ff_rtmp_packet_create(&pkt, RTMP_NETWORK_CHANNEL,
456 456
                                      RTMP_PT_SERVER_BW, 0, 4)) < 0)
457 457
         return ret;
... ...
@@ -581,7 +581,7 @@ static int gen_release_stream(URLContext *s, RTMPContext *rt)
581 581
 
582 582
 /**
583 583
  * Generate 'FCPublish' call and send it to the server. It should make
584
- * the server preapare for receiving media streams.
584
+ * the server prepare for receiving media streams.
585 585
  */
586 586
 static int gen_fcpublish_stream(URLContext *s, RTMPContext *rt)
587 587
 {
... ...
@@ -2000,7 +2000,7 @@ static int send_invoke_response(URLContext *s, RTMPPacket *pkt)
2000 2000
  * successful response, we will return set the value to number (otherwise number
2001 2001
  * will not be changed).
2002 2002
  *
2003
- * @return 0 if reading the value succeeds, negative value otherwiss
2003
+ * @return 0 if reading the value succeeds, negative value otherwise
2004 2004
  */
2005 2005
 static int read_number_result(RTMPPacket *pkt, double *number)
2006 2006
 {
... ...
@@ -2023,7 +2023,7 @@ static int read_number_result(RTMPPacket *pkt, double *number)
2023 2023
     // Value 3/4: Null
2024 2024
     if (ff_amf_read_null(&gbc))
2025 2025
         return AVERROR_INVALIDDATA;
2026
-    // Value 4/4: The resonse as AMF_NUMBER
2026
+    // Value 4/4: The response as AMF_NUMBER
2027 2027
     if (ff_amf_read_number(&gbc, &numbuffer))
2028 2028
         return AVERROR_INVALIDDATA;
2029 2029
     else
... ...
@@ -2514,7 +2514,7 @@ static int rtmp_close(URLContext *h)
2514 2514
  */
2515 2515
 static int inject_fake_duration_metadata(RTMPContext *rt)
2516 2516
 {
2517
-    // We need to insert the metdata packet directly after the FLV
2517
+    // We need to insert the metadata packet directly after the FLV
2518 2518
     // header, i.e. we need to move all other already read data by the
2519 2519
     // size of our fake metadata packet.
2520 2520
 
... ...
@@ -504,7 +504,7 @@ int ff_rtp_send_rtcp_feedback(RTPDemuxContext *s, URLContext *fd,
504 504
 
505 505
 /**
506 506
  * open a new RTP parse context for stream 'st'. 'st' can be NULL for
507
- * MPEG2-TS streams.
507
+ * MPEG-2 TS streams.
508 508
  */
509 509
 RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st,
510 510
                                    int payload_type, int queue_size)
... ...
@@ -107,7 +107,7 @@ static int h263_handle_packet(AVFormatContext *ctx, PayloadContext *data,
107 107
             /* Invalid src for this format, and bits that should be zero
108 108
              * according to RFC 2190 aren't zero. */
109 109
             av_log(ctx, AV_LOG_WARNING,
110
-                   "Interpreting H263 RTP data as RFC 2429/4629 even though "
110
+                   "Interpreting H.263 RTP data as RFC 2429/4629 even though "
111 111
                    "signalled with a static payload type.\n");
112 112
             data->newformat = 1;
113 113
             return ff_h263_handle_packet(ctx, data, st, pkt, timestamp, buf,
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * RTP H264 Protocol (RFC3984)
2
+ * RTP H.264 Protocol (RFC3984)
3 3
  * Copyright (c) 2006 Ryan Martell
4 4
  *
5 5
  * This file is part of FFmpeg.
... ...
@@ -289,7 +289,7 @@ static int h264_handle_packet_fu_a(AVFormatContext *ctx, PayloadContext *data, A
289 289
     uint8_t fu_indicator, fu_header, start_bit, nal_type, nal;
290 290
 
291 291
     if (len < 3) {
292
-        av_log(ctx, AV_LOG_ERROR, "Too short data for FU-A H264 RTP packet\n");
292
+        av_log(ctx, AV_LOG_ERROR, "Too short data for FU-A H.264 RTP packet\n");
293 293
         return AVERROR_INVALIDDATA;
294 294
     }
295 295
 
... ...
@@ -319,14 +319,14 @@ static int h264_handle_packet(AVFormatContext *ctx, PayloadContext *data,
319 319
     int result = 0;
320 320
 
321 321
     if (!len) {
322
-        av_log(ctx, AV_LOG_ERROR, "Empty H264 RTP packet\n");
322
+        av_log(ctx, AV_LOG_ERROR, "Empty H.264 RTP packet\n");
323 323
         return AVERROR_INVALIDDATA;
324 324
     }
325 325
     nal  = buf[0];
326 326
     type = nal & 0x1f;
327 327
 
328
-    /* Simplify the case (these are all the nal types used internally by
329
-     * the h264 codec). */
328
+    /* Simplify the case (these are all the NAL types used internally by
329
+     * the H.264 codec). */
330 330
     if (type >= 1 && type <= 23)
331 331
         type = 1;
332 332
     switch (type) {
... ...
@@ -22,7 +22,7 @@
22 22
 
23 23
 /**
24 24
  * @file
25
- * @brief MPEG4 / RTP Code
25
+ * @brief MPEG-4 / RTP Code
26 26
  * @author Fabrice Bellard
27 27
  * @author Romain Degez
28 28
  */
... ...
@@ -93,7 +93,7 @@ static int qt_rtp_parse_packet(AVFormatContext *s, PayloadContext *qt,
93 93
         if (pos + 12 > len)
94 94
             return AVERROR_INVALIDDATA;
95 95
 
96
-        skip_bits(&gb, 2); // has non-I frames:1, is sparse:1
96
+        skip_bits(&gb, 2); // has non-I-frames:1, is sparse:1
97 97
         is_start  = get_bits1(&gb);
98 98
         is_finish = get_bits1(&gb);
99 99
         if (!is_start || !is_finish) {
... ...
@@ -46,7 +46,7 @@ struct PayloadContext {
46 46
     int          prev_pictureid;
47 47
     int          broken_frame;
48 48
     /* If sequence_dirty is set, we have lost some data (critical or
49
-     * non-critical) and decoding will have some sort of artefacts, and
49
+     * non-critical) and decoding will have some sort of artifacts, and
50 50
      * we thus should request a new keyframe.
51 51
      */
52 52
     int          sequence_dirty;
... ...
@@ -189,7 +189,7 @@ static int rtp_write_header(AVFormatContext *s1)
189 189
     case AV_CODEC_ID_H261:
190 190
         if (s1->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
191 191
             av_log(s, AV_LOG_ERROR,
192
-                   "Packetizing H261 is experimental and produces incorrect "
192
+                   "Packetizing H.261 is experimental and produces incorrect "
193 193
                    "packetization for cases where GOBs don't fit into packets "
194 194
                    "(even though most receivers may handle it just fine). "
195 195
                    "Please set -f_strict experimental in order to enable it.\n");
... ...
@@ -205,7 +205,7 @@ static int rtp_write_header(AVFormatContext *s1)
205 205
         break;
206 206
     case AV_CODEC_ID_HEVC:
207 207
         /* Only check for the standardized hvcC version of extradata, keeping
208
-         * things simple and similar to the avcC/H264 case above, instead
208
+         * things simple and similar to the avcC/H.264 case above, instead
209 209
          * of trying to handle the pre-standardization versions (as in
210 210
          * libavcodec/hevc.c). */
211 211
         if (st->codecpar->extradata_size > 21 && st->codecpar->extradata[0] == 1) {
... ...
@@ -76,7 +76,7 @@ typedef struct RTPMuxContext RTPMuxContext;
76 76
     { "latm", "Use MP4A-LATM packetization instead of MPEG4-GENERIC for AAC", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_MP4A_LATM}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
77 77
     { "rfc2190", "Use RFC 2190 packetization instead of RFC 4629 for H.263", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_RFC2190}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
78 78
     { "skip_rtcp", "Don't send RTCP sender reports", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_SKIP_RTCP}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
79
-    { "h264_mode0", "Use mode 0 for H264 in RTP", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_H264_MODE0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
79
+    { "h264_mode0", "Use mode 0 for H.264 in RTP", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_H264_MODE0}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" }, \
80 80
     { "send_bye", "Send RTCP BYE packets when finishing", 0, AV_OPT_TYPE_CONST, {.i64 = FF_RTP_FLAG_SEND_BYE}, INT_MIN, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, "rtpflags" } \
81 81
 
82 82
 void ff_rtp_send_data(AVFormatContext *s1, const uint8_t *buf1, int len, int m);
... ...
@@ -72,12 +72,12 @@ void ff_rtp_send_h261(AVFormatContext *ctx, const uint8_t *frame_buf, int frame_
72 72
         rtp_ctx->buf[2] = 0; /* quant=0, hmvd=5 */
73 73
         rtp_ctx->buf[3] = 0; /* vmvd=0 */
74 74
         if (frame_size < 2 || frame_buf[0] != 0 || frame_buf[1] != 1) {
75
-            /* A full, correct fix for this would be to make the H261 encoder
75
+            /* A full, correct fix for this would be to make the H.261 encoder
76 76
              * support inserting extra GOB headers (triggered by setting e.g.
77 77
              * "-ps 1"), and including information about macroblock boundaries
78 78
              * (such as for h263_rfc2190). */
79 79
             av_log(ctx, AV_LOG_WARNING,
80
-                   "RTP/H261 packet not cut at a GOB boundary, not signaled correctly\n");
80
+                   "RTP/H.261 packet not cut at a GOB boundary, not signaled correctly\n");
81 81
         }
82 82
 
83 83
         cur_frame_size = FFMIN(rtp_ctx->max_payload_size - RTP_H261_HEADER_SIZE, frame_size);
... ...
@@ -114,7 +114,7 @@ void ff_rtp_send_h263_rfc2190(AVFormatContext *s1, const uint8_t *buf, int size,
114 114
     init_get_bits(&gb, buf, size*8);
115 115
     if (get_bits(&gb, 22) == 0x20) { /* Picture Start Code */
116 116
         info.tr  = get_bits(&gb, 8);
117
-        skip_bits(&gb, 2); /* PTYPE start, H261 disambiguation */
117
+        skip_bits(&gb, 2); /* PTYPE start, H.261 disambiguation */
118 118
         skip_bits(&gb, 3); /* Split screen, document camera, freeze picture release */
119 119
         info.src = get_bits(&gb, 3);
120 120
         info.i   = get_bits(&gb, 1);
... ...
@@ -168,7 +168,7 @@ void ff_rtp_send_h263_rfc2190(AVFormatContext *s1, const uint8_t *buf, int size,
168 168
                         mb_info_pos++;
169 169
                     }
170 170
                 } else {
171
-                    av_log(s1, AV_LOG_ERROR, "Unable to split H263 packet, "
171
+                    av_log(s1, AV_LOG_ERROR, "Unable to split H.263 packet, "
172 172
                            "use -mb_info %d or -ps 1.\n",
173 173
                            s->max_payload_size - 8);
174 174
                 }
... ...
@@ -59,7 +59,7 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buf, int size)
59 59
         return;
60 60
     }
61 61
 
62
-    /* preparse the header for getting some infos */
62
+    /* preparse the header for getting some info */
63 63
     for (i = 0; i < size; i++) {
64 64
         if (buf[i] != 0xff)
65 65
             continue;
... ...
@@ -68,7 +68,7 @@ void ff_rtp_send_xiph(AVFormatContext *s1, const uint8_t *buff, int size)
68 68
     // 0 - whole frame (possibly multiple frames)
69 69
     // 1 - first fragment
70 70
     // 2 - fragment continuation
71
-    // 3 - last fragmement
71
+    // 3 - last fragment
72 72
     frag = size <= max_pkt_size ? 0 : 1;
73 73
 
74 74
     if (!frag && !xdt) { // do we have a whole frame of raw data?
... ...
@@ -261,7 +261,7 @@ static char *extradata2psets_hevc(AVCodecParameters *par)
261 261
             goto err;
262 262
         nalu_type = extradata[pos] & 0x3f;
263 263
         // Not including libavcodec/hevc.h to avoid confusion between
264
-        // NAL_* with the same name for both H264 and HEVC.
264
+        // NAL_* with the same name for both H.264 and HEVC.
265 265
         if (nalu_type == 32) // VPS
266 266
             ps_pos[0] = pos;
267 267
         else if (nalu_type == 33) // SPS
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Sega FILM Format (CPK) Demuxer
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Sierra VMD Format Demuxer
3
- * Copyright (c) 2004 The FFmpeg Project
3
+ * Copyright (c) 2004 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -54,8 +54,8 @@ enum IEC61937DataType {
54 54
 
55 55
 static const uint16_t spdif_mpeg_pkt_offset[2][3] = {
56 56
     //LAYER1  LAYER2  LAYER3
57
-    { 3072,    9216,   4608 }, // MPEG2 LSF
58
-    { 1536,    4608,   4608 }, // MPEG1
57
+    { 3072,    9216,   4608 }, // MPEG-2 LSF
58
+    { 1536,    4608,   4608 }, // MPEG-1
59 59
 };
60 60
 
61 61
 void ff_spdif_bswap_buf16(uint16_t *dst, const uint16_t *src, int w);
... ...
@@ -32,7 +32,7 @@
32 32
 /*
33 33
  * Terminology used in specification:
34 34
  * data-burst - IEC61937 frame, contains header and encapsuled frame
35
- * burst-preambule - IEC61937 frame header, contains 16-bits words named Pa, Pb, Pc and Pd
35
+ * burst-preamble - IEC61937 frame header, contains 16-bit words named Pa, Pb, Pc and Pd
36 36
  * burst-payload - encapsuled frame
37 37
  * Pa, Pb - syncword - 0xF872, 0x4E1F
38 38
  * Pc - burst-info, contains data-type (bits 0-6), error flag (bit 7), data-type-dependent info (bits 8-12)
... ...
@@ -147,7 +147,7 @@ static int spdif_header_eac3(AVFormatContext *s, AVPacket *pkt)
147 147
  * DTS type IV (DTS-HD) can be transmitted with various frame repetition
148 148
  * periods; longer repetition periods allow for longer packets and therefore
149 149
  * higher bitrate. Longer repetition periods mean that the constant bitrate of
150
- * the outputted IEC 61937 stream is higher.
150
+ * the output IEC 61937 stream is higher.
151 151
  * The repetition period is measured in IEC 60958 frames (4 bytes).
152 152
  */
153 153
 static int spdif_dts4_subtype(int period)
... ...
@@ -319,8 +319,8 @@ static int spdif_header_dts(AVFormatContext *s, AVPacket *pkt)
319 319
 
320 320
 static const enum IEC61937DataType mpeg_data_type[2][3] = {
321 321
     //     LAYER1                      LAYER2                  LAYER3
322
-    { IEC61937_MPEG2_LAYER1_LSF, IEC61937_MPEG2_LAYER2_LSF, IEC61937_MPEG2_LAYER3_LSF },//MPEG2 LSF
323
-    { IEC61937_MPEG1_LAYER1,     IEC61937_MPEG1_LAYER23,    IEC61937_MPEG1_LAYER23 },   //MPEG1
322
+    { IEC61937_MPEG2_LAYER1_LSF, IEC61937_MPEG2_LAYER2_LSF, IEC61937_MPEG2_LAYER3_LSF }, // MPEG-2 LSF
323
+    { IEC61937_MPEG1_LAYER1,     IEC61937_MPEG1_LAYER23,    IEC61937_MPEG1_LAYER23 },    // MPEG-1
324 324
 };
325 325
 
326 326
 static int spdif_header_mpeg(AVFormatContext *s, AVPacket *pkt)
... ...
@@ -261,7 +261,7 @@ int ffurl_get_multi_file_handle(URLContext *h, int **handles, int *numhandles);
261 261
 int ffurl_shutdown(URLContext *h, int flags);
262 262
 
263 263
 /**
264
- * Check if the user has requested to interrup a blocking function
264
+ * Check if the user has requested to interrupt a blocking function
265 265
  * associated with cb.
266 266
  */
267 267
 int ff_check_interrupt(AVIOInterruptCB *cb);
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Wing Commander III Movie (.mve) File Demuxer
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Westwood Studios AUD Format Demuxer
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * Westwood Studios VQA Format Demuxer
3
- * Copyright (c) 2003 The FFmpeg Project
3
+ * Copyright (c) 2003 The FFmpeg project
4 4
  *
5 5
  * This file is part of FFmpeg.
6 6
  *
... ...
@@ -131,7 +131,7 @@ static int wsvqa_read_header(AVFormatContext *s)
131 131
         chunk_tag = AV_RB32(&scratch[0]);
132 132
         chunk_size = AV_RB32(&scratch[4]);
133 133
 
134
-        /* catch any unknown header tags, for curiousity */
134
+        /* catch any unknown header tags, for curiosity */
135 135
         switch (chunk_tag) {
136 136
         case CINF_TAG:
137 137
         case CINH_TAG:
... ...
@@ -36,7 +36,7 @@
36 36
 #include "wtv.h"
37 37
 #include "mpegts.h"
38 38
 
39
-/* Macros for formating GUIDs */
39
+/* Macros for formatting GUIDs */
40 40
 #define PRI_PRETTY_GUID \
41 41
     "%08"PRIx32"-%04"PRIx16"-%04"PRIx16"-%02x%02x%02x%02x%02x%02x%02x%02x"
42 42
 #define ARG_PRETTY_GUID(g) \
... ...
@@ -320,7 +320,7 @@ typedef struct WtvContext {
320 320
     AVIOContext *pb;       /**< timeline file */
321 321
     int64_t epoch;
322 322
     int64_t pts;             /**< pts for next data chunk */
323
-    int64_t last_valid_pts;  /**< latest valid pts, used for interative seeking */
323
+    int64_t last_valid_pts;  /**< latest valid pts, used for interactive seeking */
324 324
 
325 325
     /* maintain private seek index, as the AVIndexEntry->pos is relative to the
326 326
        start of the 'timeline' file, not the file system (AVFormatContext->pb) */
... ...
@@ -37,8 +37,8 @@ typedef struct DitherDSPContext {
37 37
      */
38 38
     void (*quantize)(int16_t *dst, const float *src, float *dither, int len);
39 39
 
40
-    int ptr_align;      ///< src and dst constraits for quantize()
41
-    int samples_align;  ///< len constraits for quantize()
40
+    int ptr_align;      ///< src and dst constraints for quantize()
41
+    int samples_align;  ///< len constraints for quantize()
42 42
 
43 43
     /**
44 44
      * Convert dither noise from int to float with triangular distribution.
... ...
@@ -46,7 +46,7 @@
46 46
 #include "resample_template.c"
47 47
 
48 48
 
49
-/* 0th order modified bessel function of the first kind. */
49
+/* 0th order modified Bessel function of the first kind. */
50 50
 static double bessel(double x)
51 51
 {
52 52
     double v     = 1;
... ...
@@ -45,7 +45,7 @@
45 45
 
46 46
 /**
47 47
  * assert() equivalent, that does not lie in speed critical code.
48
- * These asserts() thus can be enabled without fearing speedloss.
48
+ * These asserts() thus can be enabled without fearing speed loss.
49 49
  */
50 50
 #if defined(ASSERT_LEVEL) && ASSERT_LEVEL > 0
51 51
 #define av_assert1(cond) av_assert0(cond)
... ...
@@ -27,7 +27,7 @@
27 27
 
28 28
 /*
29 29
  * AVR32 does not support unaligned memory accesses, except for the AP
30
- * series which suppports unaligned 32-bit loads and stores.  16-bit
30
+ * series which supports unaligned 32-bit loads and stores.  16-bit
31 31
  * and 64-bit accesses must be aligned to 16 and 32 bits, respectively.
32 32
  * This means we cannot use the byte-swapping load/store instructions
33 33
  * here.
... ...
@@ -266,7 +266,7 @@ enum AVPictureType {
266 266
     AV_PICTURE_TYPE_I,     ///< Intra
267 267
     AV_PICTURE_TYPE_P,     ///< Predicted
268 268
     AV_PICTURE_TYPE_B,     ///< Bi-dir predicted
269
-    AV_PICTURE_TYPE_S,     ///< S(GMC)-VOP MPEG4
269
+    AV_PICTURE_TYPE_S,     ///< S(GMC)-VOP MPEG-4
270 270
     AV_PICTURE_TYPE_SI,    ///< Switching Intra
271 271
     AV_PICTURE_TYPE_SP,    ///< Switching Predicted
272 272
     AV_PICTURE_TYPE_BI,    ///< BI type
... ...
@@ -328,7 +328,7 @@ typedef struct AVFrame {
328 328
     int palette_has_changed;
329 329
 
330 330
     /**
331
-     * reordered opaque 64bit (generally an integer or a double precision float
331
+     * reordered opaque 64 bits (generally an integer or a double precision float
332 332
      * PTS but can be anything).
333 333
      * The user sets AVCodecContext.reordered_opaque to represent the input at
334 334
      * that time,
... ...
@@ -169,7 +169,7 @@ typedef struct AVHWFramesContext {
169 169
      * A pool from which the frames are allocated by av_hwframe_get_buffer().
170 170
      * This field may be set by the caller before calling av_hwframe_ctx_init().
171 171
      * The buffers returned by calling av_buffer_pool_get() on this pool must
172
-     * have the properties described in the documentation in the correponding hw
172
+     * have the properties described in the documentation in the corresponding hw
173 173
      * type's header (hwcontext_*.h). The pool will be freed strictly before
174 174
      * this struct's free() callback is invoked.
175 175
      *
... ...
@@ -377,7 +377,7 @@ void *av_hwdevice_hwconfig_alloc(AVBufferRef *device_ctx);
377 377
 /**
378 378
  * Get the constraints on HW frames given a device and the HW-specific
379 379
  * configuration to be used with that device.  If no HW-specific
380
- * confgiuration is provided, returns the maximum possible capabilities
380
+ * configuration is provided, returns the maximum possible capabilities
381 381
  * of the device.
382 382
  *
383 383
  * @param device_ctx a reference to the associated AVHWDeviceContext.
... ...
@@ -8,7 +8,7 @@
8 8
  *
9 9
  * based on http://ubiqx.org/libcifs/source/Auth/MD5.c
10 10
  *          from Christopher R. Hertel (crh@ubiqx.mn.org)
11
- * Simplified, cleaned and IMO redundant comments removed by michael.
11
+ * Simplified, cleaned and IMO redundant comments removed by Michael.
12 12
  *
13 13
  * If you use gcc, then version 4.1 or later and -fomit-frame-pointer is
14 14
  * strongly recommended.
... ...
@@ -281,7 +281,7 @@ typedef struct AVOption {
281 281
 #define AV_OPT_FLAG_VIDEO_PARAM     16
282 282
 #define AV_OPT_FLAG_SUBTITLE_PARAM  32
283 283
 /**
284
- * The option is inteded for exporting values to the caller.
284
+ * The option is intended for exporting values to the caller.
285 285
  */
286 286
 #define AV_OPT_FLAG_EXPORT          64
287 287
 /**
... ...
@@ -53,7 +53,7 @@
53 53
  * to run on the IBM VGA graphics adapter use 6-bit palette components.
54 54
  *
55 55
  * @par
56
- * For all the 8bit per pixel formats, an RGB32 palette is in data[1] like
56
+ * For all the 8 bits per pixel formats, an RGB32 palette is in data[1] like
57 57
  * for pal8. This palette is filled in automatically by the function
58 58
  * allocating the picture.
59 59
  */
... ...
@@ -70,7 +70,7 @@ enum AVPixelFormat {
70 70
     AV_PIX_FMT_GRAY8,     ///<        Y        ,  8bpp
71 71
     AV_PIX_FMT_MONOWHITE, ///<        Y        ,  1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb
72 72
     AV_PIX_FMT_MONOBLACK, ///<        Y        ,  1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb
73
-    AV_PIX_FMT_PAL8,      ///< 8 bit with AV_PIX_FMT_RGB32 palette
73
+    AV_PIX_FMT_PAL8,      ///< 8 bits with AV_PIX_FMT_RGB32 palette
74 74
     AV_PIX_FMT_YUVJ420P,  ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range
75 75
     AV_PIX_FMT_YUVJ422P,  ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting color_range
76 76
     AV_PIX_FMT_YUVJ444P,  ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting color_range
... ...
@@ -143,7 +143,7 @@ enum AVPixelFormat {
143 143
     AV_PIX_FMT_YUV444P16LE,  ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
144 144
     AV_PIX_FMT_YUV444P16BE,  ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
145 145
 #if FF_API_VDPAU
146
-    AV_PIX_FMT_VDPAU_MPEG4,  ///< MPEG4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
146
+    AV_PIX_FMT_VDPAU_MPEG4,  ///< MPEG-4 HW decoding with VDPAU, data[0] contains a vdpau_render_state struct which contains the bitstream of the slices as well as various fields extracted from headers
147 147
 #endif
148 148
     AV_PIX_FMT_DXVA2_VLD,    ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer
149 149
 
... ...
@@ -151,7 +151,7 @@ enum AVPixelFormat {
151 151
     AV_PIX_FMT_RGB444BE,  ///< packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian,    X=unused/undefined
152 152
     AV_PIX_FMT_BGR444LE,  ///< packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined
153 153
     AV_PIX_FMT_BGR444BE,  ///< packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian,    X=unused/undefined
154
-    AV_PIX_FMT_YA8,       ///< 8bit gray, 8bit alpha
154
+    AV_PIX_FMT_YA8,       ///< 8 bits gray, 8 bits alpha
155 155
 
156 156
     AV_PIX_FMT_Y400A = AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8
157 157
     AV_PIX_FMT_GRAY8A= AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8
... ...
@@ -222,8 +222,8 @@ enum AVPixelFormat {
222 222
 
223 223
     AV_PIX_FMT_VDA,          ///< HW acceleration through VDA, data[3] contains a CVPixelBufferRef
224 224
 
225
-    AV_PIX_FMT_YA16BE,       ///< 16bit gray, 16bit alpha (big-endian)
226
-    AV_PIX_FMT_YA16LE,       ///< 16bit gray, 16bit alpha (little-endian)
225
+    AV_PIX_FMT_YA16BE,       ///< 16 bits gray, 16 bits alpha (big-endian)
226
+    AV_PIX_FMT_YA16LE,       ///< 16 bits gray, 16 bits alpha (little-endian)
227 227
 
228 228
     AV_PIX_FMT_GBRAP,        ///< planar GBRA 4:4:4:4 32bpp
229 229
     AV_PIX_FMT_GBRAP16BE,    ///< planar GBRA 4:4:4:4 64bpp, big-endian
... ...
@@ -420,9 +420,9 @@ enum AVColorTransferCharacteristic {
420 420
     AVCOL_TRC_IEC61966_2_4 = 11, ///< IEC 61966-2-4
421 421
     AVCOL_TRC_BT1361_ECG   = 12, ///< ITU-R BT1361 Extended Colour Gamut
422 422
     AVCOL_TRC_IEC61966_2_1 = 13, ///< IEC 61966-2-1 (sRGB or sYCC)
423
-    AVCOL_TRC_BT2020_10    = 14, ///< ITU-R BT2020 for 10 bit system
424
-    AVCOL_TRC_BT2020_12    = 15, ///< ITU-R BT2020 for 12 bit system
425
-    AVCOL_TRC_SMPTEST2084  = 16, ///< SMPTE ST 2084 for 10, 12, 14 and 16 bit systems
423
+    AVCOL_TRC_BT2020_10    = 14, ///< ITU-R BT2020 for 10-bit system
424
+    AVCOL_TRC_BT2020_12    = 15, ///< ITU-R BT2020 for 12-bit system
425
+    AVCOL_TRC_SMPTEST2084  = 16, ///< SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
426 426
     AVCOL_TRC_SMPTEST428_1 = 17, ///< SMPTE ST 428-1
427 427
     AVCOL_TRC_ARIB_STD_B67 = 18, ///< ARIB STD-B67, known as "Hybrid log-gamma"
428 428
     AVCOL_TRC_NB,                ///< Not part of ABI
... ...
@@ -475,8 +475,8 @@ enum AVColorRange {
475 475
  */
476 476
 enum AVChromaLocation {
477 477
     AVCHROMA_LOC_UNSPECIFIED = 0,
478
-    AVCHROMA_LOC_LEFT        = 1, ///< mpeg2/4 4:2:0, h264 default for 4:2:0
479
-    AVCHROMA_LOC_CENTER      = 2, ///< mpeg1 4:2:0, jpeg 4:2:0, h263 4:2:0
478
+    AVCHROMA_LOC_LEFT        = 1, ///< MPEG-2/4 4:2:0, H.264 default for 4:2:0
479
+    AVCHROMA_LOC_CENTER      = 2, ///< MPEG-1 4:2:0, JPEG 4:2:0, H.263 4:2:0
480 480
     AVCHROMA_LOC_TOPLEFT     = 3, ///< ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2
481 481
     AVCHROMA_LOC_TOP         = 4,
482 482
     AVCHROMA_LOC_BOTTOMLEFT  = 5,
... ...
@@ -182,7 +182,7 @@ int ff_get_cpu_flags_x86(void)
182 182
 
183 183
         /* Similar to the above but for AVX functions on AMD processors.
184 184
            This is necessary only for functions using YMM registers on Bulldozer
185
-           and Jaguar based CPUs as they lack 256-bits execution units. SSE/AVX
185
+           and Jaguar based CPUs as they lack 256-bit execution units. SSE/AVX
186 186
            functions using XMM registers are always faster on them.
187 187
            AV_CPU_FLAG_AVX and AV_CPU_FLAG_AVXSLOW are both set so that AVX is
188 188
            used unless explicitly disabled by checking AV_CPU_FLAG_AVXSLOW. */
... ...
@@ -722,7 +722,7 @@ yuv2rgba64_X_c_template(SwsContext *c, const int16_t *lumFilter,
722 722
             A2 += 0x20002000;
723 723
         }
724 724
 
725
-        // 8bit: 12+15=27; 16-bit: 12+19=31
725
+        // 8 bits: 12+15=27; 16 bits: 12+19=31
726 726
         Y1 >>= 14; // 10
727 727
         Y1 += 0x10000;
728 728
         Y2 >>= 14;
... ...
@@ -730,20 +730,20 @@ yuv2rgba64_X_c_template(SwsContext *c, const int16_t *lumFilter,
730 730
         U  >>= 14;
731 731
         V  >>= 14;
732 732
 
733
-        // 8bit: 27 -> 17bit, 16bit: 31 - 14 = 17bit
733
+        // 8 bits: 27 -> 17 bits, 16 bits: 31 - 14 = 17 bits
734 734
         Y1 -= c->yuv2rgb_y_offset;
735 735
         Y2 -= c->yuv2rgb_y_offset;
736 736
         Y1 *= c->yuv2rgb_y_coeff;
737 737
         Y2 *= c->yuv2rgb_y_coeff;
738 738
         Y1 += 1 << 13; // 21
739 739
         Y2 += 1 << 13;
740
-        // 8bit: 17 + 13bit = 30bit, 16bit: 17 + 13bit = 30bit
740
+        // 8 bits: 17 + 13 bits = 30 bits, 16 bits: 17 + 13 bits = 30 bits
741 741
 
742 742
         R = V * c->yuv2rgb_v2r_coeff;
743 743
         G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;
744 744
         B =                            U * c->yuv2rgb_u2b_coeff;
745 745
 
746
-        // 8bit: 30 - 22 = 8bit, 16bit: 30bit - 14 = 16bit
746
+        // 8 bits: 30 - 22 = 8 bits, 16 bits: 30 bits - 14 = 16 bits
747 747
         output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14);
748 748
         output_pixel(&dest[1], av_clip_uintp2(  G + Y1, 30) >> 14);
749 749
         output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14);
... ...
@@ -1294,7 +1294,7 @@ yuv2rgb_write(uint8_t *_dest, int i, int Y1, int Y2,
1294 1294
 
1295 1295
         dest[i * 2 + 0] = r[Y1 + dr1] + g[Y1 + dg1] + b[Y1 + db1];
1296 1296
         dest[i * 2 + 1] = r[Y2 + dr2] + g[Y2 + dg2] + b[Y2 + db2];
1297
-    } else /* 8/4-bit */ {
1297
+    } else /* 8/4 bits */ {
1298 1298
         uint8_t *dest = (uint8_t *) _dest;
1299 1299
         const uint8_t *r = (const uint8_t *) _r;
1300 1300
         const uint8_t *g = (const uint8_t *) _g;
... ...
@@ -73,7 +73,7 @@ const char *swscale_license(void);
73 73
 #define SWS_PRINT_INFO              0x1000
74 74
 
75 75
 //the following 3 flags are not completely implemented
76
-//internal chrominace subsampling info
76
+//internal chrominance subsampling info
77 77
 #define SWS_FULL_CHR_H_INT    0x2000
78 78
 //input subsampling info
79 79
 #define SWS_FULL_CHR_H_INP    0x4000
... ...
@@ -91,9 +91,9 @@ typedef int (*SwsFunc)(struct SwsContext *context, const uint8_t *src[],
91 91
  * Write one line of horizontally scaled data to planar output
92 92
  * without any additional vertical scaling (or point-scaling).
93 93
  *
94
- * @param src     scaled source data, 15bit for 8-10bit output,
95
- *                19-bit for 16bit output (in int32_t)
96
- * @param dest    pointer to the output plane. For >8bit
94
+ * @param src     scaled source data, 15 bits for 8-10-bit output,
95
+ *                19 bits for 16-bit output (in int32_t)
96
+ * @param dest    pointer to the output plane. For >8-bit
97 97
  *                output, this is in uint16_t
98 98
  * @param dstW    width of destination in pixels
99 99
  * @param dither  ordered dither array of type int16_t and size 8
... ...
@@ -106,11 +106,11 @@ typedef void (*yuv2planar1_fn)(const int16_t *src, uint8_t *dest, int dstW,
106 106
  * Write one line of horizontally scaled data to planar output
107 107
  * with multi-point vertical scaling between input pixels.
108 108
  *
109
- * @param filter        vertical luma/alpha scaling coefficients, 12bit [0,4096]
110
- * @param src           scaled luma (Y) or alpha (A) source data, 15bit for 8-10bit output,
111
- *                      19-bit for 16bit output (in int32_t)
109
+ * @param filter        vertical luma/alpha scaling coefficients, 12 bits [0,4096]
110
+ * @param src           scaled luma (Y) or alpha (A) source data, 15 bits for
111
+ *                      8-10-bit output, 19 bits for 16-bit output (in int32_t)
112 112
  * @param filterSize    number of vertical input lines to scale
113
- * @param dest          pointer to output plane. For >8bit
113
+ * @param dest          pointer to output plane. For >8-bit
114 114
  *                      output, this is in uint16_t
115 115
  * @param dstW          width of destination pixels
116 116
  * @param offset        Dither offset
... ...
@@ -124,13 +124,13 @@ typedef void (*yuv2planarX_fn)(const int16_t *filter, int filterSize,
124 124
  * with multi-point vertical scaling between input pixels.
125 125
  *
126 126
  * @param c             SWS scaling context
127
- * @param chrFilter     vertical chroma scaling coefficients, 12bit [0,4096]
128
- * @param chrUSrc       scaled chroma (U) source data, 15bit for 8-10bit output,
129
- *                      19-bit for 16bit output (in int32_t)
130
- * @param chrVSrc       scaled chroma (V) source data, 15bit for 8-10bit output,
131
- *                      19-bit for 16bit output (in int32_t)
127
+ * @param chrFilter     vertical chroma scaling coefficients, 12 bits [0,4096]
128
+ * @param chrUSrc       scaled chroma (U) source data, 15 bits for 8-10-bit
129
+ *                      output, 19 bits for 16-bit output (in int32_t)
130
+ * @param chrVSrc       scaled chroma (V) source data, 15 bits for 8-10-bit
131
+ *                      output, 19 bits for 16-bit output (in int32_t)
132 132
  * @param chrFilterSize number of vertical chroma input lines to scale
133
- * @param dest          pointer to the output plane. For >8bit
133
+ * @param dest          pointer to the output plane. For >8-bit
134 134
  *                      output, this is in uint16_t
135 135
  * @param dstW          width of chroma planes
136 136
  */
... ...
@@ -147,15 +147,15 @@ typedef void (*yuv2interleavedX_fn)(struct SwsContext *c,
147 147
  * that this function may do chroma scaling, see the "uvalpha" argument.
148 148
  *
149 149
  * @param c       SWS scaling context
150
- * @param lumSrc  scaled luma (Y) source data, 15bit for 8-10bit output,
151
- *                19-bit for 16bit output (in int32_t)
152
- * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,
153
- *                19-bit for 16bit output (in int32_t)
154
- * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,
155
- *                19-bit for 16bit output (in int32_t)
156
- * @param alpSrc  scaled alpha (A) source data, 15bit for 8-10bit output,
157
- *                19-bit for 16bit output (in int32_t)
158
- * @param dest    pointer to the output plane. For 16bit output, this is
150
+ * @param lumSrc  scaled luma (Y) source data, 15 bits for 8-10-bit output,
151
+ *                19 bits for 16-bit output (in int32_t)
152
+ * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output,
153
+ *                19 bits for 16-bit output (in int32_t)
154
+ * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output,
155
+ *                19 bits for 16-bit output (in int32_t)
156
+ * @param alpSrc  scaled alpha (A) source data, 15 bits for 8-10-bit output,
157
+ *                19 bits for 16-bit output (in int32_t)
158
+ * @param dest    pointer to the output plane. For 16-bit output, this is
159 159
  *                uint16_t
160 160
  * @param dstW    width of lumSrc and alpSrc in pixels, number of pixels
161 161
  *                to write into dest[]
... ...
@@ -180,15 +180,15 @@ typedef void (*yuv2packed1_fn)(struct SwsContext *c, const int16_t *lumSrc,
180 180
  * output by doing bilinear scaling between two input lines.
181 181
  *
182 182
  * @param c       SWS scaling context
183
- * @param lumSrc  scaled luma (Y) source data, 15bit for 8-10bit output,
184
- *                19-bit for 16bit output (in int32_t)
185
- * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,
186
- *                19-bit for 16bit output (in int32_t)
187
- * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,
188
- *                19-bit for 16bit output (in int32_t)
189
- * @param alpSrc  scaled alpha (A) source data, 15bit for 8-10bit output,
190
- *                19-bit for 16bit output (in int32_t)
191
- * @param dest    pointer to the output plane. For 16bit output, this is
183
+ * @param lumSrc  scaled luma (Y) source data, 15 bits for 8-10-bit output,
184
+ *                19 bits for 16-bit output (in int32_t)
185
+ * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output,
186
+ *                19 bits for 16-bit output (in int32_t)
187
+ * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output,
188
+ *                19 bits for 16-bit output (in int32_t)
189
+ * @param alpSrc  scaled alpha (A) source data, 15 bits for 8-10-bit output,
190
+ *                19 bits for 16-bit output (in int32_t)
191
+ * @param dest    pointer to the output plane. For 16-bit output, this is
192 192
  *                uint16_t
193 193
  * @param dstW    width of lumSrc and alpSrc in pixels, number of pixels
194 194
  *                to write into dest[]
... ...
@@ -214,19 +214,19 @@ typedef void (*yuv2packed2_fn)(struct SwsContext *c, const int16_t *lumSrc[2],
214 214
  * output by doing multi-point vertical scaling between input pixels.
215 215
  *
216 216
  * @param c             SWS scaling context
217
- * @param lumFilter     vertical luma/alpha scaling coefficients, 12bit [0,4096]
218
- * @param lumSrc        scaled luma (Y) source data, 15bit for 8-10bit output,
219
- *                      19-bit for 16bit output (in int32_t)
217
+ * @param lumFilter     vertical luma/alpha scaling coefficients, 12 bits [0,4096]
218
+ * @param lumSrc        scaled luma (Y) source data, 15 bits for 8-10-bit output,
219
+ *                      19 bits for 16-bit output (in int32_t)
220 220
  * @param lumFilterSize number of vertical luma/alpha input lines to scale
221
- * @param chrFilter     vertical chroma scaling coefficients, 12bit [0,4096]
222
- * @param chrUSrc       scaled chroma (U) source data, 15bit for 8-10bit output,
223
- *                      19-bit for 16bit output (in int32_t)
224
- * @param chrVSrc       scaled chroma (V) source data, 15bit for 8-10bit output,
225
- *                      19-bit for 16bit output (in int32_t)
221
+ * @param chrFilter     vertical chroma scaling coefficients, 12 bits [0,4096]
222
+ * @param chrUSrc       scaled chroma (U) source data, 15 bits for 8-10-bit output,
223
+ *                      19 bits for 16-bit output (in int32_t)
224
+ * @param chrVSrc       scaled chroma (V) source data, 15 bits for 8-10-bit output,
225
+ *                      19 bits for 16-bit output (in int32_t)
226 226
  * @param chrFilterSize number of vertical chroma input lines to scale
227
- * @param alpSrc        scaled alpha (A) source data, 15bit for 8-10bit output,
228
- *                      19-bit for 16bit output (in int32_t)
229
- * @param dest          pointer to the output plane. For 16bit output, this is
227
+ * @param alpSrc        scaled alpha (A) source data, 15 bits for 8-10-bit output,
228
+ *                      19 bits for 16-bit output (in int32_t)
229
+ * @param dest          pointer to the output plane. For 16-bit output, this is
230 230
  *                      uint16_t
231 231
  * @param dstW          width of lumSrc and alpSrc in pixels, number of pixels
232 232
  *                      to write into dest[]
... ...
@@ -248,19 +248,19 @@ typedef void (*yuv2packedX_fn)(struct SwsContext *c, const int16_t *lumFilter,
248 248
  * output by doing multi-point vertical scaling between input pixels.
249 249
  *
250 250
  * @param c             SWS scaling context
251
- * @param lumFilter     vertical luma/alpha scaling coefficients, 12bit [0,4096]
252
- * @param lumSrc        scaled luma (Y) source data, 15bit for 8-10bit output,
253
- *                      19-bit for 16bit output (in int32_t)
251
+ * @param lumFilter     vertical luma/alpha scaling coefficients, 12 bits [0,4096]
252
+ * @param lumSrc        scaled luma (Y) source data, 15 bits for 8-10-bit output,
253
+ *                      19 bits for 16-bit output (in int32_t)
254 254
  * @param lumFilterSize number of vertical luma/alpha input lines to scale
255
- * @param chrFilter     vertical chroma scaling coefficients, 12bit [0,4096]
256
- * @param chrUSrc       scaled chroma (U) source data, 15bit for 8-10bit output,
257
- *                      19-bit for 16bit output (in int32_t)
258
- * @param chrVSrc       scaled chroma (V) source data, 15bit for 8-10bit output,
259
- *                      19-bit for 16bit output (in int32_t)
255
+ * @param chrFilter     vertical chroma scaling coefficients, 12 bits [0,4096]
256
+ * @param chrUSrc       scaled chroma (U) source data, 15 bits for 8-10-bit output,
257
+ *                      19 bits for 16-bit output (in int32_t)
258
+ * @param chrVSrc       scaled chroma (V) source data, 15 bits for 8-10-bit output,
259
+ *                      19 bits for 16-bit output (in int32_t)
260 260
  * @param chrFilterSize number of vertical chroma input lines to scale
261
- * @param alpSrc        scaled alpha (A) source data, 15bit for 8-10bit output,
262
- *                      19-bit for 16bit output (in int32_t)
263
- * @param dest          pointer to the output planes. For 16bit output, this is
261
+ * @param alpSrc        scaled alpha (A) source data, 15 bits for 8-10-bit output,
262
+ *                      19 bits for 16-bit output (in int32_t)
263
+ * @param dest          pointer to the output planes. For 16-bit output, this is
264 264
  *                      uint16_t
265 265
  * @param dstW          width of lumSrc and alpSrc in pixels, number of pixels
266 266
  *                      to write into dest[]
... ...
@@ -554,7 +554,7 @@ typedef struct SwsContext {
554 554
      * Scale one horizontal line of input data using a bilinear filter
555 555
      * to produce one line of output data. Compared to SwsContext->hScale(),
556 556
      * please take note of the following caveats when using these:
557
-     * - Scaling is done using only 7bit instead of 14bit coefficients.
557
+     * - Scaling is done using only 7 bits instead of 14-bit coefficients.
558 558
      * - You can use no more than 5 input pixels to produce 4 output
559 559
      *   pixels. Therefore, this filter should not be used for downscaling
560 560
      *   by more than ~20% in width (because that equals more than 5/4th
... ...
@@ -585,15 +585,15 @@ typedef struct SwsContext {
585 585
      * @param dst        pointer to destination buffer for horizontally scaled
586 586
      *                   data. If the number of bits per component of one
587 587
      *                   destination pixel (SwsContext->dstBpc) is <= 10, data
588
-     *                   will be 15bpc in 16bits (int16_t) width. Else (i.e.
588
+     *                   will be 15 bpc in 16 bits (int16_t) width. Else (i.e.
589 589
      *                   SwsContext->dstBpc == 16), data will be 19bpc in
590
-     *                   32bits (int32_t) width.
590
+     *                   32 bits (int32_t) width.
591 591
      * @param dstW       width of destination image
592 592
      * @param src        pointer to source data to be scaled. If the number of
593 593
      *                   bits per component of a source pixel (SwsContext->srcBpc)
594
-     *                   is 8, this is 8bpc in 8bits (uint8_t) width. Else
594
+     *                   is 8, this is 8bpc in 8 bits (uint8_t) width. Else
595 595
      *                   (i.e. SwsContext->dstBpc > 8), this is native depth
596
-     *                   in 16bits (uint16_t) width. In other words, for 9-bit
596
+     *                   in 16 bits (uint16_t) width. In other words, for 9-bit
597 597
      *                   YUV input, this is 9bpc, for 10-bit YUV input, this is
598 598
      *                   10bpc, and for 16-bit RGB or YUV, this is 16bpc.
599 599
      * @param filter     filter coefficients to be used per output pixel for
... ...
@@ -50,17 +50,17 @@ SECTION .text
50 50
 ;                                     const uint8_t *dither, int offset)
51 51
 ;
52 52
 ; Scale one or $filterSize lines of source data to generate one line of output
53
-; data. The input is 15-bit in int16_t if $output_size is [8,10] and 19-bit in
54
-; int32_t if $output_size is 16. $filter is 12-bits. $filterSize is a multiple
53
+; data. The input is 15 bits in int16_t if $output_size is [8,10] and 19 bits in
54
+; int32_t if $output_size is 16. $filter is 12 bits. $filterSize is a multiple
55 55
 ; of 2. $offset is either 0 or 3. $dither holds 8 values.
56 56
 ;-----------------------------------------------------------------------------
57 57
 %macro yuv2planeX_mainloop 2
58 58
 .pixelloop_%2:
59 59
 %assign %%i 0
60
-    ; the rep here is for the 8bit output mmx case, where dither covers
60
+    ; the rep here is for the 8-bit output MMX case, where dither covers
61 61
     ; 8 pixels but we can only handle 2 pixels per register, and thus 4
62 62
     ; pixels per iteration. In order to not have to keep track of where
63
-    ; we are w.r.t. dithering, we unroll the mmx/8bit loop x2.
63
+    ; we are w.r.t. dithering, we unroll the MMX/8-bit loop x2.
64 64
 %if %1 == 8
65 65
 %assign %%repcnt 16/mmsize
66 66
 %else
... ...
@@ -39,10 +39,10 @@ SECTION .text
39 39
 ;                                const int16_t *filter,
40 40
 ;                                const int32_t *filterPos, int filterSize);
41 41
 ;
42
-; Scale one horizontal line. Input is either 8-bits width or 16-bits width
42
+; Scale one horizontal line. Input is either 8-bit width or 16-bit width
43 43
 ; ($source_width can be either 8, 9, 10 or 16, difference is whether we have to
44
-; downscale before multiplying). Filter is 14-bits. Output is either 15bits
45
-; (in int16_t) or 19bits (in int32_t), as given in $intermediate_nbits. Each
44
+; downscale before multiplying). Filter is 14 bits. Output is either 15 bits
45
+; (in int16_t) or 19 bits (in int32_t), as given in $intermediate_nbits. Each
46 46
 ; output pixel is generated from $filterSize input pixels, the position of
47 47
 ; the first pixel is given in filterPos[nOutputPixel].
48 48
 ;-----------------------------------------------------------------------------
... ...
@@ -29,7 +29,7 @@
29 29
 static const int codec_ids[4] = { AV_CODEC_ID_H264, AV_CODEC_ID_VP8, AV_CODEC_ID_RV40, AV_CODEC_ID_SVQ3 };
30 30
 
31 31
 static const char * const pred4x4_modes[4][15] = {
32
-    { /* H264 */
32
+    { /* H.264 */
33 33
         [VERT_PRED           ] = "vertical",
34 34
         [HOR_PRED            ] = "horizontal",
35 35
         [DC_PRED             ] = "dc",
... ...
@@ -65,7 +65,7 @@ static const char * const pred4x4_modes[4][15] = {
65 65
 };
66 66
 
67 67
 static const char * const pred8x8_modes[4][11] = {
68
-    { /* H264 */
68
+    { /* H.264 */
69 69
         [DC_PRED8x8              ] = "dc",
70 70
         [HOR_PRED8x8             ] = "horizontal",
71 71
         [VERT_PRED8x8            ] = "vertical",
... ...
@@ -92,7 +92,7 @@ static const char * const pred8x8_modes[4][11] = {
92 92
 };
93 93
 
94 94
 static const char * const pred16x16_modes[4][9] = {
95
-    { /* H264 */
95
+    { /* H.264 */
96 96
         [DC_PRED8x8     ] = "dc",
97 97
         [HOR_PRED8x8    ] = "horizontal",
98 98
         [VERT_PRED8x8   ] = "vertical",