Browse code

cosmetics: Fix spelling mistakes

Signed-off-by: Diego Biurrun <diego@biurrun.de>

Vittorio Giovara authored on 2016/04/28 02:45:23
Showing 361 changed files
... ...
@@ -377,7 +377,7 @@ version 0.7_beta2:
377 377
 - DPX image encoder
378 378
 - SMPTE 302M AES3 audio decoder
379 379
 - ffmpeg no longer quits after the 'q' key is pressed; use 'ctrl+c' instead
380
-- 9bit and 10bit per sample support in the H.264 decoder
380
+- 9 bits and 10 bits per sample support in the H.264 decoder
381 381
 
382 382
 
383 383
 version 0.7_beta1:
... ...
@@ -732,7 +732,7 @@ version 0.4.9-pre1:
732 732
 - rate distorted optimal lambda->qp support
733 733
 - AAC encoding with libfaac
734 734
 - Sunplus JPEG codec (SP5X) support
735
-- use Lagrange multipler instead of QP for ratecontrol
735
+- use Lagrange multiplier instead of QP for ratecontrol
736 736
 - Theora/VP3 decoding support
737 737
 - XA and ADX ADPCM codecs
738 738
 - export MPEG-2 active display area / pan scan
... ...
@@ -1,6 +1,6 @@
1 1
 /*
2 2
  * avconv main
3
- * Copyright (c) 2000-2011 The libav developers.
3
+ * Copyright (c) 2000-2011 The Libav developers
4 4
  *
5 5
  * This file is part of Libav.
6 6
  *
... ...
@@ -1154,7 +1154,7 @@ int guess_input_channel_layout(InputStream *ist)
1154 1154
             return 0;
1155 1155
         av_get_channel_layout_string(layout_name, sizeof(layout_name),
1156 1156
                                      dec->channels, dec->channel_layout);
1157
-        av_log(NULL, AV_LOG_WARNING, "Guessed Channel Layout for  Input Stream "
1157
+        av_log(NULL, AV_LOG_WARNING, "Guessed Channel Layout for Input Stream "
1158 1158
                "#%d.%d : %s\n", ist->file_index, ist->st->index, layout_name);
1159 1159
     }
1160 1160
     return 1;
... ...
@@ -1630,7 +1630,7 @@ static int init_output_bsfs(OutputStream *ost)
1630 1630
     for (i = 0; i < ost->nb_bitstream_filters; i++) {
1631 1631
         ret = av_bsf_alloc(ost->bitstream_filters[i], &ctx);
1632 1632
         if (ret < 0) {
1633
-            av_log(NULL, AV_LOG_ERROR, "Error allocating a bistream filter context\n");
1633
+            av_log(NULL, AV_LOG_ERROR, "Error allocating a bitstream filter context\n");
1634 1634
             return ret;
1635 1635
         }
1636 1636
         ost->bsf_ctx[i] = ctx;
... ...
@@ -1644,7 +1644,7 @@ static int init_output_bsfs(OutputStream *ost)
1644 1644
 
1645 1645
         ret = av_bsf_init(ctx);
1646 1646
         if (ret < 0) {
1647
-            av_log(NULL, AV_LOG_ERROR, "Error initializing bistream filter: %s\n",
1647
+            av_log(NULL, AV_LOG_ERROR, "Error initializing bitstream filter: %s\n",
1648 1648
                    ost->bitstream_filters[i]->name);
1649 1649
             return ret;
1650 1650
         }
... ...
@@ -760,7 +760,7 @@ static int open_input_file(OptionsContext *o, const char *filename)
760 760
     ic->flags |= AVFMT_FLAG_NONBLOCK;
761 761
     ic->interrupt_callback = int_cb;
762 762
 
763
-    /* open the input file with generic libav function */
763
+    /* open the input file with generic Libav function */
764 764
     err = avformat_open_input(&ic, filename, file_iformat, &o->g->format_opts);
765 765
     if (err < 0) {
766 766
         print_error(filename, err);
... ...
@@ -1362,7 +1362,7 @@ static int output_picture2(PlayerState *is, AVFrame *src_frame, double pts1, int
1362 1362
     }
1363 1363
     /* update video clock for next frame */
1364 1364
     frame_delay = av_q2d(is->video_dec->time_base);
1365
-    /* for MPEG2, the frame can be repeated, so we update the
1365
+    /* For MPEG-2, the frame can be repeated, so we update the
1366 1366
        clock accordingly */
1367 1367
     frame_delay += src_frame->repeat_pict * (frame_delay * 0.5);
1368 1368
     is->video_clock += frame_delay;
... ...
@@ -2123,7 +2123,7 @@ static int stream_component_open(PlayerState *is, int stream_index)
2123 2123
         /* init averaging filter */
2124 2124
         is->audio_diff_avg_coef  = exp(log(0.01) / AUDIO_DIFF_AVG_NB);
2125 2125
         is->audio_diff_avg_count = 0;
2126
-        /* since we do not have a precise anough audio fifo fullness,
2126
+        /* since we do not have a precise enough audio FIFO fullness,
2127 2127
            we correct audio sync only if larger than this threshold */
2128 2128
         is->audio_diff_threshold = 2.0 * SDL_AUDIO_BUFFER_SIZE / avctx->sample_rate;
2129 2129
 
... ...
@@ -62,7 +62,7 @@ static int use_value_sexagesimal_format = 0;
62 62
 /* globals */
63 63
 static const OptionDef *options;
64 64
 
65
-/* AVprobe context */
65
+/* avprobe context */
66 66
 static const char *input_filename;
67 67
 static AVInputFormat *iformat = NULL;
68 68
 
... ...
@@ -23,7 +23,7 @@ API changes, most recent first:
23 23
 
24 24
 2016-xx-xx - xxxxxxx - lavc 57.15.0 - avcodec.h
25 25
   Add a new bitstream filtering API working with AVPackets.
26
-  Deprecate the old bistream filtering API.
26
+  Deprecate the old bitstream filtering API.
27 27
 
28 28
 2016-xx-xx - xxxxxxx - lavfi 6.3.0 - avfilter.h
29 29
   Add AVFilterContext.hw_device_ctx.
... ...
@@ -501,7 +501,7 @@ API changes, most recent first:
501 501
 
502 502
 2013-08-05 - f824535 - lavc 55.13.0 - avcodec.h
503 503
   Deprecate the bitstream-related members from struct AVVDPAUContext.
504
-  The bistream buffers no longer need to be explicitly freed.
504
+  The bitstream buffers no longer need to be explicitly freed.
505 505
 
506 506
 2013-08-05 - 549294f - lavc 55.12.0 - avcodec.h
507 507
   Deprecate the CODEC_CAP_HWACCEL_VDPAU codec capability. Use CODEC_CAP_HWACCEL
... ...
@@ -591,7 +591,7 @@ lavd 54.0.0, lavfi 3.5.0
591 591
                 * base -- is now stored in AVBufferRef
592 592
                 * reference, type, buffer_hints -- are unnecessary in the new API
593 593
                 * hwaccel_picture_private, owner, thread_opaque -- should not
594
-                  have been acessed from outside of lavc
594
+                  have been accessed from outside of lavc
595 595
                 * qscale_table, qstride, qscale_type, mbskip_table, motion_val,
596 596
                   mb_type, dct_coeff, ref_index -- mpegvideo-specific tables,
597 597
                   which are not exported anymore.
... ...
@@ -641,7 +641,7 @@ For DXVA2, this option should contain the number of the display adapter to use.
641 641
 If this option is not specified, the default adapter is used.
642 642
 
643 643
 @item qsv
644
-For QSV, this option corresponds to the valus of MFX_IMPL_* . Allowed values
644
+For QSV, this option corresponds to the values of MFX_IMPL_* . Allowed values
645 645
 are:
646 646
 @table @option
647 647
 @item auto
... ...
@@ -886,7 +886,7 @@ avconv -i infile -streamid 0:33 -streamid 1:36 out.ts
886 886
 @end example
887 887
 
888 888
 @item -bsf[:@var{stream_specifier}] @var{bitstream_filters} (@emph{output,per-stream})
889
-Set bitstream filters for matching streams. @var{bistream_filters} is
889
+Set bitstream filters for matching streams. @var{bitstream_filters} is
890 890
 a comma-separated list of bitstream filters. Use the @code{-bsfs} option
891 891
 to get the list of bitstream filters.
892 892
 @example
... ...
@@ -20,7 +20,7 @@ avplay [options] @file{input_file}
20 20
 @chapter Description
21 21
 @c man begin DESCRIPTION
22 22
 
23
-AVplay is a very simple and portable media player using the Libav
23
+avplay is a very simple and portable media player using the Libav
24 24
 libraries and the SDL library. It is mostly used as a testbed for the
25 25
 various Libav APIs.
26 26
 @c man end
... ...
@@ -171,7 +171,7 @@ Seek to percentage in file corresponding to fraction of width.
171 171
 @ignore
172 172
 
173 173
 @setfilename avplay
174
-@settitle AVplay media player
174
+@settitle avplay media player
175 175
 
176 176
 @c man begin SEEALSO
177 177
 avconv(1), avprobe(1) and the Libav HTML documentation
... ...
@@ -19,7 +19,7 @@ are used to precisely specify which stream(s) does a given option belong to.
19 19
 
20 20
 A stream specifier is a string generally appended to the option name and
21 21
 separated from it by a colon. E.g. @code{-codec:a:1 ac3} option contains
22
-@code{a:1} stream specifer, which matches the second audio stream. Therefore it
22
+@code{a:1} stream specifier, which matches the second audio stream. Therefore it
23 23
 would select the ac3 codec for the second audio stream.
24 24
 
25 25
 A stream specifier can match several stream, the option is then applied to all
... ...
@@ -15,7 +15,7 @@ md5.c                   MD5 Message-Digest Algorithm
15 15
 rational.c              code to perform exact calculations with rational numbers
16 16
 tree.c                  generic AVL tree
17 17
 crc.c                   generic CRC checksumming code
18
-integer.c               128bit integer math
18
+integer.c               128-bit integer math
19 19
 lls.c
20 20
 mathematics.c           greatest common divisor, integer sqrt, integer log2, ...
21 21
 mem.c                   memory allocation routines with guaranteed alignment
... ...
@@ -23,7 +23,7 @@ player. See @file{doc/examples/output.c} to use it to generate
23 23
 audio or video streams.
24 24
 @end itemize
25 25
 
26
-@section Integrating libav in your program
26
+@section Integrating Libav in your program
27 27
 
28 28
 Shared libraries should be used whenever is possible in order to reduce
29 29
 the effort distributors have to pour to support programs and to ensure
... ...
@@ -617,7 +617,7 @@ least make sure that it does not break anything.
617 617
 If the code changed has already a test present in FATE you should run it,
618 618
 otherwise it is advised to add it.
619 619
 
620
-Improvements to codec or demuxer might change the FATE results. Make sure
620
+Improvements to a codec or demuxer might change the FATE results. Make sure
621 621
 to commit the update reference with the change and to explain in the comment
622 622
 why the expected result changed.
623 623
 
... ...
@@ -803,8 +803,8 @@ Use @var{0} to disable alpha plane coding.
803 803
 @subsection Speed considerations
804 804
 
805 805
 In the default mode of operation the encoder has to honor frame constraints
806
-(i.e. not produc frames with size bigger than requested) while still making
807
-output picture as good as possible.
806
+(i.e. not produce frames with a size larger than requested) while still making
807
+the output picture as good as possible.
808 808
 A frame containing a lot of small details is harder to compress and the encoder
809 809
 would spend more time searching for appropriate quantizers for each slice.
810 810
 
... ...
@@ -23,9 +23,9 @@
23 23
  * libavcodec API use example.
24 24
  *
25 25
  * @example avcodec.c
26
- * Note that this library only handles codecs (mpeg, mpeg4, etc...),
27
- * not file formats (avi, vob, etc...). See library 'libavformat' for the
28
- * format handling
26
+ * Note that this library only handles codecs (MPEG, MPEG-4, etc...),
27
+ * not file formats (AVI, VOB, etc...). See library 'libavformat' for the
28
+ * format handling.
29 29
  */
30 30
 
31 31
 #include <stdlib.h>
... ...
@@ -234,7 +234,7 @@ static void audio_decode_example(const char *outfilename, const char *filename)
234 234
 
235 235
     printf("Audio decoding\n");
236 236
 
237
-    /* find the mpeg audio decoder */
237
+    /* find the MPEG audio decoder */
238 238
     codec = avcodec_find_decoder(AV_CODEC_ID_MP2);
239 239
     if (!codec) {
240 240
         fprintf(stderr, "codec not found\n");
... ...
@@ -325,7 +325,7 @@ static void video_encode_example(const char *filename)
325 325
 
326 326
     printf("Video encoding\n");
327 327
 
328
-    /* find the mpeg1 video encoder */
328
+    /* find the mpeg1video encoder */
329 329
     codec = avcodec_find_encoder(AV_CODEC_ID_MPEG1VIDEO);
330 330
     if (!codec) {
331 331
         fprintf(stderr, "codec not found\n");
... ...
@@ -424,7 +424,7 @@ static void video_encode_example(const char *filename)
424 424
         }
425 425
     }
426 426
 
427
-    /* add sequence end code to have a real mpeg file */
427
+    /* add sequence end code to have a real MPEG file */
428 428
     fwrite(endcode, 1, sizeof(endcode), f);
429 429
     fclose(f);
430 430
 
... ...
@@ -465,12 +465,12 @@ static void video_decode_example(const char *outfilename, const char *filename)
465 465
 
466 466
     av_init_packet(&avpkt);
467 467
 
468
-    /* set end of buffer to 0 (this ensures that no overreading happens for damaged mpeg streams) */
468
+    /* set end of buffer to 0 (this ensures that no overreading happens for damaged MPEG streams) */
469 469
     memset(inbuf + INBUF_SIZE, 0, AV_INPUT_BUFFER_PADDING_SIZE);
470 470
 
471 471
     printf("Video decoding\n");
472 472
 
473
-    /* find the mpeg1 video decoder */
473
+    /* find the MPEG-1 video decoder */
474 474
     codec = avcodec_find_decoder(AV_CODEC_ID_MPEG1VIDEO);
475 475
     if (!codec) {
476 476
         fprintf(stderr, "codec not found\n");
... ...
@@ -545,9 +545,9 @@ static void video_decode_example(const char *outfilename, const char *filename)
545 545
         }
546 546
     }
547 547
 
548
-    /* some codecs, such as MPEG, transmit the I and P frame with a
548
+    /* Some codecs, such as MPEG, transmit the I- and P-frame with a
549 549
        latency of one frame. You must do the following to have a
550
-       chance to get the last frame of the video */
550
+       chance to get the last frame of the video. */
551 551
     avpkt.data = NULL;
552 552
     avpkt.size = 0;
553 553
     len = avcodec_decode_video2(c, picture, &got_picture, &avpkt);
... ...
@@ -365,7 +365,7 @@ static void add_video_stream(OutputStream *ost, AVFormatContext *oc,
365 365
     c->gop_size      = 12; /* emit one intra frame every twelve frames at most */
366 366
     c->pix_fmt       = STREAM_PIX_FMT;
367 367
     if (c->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
368
-        /* just for testing, we also add B frames */
368
+        /* just for testing, we also add B-frames */
369 369
         c->max_b_frames = 2;
370 370
     }
371 371
     if (c->codec_id == AV_CODEC_ID_MPEG1VIDEO) {
... ...
@@ -11,7 +11,7 @@
11 11
 
12 12
 @chapter Introduction
13 13
 
14
-FATE provides a regression testsuite embedded within the Libav build system.
14
+FATE provides a regression test suite embedded within the Libav build system.
15 15
 It can be run locally and optionally configured to send reports to a web
16 16
 aggregator and viewer @url{http://fate.libav.org}.
17 17
 
... ...
@@ -24,7 +24,7 @@ and provide new tests when submitting patches to add additional features.
24 24
 In order to run, FATE needs a large amount of data (samples and references)
25 25
 that is provided separately from the actual source distribution.
26 26
 
27
-To inform the build system about the testsuite location, pass
27
+To inform the build system about the test suite location, pass
28 28
 @option{--samples=<path to the samples>} to @command{configure} or set the
29 29
 @var{SAMPLES} Make variable or the @var{LIBAV_SAMPLES} environment variable
30 30
 to a suitable value.
... ...
@@ -57,7 +57,7 @@ Specific Makefile targets and Makefile variables are available:
57 57
 List all fate/regression test targets.
58 58
 
59 59
 @item fate-rsync
60
-Shortcut to download the fate test samples to the specified testsuite location.
60
+Shortcut to download the fate test samples to the specified test suite location.
61 61
 
62 62
 @item fate
63 63
 Run the FATE test suite (requires the fate-suite dataset).
... ...
@@ -1541,7 +1541,7 @@ For more information, see
1541 1541
 @section gradfun
1542 1542
 
1543 1543
 Fix the banding artifacts that are sometimes introduced into nearly flat
1544
-regions by truncation to 8bit colordepth.
1544
+regions by truncation to 8-bit colordepth.
1545 1545
 Interpolate the gradients that should go where the bands are, and
1546 1546
 dither them.
1547 1547
 
... ...
@@ -1900,7 +1900,7 @@ libopencv function @code{cvSmooth}.
1900 1900
 Overlay one video on top of another.
1901 1901
 
1902 1902
 It takes two inputs and has one output. The first input is the "main"
1903
-video on which the second input is overlayed.
1903
+video on which the second input is overlaid.
1904 1904
 
1905 1905
 It accepts the following parameters:
1906 1906
 
... ...
@@ -2327,7 +2327,7 @@ select='not(mod(n\,100))'
2327 2327
 # Select only frames contained in the 10-20 time interval
2328 2328
 select='gte(t\,10)*lte(t\,20)'
2329 2329
 
2330
-# Select only I frames contained in the 10-20 time interval
2330
+# Select only I-frames contained in the 10-20 time interval
2331 2331
 select='gte(t\,10)*lte(t\,20)*eq(pict_type\,I)'
2332 2332
 
2333 2333
 # Select frames with a minimum distance of 10 seconds
... ...
@@ -2957,7 +2957,7 @@ number or a valid video frame rate abbreviation. The default value is
2957 2957
 
2958 2958
 The following graph description will generate a red source
2959 2959
 with an opacity of 0.2, with size "qcif" and a frame rate of 10
2960
-frames per second, which will be overlayed over the source connected
2960
+frames per second, which will be overlaid over the source connected
2961 2961
 to the pad with identifier "in":
2962 2962
 
2963 2963
 @example
... ...
@@ -3070,7 +3070,7 @@ A '|'-separated list of parameters to pass to the frei0r source.
3070 3070
 An example:
3071 3071
 @example
3072 3072
 # Generate a frei0r partik0l source with size 200x200 and framerate 10
3073
-# which is overlayed on the overlay filter main input
3073
+# which is overlaid on the overlay filter's main input
3074 3074
 frei0r_src=size=200x200:framerate=10:filter_name=partik0l:filter_params=1234 [overlay]; [in][overlay] overlay
3075 3075
 @end example
3076 3076
 
... ...
@@ -399,7 +399,7 @@ to ensure no local changes still need to be committed and that no local
399 399
 changes may have thrown off the results of your testing.
400 400
 @end itemize
401 401
 
402
-Next let the code pass through a full run of our testsuite. Before you do,
402
+Next let the code pass through a full run of our test suite. Before you do,
403 403
 the command @command{make fate-rsync} will update the test samples. Changes
404 404
 to the samples set are not very common and commits depending on samples
405 405
 changes are delayed for at least 24 hours to allow the new samples to
... ...
@@ -369,7 +369,7 @@ The syntax is:
369 369
 -grab_x @var{x_offset} -grab_y @var{y_offset}
370 370
 @end example
371 371
 
372
-Set the grabing region coordinates. The are expressed as offset from the top left
372
+Set the grabbing region coordinates. The are expressed as offset from the top left
373 373
 corner of the X11 window. The default value is 0.
374 374
 
375 375
 @c man end INPUT DEVICES
... ...
@@ -29,7 +29,7 @@ NUT has some variants signaled by using the flags field in its main header.
29 29
 
30 30
 The BROADCAST variant provides a secondary time reference to facilitate
31 31
 detecting endpoint latency and network delays.
32
-It assumes all the endpoint clocks are syncronized.
32
+It assumes all the endpoint clocks are synchronized.
33 33
 To be used in real-time scenarios.
34 34
 
35 35
 @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
... ...
@@ -62,7 +62,7 @@ bash ./configure
62 62
 @section Darwin (OS X, iPhone)
63 63
 
64 64
 The toolchain provided with Xcode is sufficient to build the basic
65
-unacelerated code.
65
+unaccelerated code.
66 66
 
67 67
 OS X on PowerPC or ARM (iPhone) requires a preprocessor from
68 68
 @url{git://git.libav.org/gas-preprocessor.git} to build the optimized
... ...
@@ -137,7 +137,7 @@ pacman -S make pkgconf diffutils
137 137
 pacman -S mingw-w64-x86_64-yasm mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL
138 138
 @end example
139 139
 
140
-To target 32bit replace the @code{x86_64} with @code{i686} in the command above.
140
+To target 32 bits replace @code{x86_64} with @code{i686} in the command above.
141 141
 
142 142
 @section Microsoft Visual C++ or Intel C++ Compiler for Windows
143 143
 
... ...
@@ -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
... ...
@@ -1,7 +1,7 @@
1
-This is a quick description of the viterbi aka dynamic programing
2
-algorthm.
1
+This is a quick description of the Viterbi aka dynamic programming
2
+algorithm.
3 3
 
4
-Its reason for existence is that wikipedia has become very poor on
4
+Its reason for existence is that Wikipedia has become very poor on
5 5
 describing algorithms in a way that makes it useable for understanding
6 6
 them or anything else actually. It tends now to describe the very same
7 7
 algorithm under 50 different names and pages with few understandable
... ...
@@ -41,7 +41,7 @@ readable)
41 41
 Our goal is to find a path from left to right through it which
42 42
 minimizes the sum of the score of all edges.
43 43
 (and of course left/right is just a convention here it could be top down too)
44
-Similarly the minimum could be the maximum by just fliping the sign,
44
+Similarly the minimum could be the maximum by just flipping the sign,
45 45
 Example of a path with scores:
46 46
 
47 47
     O   O   O   O   O   O   O
... ...
@@ -53,7 +53,7 @@ Example of a path with scores:
53 53
     O   O   O   O   O   O-1-O---> (sum here is 24)
54 54
 
55 55
 
56
-The viterbi algorthm now solves this simply column by column
56
+The Viterbi algorithm now solves this simply column by column
57 57
 For the previous column each point has a best path and a associated
58 58
 score:
59 59
 
... ...
@@ -100,10 +100,10 @@ trivial given we know the previous column best paths and scores:
100 100
     O     0     4
101 101
 
102 102
 
103
-the viterbi algorthm continues exactly like this column for column until the
103
+the Viterbi algorithm continues exactly like this column for column until the
104 104
 end and then just picks the path with the best score (above that would be the
105 105
 one with score 3)
106 106
 
107 107
 
108
-Author: Michael niedermayer
108
+Author: Michael Niedermayer
109 109
 Copyright LGPL
... ...
@@ -1916,8 +1916,8 @@ static int decode_ics(AACContext *ac, SingleChannelElement *sce,
1916 1916
             avpriv_request_sample(ac->avctx, "SSR");
1917 1917
             return AVERROR_PATCHWELCOME;
1918 1918
         }
1919
-        // I see no textual basis in the spec for this occuring after SSR gain
1920
-        // control, but this is what both reference and real implmentations do
1919
+        // I see no textual basis in the spec for this occurring after SSR gain
1920
+        // control, but this is what both reference and real implementations do
1921 1921
         if (tns->present && er_syntax)
1922 1922
             if (decode_tns(ac, tns, gb, ics) < 0)
1923 1923
                 return AVERROR_INVALIDDATA;
... ...
@@ -3047,7 +3047,7 @@ static av_cold int aac_decode_close(AVCodecContext *avctx)
3047 3047
 
3048 3048
 struct LATMContext {
3049 3049
     AACContext aac_ctx;     ///< containing AACContext
3050
-    int initialized;        ///< initilized after a valid extradata was seen
3050
+    int initialized;        ///< initialized after a valid extradata was seen
3051 3051
 
3052 3052
     // parser data
3053 3053
     int audio_mux_version_A; ///< LATM syntax version
... ...
@@ -130,7 +130,7 @@ av_cold void ff_aac_sbr_init(void)
130 130
 /** Places SBR in pure upsampling mode. */
131 131
 static void sbr_turnoff(SpectralBandReplication *sbr) {
132 132
     sbr->start = 0;
133
-    // Init defults used in pure upsampling mode
133
+    // Init defaults used in pure upsampling mode
134 134
     sbr->kx[1] = 32; //Typo in spec, kx' inits to 32
135 135
     sbr->m[1] = 0;
136 136
     // Reset values for first SBR header
... ...
@@ -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 Libav.
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 Libav.
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 Libav.
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 Libav.
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      (14)
40
- *  8bit  rice param limit     (10)
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      (14)
40
+ *  8 bits  rice param limit     (10)
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>
... ...
@@ -305,7 +305,7 @@ static av_cold int read_specific_config(ALSDecContext *ctx)
305 305
     skip_bits_long(&gb, 32); // sample rate already known
306 306
     sconf->samples              = get_bits_long(&gb, 32);
307 307
     avctx->channels             = m4ac.channels;
308
-    skip_bits(&gb, 16);      // number of channels already knwon
308
+    skip_bits(&gb, 16);      // number of channels already known
309 309
     skip_bits(&gb, 3);       // skip file_type
310 310
     sconf->resolution           = get_bits(&gb, 3);
311 311
     sconf->floating             = get_bits1(&gb);
... ...
@@ -532,13 +532,13 @@ static void decode_fixed_sparse(AMRFixed *fixed_sparse, const uint16_t *pulses,
532 532
  * @param p the context
533 533
  * @param subframe unpacked amr subframe
534 534
  * @param mode mode of the current frame
535
- * @param fixed_sparse sparse respresentation of the fixed vector
535
+ * @param fixed_sparse sparse representation of the fixed vector
536 536
  */
537 537
 static void pitch_sharpening(AMRContext *p, int subframe, enum Mode mode,
538 538
                              AMRFixed *fixed_sparse)
539 539
 {
540 540
     // The spec suggests the current pitch gain is always used, but in other
541
-    // modes the pitch and codebook gains are joinly quantized (sec 5.8.2)
541
+    // modes the pitch and codebook gains are jointly quantized (sec 5.8.2)
542 542
     // so the codebook gain cannot depend on the quantized pitch gain.
543 543
     if (mode == MODE_12k2)
544 544
         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
 
... ...
@@ -189,7 +189,7 @@ static int execute_code(AVCodecContext * avctx, int c)
189 189
         s->y = s->nb_args > 0 ? av_clip((s->args[0] - 1)*s->font_height, 0, avctx->height - s->font_height) : 0;
190 190
         s->x = s->nb_args > 1 ? av_clip((s->args[1] - 1)*FONT_WIDTH,     0, avctx->width  - FONT_WIDTH) : 0;
191 191
         break;
192
-    case 'h': //set creen mode
192
+    case 'h': //set screen mode
193 193
     case 'l': //reset screen mode
194 194
         if (s->nb_args < 2)
195 195
             s->args[0] = DEFAULT_SCREEN_MODE;
... ...
@@ -359,10 +359,10 @@ static inline void range_dec_normalize(APEContext *ctx)
359 359
 }
360 360
 
361 361
 /**
362
- * Calculate culmulative frequency for next symbol. Does NO update!
362
+ * Calculate cumulative frequency for next symbol. Does NO update!
363 363
  * @param ctx decoder context
364 364
  * @param tot_f is the total frequency or (code_value)1<<shift
365
- * @return the culmulative frequency
365
+ * @return the cumulative frequency
366 366
  */
367 367
 static inline int range_decode_culfreq(APEContext *ctx, int tot_f)
368 368
 {
... ...
@@ -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
... ...
@@ -28,7 +28,7 @@ void ff_dct_unquantize_h263_armv5te(int16_t *block, int qmul, int qadd, int coun
28 28
 
29 29
 #ifdef ENABLE_ARM_TESTS
30 30
 /**
31
- * h263 dequantizer supplementary function, it is performance critical and needs to
31
+ * H.263 dequantizer supplementary function, it is performance critical and needs to
32 32
  * have optimized implementations for each architecture. Is also used as a reference
33 33
  * implementation in regression tests
34 34
  */
... ...
@@ -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)
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * SSA/ASS common funtions
2
+ * SSA/ASS common functions
3 3
  * Copyright (c) 2010  Aurelien Jacobs <aurel@gnuage.org>
4 4
  *
5 5
  * This file is part of Libav.
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * SSA/ASS common funtions
2
+ * SSA/ASS common functions
3 3
  * Copyright (c) 2010  Aurelien Jacobs <aurel@gnuage.org>
4 4
  *
5 5
  * This file is part of Libav.
... ...
@@ -43,7 +43,7 @@ static const uint8_t bfu_bands_t[4]  = {0, 20, 36, 52};
43 43
  */
44 44
 static const uint8_t specs_per_bfu[52] = {
45 45
      8,  8,  8,  8,  4,  4,  4,  4,  8,  8,  8,  8,  6,  6,  6,  6, 6, 6, 6, 6, // low band
46
-     6,  6,  6,  6,  7,  7,  7,  7,  9,  9,  9,  9, 10, 10, 10, 10,             // midle band
46
+     6,  6,  6,  6,  7,  7,  7,  7,  9,  9,  9,  9, 10, 10, 10, 10,             // middle band
47 47
     12, 12, 12, 12, 12, 12, 12, 12, 20, 20, 20, 20, 20, 20, 20, 20              // high band
48 48
 };
49 49
 
... ...
@@ -783,7 +783,7 @@ typedef struct RcOverride{
783 783
  * Use only bitexact stuff (except (I)DCT).
784 784
  */
785 785
 #define AV_CODEC_FLAG_BITEXACT        (1 << 23)
786
-/* Fx : Flag for h263+ extra options */
786
+/* Fx : Flag for H.263+ extra options */
787 787
 /**
788 788
  * H.263 advanced intra coding / MPEG-4 AC prediction
789 789
  */
... ...
@@ -869,7 +869,7 @@ typedef struct RcOverride{
869 869
  * are connected to a parser to split what they return into proper frames.
870 870
  * This flag is reserved to the very rare category of codecs which have a
871 871
  * bitstream that cannot be split into frames without timeconsuming
872
- * operations like full decoding. Demuxers carring such bitstreams thus
872
+ * operations like full decoding. Demuxers carrying such bitstreams thus
873 873
  * may return multiple frames in a packet. This has many disadvantages like
874 874
  * prohibiting stream copy in many cases thus it should only be considered
875 875
  * as a last resort.
... ...
@@ -959,7 +959,7 @@ typedef struct RcOverride{
959 959
 #define CODEC_FLAG_LOW_DELAY      0x00080000 ///< Force low delay.
960 960
 #define CODEC_FLAG_GLOBAL_HEADER  0x00400000 ///< Place global headers in extradata instead of every keyframe.
961 961
 #define CODEC_FLAG_BITEXACT       0x00800000 ///< Use only bitexact stuff (except (I)DCT).
962
-/* Fx : Flag for h263+ extra options */
962
+/* Fx : Flag for H.263+ extra options */
963 963
 #define CODEC_FLAG_AC_PRED        0x01000000 ///< H.263 advanced intra coding / MPEG-4 AC prediction
964 964
 #define CODEC_FLAG_LOOP_FILTER    0x00000800 ///< loop filter
965 965
 #define CODEC_FLAG_INTERLACED_ME  0x20000000 ///< interlaced motion estimation
... ...
@@ -1031,7 +1031,7 @@ typedef struct RcOverride{
1031 1031
  * are connected to a parser to split what they return into proper frames.
1032 1032
  * This flag is reserved to the very rare category of codecs which have a
1033 1033
  * bitstream that cannot be split into frames without timeconsuming
1034
- * operations like full decoding. Demuxers carring such bitstreams thus
1034
+ * operations like full decoding. Demuxers carrying such bitstreams thus
1035 1035
  * may return multiple frames in a packet. This has many disadvantages like
1036 1036
  * prohibiting stream copy in many cases thus it should only be considered
1037 1037
  * as a last resort.
... ...
@@ -1097,7 +1097,7 @@ typedef struct RcOverride{
1097 1097
 #define MB_TYPE_L0L1       (MB_TYPE_L0   | MB_TYPE_L1)
1098 1098
 #define MB_TYPE_QUANT      0x00010000
1099 1099
 #define MB_TYPE_CBP        0x00020000
1100
-//Note bits 24-31 are reserved for codec specific use (h264 ref0, mpeg1 0mv, ...)
1100
+// Note bits 24-31 are reserved for codec specific use (H.264 ref0, MPEG-1 0mv, ...)
1101 1101
 #endif
1102 1102
 
1103 1103
 /**
... ...
@@ -1500,11 +1500,11 @@ typedef struct AVCodecContext {
1500 1500
 
1501 1501
     /**
1502 1502
      * some codecs need / can use extradata like Huffman tables.
1503
-     * mjpeg: Huffman tables
1503
+     * MJPEG: Huffman tables
1504 1504
      * rv10: additional flags
1505
-     * mpeg4: global headers (they can be in the bitstream or here)
1505
+     * MPEG-4: global headers (they can be in the bitstream or here)
1506 1506
      * The allocated memory should be AV_INPUT_BUFFER_PADDING_SIZE bytes larger
1507
-     * than extradata_size to avoid prolems if it is read with the bitstream reader.
1507
+     * than extradata_size to avoid problems if it is read with the bitstream reader.
1508 1508
      * The bytewise contents of extradata must not depend on the architecture or CPU endianness.
1509 1509
      * - encoding: Set/allocated/freed by libavcodec.
1510 1510
      * - decoding: Set/allocated/freed by user.
... ...
@@ -1557,7 +1557,7 @@ typedef struct AVCodecContext {
1557 1557
      * picture width / height.
1558 1558
      *
1559 1559
      * @note Those fields may not match the values of the last
1560
-     * AVFrame outputted by avcodec_decode_video2 due frame
1560
+     * AVFrame output by avcodec_decode_video2 due frame
1561 1561
      * reordering.
1562 1562
      *
1563 1563
      * - encoding: MUST be set by user.
... ...
@@ -1573,7 +1573,7 @@ typedef struct AVCodecContext {
1573 1573
      * the decoded frame is cropped before being output.
1574 1574
      *
1575 1575
      * @note Those field may not match the value of the last
1576
-     * AVFrame outputted by avcodec_receive_frame() due frame
1576
+     * AVFrame output by avcodec_receive_frame() due frame
1577 1577
      * reordering.
1578 1578
      *
1579 1579
      * - encoding: unused
... ...
@@ -1597,10 +1597,10 @@ typedef struct AVCodecContext {
1597 1597
     /**
1598 1598
      * Pixel format, see AV_PIX_FMT_xxx.
1599 1599
      * May be set by the demuxer if known from headers.
1600
-     * May be overriden by the decoder if it knows better.
1600
+     * May be overridden by the decoder if it knows better.
1601 1601
      *
1602 1602
      * @note This field may not match the value of the last
1603
-     * AVFrame outputted by avcodec_receive_frame() due frame
1603
+     * AVFrame output by avcodec_receive_frame() due frame
1604 1604
      * reordering.
1605 1605
      *
1606 1606
      * - encoding: Set by user.
... ...
@@ -1710,8 +1710,8 @@ typedef struct AVCodecContext {
1710 1710
 #endif
1711 1711
 
1712 1712
     /**
1713
-     * qscale factor between P and I-frames
1714
-     * If > 0 then the last p frame quantizer will be used (q= lastp_q*factor+offset).
1713
+     * qscale factor between P- and I-frames
1714
+     * If > 0 then the last P-frame quantizer will be used (q = lastp_q * factor + offset).
1715 1715
      * If < 0 then normal ratecontrol will be done (q= -normal_q*factor+offset).
1716 1716
      * - encoding: Set by user.
1717 1717
      * - decoding: unused
... ...
@@ -1921,7 +1921,7 @@ typedef struct AVCodecContext {
1921 1921
      */
1922 1922
     int slice_flags;
1923 1923
 #define SLICE_FLAG_CODED_ORDER    0x0001 ///< draw_horiz_band() is called in coded order instead of display
1924
-#define SLICE_FLAG_ALLOW_FIELD    0x0002 ///< allow draw_horiz_band() with field slices (MPEG2 field pics)
1924
+#define SLICE_FLAG_ALLOW_FIELD    0x0002 ///< allow draw_horiz_band() with field slices (MPEG-2 field pics)
1925 1925
 #define SLICE_FLAG_ALLOW_PLANE    0x0004 ///< allow draw_horiz_band() with 1 component at a time (SVQ1)
1926 1926
 
1927 1927
 #if FF_API_XVMC
... ...
@@ -2012,14 +2012,14 @@ typedef struct AVCodecContext {
2012 2012
 #endif
2013 2013
 
2014 2014
     /**
2015
-     * minimum MB lagrange multipler
2015
+     * minimum MB Lagrange multiplier
2016 2016
      * - encoding: Set by user.
2017 2017
      * - decoding: unused
2018 2018
      */
2019 2019
     int mb_lmin;
2020 2020
 
2021 2021
     /**
2022
-     * maximum MB lagrange multipler
2022
+     * maximum MB Lagrange multiplier
2023 2023
      * - encoding: Set by user.
2024 2024
      * - decoding: unused
2025 2025
      */
... ...
@@ -2238,7 +2238,7 @@ typedef struct AVCodecContext {
2238 2238
      *     to all data planes. data[] must hold as many pointers as it can.
2239 2239
      *     extended_data must be allocated with av_malloc() and will be freed in
2240 2240
      *     av_frame_unref().
2241
-     *   * otherwise exended_data must point to data
2241
+     *   * otherwise extended_data must point to data
2242 2242
      * - buf[] must contain one or more pointers to AVBufferRef structures. Each of
2243 2243
      *   the frame's data and extended_data pointers must be contained in these. That
2244 2244
      *   is, one AVBufferRef for each allocated chunk of memory, not necessarily one
... ...
@@ -2580,7 +2580,7 @@ typedef struct AVCodecContext {
2580 2580
 #define FF_BUG_TRUNCATED       16384
2581 2581
 
2582 2582
     /**
2583
-     * strictly follow the standard (MPEG4, ...).
2583
+     * strictly follow the standard (MPEG-4, ...).
2584 2584
      * - encoding: Set by user.
2585 2585
      * - decoding: Set by user.
2586 2586
      * Setting this to STRICT or higher means the encoder and decoder will
... ...
@@ -2646,9 +2646,9 @@ typedef struct AVCodecContext {
2646 2646
      */
2647 2647
     attribute_deprecated
2648 2648
     int debug_mv;
2649
-#define FF_DEBUG_VIS_MV_P_FOR  0x00000001 //visualize forward predicted MVs of P frames
2650
-#define FF_DEBUG_VIS_MV_B_FOR  0x00000002 //visualize forward predicted MVs of B frames
2651
-#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 //visualize backward predicted MVs of B frames
2649
+#define FF_DEBUG_VIS_MV_P_FOR  0x00000001 // visualize forward predicted MVs of P-frames
2650
+#define FF_DEBUG_VIS_MV_B_FOR  0x00000002 // visualize forward predicted MVs of B-frames
2651
+#define FF_DEBUG_VIS_MV_B_BACK 0x00000004 // visualize backward predicted MVs of B-frames
2652 2652
 #endif
2653 2653
 
2654 2654
     /**
... ...
@@ -2670,7 +2670,7 @@ typedef struct AVCodecContext {
2670 2670
 #define AV_EF_EXPLODE   (1<<3)
2671 2671
 
2672 2672
     /**
2673
-     * opaque 64bit number (generally a PTS) that will be reordered and
2673
+     * opaque 64-bit number (generally a PTS) that will be reordered and
2674 2674
      * output in AVFrame.reordered_opaque
2675 2675
      * - encoding: unused
2676 2676
      * - decoding: Set by user.
... ...
@@ -2855,7 +2855,7 @@ typedef struct AVCodecContext {
2855 2855
     int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
2856 2856
 
2857 2857
     /**
2858
-     * noise vs. sse weight for the nsse comparsion function
2858
+     * noise vs. sse weight for the nsse comparison function
2859 2859
      * - encoding: Set by user.
2860 2860
      * - decoding: unused
2861 2861
      */
... ...
@@ -3426,7 +3426,7 @@ typedef struct AVSubtitleRect {
3426 3426
 
3427 3427
     /**
3428 3428
      * 0 terminated ASS/SSA compatible event line.
3429
-     * The pressentation of this is unaffected by the other values in this
3429
+     * The presentation of this is unaffected by the other values in this
3430 3430
      * struct.
3431 3431
      */
3432 3432
     char *ass;
... ...
@@ -4153,7 +4153,7 @@ int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
4153 4153
  *             next call to this function or until closing or flushing the
4154 4154
  *             decoder. The caller may not write to it.
4155 4155
  *
4156
- * @param[in] avpkt The input AVpacket containing the input buffer.
4156
+ * @param[in] avpkt The input AVPacket containing the input buffer.
4157 4157
  *            You can create such packet with av_init_packet() and by then setting
4158 4158
  *            data and size, some decoders might in addition need other fields like
4159 4159
  *            flags&AV_PKT_FLAG_KEY. All decoders are designed to use the least
... ...
@@ -5172,7 +5172,7 @@ unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
5172 5172
  * a pointer to an AVClass struct
5173 5173
  * @param[in] feature string containing the name of the missing feature
5174 5174
  * @param[in] want_sample indicates if samples are wanted which exhibit this feature.
5175
- * If want_sample is non-zero, additional verbage will be added to the log
5175
+ * If want_sample is non-zero, additional verbiage will be added to the log
5176 5176
  * message which tells the user how to report samples to the development
5177 5177
  * mailing list.
5178 5178
  * @deprecated Use avpriv_report_missing_feature() instead.
... ...
@@ -1236,7 +1236,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
1236 1236
 }
1237 1237
 
1238 1238
 /**
1239
- * Caclulate quantization tables for version b
1239
+ * Calculate quantization tables for version b
1240 1240
  */
1241 1241
 static av_cold void binkb_calc_quant(void)
1242 1242
 {
... ...
@@ -146,7 +146,7 @@ static int compare_vlcspec(const void *a, const void *b)
146 146
 /**
147 147
  * Build VLC decoding tables suitable for use with get_vlc().
148 148
  *
149
- * @param vlc            the context to be initted
149
+ * @param vlc            the context to be initialized
150 150
  *
151 151
  * @param table_nb_bits  max length of vlc codes to store directly in this table
152 152
  *                       (Longer codes are delegated to subtables.)
... ...
@@ -240,7 +240,7 @@ static int build_table(VLC *vlc, int table_nb_bits, int nb_codes,
240 240
 
241 241
 /* Build VLC decoding tables suitable for use with get_vlc().
242 242
 
243
-   'nb_bits' set thee decoding table size (2^nb_bits) entries. The
243
+   'nb_bits' sets the decoding table size (2^nb_bits) entries. The
244 244
    bigger it is, the faster is the decoding. But it should not be too
245 245
    big to save memory and L1 cache. '9' is a good compromise.
246 246
 
... ...
@@ -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 Libav.
6 6
  *
... ...
@@ -140,7 +140,7 @@ typedef struct cook {
140 140
     VLC                 envelope_quant_index[13];
141 141
     VLC                 sqvh[7];          // scalar quantization
142 142
 
143
-    /* generatable tables and related variables */
143
+    /* generate tables and related variables */
144 144
     int                 gain_size_factor;
145 145
     float               gain_table[23];
146 146
 
... ...
@@ -1170,7 +1170,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
1170 1170
         /* Initialize variable relations */
1171 1171
         q->subpacket[s].numvector_size = (1 << q->subpacket[s].log2_numvector_size);
1172 1172
 
1173
-        /* Try to catch some obviously faulty streams, othervise it might be exploitable */
1173
+        /* Try to catch some obviously faulty streams, otherwise it might be exploitable */
1174 1174
         if (q->subpacket[s].total_subbands > 53) {
1175 1175
             avpriv_request_sample(avctx, "total_subbands > 53");
1176 1176
             return AVERROR_PATCHWELCOME;
... ...
@@ -1234,7 +1234,7 @@ static av_cold int cook_decode_init(AVCodecContext *avctx)
1234 1234
         q->saturate_output = saturate_output_float;
1235 1235
     }
1236 1236
 
1237
-    /* Try to catch some obviously faulty streams, othervise it might be exploitable */
1237
+    /* Try to catch some obviously faulty streams, otherwise it might be exploitable */
1238 1238
     if (q->samples_per_channel != 256 && q->samples_per_channel != 512 &&
1239 1239
         q->samples_per_channel != 1024) {
1240 1240
         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 Libav.
10 10
  *
... ...
@@ -47,7 +47,7 @@ const uint8_t ff_dca_bits_per_sample[7] = {
47 47
 
48 48
 /* ADPCM data */
49 49
 
50
-/* 16bits signed fractional Q13 binary codes */
50
+/* 16 bits signed fractional Q13 binary codes */
51 51
 const int16_t ff_dca_adpcm_vb[4096][4] = {
52 52
     {   9928,  -2618,  -1093, -1263 },
53 53
     {  11077,  -2876,  -1747,  -308 },
... ...
@@ -4179,7 +4179,7 @@ const uint32_t ff_dca_scale_factor_quant7[128] = {
4179 4179
     5011872, 5688529, 6456542, 7328245, 8317638,       0,       0,       0
4180 4180
 };
4181 4181
 
4182
-/* 20bits unsigned fractional binary codes */
4182
+/* 20 bits unsigned fractional binary codes */
4183 4183
 const uint32_t ff_dca_lossy_quant[32] = {
4184 4184
          0, 6710886, 4194304, 3355443, 2474639, 2097152, 1761608, 1426063,
4185 4185
     796918,  461373,  251658,  146801,   79692,   46137,   27263,   16777,
... ...
@@ -4187,7 +4187,7 @@ const uint32_t ff_dca_lossy_quant[32] = {
4187 4187
         84,      42,      21,       0,       0,       0,       0,       0
4188 4188
 };
4189 4189
 
4190
-/* 20bits unsigned fractional binary codes */
4190
+/* 20 bits unsigned fractional binary codes */
4191 4191
 const uint32_t ff_dca_lossless_quant[32] = {
4192 4192
          0, 4194304, 2097152, 1384120, 1048576, 696254, 524288, 348127,
4193 4193
     262144,  131072,   65431,   33026,   16450,   8208,   4100,   2049,
... ...
@@ -1348,7 +1348,7 @@ static int set_channel_layout(AVCodecContext *avctx, int channels, int num_core_
1348 1348
             ff_dlog(s->avctx, "\n");
1349 1349
         }
1350 1350
     } else {
1351
-        av_log(avctx, AV_LOG_ERROR, "Non standard configuration %d !\n", s->amode);
1351
+        av_log(avctx, AV_LOG_ERROR, "Nonstandard configuration %d !\n", s->amode);
1352 1352
         return AVERROR_INVALIDDATA;
1353 1353
     }
1354 1354
 
... ...
@@ -394,7 +394,7 @@ static void help(void)
394 394
     printf("dct-test [-i] [<test-number>]\n"
395 395
            "test-number 0 -> test with random matrixes\n"
396 396
            "            1 -> test with random sparse matrixes\n"
397
-           "            2 -> do 3. test from mpeg4 std\n"
397
+           "            2 -> do 3. test from MPEG-4 std\n"
398 398
            "-i          test IDCT implementations\n"
399 399
            "-4          test IDCT248 implementations\n"
400 400
            "-t          speed test\n");
... ...
@@ -40,7 +40,7 @@ typedef struct CIDEntry {
40 40
     const uint8_t *ac_run_flag, *ac_index_flag;
41 41
     const uint16_t *run_codes;
42 42
     const uint8_t *run_bits, *run;
43
-    int bit_rates[5]; ///< Helpher to choose variants, rounded to nearest 5Mb/s
43
+    int bit_rates[5]; ///< Helper to choose variants, rounded to nearest 5Mb/s
44 44
 } CIDEntry;
45 45
 
46 46
 extern const CIDEntry ff_dnxhd_cid_table[];
... ...
@@ -36,7 +36,7 @@
36 36
 #include "pixblockdsp.h"
37 37
 #include "dnxhdenc.h"
38 38
 
39
-// 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.
40 40
 #define DNX10BIT_QMAT_SHIFT 18
41 41
 #define RC_VARIANCE 1 // use variance or ssd for fast rc
42 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 Libav.
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 {
... ...
@@ -30,7 +30,7 @@
30 30
 #include "elbg.h"
31 31
 #include "avcodec.h"
32 32
 
33
-#define DELTA_ERR_MAX 0.1  ///< Precision of the ELBG algorithm (as percentual error)
33
+#define DELTA_ERR_MAX 0.1  ///< Precision of the ELBG algorithm (as percentage error)
34 34
 
35 35
 /**
36 36
  * In the ELBG jargon, a cell is the set of points that are closest to a
... ...
@@ -189,7 +189,7 @@ static void get_new_centroids(elbg_data *elbg, int huc, int *newcentroid_i,
189 189
 
190 190
 /**
191 191
  * Add the points in the low utility cell to its closest cell. Split the high
192
- * utility cell, putting the separed points in the (now empty) low utility
192
+ * utility cell, putting the separated points in the (now empty) low utility
193 193
  * cell.
194 194
  *
195 195
  * @param elbg         Internal elbg data
... ...
@@ -1047,7 +1047,7 @@ void ff_er_frame_end(ERContext *s)
1047 1047
                 s->mv[0][0][1] = s->cur_pic.motion_val[dir][mb_x * 2 + mb_y * 2 * s->b8_stride][1];
1048 1048
             }
1049 1049
 
1050
-            s->decode_mb(s->opaque, 0 /* FIXME h264 partitioned slices need this set */,
1050
+            s->decode_mb(s->opaque, 0 /* FIXME H.264 partitioned slices need this set */,
1051 1051
                          mv_dir, mv_type, &s->mv, mb_x, mb_y, 0, 0);
1052 1052
         }
1053 1053
     }
... ...
@@ -41,7 +41,7 @@ typedef struct ERPicture {
41 41
     AVFrame *f;
42 42
     ThreadFrame *tf;
43 43
 
44
-    // it's the caller responsability 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
 
... ...
@@ -159,13 +159,13 @@ static union av_intfloat32 exr_half2float(uint16_t hf)
159 159
                 mantissa <<= 1;
160 160
                 exp -= (1 << 23);
161 161
             }
162
-            // clamp the mantissa to 10-bits
162
+            // clamp the mantissa to 10 bits
163 163
             mantissa &= ((1 << 10) - 1);
164
-            // shift left to generate single-precision mantissa of 23-bits
164
+            // shift left to generate single-precision mantissa of 23 bits
165 165
             mantissa <<= 13;
166 166
         }
167 167
     } else {
168
-        // shift left to generate single-precision mantissa of 23-bits
168
+        // shift left to generate single-precision mantissa of 23 bits
169 169
         mantissa <<= 13;
170 170
         // generate single precision biased exponent value
171 171
         exp = (exp << 13) + HALF_FLOAT_MIN_BIASED_EXP_AS_SINGLE_FP_EXP;
... ...
@@ -1381,7 +1381,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
1381 1381
         }
1382 1382
     }
1383 1383
 
1384
-    // allocate thread data, used for non EXR_RAW compreesion types
1384
+    // allocate thread data, used for non EXR_RAW compression types
1385 1385
     s->thread_data = av_mallocz_array(avctx->thread_count, sizeof(EXRThreadData));
1386 1386
     if (!s->thread_data)
1387 1387
         return AVERROR_INVALIDDATA;
... ...
@@ -1392,7 +1392,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
1392 1392
 static int decode_init_thread_copy(AVCodecContext *avctx)
1393 1393
 {    EXRContext *s = avctx->priv_data;
1394 1394
 
1395
-    // allocate thread data, used for non EXR_RAW compreesion types
1395
+    // allocate thread data, used for non EXR_RAW compression types
1396 1396
     s->thread_data = av_mallocz_array(avctx->thread_count, sizeof(EXRThreadData));
1397 1397
     if (!s->thread_data)
1398 1398
         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 Libav.
6 6
  *
... ...
@@ -115,7 +115,7 @@ static av_cold int flic_decode_init(AVCodecContext *avctx)
115 115
         case 8  : avctx->pix_fmt = AV_PIX_FMT_PAL8; break;
116 116
         case 15 : avctx->pix_fmt = AV_PIX_FMT_RGB555; break;
117 117
         case 16 : avctx->pix_fmt = AV_PIX_FMT_RGB565; break;
118
-        case 24 : avctx->pix_fmt = AV_PIX_FMT_BGR24; /* Supposedly BGR, but havent any files to test with */
118
+        case 24 : avctx->pix_fmt = AV_PIX_FMT_BGR24; /* Supposedly BGR, but no files to test with */
119 119
                   av_log(avctx, AV_LOG_ERROR, "24Bpp FLC/FLX is unsupported due to no test files.\n");
120 120
                   return AVERROR_PATCHWELCOME;
121 121
         default :
... ...
@@ -725,7 +725,7 @@ static int flic_decode_frame(AVCodecContext *avctx,
725 725
 
726 726
     /* Should not get  here, ever as the pix_fmt is processed */
727 727
     /* in flic_decode_init and the above if should deal with */
728
-    /* the finite set of possibilites allowable by here. */
728
+    /* the finite set of possibilities allowable by here. */
729 729
     /* But in case we do, just error out. */
730 730
     av_log(avctx, AV_LOG_ERROR, "Unknown FLC format, my science cannot explain how this happened.\n");
731 731
     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
... ...
@@ -483,7 +483,7 @@ static int comp_interp_index(G723_1_Context *p, int pitch_lag,
483 483
 }
484 484
 
485 485
 /**
486
- * Peform residual interpolation based on frame classification.
486
+ * Perform residual interpolation based on frame classification.
487 487
  *
488 488
  * @param buf   decoded excitation vector
489 489
  * @param out   output vector
... ...
@@ -931,7 +931,7 @@ static int g723_1_decode_frame(AVCodecContext *avctx, void *data,
931 931
             p->interp_index = comp_interp_index(p, p->pitch_lag[1],
932 932
                                                 &p->sid_gain, &p->cur_gain);
933 933
 
934
-            /* Peform pitch postfiltering */
934
+            /* Perform pitch postfiltering */
935 935
             if (p->postfilter) {
936 936
                 i = PITCH_MAX;
937 937
                 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 arithmentic 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)
... ...
@@ -97,7 +97,7 @@ typedef struct G726Context {
97 97
     int code_size;
98 98
 } G726Context;
99 99
 
100
-static const int quant_tbl16[] =                  /**< 16kbit/s 2bits per sample */
100
+static const int quant_tbl16[] =                  /**< 16kbit/s 2 bits per sample */
101 101
            { 260, INT_MAX };
102 102
 static const int16_t iquant_tbl16[] =
103 103
            { 116, 365, 365, 116 };
... ...
@@ -106,7 +106,7 @@ static const int16_t W_tbl16[] =
106 106
 static const uint8_t F_tbl16[] =
107 107
            { 0, 7, 7, 0 };
108 108
 
109
-static const int quant_tbl24[] =                  /**< 24kbit/s 3bits per sample */
109
+static const int quant_tbl24[] =                  /**< 24kbit/s 3 bits per sample */
110 110
            {  7, 217, 330, INT_MAX };
111 111
 static const int16_t iquant_tbl24[] =
112 112
            { INT16_MIN, 135, 273, 373, 373, 273, 135, INT16_MIN };
... ...
@@ -115,7 +115,7 @@ static const int16_t W_tbl24[] =
115 115
 static const uint8_t F_tbl24[] =
116 116
            { 0, 1, 2, 7, 7, 2, 1, 0 };
117 117
 
118
-static const int quant_tbl32[] =                  /**< 32kbit/s 4bits per sample */
118
+static const int quant_tbl32[] =                  /**< 32kbit/s 4 bits per sample */
119 119
            { -125,  79, 177, 245, 299, 348, 399, INT_MAX };
120 120
 static const int16_t iquant_tbl32[] =
121 121
          { INT16_MIN,   4, 135, 213, 273, 323, 373, 425,
... ...
@@ -126,7 +126,7 @@ static const int16_t W_tbl32[] =
126 126
 static const uint8_t F_tbl32[] =
127 127
            { 0, 0, 0, 1, 1, 1, 3, 7, 7, 3, 1, 1, 1, 0, 0, 0 };
128 128
 
129
-static const int quant_tbl40[] =                  /**< 40kbit/s 5bits per sample */
129
+static const int quant_tbl40[] =                  /**< 40kbit/s 5 bits per sample */
130 130
            { -122, -16,  67, 138, 197, 249, 297, 338,
131 131
               377, 412, 444, 474, 501, 527, 552, INT_MAX };
132 132
 static const int16_t iquant_tbl40[] =
... ...
@@ -151,7 +151,7 @@ static const G726Tables G726Tables_pool[] =
151 151
 
152 152
 
153 153
 /**
154
- * Para 4.2.2 page 18: Adaptive quantizer.
154
+ * Paragraph 4.2.2 page 18: Adaptive quantizer.
155 155
  */
156 156
 static inline uint8_t quant(G726Context* c, int d)
157 157
 {
... ...
@@ -177,14 +177,14 @@ static inline uint8_t quant(G726Context* c, int d)
177 177
 }
178 178
 
179 179
 /**
180
- * Para 4.2.3 page 22: Inverse adaptive quantizer.
180
+ * Paragraph 4.2.3 page 22: Inverse adaptive quantizer.
181 181
  */
182 182
 static inline int16_t inverse_quant(G726Context* c, int i)
183 183
 {
184 184
     int dql, dex, dqt;
185 185
 
186 186
     dql = c->tbls.iquant[i] + (c->y >> 2);
187
-    dex = (dql>>7) & 0xf;        /* 4bit exponent */
187
+    dex = (dql>>7) & 0xf;        /* 4-bit exponent */
188 188
     dqt = (1<<7) + (dql & 0x7f); /* log2 -> linear */
189 189
     return (dql < 0) ? 0 : ((dqt<<dex) >> 7);
190 190
 }
... ...
@@ -92,7 +92,7 @@ typedef struct RL_VLC_ELEM {
92 92
  *
93 93
  * GET_CACHE(name, gb)
94 94
  *   Will output the contents of the internal cache,
95
- *   next bit is MSB of 32 or 64 bit (FIXME 64bit).
95
+ *   next bit is MSB of 32 or 64 bits (FIXME 64 bits).
96 96
  *
97 97
  * SHOW_UBITS(name, gb, num)
98 98
  *   Will return the next num bits.
... ...
@@ -207,7 +207,7 @@ static inline void skip_bits_long(GetBitContext *s, int n)
207 207
 }
208 208
 
209 209
 /**
210
- * read mpeg1 dc style vlc (sign bit + mantisse with no MSB).
210
+ * Read MPEG-1 dc-style VLC (sign bit + mantisse with no MSB).
211 211
  * if MSB not set it is negative
212 212
  * @param n length in bits
213 213
  */
... ...
@@ -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
  *
... ...
@@ -580,7 +580,7 @@ retry:
580 580
     init_get_bits(&s->gb, buf, buf_size * 8);
581 581
 
582 582
     if (!s->context_initialized)
583
-        // we need the IDCT permutaton for reading a custom matrix
583
+        // we need the IDCT permutation for reading a custom matrix
584 584
         ff_mpv_idct_init(s);
585 585
 
586 586
     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 Libav.
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 Libav.
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
  *
... ...
@@ -117,7 +117,7 @@ av_cold int ff_h263_decode_init(AVCodecContext *avctx)
117 117
     }
118 118
     s->codec_id    = avctx->codec->id;
119 119
 
120
-    /* for h263, we allocate the images after having read the header */
120
+    /* for H.263, we allocate the images after having read the header */
121 121
     if (avctx->codec->id != AV_CODEC_ID_H263 &&
122 122
         avctx->codec->id != AV_CODEC_ID_MPEG4) {
123 123
         avctx->pix_fmt = h263_get_format(avctx);
... ...
@@ -422,7 +422,7 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
422 422
         return ret;
423 423
 
424 424
     if (!s->context_initialized)
425
-        // we need the idct permutaton for reading a custom matrix
425
+        // we need the idct permutation for reading a custom matrix
426 426
         ff_mpv_idct_init(s);
427 427
 
428 428
     /* let's go :-) */
... ...
@@ -494,9 +494,9 @@ int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
494 494
         SET_QPEL_FUNC(qpel_pixels_tab[1][15], qpel8_mc33_old_c)
495 495
     }
496 496
 
497
-    /* After H263 & mpeg4 header decode we have the height, width,
497
+    /* After H.263 & MPEG-4 header decode we have the height, width,
498 498
      * and other parameters. So then we could init the picture.
499
-     * FIXME: By the way H263 decoder is evolving it should have
499
+     * FIXME: By the way H.263 decoder is evolving it should have
500 500
      * an H263EncContext */
501 501
     if (s->width  != avctx->coded_width  ||
502 502
         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
 
... ...
@@ -418,7 +418,7 @@ typedef struct H264SliceContext {
418 418
 
419 419
     DECLARE_ALIGNED(8, uint16_t, sub_mb_type)[4];
420 420
 
421
-    ///< as a dct coeffecient is int32_t in high depth, we need to reserve twice the space.
421
+    ///< as a DCT coefficient is int32_t in high depth, we need to reserve twice the space.
422 422
     DECLARE_ALIGNED(16, int16_t, mb)[16 * 48 * 2];
423 423
     DECLARE_ALIGNED(16, int16_t, mb_luma_dc)[3][16 * 2];
424 424
     ///< as mb is addressed by scantable[i] and scantable is uint8_t we can either
... ...
@@ -456,7 +456,7 @@ typedef struct H264Context {
456 456
 
457 457
     H2645Packet pkt;
458 458
 
459
-    int pixel_shift;    ///< 0 for 8-bit H264, 1 for high-bit-depth H264
459
+    int pixel_shift;    ///< 0 for 8-bit H.264, 1 for high-bit-depth H.264
460 460
 
461 461
     /* coded dimensions -- 16 * mb w/h */
462 462
     int width, height;
... ...
@@ -534,7 +534,7 @@ typedef struct H264Context {
534 534
     int nal_unit_type;
535 535
 
536 536
     /**
537
-     * Used to parse AVC variant of h264
537
+     * Used to parse AVC variant of H.264
538 538
      */
539 539
     int is_avc;           ///< this flag is != 0 if codec is avc1
540 540
     int nal_length_size;  ///< Number of bytes used for nal length (1, 2 or 4)
... ...
@@ -580,7 +580,7 @@ typedef struct H264Context {
580 580
      * @{
581 581
      */
582 582
     /**
583
-     * current slice number, used to initalize slice_num of each thread/context
583
+     * current slice number, used to initialize slice_num of each thread/context
584 584
      */
585 585
     int current_slice;
586 586
 
... ...
@@ -55,7 +55,7 @@ typedef struct H2645NAL {
55 55
     int temporal_id;
56 56
 
57 57
     /**
58
-     * H264 only, nal_ref_idc
58
+     * H.264 only, nal_ref_idc
59 59
      */
60 60
     int ref_idc;
61 61
 } 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 Libav.
... ...
@@ -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
 
... ...
@@ -610,7 +610,7 @@ int ff_h264_execute_ref_pic_marking(H264Context *h, MMCO *mmco, int mmco_count)
610 610
                 av_log(h->avctx, AV_LOG_DEBUG, "mmco: unref long failure\n");
611 611
             break;
612 612
         case MMCO_LONG:
613
-                    // Comment below left from previous code as it is an interresting note.
613
+                    // Comment below left from previous code as it is an interesting note.
614 614
                     /* First field in pair is in short term list or
615 615
                      * at a different long term index.
616 616
                      * 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 Libav.
... ...
@@ -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_malloc(&sl->top_borders[0], &sl->top_borders_allocated[0],
... ...
@@ -903,7 +903,7 @@ static int h264_slice_header_init(H264Context *h)
903 903
 
904 904
 /**
905 905
  * Decode a slice header.
906
- * This will (re)intialize the decoder and call h264_frame_start() as needed.
906
+ * This will (re)initialize the decoder and call h264_frame_start() as needed.
907 907
  *
908 908
  * @param h h264context
909 909
  *
... ...
@@ -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 Libav.
... ...
@@ -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
 
... ...
@@ -547,7 +547,7 @@ av_cold void ff_h264_pred_init(H264PredContext *h, int codec_id,
547 547
     h->pred16x16[TOP_DC_PRED8x8 ]= FUNCC(pred16x16_top_dc                 , depth);\
548 548
     h->pred16x16[DC_128_PRED8x8 ]= FUNCC(pred16x16_128_dc                 , depth);\
549 549
 \
550
-    /* special lossless h/v prediction for h264 */ \
550
+    /* special lossless h/v prediction for H.264 */ \
551 551
     h->pred4x4_add  [VERT_PRED   ]= FUNCC(pred4x4_vertical_add            , depth);\
552 552
     h->pred4x4_add  [ HOR_PRED   ]= FUNCC(pred4x4_horizontal_add          , depth);\
553 553
     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
 
... ...
@@ -109,7 +109,7 @@ static int check_prediction_block_available(HEVCContext *s, int log2_cb_size,
109 109
         return z_scan_block_avail(s, x0, y0, xA1, yA1);
110 110
 }
111 111
 
112
-//check if the two luma locations belong to the same mostion estimation region
112
+//check if the two luma locations belong to the same motion estimation region
113 113
 static int isDiffMER(HEVCContext *s, int xN, int yN, int xP, int yP)
114 114
 {
115 115
     uint8_t plevel = s->ps.pps->log2_parallel_merge_level;
... ...
@@ -95,7 +95,7 @@ static int decode_nal_sei_frame_packing_arrangement(HEVCContext *s)
95 95
         if (!s->quincunx_subsampling && s->frame_packing_arrangement_type != 5)
96 96
             skip_bits(gb, 16);  // frame[01]_grid_position_[xy]
97 97
         skip_bits(gb, 8);       // frame_packing_arrangement_reserved_byte
98
-        skip_bits1(gb);         // frame_packing_arrangement_persistance_flag
98
+        skip_bits1(gb);         // frame_packing_arrangement_persistence_flag
99 99
     }
100 100
     skip_bits1(gb);             // upsampled_aspect_ratio_flag
101 101
     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 Libav.
6 6
  *
... ...
@@ -69,7 +69,7 @@ typedef struct IMCChannel {
69 69
     int sumLenArr[BANDS];      ///< bits for all coeffs in band
70 70
     int skipFlagRaw[BANDS];    ///< skip flags are stored in raw form or not
71 71
     int skipFlagBits[BANDS];   ///< bits used to code skip flags
72
-    int skipFlagCount[BANDS];  ///< skipped coeffients per band
72
+    int skipFlagCount[BANDS];  ///< skipped coefficients per band
73 73
     int skipFlags[COEFFS];     ///< skip coefficient decoding or not
74 74
     int codewords[COEFFS];     ///< raw codewords read from bitstream
75 75
 
... ...
@@ -52,7 +52,7 @@ enum {
52 52
 
53 53
 
54 54
 /* Some constants for parsing frame bitstream flags. */
55
-#define BS_8BIT_PEL     (1 << 1) ///< 8bit pixel bitdepth indicator
55
+#define BS_8BIT_PEL     (1 << 1) ///< 8-bit pixel bitdepth indicator
56 56
 #define BS_KEYFRAME     (1 << 2) ///< intra frame indicator
57 57
 #define BS_MV_Y_HALF    (1 << 4) ///< vertical mv halfpel resolution indicator
58 58
 #define BS_MV_X_HALF    (1 << 5) ///< horizontal mv halfpel resolution indicator
... ...
@@ -307,7 +307,7 @@ static inline uint32_t replicate32(uint32_t a) {
307 307
 }
308 308
 
309 309
 
310
-/* Fill n lines with 64bit pixel value pix */
310
+/* Fill n lines with 64-bit pixel value pix */
311 311
 static inline void fill_64(uint8_t *dst, const uint64_t pix, int32_t n,
312 312
                            int32_t row_offset)
313 313
 {
... ...
@@ -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
... ...
@@ -44,8 +44,8 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
44 44
         return -1;      /* marker */
45 45
     }
46 46
     if (get_bits1(&s->gb) != 0) {
47
-        av_log(s->avctx, AV_LOG_ERROR, "Bad H263 id\n");
48
-        return -1;      /* h263 id */
47
+        av_log(s->avctx, AV_LOG_ERROR, "Bad H.263 id\n");
48
+        return -1;      /* H.263 id */
49 49
     }
50 50
     skip_bits1(&s->gb);         /* split screen off */
51 51
     skip_bits1(&s->gb);         /* camera  off */
... ...
@@ -53,7 +53,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
53 53
 
54 54
     format = get_bits(&s->gb, 3);
55 55
     if (format == 0 || format == 6) {
56
-        av_log(s->avctx, AV_LOG_ERROR, "Intel H263 free format not supported\n");
56
+        av_log(s->avctx, AV_LOG_ERROR, "Intel H.263 free format not supported\n");
57 57
         return -1;
58 58
     }
59 59
     s->h263_plus = 0;
... ...
@@ -78,7 +78,7 @@ int ff_intel_h263_decode_picture_header(MpegEncContext *s)
78 78
     } else {
79 79
         format = get_bits(&s->gb, 3);
80 80
         if(format == 0 || format == 7){
81
-            av_log(s->avctx, AV_LOG_ERROR, "Wrong Intel H263 format\n");
81
+            av_log(s->avctx, AV_LOG_ERROR, "Wrong Intel H.263 format\n");
82 82
             return -1;
83 83
         }
84 84
         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 Libav.
6 6
  *
... ...
@@ -217,7 +217,7 @@ static void x8_get_ac_rlf(IntraX8Context *const w, const int mode,
217 217
         int t, l;
218 218
         if (i < 0) {
219 219
             *level =
220
-            *final =      // prevent 'may be used unilitialized'
220
+            *final =      // prevent 'may be used uninitialized'
221 221
             *run   = 64;  // this would cause error exit in the ac loop
222 222
             return;
223 223
         }
... ...
@@ -251,12 +251,12 @@ static void x8_get_ac_rlf(IntraX8Context *const w, const int mode,
251 251
         sm = ac_decode_table[i];
252 252
 
253 253
         e    = get_bits(w->gb, sm & 0xF);
254
-        sm >>= 8;                               // 3bits
254
+        sm >>= 8;                               // 3 bits
255 255
         mask = sm & 0xff;
256
-        sm >>= 8;                               // 1bit
256
+        sm >>= 8;                               // 1 bit
257 257
 
258
-        *run   = (sm &  0xff) + (e &  mask);    // 6bits
259
-        *level = (sm >>    8) + (e & ~mask);    // 5bits
258
+        *run   = (sm &  0xff) + (e &  mask);    // 6 bits
259
+        *level = (sm >>    8) + (e & ~mask);    // 5 bits
260 260
         *final = i > (58 - 46);
261 261
     } else if (i < 75) { // [73-74]
262 262
         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
 #include <limits.h>
... ...
@@ -298,7 +298,7 @@ int ff_h263_decode_motion(MpegEncContext * s, int pred, int f_code)
298 298
     if (!s->h263_long_vectors) {
299 299
         val = sign_extend(val, 5 + f_code);
300 300
     } else {
301
-        /* horrible h263 long vector mode */
301
+        /* horrible H.263 long vector mode */
302 302
         if (pred < -31 && val < -63)
303 303
             val += 64;
304 304
         if (pred > 32 && val > 63)
... ...
@@ -866,7 +866,7 @@ end:
866 866
     return SLICE_OK;
867 867
 }
868 868
 
869
-/* most is hardcoded. should extend to handle all h263 streams */
869
+/* Most is hardcoded; should extend to handle all H.263 streams. */
870 870
 int ff_h263_decode_picture_header(MpegEncContext *s)
871 871
 {
872 872
     int format, width, height, i, ret;
... ...
@@ -900,8 +900,8 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
900 900
         return -1;
901 901
     }
902 902
     if (get_bits1(&s->gb) != 0) {
903
-        av_log(s->avctx, AV_LOG_ERROR, "Bad H263 id\n");
904
-        return -1;      /* h263 id */
903
+        av_log(s->avctx, AV_LOG_ERROR, "Bad H.263 id\n");
904
+        return -1;      /* H.263 id */
905 905
     }
906 906
     skip_bits1(&s->gb);         /* split screen off */
907 907
     skip_bits1(&s->gb);         /* camera  off */
... ...
@@ -926,7 +926,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
926 926
         s->h263_long_vectors = get_bits1(&s->gb);
927 927
 
928 928
         if (get_bits1(&s->gb) != 0) {
929
-            av_log(s->avctx, AV_LOG_ERROR, "H263 SAC not supported\n");
929
+            av_log(s->avctx, AV_LOG_ERROR, "H.263 SAC not supported\n");
930 930
             return -1; /* SAC: off */
931 931
         }
932 932
         s->obmc= get_bits1(&s->gb); /* Advanced prediction mode */
... ...
@@ -1017,7 +1017,7 @@ int ff_h263_decode_picture_header(MpegEncContext *s)
1017 1017
                 height = get_bits(&s->gb, 9) * 4;
1018 1018
                 ff_dlog(s->avctx, "\nH.263+ Custom picture: %dx%d\n",width,height);
1019 1019
                 if (s->aspect_ratio_info == FF_ASPECT_EXTENDED) {
1020
-                    /* aspected dimensions */
1020
+                    /* expected dimensions */
1021 1021
                     s->avctx->sample_aspect_ratio.num= get_bits(&s->gb, 8);
1022 1022
                     s->avctx->sample_aspect_ratio.den= get_bits(&s->gb, 8);
1023 1023
                 }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 {
... ...
@@ -270,7 +270,7 @@ void ff_h263_encode_gob_header(MpegEncContext * s, int mb_line)
270 270
 }
271 271
 
272 272
 /**
273
- * modify qscale so that encoding is acually possible in h263 (limit difference to -2..2)
273
+ * modify qscale so that encoding is actually possible in H.263 (limit difference to -2..2)
274 274
  */
275 275
 void ff_clean_h263_qscales(MpegEncContext *s){
276 276
     int i;
... ...
@@ -782,7 +782,7 @@ av_cold void ff_h263_encode_init(MpegEncContext *s)
782 782
 
783 783
         init_mv_penalty_and_fcode(s);
784 784
     }
785
-    s->me.mv_penalty= mv_penalty; //FIXME exact table for msmpeg4 & h263p
785
+    s->me.mv_penalty= mv_penalty; // FIXME exact table for MSMPEG4 & H.263+
786 786
 
787 787
     s->intra_ac_vlc_length     =s->inter_ac_vlc_length     = uni_h263_inter_rl_len;
788 788
     s->intra_ac_vlc_last_length=s->inter_ac_vlc_last_length= uni_h263_inter_rl_len + 128*64;
... ...
@@ -792,7 +792,7 @@ av_cold void ff_h263_encode_init(MpegEncContext *s)
792 792
     }
793 793
     s->ac_esc_length= 7+1+6+8;
794 794
 
795
-    // use fcodes >1 only for mpeg4 & h263 & h263p FIXME
795
+    // use fcodes >1 only for MPEG-4 & H.263 & H.263+ FIXME
796 796
     switch(s->codec_id){
797 797
     case AV_CODEC_ID_MPEG4:
798 798
         s->fcode_tab= fcode_tab;
... ...
@@ -808,7 +808,7 @@ av_cold void ff_h263_encode_init(MpegEncContext *s)
808 808
             s->max_qcoeff=  127;
809 809
         }
810 810
         break;
811
-        //Note for mpeg4 & h263 the dc-scale table will be set per frame as needed later
811
+        // Note for MPEG-4 & H.263 the dc-scale table will be set per frame as needed later
812 812
     case AV_CODEC_ID_FLV1:
813 813
         if (s->h263_flv > 1) {
814 814
             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
 
... ...
@@ -236,7 +236,7 @@ static void init_band_stepsize(AVCodecContext *avctx,
236 236
         av_log(avctx, AV_LOG_ERROR, "Unknown quantization format\n");
237 237
         break;
238 238
     }
239
-    /* FIXME: In openjepg code stespize = stepsize * 0.5. Why?
239
+    /* FIXME: In OpenJPEG code stespize = stepsize * 0.5. Why?
240 240
      * If not set output of entropic decoder is not correct. */
241 241
     if (!av_codec_is_encoder(avctx->codec))
242 242
         band->f_stepsize *= 0.5;
... ...
@@ -487,7 +487,7 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
487 487
         else
488 488
             reslevel->nbands = 3;
489 489
 
490
-        /* Number of precincts wich span the tile for resolution level reslevelno
490
+        /* Number of precincts which span the tile for resolution level reslevelno
491 491
          * see B.6 in ISO/IEC 15444-1:2002 eq. B-16
492 492
          * num_precincts_x = |- trx_1 / 2 ^ log2_prec_width) -| - (trx_0 / 2 ^ log2_prec_width)
493 493
          * num_precincts_y = |- try_1 / 2 ^ log2_prec_width) -| - (try_0 / 2 ^ log2_prec_width)
... ...
@@ -387,7 +387,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
387 387
     av_freep(&state);
388 388
 
389 389
     /* the specification says that after doing 0xff escaping unused bits in
390
-     * the last byte must be set to 0, so just append 7 "optional" zero-bits
390
+     * the last byte must be set to 0, so just append 7 "optional" zero bits
391 391
      * to avoid special-casing. */
392 392
     put_bits(&pb2, 7, 0);
393 393
     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)
... ...
@@ -226,7 +226,7 @@ static void add_lag_median_prediction(uint8_t *dst, uint8_t *src1,
226 226
                                       int *left_top)
227 227
 {
228 228
     /* This is almost identical to add_hfyu_median_pred in huffyuvdsp.h.
229
-     * However the &0xFF on the gradient predictor yealds incorrect output
229
+     * However the &0xFF on the gradient predictor yields incorrect output
230 230
      * for lagarith.
231 231
      */
232 232
     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 Libav.
6 6
  *
... ...
@@ -152,7 +152,7 @@ typedef struct AMR_bitrates {
152 152
 /* Match desired bitrate */
153 153
 static int get_bitrate_mode(int bitrate, void *log_ctx)
154 154
 {
155
-    /* make the correspondance between bitrate and mode */
155
+    /* make the correspondence between bitrate and mode */
156 156
     static const AMR_bitrates rates[] = {
157 157
         { 4750, MR475 }, { 5150, MR515 }, {  5900, MR59  }, {  6700, MR67  },
158 158
         { 7400, MR74 },  { 7950, MR795 }, { 10200, MR102 }, { 12200, MR122 }
... ...
@@ -2,20 +2,20 @@
2 2
  * libopus encoder/decoder common code
3 3
  * Copyright (c) 2012 Nicolas George
4 4
  *
5
- * This file is part of libav.
5
+ * This file is part of Libav.
6 6
  *
7
- * libav is free software; you can redistribute it and/or
7
+ * Libav is free software; you can redistribute it and/or
8 8
  * modify it under the terms of the GNU Lesser General Public
9 9
  * License as published by the Free Software Foundation; either
10 10
  * version 2.1 of the License, or (at your option) any later version.
11 11
  *
12
- * libav is distributed in the hope that it will be useful,
12
+ * Libav is distributed in the hope that it will be useful,
13 13
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 14
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 15
  * Lesser General Public License for more details.
16 16
  *
17 17
  * You should have received a copy of the GNU Lesser General Public
18
- * License along with libav; if not, write to the Free Software
18
+ * License along with Libav; if not, write to the Free Software
19 19
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
  */
21 21
 
... ...
@@ -2,20 +2,20 @@
2 2
  * libopus encoder/decoder common code
3 3
  * Copyright (c) 2012 Nicolas George
4 4
  *
5
- * This file is part of libav.
5
+ * This file is part of Libav.
6 6
  *
7
- * libav is free software; you can redistribute it and/or
7
+ * Libav is free software; you can redistribute it and/or
8 8
  * modify it under the terms of the GNU Lesser General Public
9 9
  * License as published by the Free Software Foundation; either
10 10
  * version 2.1 of the License, or (at your option) any later version.
11 11
  *
12
- * libav is distributed in the hope that it will be useful,
12
+ * Libav is distributed in the hope that it will be useful,
13 13
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 14
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 15
  * Lesser General Public License for more details.
16 16
  *
17 17
  * You should have received a copy of the GNU Lesser General Public
18
- * License along with libav; if not, write to the Free Software
18
+ * License along with Libav; if not, write to the Free Software
19 19
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
  */
21 21
 
... ...
@@ -73,7 +73,7 @@ static av_cold int libopus_decode_init(AVCodecContext *avc)
73 73
         const uint8_t *vorbis_offset = ff_vorbis_channel_layout_offsets[avc->channels - 1];
74 74
         int ch;
75 75
 
76
-        /* Remap channels from vorbis order to libav order */
76
+        /* Remap channels from Vorbis order to libav order */
77 77
         for (ch = 0; ch < avc->channels; ch++)
78 78
             mapping_arr[ch] = mapping[vorbis_offset[ch]];
79 79
         mapping = mapping_arr;
... ...
@@ -2,20 +2,20 @@
2 2
  * Opus encoder using libopus
3 3
  * Copyright (c) 2012 Nathan Caldwell
4 4
  *
5
- * This file is part of libav.
5
+ * This file is part of Libav.
6 6
  *
7
- * libav is free software; you can redistribute it and/or
7
+ * Libav is free software; you can redistribute it and/or
8 8
  * modify it under the terms of the GNU Lesser General Public
9 9
  * License as published by the Free Software Foundation; either
10 10
  * version 2.1 of the License, or (at your option) any later version.
11 11
  *
12
- * libav is distributed in the hope that it will be useful,
12
+ * Libav is distributed in the hope that it will be useful,
13 13
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 14
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15 15
  * Lesser General Public License for more details.
16 16
  *
17 17
  * You should have received a copy of the GNU Lesser General Public
18
- * License along with libav; if not, write to the Free Software
18
+ * License along with Libav; if not, write to the Free Software
19 19
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 20
  */
21 21
 
... ...
@@ -351,7 +351,7 @@ static int libschroedinger_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
351 351
                 p_frame_output->key_frame = 1;
352 352
 
353 353
             /* Parse the coded frame number from the bitstream. Bytes 14
354
-             * through 17 represesent the frame number. */
354
+             * through 17 represent the frame number. */
355 355
             p_frame_output->frame_num = AV_RB32(enc_buf->data + 13);
356 356
 
357 357
             ff_schro_queue_push_back(&p_schro_params->enc_frame_queue,
... ...
@@ -215,7 +215,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
215 215
     if (s->vad)
216 216
         speex_encoder_ctl(s->enc_state, SPEEX_SET_VAD, &s->vad);
217 217
 
218
-    /* Activiting Discontinuous Transmission */
218
+    /* Activating Discontinuous Transmission */
219 219
     if (s->dtx) {
220 220
         speex_encoder_ctl(s->enc_state, SPEEX_SET_DTX, &s->dtx);
221 221
         if (!(s->abr || s->vad || s->header.vbr))
... ...
@@ -250,7 +250,7 @@ static av_cold int encode_init(AVCodecContext* avc_context)
250 250
         Output first header packet consisting of theora
251 251
         header, comment, and tables.
252 252
 
253
-        Each one is prefixed with a 16bit size, then they
253
+        Each one is prefixed with a 16-bit size, then they
254 254
         are concatenated together into libavcodec's extradata.
255 255
     */
256 256
     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 Libav.
6 6
  *
... ...
@@ -51,7 +51,7 @@ static const AVClass 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 Libav.
... ...
@@ -74,7 +74,7 @@ struct xvid_context {
74 74
     int ssim_acc;                  /**< SSIM accuracy. 0: accurate. 4: fast. */
75 75
     int gmc;
76 76
     int me_quality;                /**< Motion estimation quality. 0: fast 6: best. */
77
-    int mpeg_quant;                /**< Quantization type. 0: H263, 1: MPEG */
77
+    int mpeg_quant;                /**< Quantization type. 0: H.263, 1: MPEG */
78 78
 };
79 79
 
80 80
 /**
... ...
@@ -134,7 +134,7 @@ static int xvid_ff_2pass_create(xvid_plg_create_t *param, void **handle)
134 134
  * Destroy the two-pass plugin context.
135 135
  *
136 136
  * @param ref Context pointer for the plugin
137
- * @param param Destrooy context
137
+ * @param param Destroy context
138 138
  * @return Returns 0, success guaranteed
139 139
  */
140 140
 static int xvid_ff_2pass_destroy(struct xvid_context *ref,
... ...
@@ -664,7 +664,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
664 664
     avctx->extradata      = NULL;
665 665
     avctx->extradata_size = 0;
666 666
     if (xvid_flags & AV_CODEC_FLAG_GLOBAL_HEADER) {
667
-        /* In this case, we are claiming to be MPEG4 */
667
+        /* In this case, we are claiming to be MPEG-4 */
668 668
         x->quicktime_format = 1;
669 669
         avctx->codec_id     = AV_CODEC_ID_MPEG4;
670 670
     } else {
... ...
@@ -32,7 +32,7 @@ void ff_acelp_reorder_lsf(int16_t* lsfq, int lsfq_min_distance, int lsfq_min, in
32 32
 {
33 33
     int i, j;
34 34
 
35
-    /* sort lsfq in ascending order. float bubble agorithm,
35
+    /* sort lsfq in ascending order. float bubble algorithm,
36 36
        O(n) if data already sorted, O(n^2) - otherwise */
37 37
     for(i=0; i<lp_order-1; i++)
38 38
         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
  */
... ...
@@ -140,9 +140,9 @@ int ff_mjpeg_decode_dqt(MJpegDecodeContext *s)
140 140
     len = get_bits(&s->gb, 16) - 2;
141 141
 
142 142
     while (len >= 65) {
143
-        /* only 8 bit precision handled */
143
+        /* only 8-bit precision handled */
144 144
         if (get_bits(&s->gb, 4) != 0) {
145
-            av_log(s->avctx, AV_LOG_ERROR, "dqt: 16bit precision\n");
145
+            av_log(s->avctx, AV_LOG_ERROR, "dqt: 16-bit precision\n");
146 146
             return -1;
147 147
         }
148 148
         index = get_bits(&s->gb, 4);
... ...
@@ -155,7 +155,7 @@ int ff_mjpeg_decode_dqt(MJpegDecodeContext *s)
155 155
             s->quant_matrixes[index][j] = get_bits(&s->gb, 8);
156 156
         }
157 157
 
158
-        // XXX FIXME finetune, and perhaps add dc too
158
+        // XXX FIXME fine-tune, and perhaps add dc too
159 159
         s->qscale[index] = FFMAX(s->quant_matrixes[index][s->scantable.permutated[1]],
160 160
                                  s->quant_matrixes[index][s->scantable.permutated[8]]) >> 1;
161 161
         av_log(s->avctx, AV_LOG_DEBUG, "qscale[%d]: %d\n",
... ...
@@ -1271,9 +1271,9 @@ static int mjpeg_decode_app(MJpegDecodeContext *s)
1271 1271
             av_log(s->avctx, AV_LOG_INFO,
1272 1272
                    "Pegasus lossless jpeg header found\n");
1273 1273
         skip_bits(&s->gb, 16); /* version ? */
1274
-        skip_bits(&s->gb, 16); /* unknwon always 0? */
1275
-        skip_bits(&s->gb, 16); /* unknwon always 0? */
1276
-        skip_bits(&s->gb, 16); /* unknwon always 0? */
1274
+        skip_bits(&s->gb, 16); /* unknown always 0? */
1275
+        skip_bits(&s->gb, 16); /* unknown always 0? */
1276
+        skip_bits(&s->gb, 16); /* unknown always 0? */
1277 1277
         switch (get_bits(&s->gb, 8)) {
1278 1278
         case 1:
1279 1279
             s->rgb         = 1;
... ...
@@ -68,7 +68,7 @@ typedef struct MJpegDecodeContext {
68 68
     int maxval;
69 69
     int near;         ///< near lossless bound (si 0 for lossless)
70 70
     int t1,t2,t3;
71
-    int reset;        ///< context halfing intervall ?rename
71
+    int reset;        ///< context halfing interval ?rename
72 72
 
73 73
     int width, height;
74 74
     int mb_width, mb_height;
... ...
@@ -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];
... ...
@@ -40,9 +40,9 @@ typedef struct MLPHeaderInfo
40 40
     int group1_samplerate;                  ///< Sample rate of first substream
41 41
     int group2_samplerate;                  ///< Sample rate of second substream (MLP only)
42 42
 
43
-    int channel_modifier_thd_stream0;       ///< Channel modifier for substream 0 of TrueHD sreams ("2-channel presentation")
44
-    int channel_modifier_thd_stream1;       ///< Channel modifier for substream 1 of TrueHD sreams ("6-channel presentation")
45
-    int channel_modifier_thd_stream2;       ///< Channel modifier for substream 2 of TrueHD sreams ("8-channel presentation")
43
+    int channel_modifier_thd_stream0;       ///< Channel modifier for substream 0 of TrueHD streams ("2-channel presentation")
44
+    int channel_modifier_thd_stream1;       ///< Channel modifier for substream 1 of TrueHD streams ("6-channel presentation")
45
+    int channel_modifier_thd_stream2;       ///< Channel modifier for substream 2 of TrueHD streams ("8-channel presentation")
46 46
 
47 47
     int channels_mlp;                       ///< Channel count for MLP streams
48 48
     int channels_thd_stream1;               ///< Channel count for substream 1 of TrueHD streams ("6-channel presentation")
... ...
@@ -657,7 +657,7 @@ static int ffmmal_read_frame(AVCodecContext *avctx, AVFrame *frame, int *got_fra
657 657
         // being busy from decoder waiting for input. So just poll at the start and
658 658
         // keep feeding new data to the buffer.
659 659
         // We are pretty sure the decoder will produce output if we sent more input
660
-        // frames than what a h264 decoder could logically delay. This avoids too
660
+        // frames than what a H.264 decoder could logically delay. This avoids too
661 661
         // excessive buffering.
662 662
         // We also wait if we sent eos, but didn't receive it yet (think of decoding
663 663
         // stream with a very low number of frames).
... ...
@@ -202,7 +202,7 @@ static av_always_inline int cmp_inline(MpegEncContext *s, const int x, const int
202 202
                     cx= (cx>>1)|(cx&1);
203 203
                     cy= (cy>>1)|(cy&1);
204 204
                     uvdxy= (cx&1) + 2*(cy&1);
205
-                    //FIXME x/y wrong, but mpeg4 qpel is sick anyway, we should drop as much of it as possible in favor for h264
205
+                    // 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
206 206
                 }
207 207
             }else{
208 208
                 c->hpel_put[size][dxy](c->temp, ref[0] + x + y*stride, stride, h);
... ...
@@ -547,7 +547,7 @@ static inline void get_limits(MpegEncContext *s, int x, int y)
547 547
         c->xmax = - x + s->mb_width *16;
548 548
         c->ymax = - y + s->mb_height*16;
549 549
     } else if (s->out_format == FMT_H261){
550
-        // Search range of H261 is different from other codec standards
550
+        // Search range of H.261 is different from other codec standards
551 551
         c->xmin = (x > 15) ? - 15 : 0;
552 552
         c->ymin = (y > 15) ? - 15 : 0;
553 553
         c->xmax = (x < s->mb_width * 16 - 16) ? 15 : 0;
... ...
@@ -936,7 +936,7 @@ void ff_estimate_p_frame_motion(MpegEncContext * s,
936 936
             if (s->out_format == FMT_H263) {
937 937
                 c->pred_x = P_MEDIAN[0];
938 938
                 c->pred_y = P_MEDIAN[1];
939
-            } else { /* mpeg1 at least */
939
+            } else { /* MPEG-1 at least */
940 940
                 c->pred_x = P_LEFT[0];
941 941
                 c->pred_y = P_LEFT[1];
942 942
             }
... ...
@@ -1506,7 +1506,7 @@ void ff_estimate_b_frame_motion(MpegEncContext * s,
1506 1506
         dmin= direct_search(s, mb_x, mb_y);
1507 1507
     else
1508 1508
         dmin= INT_MAX;
1509
-//FIXME penalty stuff for non mpeg4
1509
+// FIXME penalty stuff for non-MPEG-4
1510 1510
     c->skip=0;
1511 1511
     fmin = estimate_motion_b(s, mb_x, mb_y, s->b_forw_mv_table, 0, s->f_code) +
1512 1512
            3 * penalty_factor;
... ...
@@ -432,7 +432,7 @@ static av_always_inline int small_diamond_search(MpegEncContext * s, int *best,
432 432
     { /* ensure that the best point is in the MAP as h/qpel refinement needs it */
433 433
         const unsigned key = (best[1]<<ME_MAP_MV_BITS) + best[0] + map_generation;
434 434
         const int index= ((best[1]<<ME_MAP_SHIFT) + best[0])&(ME_MAP_SIZE-1);
435
-        if(map[index]!=key){ //this will be executed only very rarey
435
+        if (map[index] != key) { // this will be executed only very rarely
436 436
             score_map[index]= cmp(s, best[0], best[1], 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);
437 437
             map[index]= key;
438 438
         }
... ...
@@ -759,7 +759,7 @@ static int sab_diamond_search(MpegEncContext * s, int *best, int dmin,
759 759
     if(   best[0] < xmax && best[0] > xmin
760 760
        && best[1] < ymax && best[1] > ymin){
761 761
         int d;
762
-        //ensure that the refernece samples for hpel refinement are in the map
762
+        // ensure that the reference samples for hpel refinement are in the map
763 763
         CHECK_MV(best[0]-1, best[1])
764 764
         CHECK_MV(best[0]+1, best[1])
765 765
         CHECK_MV(best[0], best[1]-1)
... ...
@@ -872,7 +872,7 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int
872 872
     unsigned map_generation;
873 873
     int penalty_factor;
874 874
     const int ref_mv_stride= s->mb_stride; //pass as arg  FIXME
875
-    const int ref_mv_xy= s->mb_x + s->mb_y*ref_mv_stride; //add to last_mv beforepassing FIXME
875
+    const int ref_mv_xy = s->mb_x + s->mb_y * ref_mv_stride; // add to last_mv before passing FIXME
876 876
     me_cmp_func cmpf, chroma_cmpf;
877 877
 
878 878
     LOAD_COMMON
... ...
@@ -973,7 +973,7 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int
973 973
     return dmin;
974 974
 }
975 975
 
976
-//this function is dedicated to the braindamaged gcc
976
+//this function is dedicated to the brain damaged gcc
977 977
 int ff_epzs_motion_search(MpegEncContext *s, int *mx_ptr, int *my_ptr,
978 978
                           int P[10][2], int src_index, int ref_index,
979 979
                           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 Libav.
... ...
@@ -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
... ...
@@ -698,7 +698,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
698 698
         if (get_bits1(&s->gb) == 0) {
699 699
             if (get_bits1(&s->gb) == 0) {
700 700
                 av_log(s->avctx, AV_LOG_ERROR,
701
-                       "invalid mb type in I Frame at %d %d\n",
701
+                       "Invalid mb type in I-frame at %d %d\n",
702 702
                        s->mb_x, s->mb_y);
703 703
                 return AVERROR_INVALIDDATA;
704 704
             }
... ...
@@ -711,7 +711,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
711 711
         mb_type = get_vlc2(&s->gb, ff_mb_ptype_vlc.table, MB_PTYPE_VLC_BITS, 1);
712 712
         if (mb_type < 0) {
713 713
             av_log(s->avctx, AV_LOG_ERROR,
714
-                   "invalid mb type in P Frame at %d %d\n", s->mb_x, s->mb_y);
714
+                   "Invalid mb type in P-frame at %d %d\n", s->mb_x, s->mb_y);
715 715
             return AVERROR_INVALIDDATA;
716 716
         }
717 717
         mb_type = ptype2mb_type[mb_type];
... ...
@@ -720,7 +720,7 @@ static int mpeg_decode_mb(MpegEncContext *s, int16_t block[12][64])
720 720
         mb_type = get_vlc2(&s->gb, ff_mb_btype_vlc.table, MB_BTYPE_VLC_BITS, 1);
721 721
         if (mb_type < 0) {
722 722
             av_log(s->avctx, AV_LOG_ERROR,
723
-                   "invalid mb type in B Frame at %d %d\n", s->mb_x, s->mb_y);
723
+                   "Invalid mb type in B-frame at %d %d\n", s->mb_x, s->mb_y);
724 724
             return AVERROR_INVALIDDATA;
725 725
         }
726 726
         mb_type = btype2mb_type[mb_type];
... ...
@@ -1882,7 +1882,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
1882 1882
                 int i;
1883 1883
                 if (s->pict_type == AV_PICTURE_TYPE_I) {
1884 1884
                     av_log(s->avctx, AV_LOG_ERROR,
1885
-                           "skipped MB in I frame at %d %d\n", s->mb_x, s->mb_y);
1885
+                           "skipped MB in I-frame at %d %d\n", s->mb_x, s->mb_y);
1886 1886
                     return AVERROR_INVALIDDATA;
1887 1887
                 }
1888 1888
 
... ...
@@ -2183,7 +2183,7 @@ static int mpeg_decode_a53_cc(AVCodecContext *avctx,
2183 2183
         int cc_count = 0;
2184 2184
         int i;
2185 2185
         // There is a caption count field in the data, but it is often
2186
-        // incorect.  So count the number of captions present.
2186
+        // incorrect.  So count the number of captions present.
2187 2187
         for (i = 5; i + 6 <= buf_size && ((p[i] & 0xfe) == 0xfe); i += 6)
2188 2188
             cc_count++;
2189 2189
         // 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>
... ...
@@ -136,12 +136,12 @@ static av_cold int encode_init(AVCodecContext *avctx)
136 136
 
137 137
     if (find_frame_rate_index(s) < 0) {
138 138
         if (s->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
139
-            av_log(avctx, AV_LOG_ERROR, "MPEG1/2 does not support %d/%d fps\n",
139
+            av_log(avctx, AV_LOG_ERROR, "MPEG-1/2 does not support %d/%d fps\n",
140 140
                    avctx->time_base.den, avctx->time_base.num);
141 141
             return -1;
142 142
         } else {
143 143
             av_log(avctx, AV_LOG_INFO,
144
-                   "MPEG1/2 does not support %d/%d fps, there may be AV sync issues\n",
144
+                   "MPEG-1/2 does not support %d/%d fps, there may be AV sync issues\n",
145 145
                    avctx->time_base.den, avctx->time_base.num);
146 146
         }
147 147
     }
... ...
@@ -214,7 +214,7 @@ static void mpeg1_encode_sequence_header(MpegEncContext *s)
214 214
     if (s->current_picture.f->key_frame) {
215 215
         AVRational framerate = ff_mpeg12_frame_rate_tab[s->frame_rate_index];
216 216
 
217
-        /* mpeg1 header repeated every gop */
217
+        /* MPEG-1 header repeated every GOP */
218 218
         put_header(s, SEQ_START_CODE);
219 219
 
220 220
         put_sbits(&s->pb, 12, s->width);
... ...
@@ -375,7 +375,7 @@ void ff_mpeg1_encode_picture_header(MpegEncContext *s, int picture_number)
375 375
     AVFrameSideData *side_data;
376 376
     mpeg1_encode_sequence_header(s);
377 377
 
378
-    /* mpeg1 picture header */
378
+    /* MPEG-1 picture header */
379 379
     put_header(s, PICTURE_START_CODE);
380 380
     /* temporal reference */
381 381
 
... ...
@@ -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 Libav.
... ...
@@ -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
  *
... ...
@@ -102,7 +102,7 @@ typedef struct Mpeg4DecContext {
102 102
     int cplx_estimation_trash_b;
103 103
 } Mpeg4DecContext;
104 104
 
105
-/* dc encoding for mpeg4 */
105
+/* dc encoding for MPEG-4 */
106 106
 extern const uint8_t ff_mpeg4_DCtab_lum[13][2];
107 107
 extern const uint8_t ff_mpeg4_DCtab_chrom[13][2];
108 108
 
... ...
@@ -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
  *
... ...
@@ -202,7 +202,7 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g
202 202
     while ((1 << alpha) < w)
203 203
         alpha++;
204 204
     while ((1 << beta) < h)
205
-        beta++;  /* typo in the mpeg4 std for the definition of w' and h' */
205
+        beta++;  /* typo in the MPEG-4 std for the definition of w' and h' */
206 206
     w2 = 1 << alpha;
207 207
     h2 = 1 << beta;
208 208
 
... ...
@@ -225,7 +225,7 @@ static int mpeg4_decode_sprite_trajectory(Mpeg4DecContext *ctx, GetBitContext *g
225 225
     /* sprite_ref[3][0] = (a >> 1) * (2 * vop_ref[3][0] + d[0][0] + d[1][0] + d[2][0] + d[3][0]);
226 226
      * sprite_ref[3][1] = (a >> 1) * (2 * vop_ref[3][1] + d[0][1] + d[1][1] + d[2][1] + d[3][1]); */
227 227
 
228
-    /* this is mostly identical to the mpeg4 std (and is totally unreadable
228
+    /* This is mostly identical to the MPEG-4 std (and is totally unreadable
229 229
      * because of that...). Perhaps it should be reordered to be more readable.
230 230
      * The idea behind this virtual_ref mess is to be able to use shifts later
231 231
      * per pixel instead of divides so the distance between points is converted
... ...
@@ -1419,7 +1419,7 @@ static int mpeg4_decode_mb(MpegEncContext *s, int16_t block[6][64])
1419 1419
             ff_thread_await_progress(&s->next_picture_ptr->tf, s->mb_y, 0);
1420 1420
         }
1421 1421
 
1422
-        /* if we skipped it in the future P Frame than skip it now too */
1422
+        /* if we skipped it in the future P-frame than skip it now too */
1423 1423
         s->mb_skipped = s->next_picture.mbskip_table[s->mb_y * s->mb_stride + s->mb_x];  // Note, skiptab=0 if last was GMC
1424 1424
 
1425 1425
         if (s->mb_skipped) {
... ...
@@ -1709,7 +1709,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
1709 1709
         }
1710 1710
     } else {
1711 1711
         /* is setting low delay flag only once the smartest thing to do?
1712
-         * low delay detection won't be overriden. */
1712
+         * low delay detection will not be overridden. */
1713 1713
         if (s->picture_number == 0)
1714 1714
             s->low_delay = 0;
1715 1715
     }
... ...
@@ -1765,7 +1765,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
1765 1765
         s->interlaced_dct        = 0;
1766 1766
         if (!get_bits1(gb) && (s->avctx->debug & FF_DEBUG_PICT_INFO))
1767 1767
             av_log(s->avctx, AV_LOG_INFO,           /* OBMC Disable */
1768
-                   "MPEG4 OBMC not supported (very likely buggy encoder)\n");
1768
+                   "MPEG-4 OBMC not supported (very likely buggy encoder)\n");
1769 1769
         if (vo_ver_id == 1)
1770 1770
             ctx->vol_sprite_usage = get_bits1(gb);    /* vol_sprite_usage */
1771 1771
         else
... ...
@@ -1892,7 +1892,7 @@ static int decode_vol_header(Mpeg4DecContext *ctx, GetBitContext *gb)
1892 1892
                     ctx->cplx_estimation_trash_i += 8 * get_bits1(gb);  /* intra_cae */
1893 1893
                     ctx->cplx_estimation_trash_i += 8 * get_bits1(gb);  /* inter_cae */
1894 1894
                     ctx->cplx_estimation_trash_i += 8 * get_bits1(gb);  /* no_update */
1895
-                    ctx->cplx_estimation_trash_i += 8 * get_bits1(gb);  /* upampling */
1895
+                    ctx->cplx_estimation_trash_i += 8 * get_bits1(gb);  /* upsampling */
1896 1896
                 }
1897 1897
                 if (!get_bits1(gb)) {
1898 1898
                     ctx->cplx_estimation_trash_i += 8 * get_bits1(gb);  /* intra_blocks */
... ...
@@ -2022,7 +2022,7 @@ static int decode_user_data(Mpeg4DecContext *ctx, GetBitContext *gb)
2022 2022
         s->divx_packed  = e == 3 && last == 'p';
2023 2023
         if (s->divx_packed && !ctx->showed_packed_warning) {
2024 2024
             av_log(s->avctx, AV_LOG_WARNING,
2025
-                   "Invalid and inefficient vfw-avi packed B frames detected\n");
2025
+                   "Invalid and inefficient vfw-avi packed B-frames detected\n");
2026 2026
             ctx->showed_packed_warning = 1;
2027 2027
         }
2028 2028
     }
... ...
@@ -2138,7 +2138,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
2138 2138
         if (s->pp_time <= s->pb_time ||
2139 2139
             s->pp_time <= s->pp_time - s->pb_time ||
2140 2140
             s->pp_time <= 0) {
2141
-            /* messed up order, maybe after seeking? skipping current b-frame */
2141
+            /* messed up order, maybe after seeking? skipping current B-frame */
2142 2142
             return FRAME_SKIPPED;
2143 2143
         }
2144 2144
         ff_mpeg4_init_direct_mv(s);
... ...
@@ -2237,7 +2237,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
2237 2237
         s->chroma_qscale = s->qscale = get_bits(gb, s->quant_precision);
2238 2238
         if (s->qscale == 0) {
2239 2239
             av_log(s->avctx, AV_LOG_ERROR,
2240
-                   "Error, header damaged or not MPEG4 header (qscale=0)\n");
2240
+                   "Error, header damaged or not MPEG-4 header (qscale=0)\n");
2241 2241
             return -1;  // makes no sense to continue, as there is nothing left from the image then
2242 2242
         }
2243 2243
 
... ...
@@ -2245,7 +2245,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
2245 2245
             s->f_code = get_bits(gb, 3);        /* fcode_for */
2246 2246
             if (s->f_code == 0) {
2247 2247
                 av_log(s->avctx, AV_LOG_ERROR,
2248
-                       "Error, header damaged or not MPEG4 header (f_code=0)\n");
2248
+                       "Error, header damaged or not MPEG-4 header (f_code=0)\n");
2249 2249
                 return -1;  // makes no sense to continue, as there is nothing left from the image then
2250 2250
             }
2251 2251
         } else
... ...
@@ -2285,7 +2285,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
2285 2285
         }
2286 2286
     }
2287 2287
     /* detect buggy encoders which don't set the low_delay flag
2288
-     * (divx4/xvid/opendivx). Note we cannot detect divx5 without b-frames
2288
+     * (divx4/xvid/opendivx). Note we cannot detect divx5 without B-frames
2289 2289
      * easily (although it's buggy too) */
2290 2290
     if (s->vo_type == 0 && ctx->vol_control_parameters == 0 &&
2291 2291
         ctx->divx_version == -1 && s->picture_number == 0) {
... ...
@@ -2308,7 +2308,7 @@ static int decode_vop_header(Mpeg4DecContext *ctx, GetBitContext *gb)
2308 2308
 }
2309 2309
 
2310 2310
 /**
2311
- * Decode mpeg4 headers.
2311
+ * Decode MPEG-4 headers.
2312 2312
  * @return <0 if no VOP found (or a damaged one)
2313 2313
  *         FRAME_SKIPPED if a not coded VOP is found
2314 2314
  *         0 if a VOP is found
... ...
@@ -2491,7 +2491,7 @@ int ff_mpeg4_frame_end(AVCodecContext *avctx, const uint8_t *buf, int buf_size)
2491 2491
     Mpeg4DecContext *ctx = avctx->priv_data;
2492 2492
     MpegEncContext    *s = &ctx->m;
2493 2493
 
2494
-    /* divx 5.01+ bistream reorder stuff */
2494
+    /* divx 5.01+ bitstream reorder stuff */
2495 2495
     if (s->divx_packed) {
2496 2496
         int current_pos     = get_bits_count(&s->gb) >> 3;
2497 2497
         int startcode_found = 0;
... ...
@@ -2590,7 +2590,7 @@ static av_cold int decode_init(AVCodecContext *avctx)
2590 2590
     }
2591 2591
 
2592 2592
     s->h263_pred = 1;
2593
-    s->low_delay = 0; /* default, might be overriden in the vol header during header parsing */
2593
+    s->low_delay = 0; /* default, might be overridden in the vol header during header parsing */
2594 2594
     s->decode_mb = mpeg4_decode_mb;
2595 2595
     ctx->time_increment_bits = 4; /* default value for broken headers */
2596 2596
 
... ...
@@ -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 acually 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
             assert((s->dquant & 1) == 0);
530 530
             assert(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) {
... ...
@@ -876,7 +876,7 @@ void ff_mpeg4_encode_mb(MpegEncContext *s, int16_t block[6][64],
876 876
 }
877 877
 
878 878
 /**
879
- * add mpeg4 stuffing bits (01...1)
879
+ * add MPEG-4 stuffing bits (01...1)
880 880
  */
881 881
 void ff_mpeg4_stuffing(PutBitContext *pbc)
882 882
 {
... ...
@@ -1045,7 +1045,7 @@ static void mpeg4_encode_vol_header(MpegEncContext *s,
1045 1045
         put_bits(&s->pb, 2, 0);       /* sprite enable */
1046 1046
 
1047 1047
     put_bits(&s->pb, 1, 0);             /* not 8 bit == false */
1048
-    put_bits(&s->pb, 1, s->mpeg_quant); /* quant type= (0=h263 style)*/
1048
+    put_bits(&s->pb, 1, s->mpeg_quant); /* quant type = (0 = H.263 style) */
1049 1049
 
1050 1050
     if (s->mpeg_quant) {
1051 1051
         ff_write_quant_matrix(&s->pb, s->avctx->intra_matrix);
... ...
@@ -1076,7 +1076,7 @@ static void mpeg4_encode_vol_header(MpegEncContext *s,
1076 1076
     }
1077 1077
 }
1078 1078
 
1079
-/* write mpeg4 VOP header */
1079
+/* write MPEG-4 VOP header */
1080 1080
 void ff_mpeg4_encode_picture_header(MpegEncContext *s, int picture_number)
1081 1081
 {
1082 1082
     int time_incr;
... ...
@@ -1397,7 +1397,7 @@ static int mp_decode_layer3(MPADecodeContext *s)
1397 1397
                 uint8_t *sc;
1398 1398
                 int slen, slen1, slen2;
1399 1399
 
1400
-                /* MPEG1 scale factors */
1400
+                /* MPEG-1 scale factors */
1401 1401
                 slen1 = slen_table[0][g->scalefac_compress];
1402 1402
                 slen2 = slen_table[1][g->scalefac_compress];
1403 1403
                 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(AVCodecContext *avctx, uint32_t head, int *sample_rate,
58 58
                          int *channels, int *frame_size, int *bitrate);
... ...
@@ -583,7 +583,7 @@ static void compute_bit_allocation(MpegAudioContext *s,
583 583
 }
584 584
 
585 585
 /*
586
- * Output the mpeg audio layer 2 frame. Note how the code is small
586
+ * Output the MPEG audio layer 2 frame. Note how the code is small
587 587
  * compared to other encoders :-)
588 588
  */
589 589
 static void encode_frame(MpegAudioContext *s,
... ...
@@ -598,7 +598,7 @@ static void encode_frame(MpegAudioContext *s,
598 598
     /* header */
599 599
 
600 600
     put_bits(p, 12, 0xfff);
601
-    put_bits(p, 1, 1 - s->lsf); /* 1 = mpeg1 ID, 0 = mpeg2 lsf ID */
601
+    put_bits(p, 1, 1 - s->lsf); /* 1 = MPEG-1 ID, 0 = MPEG-2 lsf ID */
602 602
     put_bits(p, 2, 4-2);  /* layer 2 */
603 603
     put_bits(p, 1, 1); /* no error protection */
604 604
     put_bits(p, 4, s->bitrate_index);
... ...
@@ -59,8 +59,8 @@ int ff_mpeg_framesize_alloc(AVCodecContext *avctx, MotionEstContext *me,
59 59
     int alloc_size = FFALIGN(FFABS(linesize) + 32, 32);
60 60
 
61 61
     // edge emu needs blocksize + filter length - 1
62
-    // (= 17x17 for  halfpel / 21x21 for  h264)
63
-    // VC1 computes luma and chroma simultaneously and needs 19X19 + 9x9
62
+    // (= 17x17 for  halfpel / 21x21 for H.264)
63
+    // VC-1 computes luma and chroma simultaneously and needs 19X19 + 9x9
64 64
     // at uvlinesize. It supports only YUV420 so 24x24 is enough
65 65
     // linesize * interlaced * MBsize
66 66
     FF_ALLOCZ_OR_GOTO(avctx, sc->edge_emu_buffer, alloc_size * 2 * 24,
... ...
@@ -61,7 +61,7 @@ static void dct_unquantize_mpeg1_intra_c(MpegEncContext *s,
61 61
         block[0] = block[0] * s->y_dc_scale;
62 62
     else
63 63
         block[0] = block[0] * s->c_dc_scale;
64
-    /* XXX: only mpeg1 */
64
+    /* XXX: only MPEG-1 */
65 65
     quant_matrix = s->intra_matrix;
66 66
     for(i=1;i<=nCoeffs;i++) {
67 67
         int j= s->intra_scantable.permutated[i];
... ...
@@ -529,7 +529,7 @@ do {\
529 529
     s->next_p_frame_damaged = s1->next_p_frame_damaged;
530 530
     s->workaround_bugs      = s1->workaround_bugs;
531 531
 
532
-    // MPEG4 timing info
532
+    // MPEG-4 timing info
533 533
     memcpy(&s->last_time_base, &s1->last_time_base,
534 534
            (char *) &s1->pb_field_time + sizeof(s1->pb_field_time) -
535 535
            (char *) &s1->last_time_base);
... ...
@@ -555,7 +555,7 @@ do {\
555 555
                AV_INPUT_BUFFER_PADDING_SIZE);
556 556
     }
557 557
 
558
-    // linesize dependend scratch buffer allocation
558
+    // linesize-dependent scratch buffer allocation
559 559
     if (!s->sc.edge_emu_buffer)
560 560
         if (s1->linesize) {
561 561
             if (ff_mpeg_framesize_alloc(s->avctx, &s->me,
... ...
@@ -570,7 +570,7 @@ do {\
570 570
             return AVERROR_BUG;
571 571
         }
572 572
 
573
-    // MPEG2/interlacing info
573
+    // MPEG-2/interlacing info
574 574
     memcpy(&s->progressive_sequence, &s1->progressive_sequence,
575 575
            (char *) &s1->rtp_mode - (char *) &s1->progressive_sequence);
576 576
 
... ...
@@ -630,7 +630,7 @@ static int init_context_frame(MpegEncContext *s)
630 630
     mb_array_size = s->mb_height * s->mb_stride;
631 631
     mv_table_size = (s->mb_height + 2) * s->mb_stride + 1;
632 632
 
633
-    /* set default edge pos, will be overriden
633
+    /* set default edge pos, will be overridden
634 634
      * in decode_header if needed */
635 635
     s->h_edge_pos = s->mb_width * 16;
636 636
     s->v_edge_pos = s->mb_height * 16;
... ...
@@ -649,7 +649,7 @@ static int init_context_frame(MpegEncContext *s)
649 649
     yc_size = y_size + 2   * c_size;
650 650
 
651 651
     FF_ALLOCZ_OR_GOTO(s->avctx, s->mb_index2xy, (s->mb_num + 1) * sizeof(int),
652
-                      fail); // error ressilience code looks cleaner with this
652
+                      fail); // error resilience code looks cleaner with this
653 653
     for (y = 0; y < s->mb_height; y++)
654 654
         for (x = 0; x < s->mb_width; x++)
655 655
             s->mb_index2xy[x + y * s->mb_width] = x + y * s->mb_stride;
... ...
@@ -749,7 +749,7 @@ static int init_context_frame(MpegEncContext *s)
749 749
 
750 750
     /* init macroblock skip table */
751 751
     FF_ALLOCZ_OR_GOTO(s->avctx, s->mbskip_table, mb_array_size + 2, fail);
752
-    // Note the + 1 is for  a quicker mpeg4 slice_end detection
752
+    // Note the + 1 is for  a quicker MPEG-4 slice_end detection
753 753
 
754 754
     return ff_mpeg_er_init(s);
755 755
 fail:
... ...
@@ -1063,7 +1063,7 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
1063 1063
     }
1064 1064
 
1065 1065
     /* release forgotten pictures */
1066
-    /* if (mpeg124/h263) */
1066
+    /* if (MPEG-124 / H.263) */
1067 1067
     for (i = 0; i < MAX_PICTURE_COUNT; i++) {
1068 1068
         if (&s->picture[i] != s->last_picture_ptr &&
1069 1069
             &s->picture[i] != s->next_picture_ptr &&
... ...
@@ -1236,8 +1236,8 @@ int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx)
1236 1236
     }
1237 1237
 
1238 1238
     /* set dequantizer, we can't do it during init as
1239
-     * it might change for mpeg4 and we can't do it in the header
1240
-     * decode as init is not called for mpeg4 there yet */
1239
+     * it might change for MPEG-4 and we can't do it in the header
1240
+     * decode as init is not called for MPEG-4 there yet */
1241 1241
     if (s->mpeg_quant || s->codec_id == AV_CODEC_ID_MPEG2VIDEO) {
1242 1242
         s->dct_unquantize_intra = s->dct_unquantize_mpeg2_intra;
1243 1243
         s->dct_unquantize_inter = s->dct_unquantize_mpeg2_inter;
... ...
@@ -79,16 +79,16 @@ typedef struct MpegEncContext {
79 79
     int y_dc_scale, c_dc_scale;
80 80
     int ac_pred;
81 81
     int block_last_index[12];  ///< last non zero coefficient in block
82
-    int h263_aic;              ///< Advanded INTRA Coding (AIC)
82
+    int h263_aic;              ///< Advanced INTRA Coding (AIC)
83 83
 
84 84
     /* scantables */
85
-    ScanTable inter_scantable; ///< if inter == intra then intra should be used to reduce tha cache usage
85
+    ScanTable inter_scantable; ///< if inter == intra then intra should be used to reduce the cache usage
86 86
     ScanTable intra_scantable;
87 87
     ScanTable intra_h_scantable;
88 88
     ScanTable intra_v_scantable;
89 89
 
90 90
     /* WARNING: changes above this line require updates to hardcoded
91
-     *          offsets used in asm. */
91
+     *          offsets used in ASM. */
92 92
 
93 93
     struct AVCodecContext *avctx;
94 94
     /* the following parameters must be initialized before encoding */
... ...
@@ -97,20 +97,20 @@ typedef struct MpegEncContext {
97 97
     int intra_only;   ///< if true, only intra pictures are generated
98 98
     int bit_rate;     ///< wanted bit rate
99 99
     enum OutputFormat out_format; ///< output format
100
-    int h263_pred;    ///< use mpeg4/h263 ac/dc predictions
101
-    int pb_frame;     ///< PB frame mode (0 = none, 1 = base, 2 = improved)
100
+    int h263_pred;    ///< use MPEG-4/H.263 ac/dc predictions
101
+    int pb_frame;     ///< PB-frame mode (0 = none, 1 = base, 2 = improved)
102 102
 
103 103
 /* the following codec id fields are deprecated in favor of codec_id */
104
-    int h263_plus;    ///< h263 plus headers
105
-    int h263_flv;     ///< use flv h263 header
104
+    int h263_plus;    ///< H.263+ headers
105
+    int h263_flv;     ///< use flv H.263 header
106 106
 
107 107
     enum AVCodecID codec_id;     /* see AV_CODEC_ID_xxx */
108 108
     int fixed_qscale; ///< fixed qscale if non zero
109 109
     int encoding;     ///< true if we are encoding (vs decoding)
110
-    int max_b_frames; ///< max number of b-frames for encoding
110
+    int max_b_frames; ///< max number of B-frames for encoding
111 111
     int luma_elim_threshold;
112 112
     int chroma_elim_threshold;
113
-    int strict_std_compliance; ///< strictly follow the std (MPEG4, ...)
113
+    int strict_std_compliance; ///< strictly follow the std (MPEG-4, ...)
114 114
     int workaround_bugs;       ///< workaround bugs in encoders which cannot be detected automatically
115 115
     int codec_tag;             ///< internal codec_tag upper case converted from avctx codec_tag
116 116
     /* the following fields are managed internally by the encoder */
... ...
@@ -130,7 +130,7 @@ typedef struct MpegEncContext {
130 130
     ptrdiff_t uvlinesize;      ///< line size, for chroma in bytes, may be different from width
131 131
     Picture *picture;          ///< main picture buffer
132 132
     Picture **input_picture;   ///< next pictures on display order for encoding
133
-    Picture **reordered_input_picture; ///< pointer to the next pictures in codedorder for encoding
133
+    Picture **reordered_input_picture; ///< pointer to the next pictures in coded order for encoding
134 134
 
135 135
     int64_t user_specified_pts; ///< last non-zero pts from AVFrame which was passed into avcodec_encode_video2()
136 136
     /**
... ...
@@ -177,19 +177,19 @@ typedef struct MpegEncContext {
177 177
     Picture *last_picture_ptr;     ///< pointer to the previous picture.
178 178
     Picture *next_picture_ptr;     ///< pointer to the next picture (for bidir pred)
179 179
     Picture *current_picture_ptr;  ///< pointer to the current picture
180
-    int last_dc[3];                ///< last DC values for MPEG1
180
+    int last_dc[3];                ///< last DC values for MPEG-1
181 181
     int16_t *dc_val_base;
182
-    int16_t *dc_val[3];            ///< used for mpeg4 DC prediction, all 3 arrays must be continuous
182
+    int16_t *dc_val[3];            ///< used for MPEG-4 DC prediction, all 3 arrays must be continuous
183 183
     const uint8_t *y_dc_scale_table;     ///< qscale -> y_dc_scale table
184 184
     const uint8_t *c_dc_scale_table;     ///< qscale -> c_dc_scale table
185
-    const uint8_t *chroma_qscale_table;  ///< qscale -> chroma_qscale (h263)
185
+    const uint8_t *chroma_qscale_table;  ///< qscale -> chroma_qscale (H.263)
186 186
     uint8_t *coded_block_base;
187 187
     uint8_t *coded_block;          ///< used for coded block pattern prediction (msmpeg4v3, wmv1)
188 188
     int16_t (*ac_val_base)[16];
189
-    int16_t (*ac_val[3])[16];      ///< used for for mpeg4 AC prediction, all 3 arrays must be continuous
189
+    int16_t (*ac_val[3])[16];      ///< used for for MPEG-4 AC prediction, all 3 arrays must be continuous
190 190
     int mb_skipped;                ///< MUST BE SET only during DECODING
191 191
     uint8_t *mbskip_table;        /**< used to avoid copy if macroblock skipped (for black regions for example)
192
-                                   and used for b-frame encoding & decoding (contains skip table of next P Frame) */
192
+                                   and used for B-frame encoding & decoding (contains skip table of next P-frame) */
193 193
     uint8_t *mbintra_table;       ///< used to avoid setting {ac, dc, cbp}-pred stuff to zero on inter MB decoding
194 194
     uint8_t *cbp_table;           ///< used to store cbp, ac_pred for partitioned decoding
195 195
     uint8_t *pred_dir_table;      ///< used to store pred_dir for partitioned decoding
... ...
@@ -198,14 +198,14 @@ typedef struct MpegEncContext {
198 198
 
199 199
     int qscale;                 ///< QP
200 200
     int chroma_qscale;          ///< chroma QP
201
-    unsigned int lambda;        ///< lagrange multipler used in rate distortion
201
+    unsigned int lambda;        ///< Lagrange multiplier used in rate distortion
202 202
     unsigned int lambda2;       ///< (lambda*lambda) >> FF_LAMBDA_SHIFT
203 203
     int *lambda_table;
204 204
     int adaptive_quant;         ///< use adaptive quantization
205 205
     int dquant;                 ///< qscale difference to prev qscale
206 206
     int pict_type;              ///< AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
207 207
     int last_pict_type; //FIXME removes
208
-    int last_non_b_pict_type;   ///< used for mpeg4 gmc b-frames & ratecontrol
208
+    int last_non_b_pict_type;   ///< used for MPEG-4 gmc B-frames & ratecontrol
209 209
     int droppable;
210 210
     int frame_rate_index;
211 211
     int last_lambda_for[5];     ///< last lambda for a specific pict type
... ...
@@ -213,7 +213,7 @@ typedef struct MpegEncContext {
213 213
 
214 214
     /* motion compensation */
215 215
     int unrestricted_mv;        ///< mv can point outside of the coded picture
216
-    int h263_long_vectors;      ///< use horrible h263v1 long vector mode
216
+    int h263_long_vectors;      ///< use horrible H.263v1 long vector mode
217 217
 
218 218
     BlockDSPContext bdsp;
219 219
     FDCTDSPContext fdsp;
... ...
@@ -227,7 +227,7 @@ typedef struct MpegEncContext {
227 227
     VideoDSPContext vdsp;
228 228
     H263DSPContext h263dsp;
229 229
     int f_code;                 ///< forward MV resolution
230
-    int b_code;                 ///< backward MV resolution for B Frames (mpeg4)
230
+    int b_code;                 ///< backward MV resolution for B-frames (MPEG-4)
231 231
     int16_t (*p_mv_table_base)[2];
232 232
     int16_t (*b_forw_mv_table_base)[2];
233 233
     int16_t (*b_back_mv_table_base)[2];
... ...
@@ -236,14 +236,14 @@ typedef struct MpegEncContext {
236 236
     int16_t (*b_direct_mv_table_base)[2];
237 237
     int16_t (*p_field_mv_table_base[2][2])[2];
238 238
     int16_t (*b_field_mv_table_base[2][2][2])[2];
239
-    int16_t (*p_mv_table)[2];            ///< MV table (1MV per MB) p-frame encoding
240
-    int16_t (*b_forw_mv_table)[2];       ///< MV table (1MV per MB) forward mode b-frame encoding
241
-    int16_t (*b_back_mv_table)[2];       ///< MV table (1MV per MB) backward mode b-frame encoding
242
-    int16_t (*b_bidir_forw_mv_table)[2]; ///< MV table (1MV per MB) bidir mode b-frame encoding
243
-    int16_t (*b_bidir_back_mv_table)[2]; ///< MV table (1MV per MB) bidir mode b-frame encoding
244
-    int16_t (*b_direct_mv_table)[2];     ///< MV table (1MV per MB) direct mode b-frame encoding
245
-    int16_t (*p_field_mv_table[2][2])[2];   ///< MV table (2MV per MB) interlaced p-frame encoding
246
-    int16_t (*b_field_mv_table[2][2][2])[2];///< MV table (4MV per MB) interlaced b-frame encoding
239
+    int16_t (*p_mv_table)[2];            ///< MV table (1MV per MB) P-frame encoding
240
+    int16_t (*b_forw_mv_table)[2];       ///< MV table (1MV per MB) forward mode B-frame encoding
241
+    int16_t (*b_back_mv_table)[2];       ///< MV table (1MV per MB) backward mode B-frame encoding
242
+    int16_t (*b_bidir_forw_mv_table)[2]; ///< MV table (1MV per MB) bidir mode B-frame encoding
243
+    int16_t (*b_bidir_back_mv_table)[2]; ///< MV table (1MV per MB) bidir mode B-frame encoding
244
+    int16_t (*b_direct_mv_table)[2];     ///< MV table (1MV per MB) direct mode B-frame encoding
245
+    int16_t (*p_field_mv_table[2][2])[2];   ///< MV table (2MV per MB) interlaced P-frame encoding
246
+    int16_t (*b_field_mv_table[2][2][2])[2];///< MV table (4MV per MB) interlaced B-frame encoding
247 247
     uint8_t (*p_field_select_table[2]);
248 248
     uint8_t (*b_field_select_table[2][2]);
249 249
 #if FF_API_MOTION_EST
... ...
@@ -255,10 +255,10 @@ typedef struct MpegEncContext {
255 255
     int mv_dir;
256 256
 #define MV_DIR_FORWARD   1
257 257
 #define MV_DIR_BACKWARD  2
258
-#define MV_DIRECT        4 ///< bidirectional mode where the difference equals the MV of the last P/S/I-Frame (mpeg4)
258
+#define MV_DIRECT        4 ///< bidirectional mode where the difference equals the MV of the last P/S/I-Frame (MPEG-4)
259 259
     int mv_type;
260 260
 #define MV_TYPE_16X16       0   ///< 1 vector for the whole mb
261
-#define MV_TYPE_8X8         1   ///< 4 vectors (h263, mpeg4 4MV)
261
+#define MV_TYPE_8X8         1   ///< 4 vectors (H.263, MPEG-4 4MV)
262 262
 #define MV_TYPE_16X8        2   ///< 2 vectors, one per 16x8 block
263 263
 #define MV_TYPE_FIELD       3   ///< 2 vectors, one per field
264 264
 #define MV_TYPE_DMV         4   ///< 2 vectors, special mpeg2 Dual Prime Vectors
... ...
@@ -269,14 +269,14 @@ typedef struct MpegEncContext {
269 269
     */
270 270
     int mv[2][4][2];
271 271
     int field_select[2][2];
272
-    int last_mv[2][2][2];             ///< last MV, used for MV prediction in MPEG1 & B-frame MPEG4
272
+    int last_mv[2][2][2];             ///< last MV, used for MV prediction in MPEG-1 & B-frame MPEG-4
273 273
     uint8_t *fcode_tab;               ///< smallest fcode needed for each MV
274 274
     int16_t direct_scale_mv[2][64];   ///< precomputed to avoid divisions in ff_mpeg4_set_direct_mv
275 275
 
276 276
     MotionEstContext me;
277 277
 
278
-    int no_rounding;  /**< apply no rounding to motion compensation (MPEG4, msmpeg4, ...)
279
-                        for b-frames rounding mode is always 0 */
278
+    int no_rounding;  /**< apply no rounding to motion compensation (MPEG-4, msmpeg4, ...)
279
+                        for B-frames rounding mode is always 0 */
280 280
 
281 281
     /* macroblock layer */
282 282
     int mb_x, mb_y;
... ...
@@ -345,7 +345,7 @@ typedef struct MpegEncContext {
345 345
     int resync_mb_y;                 ///< y position of last resync marker
346 346
     GetBitContext last_resync_gb;    ///< used to search for the next resync marker
347 347
     int mb_num_left;                 ///< number of MBs left in this video packet (for partitioned Slices only)
348
-    int next_p_frame_damaged;        ///< set if the next p frame is damaged, to avoid showing trashed b frames
348
+    int next_p_frame_damaged;        ///< set if the next p frame is damaged, to avoid showing trashed B-frames
349 349
 
350 350
     ParseContext parse_context;
351 351
 
... ...
@@ -359,7 +359,7 @@ typedef struct MpegEncContext {
359 359
     int rc_strategy;
360 360
 
361 361
     /* H.263+ specific */
362
-    int umvplus;                    ///< == H263+ && unrestricted_mv
362
+    int umvplus;                    ///< == H.263+ && unrestricted_mv
363 363
     int h263_aic_dir;               ///< AIC direction: 0 = left, 1 = top
364 364
     int h263_slice_structured;
365 365
     int alt_inter_vlc;              ///< alternative inter vlc
... ...
@@ -367,7 +367,7 @@ typedef struct MpegEncContext {
367 367
     int loop_filter;
368 368
     int custom_pcf;
369 369
 
370
-    /* mpeg4 specific */
370
+    /* MPEG-4 specific */
371 371
     ///< number of bits to represent the fractional part of time (encoder only)
372 372
     int time_increment_bits;
373 373
     int last_time_base;
... ...
@@ -388,12 +388,12 @@ typedef struct MpegEncContext {
388 388
     int sprite_warping_accuracy;
389 389
     int data_partitioning;           ///< data partitioning flag from header
390 390
     int partitioned_frame;           ///< is current frame partitioned
391
-    int low_delay;                   ///< no reordering needed / has no b-frames
391
+    int low_delay;                   ///< no reordering needed / has no B-frames
392 392
     int vo_type;
393 393
     PutBitContext tex_pb;            ///< used for data partitioned VOPs
394 394
     PutBitContext pb2;               ///< used for data partitioned VOPs
395 395
     int mpeg_quant;
396
-    int padding_bug_score;             ///< used to detect the VERY common padding bug in MPEG4
396
+    int padding_bug_score;             ///< used to detect the VERY common padding bug in MPEG-4
397 397
 
398 398
     /* divx specific, used to workaround (many) bugs in divx5 */
399 399
     int divx_packed;
... ...
@@ -416,7 +416,7 @@ typedef struct MpegEncContext {
416 416
     int dc_table_index;
417 417
     int use_skip_mb_code;
418 418
     int slice_height;      ///< in macroblocks
419
-    int first_slice_line;  ///< used in mpeg4 too to handle resync markers
419
+    int first_slice_line;  ///< used in MPEG-4 too to handle resync markers
420 420
     int flipflop_rounding;
421 421
     int msmpeg4_version;   ///< 0=not msmpeg4, 1=mp41, 2=mp42, 3=mp43/divx3 4=wmv1/7 5=wmv2/8
422 422
     int per_mb_rl_table;
... ...
@@ -430,9 +430,9 @@ typedef struct MpegEncContext {
430 430
     /* decompression specific */
431 431
     GetBitContext gb;
432 432
 
433
-    /* Mpeg1 specific */
434
-    int gop_picture_number;  ///< index of the first picture of a GOP based on fake_pic_num & mpeg1 specific
435
-    int last_mv_dir;         ///< last mv_dir, used for b frame encoding
433
+    /* MPEG-1 specific */
434
+    int gop_picture_number;  ///< index of the first picture of a GOP based on fake_pic_num & MPEG-1 specific
435
+    int last_mv_dir;         ///< last mv_dir, used for B-frame encoding
436 436
     uint8_t *vbv_delay_ptr;  ///< pointer to vbv_delay in the bitstream
437 437
 
438 438
     /* MPEG-2-specific - I wished not to have to support this mess. */
... ...
@@ -493,9 +493,9 @@ typedef struct MpegEncContext {
493 493
                            int16_t *block/*align 16*/, int n, int qscale);
494 494
     void (*dct_unquantize_h263_inter)(struct MpegEncContext *s,
495 495
                            int16_t *block/*align 16*/, int n, int qscale);
496
-    void (*dct_unquantize_intra)(struct MpegEncContext *s, // unquantizer to use (mpeg4 can use both)
496
+    void (*dct_unquantize_intra)(struct MpegEncContext *s, // unquantizer to use (MPEG-4 can use both)
497 497
                            int16_t *block/*align 16*/, int n, int qscale);
498
-    void (*dct_unquantize_inter)(struct MpegEncContext *s, // unquantizer to use (mpeg4 can use both)
498
+    void (*dct_unquantize_inter)(struct MpegEncContext *s, // unquantizer to use (MPEG-4 can use both)
499 499
                            int16_t *block/*align 16*/, int n, int qscale);
500 500
     int (*dct_quantize)(struct MpegEncContext *s, int16_t *block/*align 16*/, int n, int qscale, int *overflow);
501 501
     int (*fast_dct_quantize)(struct MpegEncContext *s, int16_t *block/*align 16*/, int n, int qscale, int *overflow);
... ...
@@ -506,7 +506,7 @@ typedef struct MpegEncContext {
506 506
 
507 507
     /**
508 508
      * ratecontrol qmin qmax limiting method
509
-     * 0-> clipping, 1-> use a nice continuous function to limit qscale wthin qmin/qmax.
509
+     * 0-> clipping, 1-> use a nice continuous function to limit qscale within qmin/qmax.
510 510
      */
511 511
     float rc_qsquish;
512 512
     float rc_qmod_amp;
... ...
@@ -439,7 +439,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
439 439
         s->codec_id != AV_CODEC_ID_MPEG4      &&
440 440
         s->codec_id != AV_CODEC_ID_MPEG1VIDEO &&
441 441
         s->codec_id != AV_CODEC_ID_MPEG2VIDEO) {
442
-        av_log(avctx, AV_LOG_ERROR, "b frames not supported by codec\n");
442
+        av_log(avctx, AV_LOG_ERROR, "B-frames not supported by codec\n");
443 443
         return -1;
444 444
     }
445 445
 
... ...
@@ -508,7 +508,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
508 508
         }
509 509
         if (s->max_b_frames != 0) {
510 510
             av_log(avctx, AV_LOG_ERROR,
511
-                   "b frames cannot be used with low delay\n");
511
+                   "B-frames cannot be used with low delay\n");
512 512
             return -1;
513 513
         }
514 514
     }
... ...
@@ -850,7 +850,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
850 850
             s->intra_matrix[j] =
851 851
             s->inter_matrix[j] = ff_mpeg1_default_non_intra_matrix[i];
852 852
         } else {
853
-            /* mpeg1/2 */
853
+            /* MPEG-1/2 */
854 854
             s->intra_matrix[j] = ff_mpeg1_default_intra_matrix[i];
855 855
             s->inter_matrix[j] = ff_mpeg1_default_non_intra_matrix[i];
856 856
         }
... ...
@@ -1158,7 +1158,7 @@ static int load_input_picture(MpegEncContext *s, const AVFrame *pic_arg)
1158 1158
             return ret;
1159 1159
 
1160 1160
         pic->f->display_picture_number = display_picture_number;
1161
-        pic->f->pts = pts; // we set this here to avoid modifiying pic_arg
1161
+        pic->f->pts = pts; // we set this here to avoid modifying pic_arg
1162 1162
     } else {
1163 1163
         /* Flushing: When we have not received enough input frames,
1164 1164
          * ensure s->input_picture[0] contains the first picture */
... ...
@@ -1370,7 +1370,7 @@ static int select_input_picture(MpegEncContext *s)
1370 1370
             if (s->frame_skip_threshold || s->frame_skip_factor) {
1371 1371
                 if (s->picture_in_gop_number < s->gop_size &&
1372 1372
                     skip_check(s, s->input_picture[0], s->next_picture_ptr)) {
1373
-                    // FIXME check that te gop check above is +-1 correct
1373
+                    // FIXME check that the gop check above is +-1 correct
1374 1374
                     av_frame_unref(s->input_picture[0]->f);
1375 1375
 
1376 1376
                     emms_c();
... ...
@@ -1438,7 +1438,7 @@ static int select_input_picture(MpegEncContext *s)
1438 1438
             if (s->input_picture[b_frames]->f->pict_type == AV_PICTURE_TYPE_B &&
1439 1439
                 b_frames == s->max_b_frames) {
1440 1440
                 av_log(s->avctx, AV_LOG_ERROR,
1441
-                       "warning, too many b frames in a row\n");
1441
+                       "warning, too many B-frames in a row\n");
1442 1442
             }
1443 1443
 
1444 1444
             if (s->picture_in_gop_number + b_frames >= s->gop_size) {
... ...
@@ -1482,7 +1482,7 @@ no_output_pic:
1482 1482
             return ret;
1483 1483
 
1484 1484
         if (s->reordered_input_picture[0]->shared || s->avctx->rc_buffer_size) {
1485
-            // input is a shared pix, so we can't modifiy it -> alloc a new
1485
+            // input is a shared pix, so we can't modify it -> allocate a new
1486 1486
             // one & ensure that the shared one is reuseable
1487 1487
 
1488 1488
             Picture *pic;
... ...
@@ -1827,7 +1827,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
1827 1827
             s->frame_bits  = put_bits_count(&s->pb);
1828 1828
         }
1829 1829
 
1830
-        /* update mpeg1/2 vbv_delay for CBR */
1830
+        /* update MPEG-1/2 vbv_delay for CBR */
1831 1831
         if (s->avctx->rc_max_rate                          &&
1832 1832
             s->avctx->rc_min_rate == s->avctx->rc_max_rate &&
1833 1833
             s->out_format == FMT_MPEG1                     &&
... ...
@@ -2396,7 +2396,7 @@ static inline void copy_context_before_encode(MpegEncContext *d, MpegEncContext
2396 2396
 
2397 2397
     memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster than a loop?
2398 2398
 
2399
-    /* mpeg1 */
2399
+    /* MPEG-1 */
2400 2400
     d->mb_skip_run= s->mb_skip_run;
2401 2401
     for(i=0; i<3; i++)
2402 2402
         d->last_dc[i] = s->last_dc[i];
... ...
@@ -2425,7 +2425,7 @@ static inline void copy_context_after_encode(MpegEncContext *d, MpegEncContext *
2425 2425
     memcpy(d->mv, s->mv, 2*4*2*sizeof(int));
2426 2426
     memcpy(d->last_mv, s->last_mv, 2*2*2*sizeof(int)); //FIXME is memcpy faster than a loop?
2427 2427
 
2428
-    /* mpeg1 */
2428
+    /* MPEG-1 */
2429 2429
     d->mb_skip_run= s->mb_skip_run;
2430 2430
     for(i=0; i<3; i++)
2431 2431
         d->last_dc[i] = s->last_dc[i];
... ...
@@ -3264,7 +3264,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
3264 3264
                 ff_mpv_decode_mb(s, s->block);
3265 3265
             }
3266 3266
 
3267
-            /* clean the MV table in IPS frames for direct mode in B frames */
3267
+            /* clean the MV table in IPS frames for direct mode in B-frames */
3268 3268
             if(s->mb_intra /* && I,P,S_TYPE */){
3269 3269
                 s->p_mv_table[xy][0]=0;
3270 3270
                 s->p_mv_table[xy][1]=0;
... ...
@@ -3420,7 +3420,7 @@ static int encode_picture(MpegEncContext *s, int picture_number)
3420 3420
     s->me.mb_var_sum_temp    =
3421 3421
     s->me.mc_mb_var_sum_temp = 0;
3422 3422
 
3423
-    /* we need to initialize some time vars before we can encode b-frames */
3423
+    /* we need to initialize some time vars before we can encode B-frames */
3424 3424
     // RAL: Condition added for MPEG1VIDEO
3425 3425
     if (s->codec_id == AV_CODEC_ID_MPEG1VIDEO || s->codec_id == AV_CODEC_ID_MPEG2VIDEO || (s->h263_pred && !s->msmpeg4_version))
3426 3426
         set_frame_distances(s);
... ...
@@ -3795,7 +3795,7 @@ static int dct_quantize_trellis_c(MpegEncContext *s,
3795 3795
 
3796 3796
             if(s->out_format == FMT_H263){
3797 3797
                 unquant_coeff= alevel*qmul + qadd;
3798
-            }else{ //MPEG1
3798
+            } else { // MPEG-1
3799 3799
                 j = s->idsp.idct_permutation[scantable[i]]; // FIXME: optimize
3800 3800
                 if(s->mb_intra){
3801 3801
                         unquant_coeff = (int)(  alevel  * qscale * s->intra_matrix[j]) >> 3;
... ...
@@ -3865,7 +3865,7 @@ static int dct_quantize_trellis_c(MpegEncContext *s,
3865 3865
 
3866 3866
         score_tab[i+1]= best_score;
3867 3867
 
3868
-        //Note: there is a vlc code in mpeg4 which is 1 bit shorter then another one with a shorter run and the same level
3868
+        // 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
3869 3869
         if(last_non_zero <= 27){
3870 3870
             for(; survivor_count; survivor_count--){
3871 3871
                 if(score_tab[ survivor[survivor_count-1] ] <= best_score)
... ...
@@ -3885,7 +3885,8 @@ static int dct_quantize_trellis_c(MpegEncContext *s,
3885 3885
         last_score= 256*256*256*120;
3886 3886
         for(i= survivor[0]; i<=last_non_zero + 1; i++){
3887 3887
             int score= score_tab[i];
3888
-            if(i) score += lambda*2; //FIXME exacter?
3888
+            if (i)
3889
+                score += lambda * 2; // FIXME more exact?
3889 3890
 
3890 3891
             if(score < last_score){
3891 3892
                 last_score= score;
... ...
@@ -3916,7 +3917,7 @@ static int dct_quantize_trellis_c(MpegEncContext *s,
3916 3916
 
3917 3917
             if(s->out_format == FMT_H263){
3918 3918
                     unquant_coeff= (alevel*qmul + qadd)>>3;
3919
-            }else{ //MPEG1
3919
+            } else { // MPEG-1
3920 3920
                     unquant_coeff = (((  alevel  << 1) + 1) * qscale * ((int) s->inter_matrix[0])) >> 4;
3921 3921
                     unquant_coeff =   (unquant_coeff - 1) | 1;
3922 3922
             }
... ...
@@ -4039,7 +4040,7 @@ static int messed_sign=0;
4039 4039
 #endif
4040 4040
     dc += (1<<(RECON_SHIFT-1));
4041 4041
     for(i=0; i<64; i++){
4042
-        rem[i]= dc - (orig[i]<<RECON_SHIFT); //FIXME  use orig dirrectly instead of copying to rem[]
4042
+        rem[i] = dc - (orig[i] << RECON_SHIFT); // FIXME use orig directly instead of copying to rem[]
4043 4043
     }
4044 4044
 #ifdef REFINE_STATS
4045 4045
 STOP_TIMER("memset rem[]")}
... ...
@@ -4350,7 +4351,7 @@ STOP_TIMER("iterative search")
4350 4350
 }
4351 4351
 
4352 4352
 /**
4353
- * Permute an 8x8 block according to permuatation.
4353
+ * Permute an 8x8 block according to permutation.
4354 4354
  * @param block the block which will be permuted according to
4355 4355
  *              the given permutation vector
4356 4356
  * @param permutation the permutation vector
... ...
@@ -582,7 +582,7 @@ static inline void qpel_motion(MpegEncContext *s,
582 582
 }
583 583
 
584 584
 /**
585
- * h263 chroma 4mv motion compensation.
585
+ * H.263 chroma 4mv motion compensation.
586 586
  */
587 587
 static void chroma_4mv_motion(MpegEncContext *s,
588 588
                               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
  *
... ...
@@ -50,7 +50,7 @@ typedef struct MqcState {
50 50
 /**
51 51
  * Initialize MQ-decoder.
52 52
  * @param mqc   MQ decoder state
53
- * @param bp    byte poiter
53
+ * @param bp    byte pointer
54 54
  */
55 55
 void ff_mqc_initdec(MqcState *mqc, uint8_t *bp);
56 56
 
... ...
@@ -58,7 +58,7 @@ void ff_mqc_initdec(MqcState *mqc, uint8_t *bp);
58 58
  * MQ decoder.
59 59
  * @param mqc       MQ decoder state
60 60
  * @param cxstate   Context
61
- * @return          Decision (0 ot 1)
61
+ * @return          Decision (0 to 1)
62 62
  */
63 63
 int ff_mqc_decode(MqcState *mqc, uint8_t *cxstate);
64 64
 
... ...
@@ -39,14 +39,14 @@
39 39
 #include "vc1data.h"
40 40
 
41 41
 /*
42
- * You can also call this codec : MPEG4 with a twist !
42
+ * You can also call this codec: MPEG-4 with a twist!
43 43
  *
44 44
  * TODO:
45 45
  *        - (encoding) select best mv table (two choices)
46 46
  *        - (encoding) select best vlc/dc table
47 47
  */
48 48
 
49
-/* This table is practically identical to the one from h263
49
+/* This table is practically identical to the one from H.263
50 50
  * except that it is inverted. */
51 51
 static av_cold void init_h263_dc_for_msmpeg4(void)
52 52
 {
... ...
@@ -67,7 +67,7 @@ static av_cold void init_h263_dc_for_msmpeg4(void)
67 67
             else
68 68
                 l= level;
69 69
 
70
-            /* luminance h263 */
70
+            /* luminance H.263 */
71 71
             uni_code= ff_mpeg4_DCtab_lum[size][0];
72 72
             uni_len = ff_mpeg4_DCtab_lum[size][1];
73 73
             uni_code ^= (1<<uni_len)-1; //M$ does not like compatibility
... ...
@@ -83,7 +83,7 @@ static av_cold void init_h263_dc_for_msmpeg4(void)
83 83
             ff_v2_dc_lum_table[level + 256][0] = uni_code;
84 84
             ff_v2_dc_lum_table[level + 256][1] = uni_len;
85 85
 
86
-            /* chrominance h263 */
86
+            /* chrominance H.263 */
87 87
             uni_code= ff_mpeg4_DCtab_chrom[size][0];
88 88
             uni_len = ff_mpeg4_DCtab_chrom[size][1];
89 89
             uni_code ^= (1<<uni_len)-1; //M$ does not like compatibility
... ...
@@ -254,7 +254,7 @@ int ff_msmpeg4_pred_dc(MpegEncContext *s, int n,
254 254
         c = FASTDIV((c + (scale >> 1)), scale);
255 255
     }
256 256
 #endif
257
-    /* XXX: WARNING: they did not choose the same test as MPEG4. This
257
+    /* XXX: WARNING: they did not choose the same test as MPEG-4. This
258 258
        is very important ! */
259 259
     if(s->msmpeg4_version>3){
260 260
         if(s->inter_intra_pred){
... ...
@@ -69,7 +69,7 @@ static VLC v2_mb_type_vlc;
69 69
 static VLC v2_mv_vlc;
70 70
 VLC ff_inter_intra_vlc;
71 71
 
72
-/* This is identical to h263 except that its range is multiplied by 2. */
72
+/* This is identical to H.263 except that its range is multiplied by 2. */
73 73
 static int msmpeg4v2_decode_motion(MpegEncContext * s, int pred, int f_code)
74 74
 {
75 75
     int code, val, sign, shift;
... ...
@@ -565,7 +565,7 @@ int ff_msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size)
565 565
     }
566 566
     else
567 567
     {
568
-        av_log(s->avctx, AV_LOG_ERROR, "I frame too long, ignoring ext header\n");
568
+        av_log(s->avctx, AV_LOG_ERROR, "I-frame too long, ignoring ext header\n");
569 569
     }
570 570
 
571 571
     return 0;
... ...
@@ -236,8 +236,8 @@ void ff_msmpeg4_encode_picture_header(MpegEncContext * s, int picture_number)
236 236
     }
237 237
 
238 238
     s->dc_table_index = 1;
239
-    s->mv_table_index = 1; /* only if P frame */
240
-    s->use_skip_mb_code = 1; /* only if P frame */
239
+    s->mv_table_index = 1; /* only if P-frame */
240
+    s->use_skip_mb_code = 1; /* only if P-frame */
241 241
     s->per_mb_rl_table = 0;
242 242
     if(s->msmpeg4_version==4)
243 243
         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 Libav.
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 Libav.
6 6
  *
... ...
@@ -174,7 +174,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
174 174
     // codec data (rtjpeg quant tables)
175 175
     if (buf[0] == 'D' && buf[1] == 'R') {
176 176
         int ret;
177
-        // skip rest of the frameheader.
177
+        // Skip the rest of the frame header.
178 178
         buf       = &buf[12];
179 179
         buf_size -= 12;
180 180
         ret       = get_quant(avctx, c, buf, buf_size);
... ...
@@ -201,7 +201,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
201 201
         keyframe = 1;
202 202
         break;
203 203
     }
204
-    // skip rest of the frameheader.
204
+    // Skip the rest of the frame header.
205 205
     buf       = &buf[12];
206 206
     buf_size -= 12;
207 207
     if (comptype == NUV_RTJPEG_IN_LZO || comptype == NUV_LZO) {
... ...
@@ -295,7 +295,7 @@ static int nvenc_check_capabilities(AVCodecContext *avctx)
295 295
 
296 296
     ret = nvenc_check_cap(avctx, NV_ENC_CAPS_NUM_MAX_BFRAMES);
297 297
     if (ret < avctx->max_b_frames) {
298
-        av_log(avctx, AV_LOG_VERBOSE, "Max b-frames %d exceed %d\n",
298
+        av_log(avctx, AV_LOG_VERBOSE, "Max B-frames %d exceed %d\n",
299 299
                avctx->max_b_frames, ret);
300 300
 
301 301
         return AVERROR(ENOSYS);
... ...
@@ -715,8 +715,8 @@ static int nvenc_setup_encoder(AVCodecContext *avctx)
715 715
         if (avctx->max_b_frames > 0) {
716 716
             /* 0 is intra-only,
717 717
              * 1 is I/P only,
718
-             * 2 is one B Frame,
719
-             * 3 two B frames, and so on. */
718
+             * 2 is one B-Frame,
719
+             * 3 two B-frames, and so on. */
720 720
             ctx->config.frameIntervalP = avctx->max_b_frames + 1;
721 721
         } else if (avctx->max_b_frames == 0) {
722 722
             ctx->config.frameIntervalP = 1;
... ...
@@ -804,7 +804,7 @@ static int nvenc_alloc_surface(AVCodecContext *avctx, int idx)
804 804
 
805 805
     out_buffer.version = NV_ENC_CREATE_BITSTREAM_BUFFER_VER;
806 806
     /* 1MB is large enough to hold most output frames.
807
-     * NVENC increases this automaticaly if it's not enough. */
807
+     * NVENC increases this automatically if it is not enough. */
808 808
     out_buffer.size = BITSTREAM_BUFFER_SIZE;
809 809
 
810 810
     out_buffer.memoryHeap = NV_ENC_MEMORY_HEAP_SYSMEM_UNCACHED;
... ...
@@ -129,7 +129,7 @@ typedef struct NVENCContext {
129 129
     enum AVPixelFormat data_pix_fmt;
130 130
 
131 131
     /* timestamps of the first two frames, for computing the first dts
132
-     * when b-frames are present */
132
+     * when B-frames are present */
133 133
     int64_t initial_pts[2];
134 134
     int first_packet_output;
135 135
 
... ...
@@ -92,7 +92,7 @@ static const AVCodecDefault defaults[] = {
92 92
 
93 93
 AVCodec ff_h264_nvenc_encoder = {
94 94
     .name           = "h264_nvenc",
95
-    .long_name      = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H264 encoder"),
95
+    .long_name      = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H.264 encoder"),
96 96
     .type           = AVMEDIA_TYPE_VIDEO,
97 97
     .id             = AV_CODEC_ID_H264,
98 98
     .init           = ff_nvenc_encode_init,
... ...
@@ -123,7 +123,7 @@ static const AVClass nvenc_h264_old_class = {
123 123
 
124 124
 AVCodec ff_nvenc_h264_encoder = {
125 125
     .name           = "nvenc_h264",
126
-    .long_name      = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H264 encoder"),
126
+    .long_name      = NULL_IF_CONFIG_SMALL("NVIDIA NVENC H.264 encoder"),
127 127
     .type           = AVMEDIA_TYPE_VIDEO,
128 128
     .id             = AV_CODEC_ID_H264,
129 129
     .init           = nvenc_old_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),
... ...
@@ -113,7 +113,7 @@ static const AVOption avcodec_options[] = {
113 113
 {"qmin", "minimum video quantizer scale (VBR)", OFFSET(qmin), AV_OPT_TYPE_INT, {.i64 = 2 }, -1, 69, V|E},
114 114
 {"qmax", "maximum video quantizer scale (VBR)", OFFSET(qmax), AV_OPT_TYPE_INT, {.i64 = 31 }, -1, 69, V|E},
115 115
 {"qdiff", "maximum difference between the quantizer scales (VBR)", OFFSET(max_qdiff), AV_OPT_TYPE_INT, {.i64 = 3 }, INT_MIN, INT_MAX, V|E},
116
-{"bf", "use 'frames' B frames", OFFSET(max_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, -1, INT_MAX, V|E},
116
+{"bf", "use 'frames' B-frames", OFFSET(max_b_frames), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, -1, INT_MAX, V|E},
117 117
 {"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},
118 118
 #if FF_API_RC_STRATEGY
119 119
 {"rc_strategy", "ratecontrol method", OFFSET(rc_strategy), AV_OPT_TYPE_INT, {.i64 = DEFAULT }, INT_MIN, INT_MAX, V|E},
... ...
@@ -264,7 +264,7 @@ int ff_opus_parse_packet(OpusPacket *pkt, const uint8_t *buf, int buf_size,
264 264
     } else {
265 265
         pkt->mode = OPUS_MODE_CELT;
266 266
         pkt->bandwidth = (pkt->config - 16) >> 2;
267
-        /* skip mediumband */
267
+        /* skip medium band */
268 268
         if (pkt->bandwidth)
269 269
             pkt->bandwidth++;
270 270
     }
... ...
@@ -396,7 +396,7 @@ av_cold int ff_opus_parse_extradata(AVCodecContext *avctx,
396 396
             return AVERROR_INVALIDDATA;
397 397
         }
398 398
 
399
-        /* check that we din't see this index yet */
399
+        /* check that we did not see this index yet */
400 400
         map->copy = 0;
401 401
         for (j = 0; j < i; j++)
402 402
             if (channel_map[channel_reorder(channels, j)] == idx) {
... ...
@@ -32,7 +32,7 @@ typedef struct PCMDVDContext {
32 32
     uint32_t last_header;    // Cached header to see if parsing is needed
33 33
     int block_size;          // Size of a block of samples in bytes
34 34
     int samples_per_block;   // Number of samples per channel per block
35
-    int groups_per_block;    // Number of 20/24bit sample groups per block
35
+    int groups_per_block;    // Number of 20/24-bit sample groups per block
36 36
     uint8_t *extra_samples;  // Pointer to leftover samples from a frame
37 37
     int extra_sample_count;  // Number of leftover samples in the buffer
38 38
 } PCMDVDContext;
... ...
@@ -102,7 +102,7 @@ static int pcm_dvd_parse_header(AVCodecContext *avctx, const uint8_t *header)
102 102
                       avctx->sample_rate *
103 103
                       avctx->bits_per_coded_sample;
104 104
 
105
-    /* 4 samples form a group in 20/24bit PCM on DVD Video.
105
+    /* 4 samples form a group in 20/24-bit PCM on DVD Video.
106 106
      * A block is formed by the number of groups that are
107 107
      * needed to complete a set of samples for each channel. */
108 108
     if (avctx->bits_per_coded_sample == 16) {
... ...
@@ -639,7 +639,7 @@ skip_tag:
639 639
         }
640 640
     }
641 641
 exit_loop:
642
-    /* handle p-frames only if a predecessor frame is available */
642
+    /* handle P-frames only if a predecessor frame is available */
643 643
     if (s->prev->data[0]) {
644 644
         if (!(avpkt->flags & AV_PKT_FLAG_KEY)) {
645 645
             int i, j;
... ...
@@ -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
 
... ...
@@ -600,7 +600,7 @@ static qcelp_packet_rate buf_size2bitrate(const int buf_size)
600 600
  *
601 601
  * @param avctx the AV codec context
602 602
  * @param buf_size length of the buffer
603
- * @param buf the bufffer
603
+ * @param buf the buffer
604 604
  *
605 605
  * @return the bitrate on success,
606 606
  *         I_F_Q  if the bitrate cannot be satisfactorily determined
... ...
@@ -392,7 +392,7 @@ static int qdm2_get_se_vlc(VLC *vlc, GetBitContext *gb, int depth)
392 392
 /**
393 393
  * QDM2 checksum
394 394
  *
395
- * @param data      pointer to data to be checksum'ed
395
+ * @param data      pointer to data to be checksummed
396 396
  * @param length    data length
397 397
  * @param value     checksum value
398 398
  *
... ...
@@ -1947,7 +1947,7 @@ static int qdm2_decode(QDM2Context *q, const uint8_t *in, int16_t *out)
1947 1947
 
1948 1948
     q->sub_packet = (q->sub_packet + 1) % 16;
1949 1949
 
1950
-    /* clip and convert output float[] to 16bit signed samples */
1950
+    /* clip and convert output float[] to 16-bit signed samples */
1951 1951
     for (i = 0; i < frame_size; i++) {
1952 1952
         int value = (int)q->output_buffer[i];
1953 1953
 
... ...
@@ -1,5 +1,5 @@
1 1
 /*
2
- * Intel MediaSDK QSV based MPEG2 decoder
2
+ * Intel MediaSDK QSV based MPEG-2 decoder
3 3
  *
4 4
  * copyright (c) 2015 Anton Khirnov
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 Libav.
6 6
  *
... ...
@@ -130,7 +130,7 @@ static void qtrle_encode_line(QtrleEncContext *s, const AVFrame *p, int line, ui
130 130
 
131 131
     /* We will use it to compute the best bulk copy sequence */
132 132
     unsigned int bulkcount;
133
-    /* This will be the number of pixels equal to the preivous frame one's
133
+    /* This will be the number of pixels equal to the previous frame one's
134 134
      * starting from the ith pixel */
135 135
     unsigned int skipcount;
136 136
     /* This will be the number of consecutive equal pixels in the current
... ...
@@ -214,7 +214,7 @@ static void qtrle_encode_line(QtrleEncContext *s, const AVFrame *p, int line, ui
214 214
         prev_line -= s->pixel_size;
215 215
     }
216 216
 
217
-    /* Good ! Now we have the best sequence for this line, let's ouput it */
217
+    /* Good! Now we have the best sequence for this line, let's output it. */
218 218
 
219 219
     /* We do a special case for the first pixel so that we avoid testing it in
220 220
      * 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 Libav.
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 Libav.
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 Libav.
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 Libav.
6 6
  *
... ...
@@ -175,8 +175,8 @@ FF_ENABLE_DEPRECATION_WARNINGS
175 175
         if (!rcc->entry)
176 176
             return AVERROR(ENOMEM);
177 177
 
178
-        /* init all to skipped p frames
179
-         * (with b frames we might have a not encoded frame at the end FIXME) */
178
+        /* init all to skipped P-frames
179
+         * (with B-frames we might have a not encoded frame at the end FIXME) */
180 180
         for (i = 0; i < rcc->num_entries; i++) {
181 181
             RateControlEntry *rce = &rcc->entry[i];
182 182
 
... ...
@@ -196,7 +196,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
196 196
 
197 197
             next = strchr(p, ';');
198 198
             if (next) {
199
-                (*next) = 0; // sscanf in unbelievably slow on looong strings // FIXME copy / do not write
199
+                (*next) = 0; // sscanf is unbelievably slow on looong strings // FIXME copy / do not write
200 200
                 next++;
201 201
             }
202 202
             e = sscanf(p, " in:%d ", &picture_number);
... ...
@@ -638,9 +638,9 @@ static void adaptive_quantization(MpegEncContext *s, double q)
638 638
         int mb_distance;
639 639
         float mb_factor = 0.0;
640 640
         if (spat_cplx < 4)
641
-            spat_cplx = 4;              // FIXME finetune
641
+            spat_cplx = 4;              // FIXME fine-tune
642 642
         if (temp_cplx < 4)
643
-            temp_cplx = 4;              // FIXME finetune
643
+            temp_cplx = 4;              // FIXME fine-tune
644 644
 
645 645
         if ((s->mb_type[mb_xy] & CANDIDATE_MB_TYPE_INTRA)) { // FIXME hq mode
646 646
             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
     int last_mc_mb_var_sum;
... ...
@@ -64,7 +64,7 @@ static av_always_inline void fill_rectangle(void *vp, int w, int h, int stride,
64 64
         *(uint32_t*)(p + 2*stride)= v;
65 65
         *(uint32_t*)(p + 3*stride)= v;
66 66
     }else if(w==8){
67
-    //gcc can't optimize 64bit math on x86_32
67
+    // gcc cannot optimize 64-bit math on x86_32
68 68
 #if HAVE_FAST_64BIT
69 69
         const uint64_t v=  size==2 ? val*0x0001000100010001ULL : val*0x0100000001ULL;
70 70
         *(uint64_t*)(p + 0*stride)= v;
... ...
@@ -53,7 +53,7 @@ typedef struct Rl2Context {
53 53
  * @param s rl2 context
54 54
  * @param in input buffer
55 55
  * @param size input buffer size
56
- * @param out ouput buffer
56
+ * @param out output buffer
57 57
  * @param stride stride of the output buffer
58 58
  * @param video_base offset of the rle data inside the frame
59 59
  */
... ...
@@ -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 Libav.
5 5
  *
... ...
@@ -1080,7 +1080,7 @@ static int roq_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
1080 1080
     }
1081 1081
     enc->out_buf = pkt->data;
1082 1082
 
1083
-    /* Check for I frame */
1083
+    /* Check for I-frame */
1084 1084
     if (enc->framesSinceKeyframe == avctx->gop_size)
1085 1085
         enc->framesSinceKeyframe = 0;
1086 1086
 
... ...
@@ -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 Libav.
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
 
... ...
@@ -413,7 +413,7 @@ static int rv20_decode_picture_header(RVDecContext *rv)
413 413
             if (s->pp_time <= s->pb_time ||
414 414
                 s->pp_time <= s->pp_time - s->pb_time || s->pp_time <= 0) {
415 415
                 av_log(s->avctx, AV_LOG_DEBUG, "messed up order, possible "
416
-                       "from seeking? skipping current b frame\n");
416
+                       "from seeking? skipping current B-frame\n");
417 417
                 return FRAME_SKIPPED;
418 418
             }
419 419
             ff_mpeg4_init_direct_mv(s);
... ...
@@ -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
 
... ...
@@ -58,7 +58,7 @@ static const uint8_t rv30_itype_code[9*9*2] = {
58 58
  *
59 59
  * This is really a three-dimensional matrix with dimensions
60 60
  * [-1..9][-1..9][0..9]. The first and second coordinates are
61
- * detemined by the top and left neighbors (-1 if unavailable).
61
+ * determined by the top and left neighbors (-1 if unavailable).
62 62
  */
63 63
 static const uint8_t rv30_itype_from_context[900] = {
64 64
     0, 9, 9, 9, 9, 9, 9, 9, 9,
... ...
@@ -215,7 +215,7 @@ static int rv34_decode_cbp(GetBitContext *gb, RV34VLC *vlc, int table)
215 215
 }
216 216
 
217 217
 /**
218
- * Get one coefficient value from the bistream and store it.
218
+ * Get one coefficient value from the bitstream and store it.
219 219
  */
220 220
 static inline void decode_coeff(int16_t *dst, int coef, int esc, GetBitContext *gb, VLC* vlc, int q)
221 221
 {
... ...
@@ -1464,7 +1464,7 @@ static int rv34_decode_slice(RV34DecContext *r, int end, const uint8_t* buf, int
1464 1464
     return s->mb_y == s->mb_height;
1465 1465
 }
1466 1466
 
1467
-/** @} */ // recons group end
1467
+/** @} */ // reconstruction group end
1468 1468
 
1469 1469
 /**
1470 1470
  * 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 rpr;                 ///< one field size in RV30 slice header
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
     uint16_t *cbp_luma;      ///< CBP values for luma subblocks
... ...
@@ -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 Libav.
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 Libav.
6 6
  *
... ...
@@ -4,7 +4,7 @@
4 4
  * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>
5 5
  *
6 6
  * Copyright (C) 2002 the xine project
7
- * Copyright (C) 2002 the ffmpeg project
7
+ * Copyright (C) 2002 The FFmpeg project
8 8
  *
9 9
  * SVQ1 Encoder (c) 2004 Mike Melanson <melanson@pcisys.net>
10 10
  *
... ...
@@ -4,7 +4,7 @@
4 4
  * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>
5 5
  *
6 6
  * Copyright (C) 2002 the xine project
7
- * Copyright (C) 2002 the ffmpeg project
7
+ * Copyright (C) 2002 The FFmpeg project
8 8
  *
9 9
  * SVQ1 Encoder (c) 2004 Mike Melanson <melanson@pcisys.net>
10 10
  *
... ...
@@ -4,7 +4,7 @@
4 4
  * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>
5 5
  *
6 6
  * Copyright (C) 2002 the xine project
7
- * Copyright (C) 2002 the ffmpeg project
7
+ * Copyright (C) 2002 The FFmpeg project
8 8
  *
9 9
  * This file is part of Libav.
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 Libav.
5 5
  *
... ...
@@ -4,7 +4,7 @@
4 4
  * ported to libavcodec by Nick Kurshev <nickols_k@mail.ru>
5 5
  *
6 6
  * Copyright (C) 2002 the xine project
7
- * Copyright (C) 2002 the ffmpeg project
7
+ * Copyright (C) 2002 The FFmpeg project
8 8
  *
9 9
  * SVQ1 Encoder (c) 2004 Mike Melanson <melanson@pcisys.net>
10 10
  *
... ...
@@ -150,7 +150,7 @@ static int encode_block(SVQ1EncContext *s, uint8_t *src, uint8_t *ref,
150 150
                 vector = codebook + stage * size * 16 + i * size;
151 151
                 sqr    = s->ssd_int8_vs_int16(vector, block[stage], size);
152 152
                 diff   = block_sum[stage] - sum;
153
-                score  = sqr - (diff * (int64_t)diff >> (level + 3)); // FIXME: 64bit slooow
153
+                score  = sqr - (diff * (int64_t)diff >> (level + 3)); // FIXME: 64 bits slooow
154 154
                 if (score < best_vector_score) {
155 155
                     int mean = diff + (size >> 1) >> (level + 3);
156 156
                     assert(mean > -300 && mean < 300);
... ...
@@ -135,7 +135,7 @@ typedef struct SVQ3Context {
135 135
 #define THIRDPEL_MODE 3
136 136
 #define PREDICT_MODE  4
137 137
 
138
-/* dual scan (from some older h264 draft)
138
+/* dual scan (from some older H.264 draft)
139 139
  * o-->o-->o   o
140 140
  *         |  /|
141 141
  * 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],
... ...
@@ -166,7 +166,7 @@ static inline void dxt3_block_internal(uint8_t *dst, ptrdiff_t stride,
166 166
     }
167 167
 }
168 168
 
169
-/** Convert a premultiplied alpha pixel to a straigth alpha pixel. */
169
+/** Convert a premultiplied alpha pixel to a straight alpha pixel. */
170 170
 static av_always_inline void premult2straight(uint8_t *src)
171 171
 {
172 172
     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)
... ...
@@ -611,7 +611,7 @@ static int utvideo_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
611 611
     }
612 612
 
613 613
     /*
614
-     * Write frame information (LE 32bit unsigned)
614
+     * Write frame information (LE 32-bit unsigned)
615 615
      * into the output packet.
616 616
      * Contains the prediction method.
617 617
      */
... ...
@@ -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;
... ...
@@ -793,7 +793,7 @@ static av_cold int vaapi_encode_h264_init_fixed_qp(AVCodecContext *avctx)
793 793
         priv->fixed_qp_b = priv->fixed_qp_p;
794 794
 
795 795
     av_log(avctx, AV_LOG_DEBUG, "Using fixed QP = "
796
-           "%d / %d / %d for IDR / P / B frames.\n",
796
+           "%d / %d / %d for IDR- / P- / B-frames.\n",
797 797
            priv->fixed_qp_idr, priv->fixed_qp_p, priv->fixed_qp_b);
798 798
     return 0;
799 799
 }
... ...
@@ -930,7 +930,7 @@ static av_cold int vaapi_encode_h264_init(AVCodecContext *avctx)
930 930
                    offsetof(VAAPIEncodeH264Options, x))
931 931
 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
932 932
 static const AVOption vaapi_encode_h264_options[] = {
933
-    { "qp", "Constant QP (for P frames; scaled by qfactor/qoffset for I/B)",
933
+    { "qp", "Constant QP (for P-frames; scaled by qfactor/qoffset for I/B)",
934 934
       OFFSET(qp), AV_OPT_TYPE_INT, { .i64 = 20 }, 0, 52, FLAGS },
935 935
     { "quality", "Set encode quality (trades off against speed, higher is faster)",
936 936
       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;
... ...
@@ -1220,7 +1220,7 @@ static av_cold int vaapi_encode_h265_init_fixed_qp(AVCodecContext *avctx)
1220 1220
         priv->fixed_qp_b = priv->fixed_qp_p;
1221 1221
 
1222 1222
     av_log(avctx, AV_LOG_DEBUG, "Using fixed QP = "
1223
-           "%d / %d / %d for IDR / P / B frames.\n",
1223
+           "%d / %d / %d for IDR- / P- / B-frames.\n",
1224 1224
            priv->fixed_qp_idr, priv->fixed_qp_p, priv->fixed_qp_b);
1225 1225
     return 0;
1226 1226
 }
... ...
@@ -1321,7 +1321,7 @@ static av_cold int vaapi_encode_h265_init(AVCodecContext *avctx)
1321 1321
                    offsetof(VAAPIEncodeH265Options, x))
1322 1322
 #define FLAGS (AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM)
1323 1323
 static const AVOption vaapi_encode_h265_options[] = {
1324
-    { "qp", "Constant QP (for P frames; scaled by qfactor/qoffset for I/B)",
1324
+    { "qp", "Constant QP (for P-frames; scaled by qfactor/qoffset for I/B)",
1325 1325
       OFFSET(qp), AV_OPT_TYPE_INT, { .i64 = 25 }, 0, 52, FLAGS },
1326 1326
     { NULL },
1327 1327
 };
... ...
@@ -401,7 +401,7 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo
401 401
            "Profile %i:\nfrmrtq_postproc=%i, bitrtq_postproc=%i\n"
402 402
            "LoopFilter=%i, MultiRes=%i, FastUVMC=%i, Extended MV=%i\n"
403 403
            "Rangered=%i, VSTransform=%i, Overlap=%i, SyncMarker=%i\n"
404
-           "DQuant=%i, Quantizer mode=%i, Max B frames=%i\n",
404
+           "DQuant=%i, Quantizer mode=%i, Max B-frames=%i\n",
405 405
            v->profile, v->frmrtq_postproc, v->bitrtq_postproc,
406 406
            v->s.loop_filter, v->multires, v->fastuvmc, v->extended_mv,
407 407
            v->rangered, v->vstransform, v->overlap, v->resync_marker,
... ...
@@ -753,7 +753,7 @@ int ff_vc1_parse_frame_header(VC1Context *v, GetBitContext* gb)
753 753
         av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: "
754 754
                "Imode: %i, Invert: %i\n", status>>1, status&1);
755 755
 
756
-        /* Hopefully this is correct for P frames */
756
+        /* Hopefully this is correct for P-frames */
757 757
         v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables
758 758
         v->cbpcy_vlc = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)];
759 759
 
... ...
@@ -1136,7 +1136,7 @@ int ff_vc1_parse_frame_header_adv(VC1Context *v, GetBitContext* gb)
1136 1136
             av_log(v->s.avctx, AV_LOG_DEBUG, "MB Skip plane encoding: "
1137 1137
                    "Imode: %i, Invert: %i\n", status>>1, status&1);
1138 1138
 
1139
-            /* Hopefully this is correct for P frames */
1139
+            /* Hopefully this is correct for P-frames */
1140 1140
             v->s.mv_table_index = get_bits(gb, 2); //but using ff_vc1_ tables
1141 1141
             v->cbpcy_vlc        = &ff_vc1_cbpcy_p_vlc[get_bits(gb, 2)];
1142 1142
         } 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,
... ...
@@ -179,18 +179,18 @@ typedef struct VC1Context{
179 179
 
180 180
     /** Advanced Profile */
181 181
     //@{
182
-    int level;            ///< 3bits, for Advanced/Simple Profile, provided by TS layer
183
-    int chromaformat;     ///< 2bits, 2=4:2:0, only defined
182
+    int level;            ///< 3 bits, for Advanced/Simple Profile, provided by TS layer
183
+    int chromaformat;     ///< 2 bits, 2=4:2:0, only defined
184 184
     int postprocflag;     ///< Per-frame processing suggestion flag present
185 185
     int broadcast;        ///< TFF/RFF present
186 186
     int interlace;        ///< Progressive/interlaced (RPTFTM syntax element)
187 187
     int tfcntrflag;       ///< TFCNTR present
188 188
     int panscanflag;      ///< NUMPANSCANWIN, TOPLEFT{X,Y}, BOTRIGHT{X,Y} present
189 189
     int refdist_flag;     ///< REFDIST syntax element present in II, IP, PI or PP field picture headers
190
-    int extended_dmv;     ///< Additional extended dmv range at P/B frame-level
191
-    int color_prim;       ///< 8bits, chroma coordinates of the color primaries
192
-    int transfer_char;    ///< 8bits, Opto-electronic transfer characteristics
193
-    int matrix_coef;      ///< 8bits, Color primaries->YCbCr transform matrix
190
+    int extended_dmv;     ///< Additional extended dmv range at P/B-frame-level
191
+    int color_prim;       ///< 8 bits, chroma coordinates of the color primaries
192
+    int transfer_char;    ///< 8 bits, Opto-electronic transfer characteristics
193
+    int matrix_coef;      ///< 8 bits, Color primaries->YCbCr transform matrix
194 194
     int hrd_param_flag;   ///< Presence of Hypothetical Reference
195 195
                           ///< Decoder parameters
196 196
     int psf;              ///< Progressive Segmented Frame
... ...
@@ -200,22 +200,22 @@ typedef struct VC1Context{
200 200
      * TODO: choose between ints, uint8_ts and monobit flags
201 201
      */
202 202
     //@{
203
-    int profile;          ///< 2bits, Profile
204
-    int frmrtq_postproc;  ///< 3bits,
205
-    int bitrtq_postproc;  ///< 5bits, quantized framerate-based postprocessing strength
203
+    int profile;          ///< 2 bits, Profile
204
+    int frmrtq_postproc;  ///< 3 bits
205
+    int bitrtq_postproc;  ///< 5 bits, quantized framerate-based postprocessing strength
206 206
     int fastuvmc;         ///< Rounding of qpel vector to hpel ? (not in Simple)
207 207
     int extended_mv;      ///< Ext MV in P/B (not in Simple)
208
-    int dquant;           ///< How qscale varies with MBs, 2bits (not in Simple)
208
+    int dquant;           ///< How qscale varies with MBs, 2 bits (not in Simple)
209 209
     int vstransform;      ///< variable-size [48]x[48] transform type + info
210 210
     int overlap;          ///< overlapped transforms in use
211
-    int quantizer_mode;   ///< 2bits, quantizer mode used for sequence, see QUANT_*
211
+    int quantizer_mode;   ///< 2 bits, quantizer mode used for sequence, see QUANT_*
212 212
     int finterpflag;      ///< INTERPFRM present
213 213
     //@}
214 214
 
215 215
     /** Frame decoding info for all profiles */
216 216
     //@{
217
-    uint8_t mv_mode;             ///< MV coding monde
218
-    uint8_t mv_mode2;            ///< Secondary MV coding mode (B frames)
217
+    uint8_t mv_mode;             ///< MV coding mode
218
+    uint8_t mv_mode2;            ///< Secondary MV coding mode (B-frames)
219 219
     int k_x;                     ///< Number of bits for MVs (depends on MV range)
220 220
     int k_y;                     ///< Number of bits for MVs (depends on MV range)
221 221
     int range_x, range_y;        ///< MV range
... ...
@@ -1602,7 +1602,7 @@ static int vc1_decode_p_mb_intfr(VC1Context *v)
1602 1602
     int idx_mbmode = 0, mvbp;
1603 1603
     int stride_y, fieldtx;
1604 1604
 
1605
-    mquant = v->pq; /* Loosy initialization */
1605
+    mquant = v->pq; /* Lossy initialization */
1606 1606
 
1607 1607
     if (v->skip_is_raw)
1608 1608
         skipped = get_bits1(gb);
... ...
@@ -1814,7 +1814,7 @@ static int vc1_decode_p_mb_intfi(VC1Context *v)
1814 1814
     int block_cbp = 0, pat, block_tt = 0;
1815 1815
     int idx_mbmode = 0;
1816 1816
 
1817
-    mquant = v->pq; /* Loosy initialization */
1817
+    mquant = v->pq; /* Lossy initialization */
1818 1818
 
1819 1819
     idx_mbmode = get_vlc2(gb, v->mbmode_vlc->table, VC1_IF_MBMODE_VLC_BITS, 2);
1820 1820
     if (idx_mbmode <= 1) { // intra MB
... ...
@@ -2091,7 +2091,7 @@ static void vc1_decode_b_mb_intfi(VC1Context *v)
2091 2091
     int bmvtype = BMV_TYPE_BACKWARD;
2092 2092
     int idx_mbmode, interpmvp;
2093 2093
 
2094
-    mquant      = v->pq; /* Loosy initialization */
2094
+    mquant      = v->pq; /* Lossy initialization */
2095 2095
     s->mb_intra = 0;
2096 2096
 
2097 2097
     idx_mbmode = get_vlc2(gb, v->mbmode_vlc->table, VC1_IF_MBMODE_VLC_BITS, 2);
... ...
@@ -2583,7 +2583,7 @@ static void vc1_decode_i_blocks(VC1Context *v)
2583 2583
     uint8_t *coded_val;
2584 2584
     int mb_pos;
2585 2585
 
2586
-    /* select codingmode used for VLC tables selection */
2586
+    /* select coding mode used for VLC tables selection */
2587 2587
     switch (v->y_ac_table_index) {
2588 2588
     case 0:
2589 2589
         v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
... ...
@@ -2731,7 +2731,7 @@ static void vc1_decode_i_blocks_adv(VC1Context *v)
2731 2731
     int mqdiff;
2732 2732
     GetBitContext *gb = &s->gb;
2733 2733
 
2734
-    /* select codingmode used for VLC tables selection */
2734
+    /* select coding mode used for VLC tables selection */
2735 2735
     switch (v->y_ac_table_index) {
2736 2736
     case 0:
2737 2737
         v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
... ...
@@ -2860,7 +2860,7 @@ static void vc1_decode_p_blocks(VC1Context *v)
2860 2860
     MpegEncContext *s = &v->s;
2861 2861
     int apply_loop_filter;
2862 2862
 
2863
-    /* select codingmode used for VLC tables selection */
2863
+    /* select coding mode used for VLC tables selection */
2864 2864
     switch (v->c_ac_table_index) {
2865 2865
     case 0:
2866 2866
         v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
... ...
@@ -2935,7 +2935,7 @@ static void vc1_decode_b_blocks(VC1Context *v)
2935 2935
 {
2936 2936
     MpegEncContext *s = &v->s;
2937 2937
 
2938
-    /* select codingmode used for VLC tables selection */
2938
+    /* select coding mode used for VLC tables selection */
2939 2939
     switch (v->c_ac_table_index) {
2940 2940
     case 0:
2941 2941
         v->codingset = (v->pqindex <= 8) ? CS_HIGH_RATE_INTRA : CS_LOW_MOT_INTRA;
... ...
@@ -54,7 +54,7 @@ void ff_vc1_mc_1mv(VC1Context *v, int dir)
54 54
     mx = s->mv[dir][0][0];
55 55
     my = s->mv[dir][0][1];
56 56
 
57
-    // store motion vectors for further use in B frames
57
+    // store motion vectors for further use in B-frames
58 58
     if (s->pict_type == AV_PICTURE_TYPE_P) {
59 59
         for (i = 0; i < 4; i++) {
60 60
             s->current_picture.motion_val[1][s->block_index[i] + v->blocks_off][0] = mx;
... ...
@@ -936,7 +936,7 @@ void ff_vc1_interp_mc(VC1Context *v)
936 936
 
937 937
     if (s->avctx->flags & AV_CODEC_FLAG_GRAY)
938 938
         return;
939
-    /* Chroma MC always uses qpel blilinear */
939
+    /* Chroma MC always uses qpel bilinear */
940 940
     uvmx = (uvmx & 3) << 1;
941 941
     uvmy = (uvmy & 3) << 1;
942 942
     if (!v->rnd) {
... ...
@@ -470,7 +470,7 @@ void ff_vc1_pred_mv_intfr(VC1Context *v, int n, int dmv_x, int dmv_y,
470 470
     int A[2], B[2], C[2];
471 471
     int px = 0, py = 0;
472 472
     int a_valid = 0, b_valid = 0, c_valid = 0;
473
-    int field_a, field_b, field_c; // 0: same, 1: opposit
473
+    int field_a, field_b, field_c; // 0: same, 1: opposite
474 474
     int total_valid, num_samefield, num_oppfield;
475 475
     int pos_c, pos_b, n_adj;
476 476
 
... ...
@@ -409,7 +409,7 @@ av_cold void ff_vc1_init_transposed_scantables(VC1Context *v)
409 409
 
410 410
 /** Initialize a VC1/WMV3 decoder
411 411
  * @todo TODO: Handle VC-1 IDUs (Transport level?)
412
- * @todo TODO: Decypher remaining bits in extra_data
412
+ * @todo TODO: Decipher remaining bits in extra_data
413 413
  */
414 414
 static av_cold int vc1_decode_init(AVCodecContext *avctx)
415 415
 {
... ...
@@ -158,7 +158,7 @@ int ff_vda_create_decoder(struct vda_context *vda_ctx,
158 158
     CFMutableDictionaryRef io_surface_properties;
159 159
     CFNumberRef cv_pix_fmt;
160 160
 
161
-    /* Each VCL NAL in the bistream sent to the decoder
161
+    /* Each VCL NAL in the bitstream sent to the decoder
162 162
      * is preceded by a 4 bytes length header.
163 163
      * Change the avcC atom header if needed, to signal headers of 4 bytes. */
164 164
     if (extradata_size >= 4 && (extradata[4] & 0x03) != 0x03) {
... ...
@@ -384,7 +384,7 @@ int ff_vda_default_init(AVCodecContext *avctx)
384 384
 
385 385
     // kCVPixelFormatType_420YpCbCr8Planar;
386 386
 
387
-    /* Each VCL NAL in the bistream sent to the decoder
387
+    /* Each VCL NAL in the bitstream sent to the decoder
388 388
      * is preceded by a 4 bytes length header.
389 389
      * Change the avcC atom header if needed, to signal headers of 4 bytes. */
390 390
     if (avctx->extradata_size >= 4 && (avctx->extradata[4] & 0x03) != 0x03) {
... ...
@@ -138,7 +138,7 @@ typedef struct AVVDPAUContext {
138 138
  * display preemption).
139 139
  *
140 140
  * @note get_format() must return AV_PIX_FMT_VDPAU if this function completes
141
- * succesfully.
141
+ * successfully.
142 142
  *
143 143
  * @param avctx decoding context whose get_format() callback is invoked
144 144
  * @param device VDPAU device handle to use for hardware acceleration
... ...
@@ -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 Libav.
5 5
  *
... ...
@@ -932,14 +932,14 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
932 932
     int num_coeffs      = s->num_coded_frags[plane][coeff_index];
933 933
     int16_t *dct_tokens = s->dct_tokens[plane][coeff_index];
934 934
 
935
-    /* local references to structure members to avoid repeated deferences */
935
+    /* local references to structure members to avoid repeated dereferences */
936 936
     int *coded_fragment_list   = s->coded_fragment_list[plane];
937 937
     Vp3Fragment *all_fragments = s->all_fragments;
938 938
     VLC_TYPE(*vlc_table)[2] = table->table;
939 939
 
940 940
     if (num_coeffs < 0)
941 941
         av_log(s->avctx, AV_LOG_ERROR,
942
-               "Invalid number of coefficents at level %d\n", coeff_index);
942
+               "Invalid number of coefficients at level %d\n", coeff_index);
943 943
 
944 944
     if (eob_run > num_coeffs) {
945 945
         coeff_i      =
... ...
@@ -1021,7 +1021,7 @@ static int unpack_vlcs(Vp3DecodeContext *s, GetBitContext *gb,
1021 1021
     if (blocks_ended > s->num_coded_frags[plane][coeff_index])
1022 1022
         av_log(s->avctx, AV_LOG_ERROR, "More blocks ended than coded!\n");
1023 1023
 
1024
-    // decrement the number of blocks that have higher coeffecients for each
1024
+    // decrement the number of blocks that have higher coefficients for each
1025 1025
     // EOB run at this level
1026 1026
     if (blocks_ended)
1027 1027
         for (i = coeff_index + 1; i < 64; i++)
... ...
@@ -1110,7 +1110,7 @@ static int unpack_dct_coeffs(Vp3DecodeContext *s, GetBitContext *gb)
1110 1110
         c_tables[i] = &s->ac_vlc_4[ac_c_table];
1111 1111
     }
1112 1112
 
1113
-    /* decode all AC coefficents */
1113
+    /* decode all AC coefficients */
1114 1114
     for (i = 1; i <= 63; i++) {
1115 1115
         residual_eob_run = unpack_vlcs(s, gb, y_tables[i], i,
1116 1116
                                        0, residual_eob_run);
... ...
@@ -1308,7 +1308,7 @@ static void apply_loop_filter(Vp3DecodeContext *s, int plane,
1308 1308
         for (x = 0; x < width; x++) {
1309 1309
             /* This code basically just deblocks on the edges of coded blocks.
1310 1310
              * However, it has to be much more complicated because of the
1311
-             * braindamaged deblock ordering used in VP3/Theora. Order matters
1311
+             * brain damaged deblock ordering used in VP3/Theora. Order matters
1312 1312
              * because some pixels get filtered twice. */
1313 1313
             if (s->all_fragments[fragment].coding_method != MODE_COPY) {
1314 1314
                 /* do not perform left edge filter for left columns frags */
... ...
@@ -1581,7 +1581,7 @@ static void render_slice(Vp3DecodeContext *s, int slice)
1581 1581
                             /* Note, it is possible to implement all MC cases
1582 1582
                              * with put_no_rnd_pixels_l2 which would look more
1583 1583
                              * like the VP3 source but this would be slower as
1584
-                             * put_no_rnd_pixels_tab is better optimzed */
1584
+                             * put_no_rnd_pixels_tab is better optimized */
1585 1585
                             if (motion_halfpel_index != 3) {
1586 1586
                                 s->hdsp.put_no_rnd_pixels_tab[1][motion_halfpel_index](
1587 1587
                                     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 Libav.
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 Libav.
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
 
... ...
@@ -141,7 +141,7 @@ typedef struct VP9DSPContext {
141 141
      */
142 142
     // FIXME(rbultje) maybe replace left/top pointers with HAVE_TOP/
143 143
     // HAVE_LEFT/HAVE_TOPRIGHT flags instead, and then handle it in-place?
144
-    // also needs to fit in with what h264/vp8/etc do
144
+    // also needs to fit in with what H.264/VP8/etc do
145 145
     void (*intra_pred[N_TXFM_SIZES][N_INTRA_PRED_MODES])(uint8_t *dst,
146 146
                                                          ptrdiff_t stride,
147 147
                                                          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 Libav.
6 6
  *
... ...
@@ -421,7 +421,7 @@ unsigned int ff_wma_get_large_val(GetBitContext *gb)
421 421
  * @param version 0 for wma1,2 1 for wmapro
422 422
  * @param ptr output buffer
423 423
  * @param offset offset in the output buffer
424
- * @param num_coefs number of input coefficents
424
+ * @param num_coefs number of input coefficients
425 425
  * @param block_len input buffer length (2^n)
426 426
  * @param frame_len_bits number of bits for escaped run codes
427 427
  * @param coef_nb_bits number of bits for escaped level codes
... ...
@@ -79,7 +79,7 @@ static av_cold int wma_decode_init(AVCodecContext *avctx)
79 79
 
80 80
     s->avctx = avctx;
81 81
 
82
-    /* extract flag infos */
82
+    /* extract flag info */
83 83
     flags2    = 0;
84 84
     extradata = avctx->extradata;
85 85
     if (avctx->codec->id == AV_CODEC_ID_WMAV1 && avctx->extradata_size >= 4)
... ...
@@ -338,7 +338,7 @@ static int decode_exp_vlc(WMACodecContext *s, int ch)
338 338
             av_log(s->avctx, AV_LOG_ERROR, "Exponent vlc invalid\n");
339 339
             return -1;
340 340
         }
341
-        /* NOTE: this offset is the same as MPEG4 AAC ! */
341
+        /* NOTE: this offset is the same as MPEG-4 AAC! */
342 342
         last_exp += code - 60;
343 343
         if ((unsigned) last_exp + 60 >= FF_ARRAY_ELEMS(pow_tab)) {
344 344
             av_log(s->avctx, AV_LOG_ERROR, "Exponent out of range: %d\n",
... ...
@@ -415,7 +415,7 @@ static void wma_window(WMACodecContext *s, float *out)
415 415
 
416 416
 /**
417 417
  * @return 0 if OK. 1 if last block of frame. return -1 if
418
- * unrecorrable error.
418
+ * unrecoverable error.
419 419
  */
420 420
 static int wma_decode_block(WMACodecContext *s)
421 421
 {
... ...
@@ -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) {
... ...
@@ -101,8 +101,8 @@ typedef struct WmallDecodeCtx {
101 101
     uint32_t        frame_num;                      ///< current frame number (not used for decoding)
102 102
     GetBitContext   gb;                             ///< bitstream reader context
103 103
     int             buf_bit_size;                   ///< buffer size in bits
104
-    int16_t         *samples_16[WMALL_MAX_CHANNELS]; ///< current samplebuffer pointer (16-bit)
105
-    int32_t         *samples_32[WMALL_MAX_CHANNELS]; ///< current samplebuffer pointer (24-bit)
104
+    int16_t         *samples_16[WMALL_MAX_CHANNELS]; ///< current sample buffer pointer (16-bit)
105
+    int32_t         *samples_32[WMALL_MAX_CHANNELS]; ///< current sample buffer pointer (24-bit)
106 106
     uint8_t         drc_gain;                       ///< gain for the DRC tool
107 107
     int8_t          skip_frame;                     ///< skip output step
108 108
     int8_t          parsed_all_subframes;           ///< all subframes decoded?
... ...
@@ -1192,7 +1192,7 @@ static int decode_packet(AVCodecContext *avctx, void *data, int *got_frame_ptr,
1192 1192
         /* parse packet header */
1193 1193
         init_get_bits(gb, buf, s->buf_bit_size);
1194 1194
         packet_sequence_number = get_bits(gb, 4);
1195
-        skip_bits(gb, 1);   // Skip seekable_frame_in_packet, currently ununused
1195
+        skip_bits(gb, 1);   // Skip seekable_frame_in_packet, currently unused
1196 1196
         spliced_packet = get_bits1(gb);
1197 1197
         if (spliced_packet)
1198 1198
             avpriv_request_sample(avctx, "Bitstream splicing");
... ...
@@ -1455,7 +1455,7 @@ static void save_bits(WMAProDecodeCtx *s, GetBitContext* gb, int len,
1455 1455
     int buflen;
1456 1456
 
1457 1457
     /** when the frame data does not need to be concatenated, the input buffer
1458
-        is resetted and additional bits from the previous frame are copyed
1458
+        is reset and additional bits from the previous frame are copied
1459 1459
         and skipped later so that a fast byte copy is possible */
1460 1460
 
1461 1461
     if (!append) {
... ...
@@ -1195,7 +1195,7 @@ static void aw_pulse_set1(WMAVoiceContext *s, GetBitContext *gb,
1195 1195
 /**
1196 1196
  * @}
1197 1197
  *
1198
- * Generate a random number from frame_cntr and block_idx, which will lief
1198
+ * Generate a random number from frame_cntr and block_idx, which will live
1199 1199
  * in the range [0, 1000 - block_size] (so it can be used as an index in a
1200 1200
  * table of size 1000 of which you want to read block_size entries).
1201 1201
  *
... ...
@@ -1518,7 +1518,7 @@ static int synth_frame(AVCodecContext *ctx, GetBitContext *gb, int frame_idx,
1518 1518
             /* Pitch is given per block. Per-block pitches are encoded as an
1519 1519
              * absolute value for the first block, and then delta values
1520 1520
              * relative to this value) for all subsequent blocks. The scale of
1521
-             * this pitch value is semi-logaritmic compared to its use in the
1521
+             * this pitch value is semi-logarithmic compared to its use in the
1522 1522
              * decoder, so we convert it to normal scale also. */
1523 1523
             int block_pitch,
1524 1524
                 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;
... ...
@@ -42,7 +42,7 @@
42 42
         "sub    "tmp"       , "low"                        \n\t"
43 43
 #else /* HAVE_FAST_CMOV */
44 44
 #define BRANCHLESS_GET_CABAC_UPDATE(ret, retq, low, range, tmp) \
45
-/* P4 Prescott has crappy cmov,sbb,64bit shift so avoid them */ \
45
+/* P4 Prescott has crappy cmov,sbb,64-bit shift so avoid them */ \
46 46
         "sub    "low"       , "tmp"                        \n\t"\
47 47
         "sar    $31         , "tmp"                        \n\t"\
48 48
         "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 Libav.
6 6
  *
... ...
@@ -179,7 +179,7 @@ static void dct_unquantize_mpeg1_intra_mmx(MpegEncContext *s,
179 179
         block0 = block[0] * s->y_dc_scale;
180 180
     else
181 181
         block0 = block[0] * s->c_dc_scale;
182
-    /* XXX: only mpeg1 */
182
+    /* XXX: only MPEG-1 */
183 183
     quant_matrix = s->intra_matrix;
184 184
 __asm__ volatile(
185 185
                 "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
... ...
@@ -81,7 +81,7 @@
81 81
     "movq      %%mm"#R1", "#OFF"(%1)   \n\t"    \
82 82
     "add       %2, %0                  \n\t"
83 83
 
84
-/** Sacrifying mm6 allows to pipeline loads from src */
84
+/** Sacrificing mm6 allows to pipeline loads from src */
85 85
 static void vc1_put_ver_16b_shift2_mmx(int16_t *dst,
86 86
                                        const uint8_t *src, x86_reg stride,
87 87
                                        int rnd, int64_t shift)
... ...
@@ -165,7 +165,7 @@ VC1_HOR_16b_SHIFT2(OP_AVG, avg_)
165 165
 
166 166
 /**
167 167
  * Purely vertical or horizontal 1/2 shift interpolation.
168
- * Sacrify mm6 for *9 factor.
168
+ * Sacrifice mm6 for *9 factor.
169 169
  */
170 170
 #define VC1_SHIFT2(OP, OPNAME)\
171 171
 static void OPNAME ## vc1_shift2_mmx(uint8_t *dst, const uint8_t *src,\
... ...
@@ -223,7 +223,7 @@ VC1_SHIFT2(OP_AVG, avg_)
223 223
 /**
224 224
  * Core of the 1/4 and 3/4 shift bicubic interpolation.
225 225
  *
226
- * @param UNPACK  Macro unpacking arguments from 8 to 16bits (can be empty).
226
+ * @param UNPACK  Macro unpacking arguments from 8 to 16 bits (can be empty).
227 227
  * @param MOVQ    "movd 1" or "movq 2", if data read is already unpacked.
228 228
  * @param A1      Address of 1st tap (beware of unpacked/packed).
229 229
  * @param A2      Address of 2nd tap
... ...
@@ -263,7 +263,7 @@ VC1_SHIFT2(OP_AVG, avg_)
263 263
      "paddw     %%mm2, %%mm4    \n\t" /* 4,53,18,-3 */
264 264
 
265 265
 /**
266
- * Macro to build the vertical 16bits version of vc1_put_shift[13].
266
+ * Macro to build the vertical 16 bits version of vc1_put_shift[13].
267 267
  * Here, offset=src_stride. Parameters passed A1 to A4 must use
268 268
  * %3 (src_stride) and %4 (3*src_stride).
269 269
  *
... ...
@@ -320,8 +320,8 @@ vc1_put_ver_16b_ ## NAME ## _mmx(int16_t *dst, const uint8_t *src,      \
320 320
 }
321 321
 
322 322
 /**
323
- * Macro to build the horizontal 16bits version of vc1_put_shift[13].
324
- * Here, offset=16bits, so parameters passed A1 to A4 should be simple.
323
+ * Macro to build the horizontal 16 bits version of vc1_put_shift[13].
324
+ * Here, offset=16 bits, so parameters passed A1 to A4 should be simple.
325 325
  *
326 326
  * @param  NAME   Either 1 or 3
327 327
  * @see MSPEL_FILTER13_CORE for information on A1->A4
... ...
@@ -357,7 +357,7 @@ OPNAME ## vc1_hor_16b_ ## NAME ## _mmx(uint8_t *dst, x86_reg stride,    \
357 357
 }
358 358
 
359 359
 /**
360
- * Macro to build the 8bits, any direction, version of vc1_put_shift[13].
360
+ * Macro to build the 8 bits, any direction, version of vc1_put_shift[13].
361 361
  * Here, offset=src_stride. Parameters passed A1 to A4 must use
362 362
  * %3 (offset) and %4 (3*offset).
363 363
  *
... ...
@@ -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 Libav.
6 6
  *
... ...
@@ -498,7 +498,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
498 498
         return AVERROR_INVALIDDATA;
499 499
     }
500 500
 
501
-    if (c->comp == 0) { //Uncompressed data
501
+    if (c->comp == 0) { // uncompressed data
502 502
         if (c->decomp_size < len) {
503 503
             av_log(avctx, AV_LOG_ERROR, "Buffer too small\n");
504 504
             return AVERROR_INVALIDDATA;
... ...
@@ -76,7 +76,7 @@ typedef struct X11GrabContext {
76 76
     Display *dpy;            /**< X11 display from which x11grab grabs frames */
77 77
     XImage *image;           /**< X11 image holding the grab */
78 78
     int use_shm;             /**< !0 when using XShm extension */
79
-    XShmSegmentInfo shminfo; /**< When using XShm, keeps track of XShm infos */
79
+    XShmSegmentInfo shminfo; /**< When using XShm, keeps track of XShm info */
80 80
     int draw_mouse;          /**< Set by a private option. */
81 81
     int follow_mouse;        /**< Set by a private option. */
82 82
     int show_region;         /**< set by a private option. */
... ...
@@ -441,7 +441,7 @@ void avfilter_uninit(void);
441 441
  * is not registered.
442 442
  *
443 443
  * @param filter the filter to register
444
- * @return 0 if the registration was succesfull, a negative value
444
+ * @return 0 if the registration was successful, a negative value
445 445
  * otherwise
446 446
  */
447 447
 int avfilter_register(AVFilter *filter);
... ...
@@ -47,9 +47,9 @@ 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
-    int got_output;        // signal an output frame is reday to request_frame()
52
+    int got_output;        // signal an output frame is ready to request_frame()
53 53
     void (*lowpass_line)(uint8_t *dstp, ptrdiff_t linesize, const uint8_t *srcp,
54 54
                          const uint8_t *srcp_above, const uint8_t *srcp_below);
55 55
 } InterlaceContext;
... ...
@@ -44,7 +44,7 @@ typedef struct ThreadContext {
44 44
     pthread_t *workers;
45 45
     avfilter_action_func *func;
46 46
 
47
-    /* per-execute perameters */
47
+    /* per-execute parameters */
48 48
     AVFilterContext *ctx;
49 49
     void *arg;
50 50
     int   *rets;
... ...
@@ -45,7 +45,7 @@ static const char *const var_names[] = {
45 45
     "INTERLACED",  ///< tell if the current frame is interlaced
46 46
     "N",           ///< frame / sample number (starting at zero)
47 47
     "PHI",         ///< golden ratio
48
-    "PI",          ///< greek pi
48
+    "PI",          ///< Greek pi
49 49
     "PREV_INPTS",  ///< previous  input PTS
50 50
     "PREV_OUTPTS", ///< previous output PTS
51 51
     "PTS",         ///< original pts in the file of the frame
... ...
@@ -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;
... ...
@@ -75,7 +75,7 @@ static const char *eof_action_str[] = {
75 75
 
76 76
 typedef struct OverlayContext {
77 77
     const AVClass *class;
78
-    int x, y;                   ///< position of overlayed picture
78
+    int x, y;                   ///< position of overlaid picture
79 79
 
80 80
     int max_plane_step[4];      ///< steps per pixel for each plane
81 81
     int hsub, vsub;             ///< chroma subsampling values
... ...
@@ -35,7 +35,7 @@
35 35
 static const char *const var_names[] = {
36 36
     "E",                 ///< Euler number
37 37
     "PHI",               ///< golden ratio
38
-    "PI",                ///< greek pi
38
+    "PI",                ///< Greek pi
39 39
 
40 40
     "TB",                ///< timebase
41 41
 
... ...
@@ -398,7 +398,7 @@ static int poll_frame(AVFilterLink *link)
398 398
     if (val <= 0)
399 399
         return val;
400 400
 
401
-    //FIXME change API to not requre this red tape
401
+    //FIXME change API to not require this red tape
402 402
     if (val == 1 && !yadif->next) {
403 403
         if ((ret = ff_request_frame(link->src->inputs[0])) < 0)
404 404
             return ret;
... ...
@@ -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 Libav.
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 bsm_s, bsm_e, inb_s, inb_e, ch;
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 Libav.
6 6
  *
... ...
@@ -115,7 +115,7 @@ static int amr_read_packet(AVFormatContext *s, AVPacket *pkt)
115 115
         return AVERROR(EIO);
116 116
     }
117 117
 
118
-    // FIXME this is wrong, this should rather be in a AVParset
118
+    // FIXME this is wrong, this should rather be in an AVParser
119 119
     toc  = avio_r8(s->pb);
120 120
     mode = (toc >> 3) & 0x0F;
121 121
 
... ...
@@ -40,7 +40,7 @@ typedef struct ASFMainHeader {
40 40
                                  *   invalid if broadcasting (could be ignored) */
41 41
     uint32_t preroll;           /**< timestamp of the first packet, in milliseconds
42 42
                                  *   if nonzero - subtract from time */
43
-    uint32_t ignore;            ///< preroll is 64bit - but let's just ignore it
43
+    uint32_t ignore;            ///< preroll is 64 bits - but let's just ignore it
44 44
     uint32_t flags;             /**< 0x01 - broadcast
45 45
                                  *   0x02 - seekable
46 46
                                  *   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
... ...
@@ -1175,7 +1175,7 @@ static int asf_read_multiple_payload(AVFormatContext *s, AVPacket *pkt,
1175 1175
     int ret;
1176 1176
     int skip = 0;
1177 1177
 
1178
-    // if replicated lenght is 1, subpayloads are present
1178
+    // if replicated length is 1, subpayloads are present
1179 1179
     if (asf->rep_data_len == 1) {
1180 1180
         asf->sub_left = 1;
1181 1181
         asf->state = READ_MULTI_SUB;
... ...
@@ -209,7 +209,7 @@ typedef struct ASFContext {
209 209
     uint32_t seqno;
210 210
     int is_streamed;
211 211
     ASFStream streams[128];              ///< it's max number and it's not that big
212
-    /* non streamed additonnal info */
212
+    /* non-streamed additional info */
213 213
     uint64_t nb_packets;                 ///< how many packets are there in the file, invalid if broadcasting
214 214
     uint64_t duration;                   ///< in ms
215 215
     /* packet filling */
... ...
@@ -446,7 +446,7 @@ static int asf_write_header1(AVFormatContext *s, int64_t file_size,
446 446
     avio_wl16(pb, 0);
447 447
     end_header(pb, hpos);
448 448
 
449
-    /* title and other infos */
449
+    /* title and other info */
450 450
     if (has_title) {
451 451
         int len;
452 452
         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;
... ...
@@ -1931,7 +1931,7 @@ void av_url_split(char *proto,         int proto_size,
1931 1931
  * @param ic        the context to analyze
1932 1932
  * @param index     the index to print, if you have multiple inputs or outputs
1933 1933
  * @param url       the URL to print, such as source or destination file
1934
- * @param is_output whether the context is input or ouput
1934
+ * @param is_output whether the context is input or output
1935 1935
  */
1936 1936
 void av_dump_format(AVFormatContext *ic,
1937 1937
                     int index,
... ...
@@ -548,7 +548,7 @@ static int avi_read_header(AVFormatContext *s)
548 548
             st->start_time = 0;
549 549
             avio_rl32(pb); /* buffer size */
550 550
             avio_rl32(pb); /* quality */
551
-            ast->sample_size = avio_rl32(pb); /* sample ssize */
551
+            ast->sample_size = avio_rl32(pb); /* sample size */
552 552
             ast->cum_len    *= FFMAX(1, ast->sample_size);
553 553
             av_log(s, AV_LOG_TRACE, "%"PRIu32" %"PRIu32" %d\n",
554 554
                     ast->rate, ast->scale, ast->sample_size);
... ...
@@ -195,16 +195,16 @@ int avio_put_str16le(AVIOContext *s, const char *str);
195 195
 int avio_put_str16be(AVIOContext *s, const char *str);
196 196
 
197 197
 /**
198
- * Passing this as the "whence" parameter to a seek function causes it to
198
+ * ORing this as the "whence" parameter to a seek function causes it to
199 199
  * return the filesize without seeking anywhere. Supporting this is optional.
200 200
  * If it is not supported then the seek function will return <0.
201 201
  */
202 202
 #define AVSEEK_SIZE 0x10000
203 203
 
204 204
 /**
205
- * Oring this flag as into the "whence" parameter to a seek function causes it to
206
- * seek by any means (like reopening and linear reading) or other normally unreasonble
207
- * means that can be extreemly slow.
205
+ * Passing this flag as the "whence" parameter to a seek function causes it to
206
+ * seek by any means (like reopening and linear reading) or other normally unreasonable
207
+ * means that can be extremely slow.
208 208
  * This may be ignored by the seek code.
209 209
  */
210 210
 #define AVSEEK_FORCE 0x20000
... ...
@@ -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 Libav.
6 6
  *
... ...
@@ -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
 
... ...
@@ -239,7 +239,7 @@ static int read_packet(AVFormatContext *s, AVPacket *pkt)
239 239
             pkt->pts = bink->audio_pts[bink->current_track - 1];
240 240
 
241 241
             /* Each audio packet reports the number of decompressed samples
242
-               (in bytes). We use this value to calcuate the audio PTS */
242
+               (in bytes). We use this value to calculate the audio PTS */
243 243
             if (pkt->size >= 4)
244 244
                 bink->audio_pts[bink->current_track -1] +=
245 245
                     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 Libav.
6 6
  *
... ...
@@ -357,7 +357,7 @@ static void dump_sidedata(void *ctx, AVStream *st, const char *indent)
357 357
             dump_paramchange(ctx, &sd);
358 358
             break;
359 359
         case AV_PKT_DATA_H263_MB_INFO:
360
-            av_log(ctx, AV_LOG_INFO, "h263 macroblock info");
360
+            av_log(ctx, AV_LOG_INFO, "H.263 macroblock info");
361 361
             break;
362 362
         case AV_PKT_DATA_REPLAYGAIN:
363 363
             av_log(ctx, AV_LOG_INFO, "replaygain: ");
... ...
@@ -102,11 +102,11 @@ static const int dv_audio_frequency[3] = {
102 102
 
103 103
 /*
104 104
  * There's a couple of assumptions being made here:
105
- * 1. By default we silence erroneous (0x8000/16bit 0x800/12bit) audio samples.
105
+ * 1. By default we silence erroneous (0x8000/16-bit 0x800/12-bit) audio samples.
106 106
  *    We can pass them upwards when libavcodec will be ready to deal with them.
107 107
  * 2. We don't do software emphasis.
108
- * 3. Audio is always returned as 16bit linear samples: 12bit nonlinear samples
109
- *    are converted into 16bit linear ones.
108
+ * 3. Audio is always returned as 16-bit linear samples: 12-bit nonlinear samples
109
+ *    are converted into 16-bit linear ones.
110 110
  */
111 111
 static int dv_extract_audio(uint8_t *frame, uint8_t **ppcm,
112 112
                             const AVDVProfile *sys)
... ...
@@ -122,7 +122,7 @@ static int dv_extract_audio(uint8_t *frame, uint8_t **ppcm,
122 122
 
123 123
     smpls = as_pack[1]      & 0x3f; /* samples in this frame - min. samples */
124 124
     freq  = as_pack[4] >> 3 & 0x07; /* 0 - 48kHz, 1 - 44,1kHz, 2 - 32kHz */
125
-    quant = as_pack[4]      & 0x07; /* 0 - 16bit linear, 1 - 12bit nonlinear */
125
+    quant = as_pack[4]      & 0x07; /* 0 - 16-bit linear, 1 - 12-bit nonlinear */
126 126
 
127 127
     if (quant > 1)
128 128
         return -1;  /* unsupported quantization */
... ...
@@ -148,7 +148,7 @@ static int dv_extract_audio(uint8_t *frame, uint8_t **ppcm,
148 148
         for (i = 0; i < sys->difseg_size; i++) {
149 149
             frame += 6 * 80; /* skip DIF segment header */
150 150
             if (quant == 1 && i == half_ch) {
151
-                /* next stereo channel (12bit mode only) */
151
+                /* next stereo channel (12-bit mode only) */
152 152
                 pcm = ppcm[ipcm++];
153 153
                 if (!pcm)
154 154
                     break;
... ...
@@ -157,7 +157,7 @@ static int dv_extract_audio(uint8_t *frame, uint8_t **ppcm,
157 157
             /* for each AV sequence */
158 158
             for (j = 0; j < 9; j++) {
159 159
                 for (d = 8; d < 80; d += 2) {
160
-                    if (quant == 0) {  /* 16bit quantization */
160
+                    if (quant == 0) {  /* 16-bit quantization */
161 161
                         of = sys->audio_shuffle[i][j] +
162 162
                              (d - 8) / 2 * sys->audio_stride;
163 163
                         if (of * 2 >= size)
... ...
@@ -170,7 +170,7 @@ static int dv_extract_audio(uint8_t *frame, uint8_t **ppcm,
170 170
 
171 171
                         if (pcm[of * 2 + 1] == 0x80 && pcm[of * 2] == 0x00)
172 172
                             pcm[of * 2 + 1] = 0;
173
-                    } else {           /* 12bit quantization */
173
+                    } else {           /* 12-bit quantization */
174 174
                         lc = ((uint16_t)frame[d]     << 4) |
175 175
                              ((uint16_t)frame[d + 2] >> 4);
176 176
                         rc = ((uint16_t)frame[d + 1] << 4) |
... ...
@@ -219,7 +219,7 @@ static int dv_extract_audio_info(DVDemuxContext *c, uint8_t *frame)
219 219
     smpls = as_pack[1]      & 0x3f; /* samples in this frame - min. samples */
220 220
     freq  = as_pack[4] >> 3 & 0x07; /* 0 - 48kHz, 1 - 44,1kHz, 2 - 32kHz */
221 221
     stype = as_pack[3]      & 0x1f; /* 0 - 2CH, 2 - 4CH, 3 - 8CH */
222
-    quant = as_pack[4]      & 0x07; /* 0 - 16bit linear, 1 - 12bit nonlinear */
222
+    quant = as_pack[4]      & 0x07; /* 0 - 16-bit linear, 1 - 12-bit nonlinear */
223 223
 
224 224
     if (freq >= FF_ARRAY_ELEMS(dv_audio_frequency)) {
225 225
         av_log(c->fctx, AV_LOG_ERROR,
... ...
@@ -38,7 +38,7 @@
38 38
 #include "libavutil/fifo.h"
39 39
 #include "libavutil/mathematics.h"
40 40
 
41
-#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32bit audio
41
+#define MAX_AUDIO_FRAME_SIZE 192000 // 1 second of 48khz 32-bit audio
42 42
 
43 43
 struct DVMuxContext {
44 44
     const AVDVProfile*  sys;           /* current DV profile, e.g.: 525/60, 625/50 */
... ...
@@ -124,7 +124,7 @@ static int dv_write_pack(enum dv_pack_type pack_id, DVMuxContext *c, uint8_t* bu
124 124
         buf[4] = (1 << 7) | /* emphasis: 1 -- off */
125 125
                  (0 << 6) | /* emphasis time constant: 0 -- reserved */
126 126
                  (0 << 3) | /* frequency: 0 -- 48kHz, 1 -- 44,1kHz, 2 -- 32kHz */
127
-                  0;        /* quantization: 0 -- 16bit linear, 1 -- 12bit nonlinear */
127
+                  0;        /* quantization: 0 -- 16-bit linear, 1 -- 12-bit nonlinear */
128 128
         va_end(ap);
129 129
         break;
130 130
     case dv_audio_control:
... ...
@@ -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 Libav.
... ...
@@ -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 Libav.
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 Libav.
11 11
  *
... ...
@@ -42,7 +42,7 @@ typedef struct GXFStreamContext {
42 42
     int pframes;
43 43
     int bframes;
44 44
     int p_per_gop;
45
-    int b_per_i_or_p; ///< number of B frames per I frame or P frame
45
+    int b_per_i_or_p; ///< number of B-frames per I-frame or P-frame
46 46
     int first_gop_closed;
47 47
     unsigned order;   ///< interleaving order
48 48
 } GXFStreamContext;
... ...
@@ -799,7 +799,7 @@ static void hvcc_init(HEVCDecoderConfigurationRecord *hvcc)
799 799
 
800 800
     /*
801 801
      * Initialize this field with an invalid value which can be used to detect
802
-     * whether we didn't see any VUI (in wich case it should be reset to zero).
802
+     * whether we didn't see any VUI (in which case it should be reset to zero).
803 803
      */
804 804
     hvcc->min_spatial_segmentation_idc = MAX_SPATIAL_SEGMENTATION + 1;
805 805
 }
... ...
@@ -40,7 +40,7 @@ void ff_http_init_auth_state(URLContext *dest, const URLContext *src);
40 40
 /**
41 41
  * Send a new HTTP request, reusing the old connection.
42 42
  *
43
- * @param h pointer to the ressource
43
+ * @param h pointer to the resource
44 44
  * @param uri uri used to perform the request
45 45
  * @return a negative value if an error condition occurred, 0
46 46
  * otherwise
... ...
@@ -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
     /**
... ...
@@ -83,7 +83,7 @@ static int id3v2_put_ttag(ID3v2EncContext *id3, AVIOContext *avioc, const char *
83 83
     len = avio_close_dyn_buf(dyn_buf, &pb);
84 84
 
85 85
     avio_wb32(avioc, tag);
86
-    /* ID3v2.3 frame size is not synchsafe */
86
+    /* ID3v2.3 frame size is not sync-safe */
87 87
     if (id3->version == 3)
88 88
         avio_wb32(avioc, len);
89 89
     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 Libav.
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 Libav.
6 6
  *
... ...
@@ -194,7 +194,7 @@ static int iff_read_header(AVFormatContext *s)
194 194
                 compression                  = avio_r8(pb);
195 195
             }
196 196
             if (data_size >= 16) {
197
-                avio_skip(pb, 3); // paddding, transparent
197
+                avio_skip(pb, 3); // padding, transparent
198 198
                 st->sample_aspect_ratio.num  = avio_r8(pb);
199 199
                 st->sample_aspect_ratio.den  = avio_r8(pb);
200 200
             }
... ...
@@ -437,7 +437,7 @@ static inline int ff_rename(const char *oldpath, const char *newpath)
437 437
 
438 438
 /**
439 439
  * A wrapper around AVFormatContext.io_close that should be used
440
- * intead of calling the pointer directly.
440
+ * instead of calling the pointer directly.
441 441
  */
442 442
 void ff_format_io_close(AVFormatContext *s, AVIOContext **pb);
443 443
 
... ...
@@ -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 Libav.
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 */
... ...
@@ -58,9 +58,9 @@ const AVCodecTag ff_mp4_obj_type[] = {
58 58
     { AV_CODEC_ID_DIRAC       , 0xA4 },
59 59
     { AV_CODEC_ID_AC3         , 0xA5 },
60 60
     { AV_CODEC_ID_DTS         , 0xA9 }, /* mp4ra.org */
61
-    { AV_CODEC_ID_TSCC2       , 0xD0 }, /* non standard, camtasia uses it */
62
-    { AV_CODEC_ID_VORBIS      , 0xDD }, /* non standard, gpac uses it */
63
-    { AV_CODEC_ID_DVD_SUBTITLE, 0xE0 }, /* non standard, see unsupported-embedded-subs-2.mp4 */
61
+    { AV_CODEC_ID_TSCC2       , 0xD0 }, /* nonstandard, camtasia uses it */
62
+    { AV_CODEC_ID_VORBIS      , 0xDD }, /* nonstandard, gpac uses it */
63
+    { AV_CODEC_ID_DVD_SUBTITLE, 0xE0 }, /* nonstandard, see unsupported-embedded-subs-2.mp4 */
64 64
     { AV_CODEC_ID_QCELP       , 0xE1 },
65 65
     { AV_CODEC_ID_MPEG4SYSTEMS, 0x01 },
66 66
     { AV_CODEC_ID_MPEG4SYSTEMS, 0x02 },
... ...
@@ -70,11 +70,11 @@ const AVCodecTag ff_mp4_obj_type[] = {
70 70
 const AVCodecTag ff_codec_movvideo_tags[] = {
71 71
 /*  { AV_CODEC_ID_, MKTAG('I', 'V', '5', '0') }, *//* Indeo 5.0 */
72 72
 
73
-    { AV_CODEC_ID_RAWVIDEO, MKTAG('r', 'a', 'w', ' ') }, /* Uncompressed RGB */
74
-    { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') }, /* Uncompressed YUV422 */
75
-    { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'V', 'U', 'I') }, /* YUV with alpha-channel (AVID Uncompressed) */
76
-    { AV_CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') }, /* UNCOMPRESSED 8BIT 4:2:2 */
77
-    { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') }, /* same as 2vuy but byte swapped */
73
+    { AV_CODEC_ID_RAWVIDEO, MKTAG('r', 'a', 'w', ' ') }, /* uncompressed RGB */
74
+    { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', '2') }, /* uncompressed YUV422 */
75
+    { AV_CODEC_ID_RAWVIDEO, MKTAG('A', 'V', 'U', 'I') }, /* YUV with alpha-channel (AVID uncompressed) */
76
+    { AV_CODEC_ID_RAWVIDEO, MKTAG('2', 'v', 'u', 'y') }, /* uncompressed 8-bit 4:2:2 */
77
+    { AV_CODEC_ID_RAWVIDEO, MKTAG('y', 'u', 'v', 's') }, /* same as 2VUY but byte-swapped */
78 78
 
79 79
     { AV_CODEC_ID_RAWVIDEO, MKTAG('L', '5', '5', '5') },
80 80
     { AV_CODEC_ID_RAWVIDEO, MKTAG('L', '5', '6', '5') },
... ...
@@ -93,12 +93,12 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
93 93
     { AV_CODEC_ID_RAWVIDEO, MKTAG('R', '4', '2', '0') }, /* Radius DV YUV PAL */
94 94
     { AV_CODEC_ID_RAWVIDEO, MKTAG('R', '4', '1', '1') }, /* Radius DV YUV NTSC */
95 95
 
96
-    { AV_CODEC_ID_R10K,   MKTAG('R', '1', '0', 'k') }, /* UNCOMPRESSED 10BIT RGB */
97
-    { AV_CODEC_ID_R10K,   MKTAG('R', '1', '0', 'g') }, /* UNCOMPRESSED 10BIT RGB */
98
-    { AV_CODEC_ID_R210,   MKTAG('r', '2', '1', '0') }, /* UNCOMPRESSED 10BIT RGB */
99
-    { AV_CODEC_ID_V210,   MKTAG('v', '2', '1', '0') }, /* UNCOMPRESSED 10BIT 4:2:2 */
100
-    { AV_CODEC_ID_V210,   MKTAG('b', 'x', 'y', '2') }, /* BOXX 10BIT 4:2:2 */
101
-    { AV_CODEC_ID_V410,   MKTAG('v', '4', '1', '0') }, /* UNCOMPRESSED 10BIT 4:4:4 */
96
+    { AV_CODEC_ID_R10K,   MKTAG('R', '1', '0', 'k') }, /* uncompressed 10-bit RGB */
97
+    { AV_CODEC_ID_R10K,   MKTAG('R', '1', '0', 'g') }, /* uncompressed 10-bit RGB */
98
+    { AV_CODEC_ID_R210,   MKTAG('r', '2', '1', '0') }, /* uncompressed 10-bit RGB */
99
+    { AV_CODEC_ID_V210,   MKTAG('v', '2', '1', '0') }, /* uncompressed 10-bit 4:2:2 */
100
+    { AV_CODEC_ID_V210,   MKTAG('b', 'x', 'y', '2') }, /* BOXX 10-bit 4:2:2 */
101
+    { AV_CODEC_ID_V410,   MKTAG('v', '4', '1', '0') }, /* uncompressed 10-bit 4:4:4 */
102 102
 
103 103
     { AV_CODEC_ID_MJPEG,  MKTAG('j', 'p', 'e', 'g') }, /* PhotoJPEG */
104 104
     { AV_CODEC_ID_MJPEG,  MKTAG('m', 'j', 'p', 'a') }, /* Motion-JPEG (format A) */
... ...
@@ -117,8 +117,8 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
117 117
     { AV_CODEC_ID_MPEG4, MKTAG('X', 'V', 'I', 'D') },
118 118
     { AV_CODEC_ID_MPEG4, MKTAG('3', 'I', 'V', '2') }, /* experimental: 3IVX files before ivx D4 4.5.1 */
119 119
 
120
-    { AV_CODEC_ID_H263, MKTAG('h', '2', '6', '3') }, /* H263 */
121
-    { AV_CODEC_ID_H263, MKTAG('s', '2', '6', '3') }, /* H263 ?? works */
120
+    { AV_CODEC_ID_H263, MKTAG('h', '2', '6', '3') }, /* H.263 */
121
+    { AV_CODEC_ID_H263, MKTAG('s', '2', '6', '3') }, /* H.263 ?? works */
122 122
 
123 123
     { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', 'p') }, /* DV PAL */
124 124
     { AV_CODEC_ID_DVVIDEO, MKTAG('d', 'v', 'c', ' ') }, /* DV NTSC */
... ...
@@ -165,7 +165,7 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
165 165
     { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '5') }, /* AVC-Intra 100M 1080i50 */
166 166
     { AV_CODEC_ID_H264, MKTAG('a', 'i', '1', '6') }, /* AVC-Intra 100M 1080i60 */
167 167
     { AV_CODEC_ID_H264, MKTAG('A', 'V', 'i', 'n') }, /* AVC-Intra with implicit SPS/PPS */
168
-    { AV_CODEC_ID_H264, MKTAG('a', 'i', 'v', 'x') }, /* XAVC 4:2:2 10bit */
168
+    { AV_CODEC_ID_H264, MKTAG('a', 'i', 'v', 'x') }, /* XAVC 10-bit 4:2:2 */
169 169
     { AV_CODEC_ID_H264, MKTAG('r', 'v', '6', '4') }, /* X-Com Radvision */
170 170
 
171 171
     { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', '1', 'v', ' ') },
... ...
@@ -173,22 +173,22 @@ const AVCodecTag ff_codec_movvideo_tags[] = {
173 173
     { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', 'e', 'g') }, /* MPEG */
174 174
     { AV_CODEC_ID_MPEG1VIDEO, MKTAG('m', 'p', '1', 'v') }, /* CoreMedia CMVideoCodecType */
175 175
     { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', '2', 'v', '1') }, /* Apple MPEG-2 Camcorder */
176
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '1') }, /* MPEG2 HDV 720p30 */
177
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '2') }, /* MPEG2 HDV 1080i60 */
178
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '3') }, /* MPEG2 HDV 1080i50 */
179
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '4') }, /* MPEG2 HDV 720p24 */
180
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '5') }, /* MPEG2 HDV 720p25 */
181
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '6') }, /* MPEG2 HDV 1080p24 */
182
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '7') }, /* MPEG2 HDV 1080p25 */
183
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '8') }, /* MPEG2 HDV 1080p30 */
184
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '9') }, /* MPEG2 HDV 720p60 JVC */
185
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', 'a') }, /* MPEG2 HDV 720p50 */
186
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'n') }, /* MPEG2 IMX NTSC 525/60 50mb/s produced by FCP */
187
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'p') }, /* MPEG2 IMX PAL 625/50 50mb/s produced by FCP */
188
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'n') }, /* MPEG2 IMX NTSC 525/60 40mb/s produced by FCP */
189
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'p') }, /* MPEG2 IMX PAL 625/50 40mb/s produced by FCP */
190
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'n') }, /* MPEG2 IMX NTSC 525/60 30mb/s produced by FCP */
191
-    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'p') }, /* MPEG2 IMX PAL 625/50 30mb/s produced by FCP */
176
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '1') }, /* MPEG-2 HDV 720p30 */
177
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '2') }, /* MPEG-2 HDV 1080i60 */
178
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '3') }, /* MPEG-2 HDV 1080i50 */
179
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '4') }, /* MPEG-2 HDV 720p24 */
180
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '5') }, /* MPEG-2 HDV 720p25 */
181
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '6') }, /* MPEG-2 HDV 1080p24 */
182
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '7') }, /* MPEG-2 HDV 1080p25 */
183
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '8') }, /* MPEG-2 HDV 1080p30 */
184
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', '9') }, /* MPEG-2 HDV 720p60 JVC */
185
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('h', 'd', 'v', 'a') }, /* MPEG-2 HDV 720p50 */
186
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'n') }, /* MPEG-2 IMX NTSC 525/60 50mb/s produced by FCP */
187
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '5', 'p') }, /* MPEG-2 IMX PAL 625/50 50mb/s produced by FCP */
188
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'n') }, /* MPEG-2 IMX NTSC 525/60 40mb/s produced by FCP */
189
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '4', 'p') }, /* MPEG-2 IMX PAL 625/50 40mb/s produced by FCP */
190
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'n') }, /* MPEG-2 IMX NTSC 525/60 30mb/s produced by FCP */
191
+    { AV_CODEC_ID_MPEG2VIDEO, MKTAG('m', 'x', '3', 'p') }, /* MPEG-2 IMX PAL 625/50 30mb/s produced by FCP */
192 192
     { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '1') }, /* XDCAM HD422 720p30 CBR */
193 193
     { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '4') }, /* XDCAM HD422 720p24 CBR */
194 194
     { AV_CODEC_ID_MPEG2VIDEO, MKTAG('x', 'd', '5', '5') }, /* XDCAM HD422 720p25 CBR */
... ...
@@ -321,7 +321,7 @@ const AVCodecTag ff_codec_movsubtitle_tags[] = {
321 321
 /* map numeric codes from mdhd atom to ISO 639 */
322 322
 /* cf. QTFileFormat.pdf p253, qtff.pdf p205 */
323 323
 /* http://developer.apple.com/documentation/mac/Text/Text-368.html */
324
-/* deprecated by putting the code as 3*5bit ascii */
324
+/* deprecated by putting the code as 3*5 bits ASCII */
325 325
 static const char mov_mdhd_language_map[][4] = {
326 326
     /* 0-9 */
327 327
     "eng", "fra", "ger", "ita", "dut", "sve", "spa", "dan", "por", "nor",
... ...
@@ -359,7 +359,7 @@ int ff_mov_iso639_to_lang(const char lang[4], int mp4)
359 359
     /* handle undefined as such */
360 360
     if (lang[0] == '\0')
361 361
         lang = "und";
362
-    /* 5bit ascii */
362
+    /* 5 bits ASCII */
363 363
     for (i = 0; i < 3; i++) {
364 364
         uint8_t c = lang[i];
365 365
         c -= 0x60;
... ...
@@ -411,7 +411,7 @@ int ff_mp4_read_descr(AVFormatContext *fc, AVIOContext *pb, int *tag)
411 411
     int len;
412 412
     *tag = avio_r8(pb);
413 413
     len = ff_mp4_read_descr_len(pb);
414
-    av_log(fc, AV_LOG_TRACE, "MPEG4 description: tag=0x%02x len=%d\n", *tag, len);
414
+    av_log(fc, AV_LOG_TRACE, "MPEG-4 description: tag=0x%02x len=%d\n", *tag, len);
415 415
     return len;
416 416
 }
417 417
 
... ...
@@ -453,7 +453,7 @@ int ff_mp4_read_dec_config_descr(AVFormatContext *fc, AVStream *st, AVIOContext
453 453
     av_log(fc, AV_LOG_TRACE, "esds object type id 0x%02x\n", object_type_id);
454 454
     len = ff_mp4_read_descr(fc, pb, &tag);
455 455
     if (tag == MP4DecSpecificDescrTag) {
456
-        av_log(fc, AV_LOG_TRACE, "Specific MPEG4 header len=%d\n", len);
456
+        av_log(fc, AV_LOG_TRACE, "Specific MPEG-4 header len=%d\n", len);
457 457
         if (!len || (uint64_t)len > (1<<30))
458 458
             return -1;
459 459
         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 Libav.
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 Libav.
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:
... ...
@@ -419,7 +419,7 @@ static int send_startup_packet(MMSTContext *mmst)
419 419
     char data_string[256];
420 420
     MMSContext *mms = &mmst->mms;
421 421
     // SubscriberName is defined in MS specification linked below.
422
-    // The guid value can be any valid value.
422
+    // The GUID value can be any valid value.
423 423
     // http://download.microsoft.com/
424 424
     // download/9/5/E/95EF66AF-9026-4BB0-A41D-A4F81802D92C/%5BMS-WMSP%5D.pdf
425 425
     snprintf(data_string, sizeof(data_string),
... ...
@@ -515,7 +515,7 @@ static int mms_open(URLContext *h, const char *uri, int flags)
515 515
             sizeof(mmst->path), uri);
516 516
 
517 517
     if(port<0)
518
-        port = 1755; // defaut mms protocol port
518
+        port = 1755; // default MMS protocol port
519 519
 
520 520
     // establish tcp connection.
521 521
     ff_url_join(tcpname, sizeof(tcpname), "tcp", NULL, mmst->host, port, NULL);
... ...
@@ -1141,7 +1141,7 @@ static int mov_read_fiel(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1141 1141
     return 0;
1142 1142
 }
1143 1143
 
1144
-/* FIXME modify qdm2/svq3/h264 decoders to take full atom as extradata */
1144
+/* FIXME modify QDM2/SVQ3/H.264 decoders to take full atom as extradata */
1145 1145
 static int mov_read_extradata(MOVContext *c, AVIOContext *pb, MOVAtom atom)
1146 1146
 {
1147 1147
     AVStream *st;
... ...
@@ -1373,7 +1373,7 @@ static int mov_codec_id(AVStream *st, uint32_t format)
1373 1373
     if (st->codecpar->codec_type != AVMEDIA_TYPE_VIDEO && id > 0) {
1374 1374
         st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
1375 1375
     } else if (st->codecpar->codec_type != AVMEDIA_TYPE_AUDIO &&
1376
-               /* skip old asf mpeg4 tag */
1376
+               /* skip old ASF MPEG-4 tag */
1377 1377
                format && format != MKTAG('m','p','4','s')) {
1378 1378
         id = ff_codec_get_id(ff_codec_movvideo_tags, format);
1379 1379
         if (id <= 0)
... ...
@@ -1427,7 +1427,7 @@ static void mov_parse_stsd_video(MOVContext *c, AVIOContext *pb,
1427 1427
     /* codec_tag YV12 triggers an UV swap in rawdec.c */
1428 1428
     if (!memcmp(codec_name, "Planar Y'CbCr 8-bit 4:2:0", 25))
1429 1429
         st->codecpar->codec_tag = MKTAG('I', '4', '2', '0');
1430
-    /* Flash Media Server uses tag H263 with Sorenson Spark */
1430
+    /* Flash Media Server uses tag H.263 with Sorenson Spark */
1431 1431
     if (st->codecpar->codec_tag == MKTAG('H','2','6','3') &&
1432 1432
         !memcmp(codec_name, "Sorenson H263", 13))
1433 1433
         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);
... ...
@@ -554,7 +554,7 @@ int main(int argc, char **argv)
554 554
     finish();
555 555
 
556 556
 
557
-    // Test discontinously written fragments with b-frames (where the
557
+    // Test discontinuously written fragments with B-frames (where the
558 558
     // assumption of starting at pts=0 works) but not with audio preroll
559 559
     // (which can't be guessed).
560 560
     av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0);
... ...
@@ -588,7 +588,7 @@ int main(int argc, char **argv)
588 588
     finish();
589 589
 
590 590
 
591
-    // Test discontinously written fragments with b-frames and audio preroll,
591
+    // Test discontinuously written fragments with B-frames and audio preroll,
592 592
     // properly signaled.
593 593
     av_dict_set(&opts, "movflags", "frag_custom+delay_moov+dash", 0);
594 594
     init(1, 1);
... ...
@@ -1657,7 +1657,7 @@ static int mov_write_edts_tag(AVIOContext *pb, MOVMuxContext *mov,
1657 1657
         /* In the positive delay case, the delay includes the cts
1658 1658
          * offset, and the second edit list entry below trims out
1659 1659
          * the same amount from the actual content. This makes sure
1660
-         * that the offsetted last sample is included in the edit
1660
+         * that the offset last sample is included in the edit
1661 1661
          * list duration as well. */
1662 1662
         if (version == 1) {
1663 1663
             avio_wb64(pb, delay);
... ...
@@ -3433,8 +3433,8 @@ int ff_mov_write_packet(AVFormatContext *s, AVPacket *pkt)
3433 3433
     }
3434 3434
 
3435 3435
     if (par->codec_id == AV_CODEC_ID_H264 && trk->vos_len > 0 && *(uint8_t *)trk->vos_data != 1) {
3436
-        /* from x264 or from bytestream h264 */
3437
-        /* nal reformating needed */
3436
+        /* from x264 or from bytestream H.264 */
3437
+        /* NAL reformatting needed */
3438 3438
         if (trk->hint_track >= 0 && trk->hint_track < mov->nb_streams) {
3439 3439
             ff_avc_parse_nal_units_buf(pkt->data, &reformatted_data,
3440 3440
                                        &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 Libav.
... ...
@@ -287,7 +287,7 @@ redo:
287 287
             goto error_redo;
288 288
         c = avio_r8(s->pb);
289 289
         len--;
290
-        /* XXX: for mpeg1, should test only bit 7 */
290
+        /* XXX: for MPEG-1, should test only bit 7 */
291 291
         if (c != 0xff)
292 292
             break;
293 293
     }
... ...
@@ -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 Libav.
... ...
@@ -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 Libav.
... ...
@@ -153,7 +153,7 @@ static int put_system_header(AVFormatContext *ctx, uint8_t *buf,
153 153
         put_bits(&pb, 1, 1);
154 154
     } else {
155 155
         put_bits(&pb, 1, 0); /* variable bitrate */
156
-        put_bits(&pb, 1, 0); /* non constrainted bit stream */
156
+        put_bits(&pb, 1, 0); /* nonconstrained bitstream */
157 157
     }
158 158
 
159 159
     if (s->is_vcd || s->is_dvd) {
... ...
@@ -1148,7 +1148,7 @@ static int mpeg_mux_end(AVFormatContext *ctx)
1148 1148
             break;
1149 1149
     }
1150 1150
 
1151
-    /* End header according to MPEG1 systems standard. We do not write
1151
+    /* End header according to MPEG-1 systems standard. We do not write
1152 1152
      * it as it is usually not needed by decoders and because it
1153 1153
      * complicates MPEG stream concatenation. */
1154 1154
     // 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 Libav.
... ...
@@ -36,8 +36,8 @@
36 36
 #include "mpeg.h"
37 37
 #include "isom.h"
38 38
 
39
-/* maximum size in which we look for synchronisation if
40
- * synchronisation is lost */
39
+/* maximum size in which we look for synchronization if
40
+ * synchronization is lost */
41 41
 #define MAX_RESYNC_SIZE 65536
42 42
 
43 43
 #define MAX_PES_PAYLOAD 200 * 1024
... ...
@@ -141,7 +141,7 @@ struct MpegTSContext {
141 141
 };
142 142
 
143 143
 #define MPEGTS_OPTIONS \
144
-    { "resync_size",   "Size limit for looking up a new syncronization.", offsetof(MpegTSContext, resync_size), AV_OPT_TYPE_INT,  { .i64 =  MAX_RESYNC_SIZE}, 0, INT_MAX,  AV_OPT_FLAG_DECODING_PARAM }
144
+    { "resync_size",   "Size limit for looking up a new synchronization.", offsetof(MpegTSContext, resync_size), AV_OPT_TYPE_INT,  { .i64 =  MAX_RESYNC_SIZE}, 0, INT_MAX,  AV_OPT_FLAG_DECODING_PARAM }
145 145
 
146 146
 static const AVOption options[] = {
147 147
     MPEGTS_OPTIONS,
... ...
@@ -836,7 +836,7 @@ static int mpegts_push_data(MpegTSFilter *filter,
836 836
                  * decide */
837 837
                 if (pes->header[0] == 0x00 && pes->header[1] == 0x00 &&
838 838
                     pes->header[2] == 0x01) {
839
-                    /* it must be an mpeg2 PES stream */
839
+                    /* it must be an MPEG-2 PES stream */
840 840
                     code = pes->header[3] | 0x100;
841 841
                     av_log(pes->stream, AV_LOG_TRACE, "pid=%x pes_code=%#x\n", pes->pid,
842 842
                             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 Libav.
... ...
@@ -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 Libav.
... ...
@@ -48,7 +48,7 @@ typedef struct MpegTSSection {
48 48
 } MpegTSSection;
49 49
 
50 50
 typedef struct MpegTSService {
51
-    MpegTSSection pmt; /* MPEG2 pmt table context */
51
+    MpegTSSection pmt; /* MPEG-2 PMT table context */
52 52
     int sid;           /* service ID */
53 53
     char *name;
54 54
     char *provider_name;
... ...
@@ -59,8 +59,8 @@ typedef struct MpegTSService {
59 59
 
60 60
 typedef struct MpegTSWrite {
61 61
     const AVClass *av_class;
62
-    MpegTSSection pat; /* MPEG2 pat table */
63
-    MpegTSSection sdt; /* MPEG2 sdt table context */
62
+    MpegTSSection pat; /* MPEG-2 PAT table */
63
+    MpegTSSection sdt; /* MPEG-2 SDT table context */
64 64
     MpegTSService **services;
65 65
     int sdt_packet_count;
66 66
     int sdt_packet_period;
... ...
@@ -726,7 +726,7 @@ fail:
726 726
     return ret;
727 727
 }
728 728
 
729
-/* send SDT, PAT and PMT tables regulary */
729
+/* send SDT, PAT and PMT tables regularly */
730 730
 static void retransmit_si_info(AVFormatContext *s)
731 731
 {
732 732
     MpegTSWrite *ts = s->priv_data;
... ...
@@ -39,17 +39,17 @@ const MXFCodecUL ff_mxf_codec_uls[] = {
39 39
     { { 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 */
40 40
     { { 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 */
41 41
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x02,0x02,0x01,0x02,0x00 }, 13,    AV_CODEC_ID_DVVIDEO }, /* DV25 IEC PAL */
42
-    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14,   AV_CODEC_ID_JPEG2000 }, /* JPEG2000 Codestream */
43
-    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13,   AV_CODEC_ID_RAWVIDEO }, /* Uncompressed */
44
-    { { 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 */
42
+    { { 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 */
43
+    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x01,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13,   AV_CODEC_ID_RAWVIDEO }, /* uncompressed */
44
+    { { 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 */
45 45
     { { 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 */
46 46
     { { 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 */
47 47
     { { 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 */
48 48
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x02,0x01,0x31,0x11,0x01 }, 14,       AV_CODEC_ID_H264 }, /* H.264/MPEG-4 AVC SPS/PPS in-band */
49 49
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x0A,0x04,0x01,0x02,0x01,0x01,0x02,0x02,0x00 }, 15,       AV_CODEC_ID_V210 }, /* V210 */
50 50
     /* SoundEssenceCompression */
51
-    { { 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) */
52
-    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x00,0x00,0x00,0x00 }, 13,  AV_CODEC_ID_PCM_S16LE }, /* Uncompressed */
51
+    { { 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) */
52
+    { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x00,0x00,0x00,0x00 }, 13,  AV_CODEC_ID_PCM_S16LE }, /* uncompressed */
53 53
     { { 0x06,0x0E,0x2B,0x34,0x04,0x01,0x01,0x01,0x04,0x02,0x02,0x01,0x7F,0x00,0x00,0x00 }, 13,  AV_CODEC_ID_PCM_S16LE },
54 54
     { { 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 */
55 55
     { { 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 */
... ...
@@ -499,7 +499,7 @@ static int mxf_read_partition_pack(void *arg, AVIOContext *pb, int tag, int size
499 499
                partition->previous_partition);
500 500
     }
501 501
 
502
-    /* some files don'thave FooterPartition set in every partition */
502
+    /* some files don't have FooterPartition set in every partition */
503 503
     if (footer_partition) {
504 504
         if (mxf->footer_partition && mxf->footer_partition != footer_partition) {
505 505
             av_log(mxf->fc, AV_LOG_ERROR,
... ...
@@ -947,22 +947,22 @@ static void *mxf_resolve_strong_ref(MXFContext *mxf, UID *strong_ref, enum MXFMe
947 947
 
948 948
 static const MXFCodecUL mxf_picture_essence_container_uls[] = {
949 949
     // video essence container uls
950
-    { { 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 */
950
+    { { 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 */
951 951
     { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x02,0x41,0x01 }, 14,    AV_CODEC_ID_DVVIDEO }, /* DV 625 25mbps */
952
-    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x05,0x00,0x00 }, 14,   AV_CODEC_ID_RAWVIDEO }, /* Uncompressed Picture */
952
+    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x01,0x0d,0x01,0x03,0x01,0x02,0x05,0x00,0x00 }, 14,   AV_CODEC_ID_RAWVIDEO }, /* uncompressed picture */
953 953
     { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,      AV_CODEC_ID_NONE },
954 954
 };
955 955
 
956 956
 /* EC ULs for intra-only formats */
957 957
 static const MXFCodecUL mxf_intra_only_essence_container_uls[] = {
958
-    { { 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 */
958
+    { { 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 */
959 959
     { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,       AV_CODEC_ID_NONE },
960 960
 };
961 961
 
962 962
 /* intra-only PictureEssenceCoding ULs, where no corresponding EC UL exists */
963 963
 static const MXFCodecUL mxf_intra_only_picture_essence_coding_uls[] = {
964 964
     { { 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 */
965
-    { { 0x06,0x0e,0x2b,0x34,0x04,0x01,0x01,0x07,0x04,0x01,0x02,0x02,0x03,0x01,0x01,0x00 }, 14,   AV_CODEC_ID_JPEG2000 }, /* JPEG2000 Codestream */
965
+    { { 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 */
966 966
     { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,       AV_CODEC_ID_NONE },
967 967
 };
968 968
 
... ...
@@ -972,7 +972,7 @@ static const MXFCodecUL mxf_sound_essence_container_uls[] = {
972 972
     { { 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 */
973 973
     { { 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 */
974 974
     { { 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 */
975
-    { { 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) */
975
+    { { 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) */
976 976
     { { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00 },  0,      AV_CODEC_ID_NONE },
977 977
 };
978 978
 
... ...
@@ -1127,7 +1127,7 @@ static void mxf_write_index_table_segment(AVFormatContext *s)
1127 1127
         for (i = 0; i < mxf->edit_units_count; i++) {
1128 1128
             int temporal_offset = 0;
1129 1129
 
1130
-            if (!(mxf->index_entries[i].flags & 0x33)) { // I frame
1130
+            if (!(mxf->index_entries[i].flags & 0x33)) { // I-frame
1131 1131
                 mxf->last_key_index = key_index;
1132 1132
                 key_index = i;
1133 1133
             }
... ...
@@ -1154,7 +1154,7 @@ static void mxf_write_index_table_segment(AVFormatContext *s)
1154 1154
                     mxf->last_key_index = key_index;
1155 1155
             }
1156 1156
 
1157
-            if (!(mxf->index_entries[i].flags & 0x33) && // I frame
1157
+            if (!(mxf->index_entries[i].flags & 0x33) && // I-frame
1158 1158
                 mxf->index_entries[i].flags & 0x40 && !temporal_offset)
1159 1159
                 mxf->index_entries[i].flags |= 0x80; // random access
1160 1160
             avio_w8(pb, mxf->index_entries[i].flags);
... ...
@@ -1365,10 +1365,10 @@ static int mxf_parse_mpeg2_frame(AVFormatContext *s, AVStream *st,
1365 1365
         } else if (c == 0x100) { // pic
1366 1366
             int pict_type = (pkt->data[i+2]>>3) & 0x07;
1367 1367
             e->temporal_ref = (pkt->data[i+1]<<2) | (pkt->data[i+2]>>6);
1368
-            if (pict_type == 2) { // P frame
1368
+            if (pict_type == 2) { // P-frame
1369 1369
                 e->flags |= 0x22;
1370
-                sc->closed_gop = 0; // reset closed gop, don't matter anymore
1371
-            } else if (pict_type == 3) { // B frame
1370
+                sc->closed_gop = 0; // reset closed GOP, don't matter anymore
1371
+            } else if (pict_type == 3) { // B-frame
1372 1372
                 if (sc->closed_gop)
1373 1373
                     e->flags |= 0x13; // only backward prediction
1374 1374
                 else
... ...
@@ -1714,7 +1714,7 @@ static int mxf_write_packet(AVFormatContext *s, AVPacket *pkt)
1714 1714
     if (st->index == 0) {
1715 1715
         if (!mxf->edit_unit_byte_count &&
1716 1716
             (!mxf->edit_units_count || mxf->edit_units_count > EDIT_UNITS_PER_BODY) &&
1717
-            !(ie.flags & 0x33)) { // I frame, Gop start
1717
+            !(ie.flags & 0x33)) { // I-frame, GOP start
1718 1718
             mxf_write_klv_fill(s);
1719 1719
             if ((err = mxf_write_partition(s, 1, 2, body_partition_key, 0)) < 0)
1720 1720
                 return err;
... ...
@@ -56,14 +56,14 @@
56 56
  * (that is the offset of the data table after the header).
57 57
  * After checking all samples from (S1) all confirms this.
58 58
  *
59
- * Then, about NSVf[12-15], faster.nsf has 179700. When veiwing it in VLC,
59
+ * Then, about NSVf[12-15], faster.nsf has 179700. When viewing it in VLC,
60 60
  * I noticed there was about 1 NVSs chunk/s, so I ran
61 61
  * strings faster.nsv | grep NSVs | wc -l
62 62
  * which gave me 180. That leads me to think that NSVf[12-15] might be the
63 63
  * file length in milliseconds.
64 64
  * Let's try that:
65 65
  * 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
66
- * except for nstrailer (which doesn't have an NSVf header), it repports correct time.
66
+ * except for nsvtrailer (which doesn't have an NSVf header), it reports correct time.
67 67
  *
68 68
  * nsvtrailer.nsv (S1) does not have any NSVf header, only NSVs chunks,
69 69
  * 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 (pb->eof_reached)
... ...
@@ -681,7 +681,7 @@ static int nsv_read_packet(AVFormatContext *s, AVPacket *pkt)
681 681
         }
682 682
     }
683 683
 
684
-    /* this restaurant is not approvisionned :^] */
684
+    /* this restaurant is not provisioned :^] */
685 685
     return -1;
686 686
 }
687 687
 
... ...
@@ -52,7 +52,7 @@ static int dirac_header(AVFormatContext *s, int idx)
52 52
     st->codecpar->profile         = dsh->profile;
53 53
     st->codecpar->level           = dsh->level;
54 54
 
55
-    // dirac in ogg always stores timestamps as though the video were interlaced
55
+    // Dirac in Ogg always stores timestamps as though the video were interlaced
56 56
     avpriv_set_pts_info(st, 64, dsh->framerate.den, 2 * dsh->framerate.num);
57 57
 
58 58
     av_freep(&dsh);
... ...
@@ -60,7 +60,7 @@ static int dirac_header(AVFormatContext *s, int idx)
60 60
     return 1;
61 61
 }
62 62
 
63
-// various undocument things: granule is signed (only for dirac!)
63
+// various undocumented things: granule is signed (only for Dirac!)
64 64
 static uint64_t dirac_gptopts(AVFormatContext *s, int idx, uint64_t granule,
65 65
                               int64_t *dts_out)
66 66
 {
... ...
@@ -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 Libav.
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, (int) stream->frame_rate);  /* 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
... ...
@@ -397,7 +397,7 @@ static int rm_write_video(AVFormatContext *s, const uint8_t *buf, int size, int
397 397
     write_packet_header(s, stream, size + 7 + (size >= 0x4000)*4, key_frame);
398 398
     /* bit 7: '1' if final packet of a frame converted in several packets */
399 399
     avio_w8(pb, 0x81);
400
-    /* bit 7: '1' if I frame. bits 6..0 : sequence number in current
400
+    /* bit 7: '1' if I-frame. bits 6..0 : sequence number in current
401 401
        frame starting from 1 */
402 402
     if (key_frame) {
403 403
         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
 {
... ...
@@ -1994,7 +1994,7 @@ static int send_invoke_response(URLContext *s, RTMPPacket *pkt)
1994 1994
  * successful response, we will return set the value to number (otherwise number
1995 1995
  * will not be changed).
1996 1996
  *
1997
- * @return 0 if reading the value succeeds, negative value otherwiss
1997
+ * @return 0 if reading the value succeeds, negative value otherwise
1998 1998
  */
1999 1999
 static int read_number_result(RTMPPacket *pkt, double *number)
2000 2000
 {
... ...
@@ -2017,7 +2017,7 @@ static int read_number_result(RTMPPacket *pkt, double *number)
2017 2017
     // Value 3/4: Null
2018 2018
     if (ff_amf_read_null(&gbc))
2019 2019
         return AVERROR_INVALIDDATA;
2020
-    // Value 4/4: The resonse as AMF_NUMBER
2020
+    // Value 4/4: The response as AMF_NUMBER
2021 2021
     if (ff_amf_read_number(&gbc, &numbuffer))
2022 2022
         return AVERROR_INVALIDDATA;
2023 2023
     else
... ...
@@ -2508,7 +2508,7 @@ static int rtmp_close(URLContext *h)
2508 2508
  */
2509 2509
 static int inject_fake_duration_metadata(RTMPContext *rt)
2510 2510
 {
2511
-    // We need to insert the metdata packet directly after the FLV
2511
+    // We need to insert the metadata packet directly after the FLV
2512 2512
     // header, i.e. we need to move all other already read data by the
2513 2513
     // size of our fake metadata packet.
2514 2514
 
... ...
@@ -496,7 +496,7 @@ int ff_rtp_send_rtcp_feedback(RTPDemuxContext *s, URLContext *fd,
496 496
 
497 497
 /**
498 498
  * open a new RTP parse context for stream 'st'. 'st' can be NULL for
499
- * MPEG2-TS streams.
499
+ * MPEG-2 TS streams.
500 500
  */
501 501
 RTPDemuxContext *ff_rtp_parse_open(AVFormatContext *s1, AVStream *st,
502 502
                                    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 Libav.
... ...
@@ -285,7 +285,7 @@ static int h264_handle_packet_fu_a(AVFormatContext *ctx, AVPacket *pkt,
285 285
     uint8_t fu_indicator, fu_header, start_bit, nal_type, nal;
286 286
 
287 287
     if (len < 3) {
288
-        av_log(ctx, AV_LOG_ERROR, "Too short data for FU-A H264 RTP packet\n");
288
+        av_log(ctx, AV_LOG_ERROR, "Too short data for FU-A H.264 RTP packet\n");
289 289
         return AVERROR_INVALIDDATA;
290 290
     }
291 291
 
... ...
@@ -315,14 +315,14 @@ static int h264_handle_packet(AVFormatContext *ctx, PayloadContext *data,
315 315
     int result = 0;
316 316
 
317 317
     if (!len) {
318
-        av_log(ctx, AV_LOG_ERROR, "Empty H264 RTP packet\n");
318
+        av_log(ctx, AV_LOG_ERROR, "Empty H.264 RTP packet\n");
319 319
         return AVERROR_INVALIDDATA;
320 320
     }
321 321
     nal  = buf[0];
322 322
     type = nal & 0x1f;
323 323
 
324
-    /* Simplify the case (these are all the nal types used internally by
325
-     * the h264 codec). */
324
+    /* Simplify the case (these are all the NAL types used internally by
325
+     * the H.264 codec). */
326 326
     if (type >= 1 && type <= 23)
327 327
         type = 1;
328 328
     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
  */
... ...
@@ -136,7 +136,7 @@ static int rtp_parse_mp4_au(PayloadContext *data, const uint8_t *buf, int len)
136 136
 
137 137
     init_get_bits(&getbitcontext, buf, data->au_headers_length_bytes * 8);
138 138
 
139
-    /* XXX: Wrong if optionnal additional sections are present (cts, dts etc...) */
139
+    /* XXX: Wrong if optional additional sections are present (cts, dts etc...) */
140 140
     au_header_size = data->sizelength + data->indexlength;
141 141
     if (au_header_size <= 0 || (au_headers_length % au_header_size != 0))
142 142
         return -1;
... ...
@@ -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;
... ...
@@ -173,7 +173,7 @@ static int rtp_write_header(AVFormatContext *s1)
173 173
     case AV_CODEC_ID_H261:
174 174
         if (s1->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) {
175 175
             av_log(s, AV_LOG_ERROR,
176
-                   "Packetizing H261 is experimental and produces incorrect "
176
+                   "Packetizing H.261 is experimental and produces incorrect "
177 177
                    "packetization for cases where GOBs don't fit into packets "
178 178
                    "(even though most receivers may handle it just fine). "
179 179
                    "Please set -f_strict experimental in order to enable it.\n");
... ...
@@ -189,7 +189,7 @@ static int rtp_write_header(AVFormatContext *s1)
189 189
         break;
190 190
     case AV_CODEC_ID_HEVC:
191 191
         /* Only check for the standardized hvcC version of extradata, keeping
192
-         * things simple and similar to the avcC/H264 case above, instead
192
+         * things simple and similar to the avcC/H.264 case above, instead
193 193
          * of trying to handle the pre-standardization versions (as in
194 194
          * libavcodec/hevc.c). */
195 195
         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);
... ...
@@ -165,11 +165,11 @@ void ff_rtp_send_h263_rfc2190(AVFormatContext *s1, const uint8_t *buf, int size,
165 165
                         mb_info_pos++;
166 166
                     } else {
167 167
                         av_log(s1, AV_LOG_ERROR,
168
-                               "Unable to split H263 packet, use -mb_info %d "
168
+                               "Unable to split H.263 packet, use -mb_info %d "
169 169
                                "or lower.\n", s->max_payload_size - 8);
170 170
                     }
171 171
                 } else {
172
-                    av_log(s1, AV_LOG_ERROR, "Unable to split H263 packet, "
172
+                    av_log(s1, AV_LOG_ERROR, "Unable to split H.263 packet, "
173 173
                            "use -mb_info %d or -ps 1.\n",
174 174
                            s->max_payload_size - 8);
175 175
                 }
... ...
@@ -57,7 +57,7 @@ void ff_rtp_send_jpeg(AVFormatContext *s1, const uint8_t *buf, int size)
57 57
         return;
58 58
     }
59 59
 
60
-    /* preparse the header for getting some infos */
60
+    /* preparse the header for getting some info */
61 61
     for (i = 0; i < size; i++) {
62 62
         if (buf[i] != 0xff)
63 63
             continue;
... ...
@@ -67,7 +67,7 @@ void ff_rtp_send_xiph(AVFormatContext *s1, const uint8_t *buff, int size)
67 67
     // 0 - whole frame (possibly multiple frames)
68 68
     // 1 - first fragment
69 69
     // 2 - fragment continuation
70
-    // 3 - last fragmement
70
+    // 3 - last fragment
71 71
     frag = size <= max_pkt_size ? 0 : 1;
72 72
 
73 73
     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 Libav.
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 Libav.
6 6
  *
... ...
@@ -53,8 +53,8 @@ enum IEC61937DataType {
53 53
 
54 54
 static const uint16_t spdif_mpeg_pkt_offset[2][3] = {
55 55
     //LAYER1  LAYER2  LAYER3
56
-    { 3072,    9216,   4608 }, // MPEG2 LSF
57
-    { 1536,    4608,   4608 }, // MPEG1
56
+    { 3072,    9216,   4608 }, // MPEG-2 LSF
57
+    { 1536,    4608,   4608 }, // MPEG-1
58 58
 };
59 59
 
60 60
 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)
... ...
@@ -234,7 +234,7 @@ int ffurl_get_multi_file_handle(URLContext *h, int **handles, int *numhandles);
234 234
 int ffurl_shutdown(URLContext *h, int flags);
235 235
 
236 236
 /**
237
- * Check if the user has requested to interrup a blocking function
237
+ * Check if the user has requested to interrupt a blocking function
238 238
  * associated with cb.
239 239
  */
240 240
 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 Libav.
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 Libav.
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 Libav.
6 6
  *
... ...
@@ -136,7 +136,7 @@ static int wsvqa_read_header(AVFormatContext *s)
136 136
         chunk_tag = AV_RB32(&scratch[0]);
137 137
         chunk_size = AV_RB32(&scratch[4]);
138 138
 
139
-        /* catch any unknown header tags, for curiousity */
139
+        /* catch any unknown header tags, for curiosity */
140 140
         switch (chunk_tag) {
141 141
         case CINF_TAG:
142 142
         case CINH_TAG:
... ...
@@ -38,7 +38,7 @@
38 38
 #include "asf.h"
39 39
 #include "mpegts.h"
40 40
 
41
-/* Macros for formating GUIDs */
41
+/* Macros for formatting GUIDs */
42 42
 #define PRI_PRETTY_GUID \
43 43
     "%08"PRIx32"-%04"PRIx16"-%04"PRIx16"-%02x%02x%02x%02x%02x%02x%02x%02x"
44 44
 #define ARG_PRETTY_GUID(g) \
... ...
@@ -328,7 +328,7 @@ typedef struct WtvContext {
328 328
     AVIOContext *pb;       /** timeline file */
329 329
     int64_t epoch;
330 330
     int64_t pts;             /** pts for next data chunk */
331
-    int64_t last_valid_pts;  /** latest valid pts, used for interative seeking */
331
+    int64_t last_valid_pts;  /** latest valid pts, used for interactive seeking */
332 332
 
333 333
     /* maintain private seek index, as the AVIndexEntry->pos is relative to the
334 334
        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.
... ...
@@ -260,7 +260,7 @@ enum AVPictureType {
260 260
     AV_PICTURE_TYPE_I = 1, ///< Intra
261 261
     AV_PICTURE_TYPE_P,     ///< Predicted
262 262
     AV_PICTURE_TYPE_B,     ///< Bi-dir predicted
263
-    AV_PICTURE_TYPE_S,     ///< S(GMC)-VOP MPEG4
263
+    AV_PICTURE_TYPE_S,     ///< S(GMC)-VOP MPEG-4
264 264
     AV_PICTURE_TYPE_SI,    ///< Switching Intra
265 265
     AV_PICTURE_TYPE_SP,    ///< Switching Predicted
266 266
     AV_PICTURE_TYPE_BI,    ///< BI type
... ...
@@ -61,7 +61,7 @@
61 61
 #define AV_DICT_DONT_STRDUP_KEY 4   /**< Take ownership of a key that's been
62 62
                                          allocated with av_malloc() and children. */
63 63
 #define AV_DICT_DONT_STRDUP_VAL 8   /**< Take ownership of a value that's been
64
-                                         allocated with av_malloc() and chilren. */
64
+                                         allocated with av_malloc() and children. */
65 65
 #define AV_DICT_DONT_OVERWRITE 16   ///< Don't overwrite existing entries.
66 66
 #define AV_DICT_APPEND         32   /**< If the entry already exists, append to it.  Note that no
67 67
                                       delimiter is added, the strings are simply concatenated. */
... ...
@@ -269,7 +269,7 @@ typedef struct AVFrame {
269 269
     int palette_has_changed;
270 270
 
271 271
     /**
272
-     * reordered opaque 64bit (generally an integer or a double precision float
272
+     * reordered opaque 64 bits (generally an integer or a double precision float
273 273
      * PTS but can be anything).
274 274
      * The user sets AVCodecContext.reordered_opaque to represent the input at
275 275
      * 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.
... ...
@@ -270,7 +270,7 @@ typedef struct AVOption {
270 270
 #define AV_OPT_FLAG_VIDEO_PARAM     16
271 271
 #define AV_OPT_FLAG_SUBTITLE_PARAM  32
272 272
 /**
273
- * The option is inteded for exporting values to the caller.
273
+ * The option is intended for exporting values to the caller.
274 274
  */
275 275
 #define AV_OPT_FLAG_EXPORT          64
276 276
 /**
... ...
@@ -50,7 +50,7 @@
50 50
  * to run on the IBM VGA graphics adapter use 6-bit palette components.
51 51
  *
52 52
  * @par
53
- * For all the 8bit per pixel formats, an RGB32 palette is in data[1] like
53
+ * For all the 8 bits per pixel formats, an RGB32 palette is in data[1] like
54 54
  * for pal8. This palette is filled in automatically by the function
55 55
  * allocating the picture.
56 56
  */
... ...
@@ -67,7 +67,7 @@ enum AVPixelFormat {
67 67
     AV_PIX_FMT_GRAY8,     ///<        Y        ,  8bpp
68 68
     AV_PIX_FMT_MONOWHITE, ///<        Y        ,  1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb
69 69
     AV_PIX_FMT_MONOBLACK, ///<        Y        ,  1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb
70
-    AV_PIX_FMT_PAL8,      ///< 8 bit with AV_PIX_FMT_RGB32 palette
70
+    AV_PIX_FMT_PAL8,      ///< 8 bits with AV_PIX_FMT_RGB32 palette
71 71
     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
72 72
     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
73 73
     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
... ...
@@ -132,7 +132,7 @@ enum AVPixelFormat {
132 132
     AV_PIX_FMT_YUV444P16LE,  ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
133 133
     AV_PIX_FMT_YUV444P16BE,  ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
134 134
 #if FF_API_VDPAU
135
-    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
135
+    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
136 136
 #endif
137 137
     AV_PIX_FMT_DXVA2_VLD,    ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer
138 138
 
... ...
@@ -140,7 +140,7 @@ enum AVPixelFormat {
140 140
     AV_PIX_FMT_RGB444BE,  ///< packed RGB 4:4:4, 16bpp, (msb)4A 4R 4G 4B(lsb), big-endian, most significant bits to 0
141 141
     AV_PIX_FMT_BGR444LE,  ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), little-endian, most significant bits to 1
142 142
     AV_PIX_FMT_BGR444BE,  ///< packed BGR 4:4:4, 16bpp, (msb)4A 4B 4G 4R(lsb), big-endian, most significant bits to 1
143
-    AV_PIX_FMT_YA8,       ///< 8bit gray, 8bit alpha
143
+    AV_PIX_FMT_YA8,       ///< 8 bits gray, 8 bits alpha
144 144
 
145 145
     AV_PIX_FMT_Y400A = AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8
146 146
 
... ...
@@ -202,8 +202,8 @@ enum AVPixelFormat {
202 202
 
203 203
     AV_PIX_FMT_VDA,          ///< HW acceleration through VDA, data[3] contains a CVPixelBufferRef
204 204
 
205
-    AV_PIX_FMT_YA16BE,       ///< 16bit gray, 16bit alpha (big-endian)
206
-    AV_PIX_FMT_YA16LE,       ///< 16bit gray, 16bit alpha (little-endian)
205
+    AV_PIX_FMT_YA16BE,       ///< 16 bits gray, 16 bits alpha (big-endian)
206
+    AV_PIX_FMT_YA16LE,       ///< 16 bits gray, 16 bits alpha (little-endian)
207 207
 
208 208
     AV_PIX_FMT_GBRAP,        ///< planar GBRA 4:4:4:4 32bpp
209 209
     AV_PIX_FMT_GBRAP16BE,    ///< planar GBRA 4:4:4:4 64bpp, big-endian
... ...
@@ -320,9 +320,9 @@ enum AVColorTransferCharacteristic {
320 320
     AVCOL_TRC_IEC61966_2_4 = 11, ///< IEC 61966-2-4
321 321
     AVCOL_TRC_BT1361_ECG   = 12, ///< ITU-R BT1361 Extended Colour Gamut
322 322
     AVCOL_TRC_IEC61966_2_1 = 13, ///< IEC 61966-2-1 (sRGB or sYCC)
323
-    AVCOL_TRC_BT2020_10    = 14, ///< ITU-R BT2020 for 10 bit system
324
-    AVCOL_TRC_BT2020_12    = 15, ///< ITU-R BT2020 for 12 bit system
325
-    AVCOL_TRC_SMPTEST2084  = 16, ///< SMPTE ST 2084 for 10, 12, 14 and 16 bit systems
323
+    AVCOL_TRC_BT2020_10    = 14, ///< ITU-R BT2020 for 10-bit system
324
+    AVCOL_TRC_BT2020_12    = 15, ///< ITU-R BT2020 for 12-bit system
325
+    AVCOL_TRC_SMPTEST2084  = 16, ///< SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
326 326
     AVCOL_TRC_SMPTEST428_1 = 17, ///< SMPTE ST 428-1
327 327
     AVCOL_TRC_NB,                ///< Not part of ABI
328 328
 };
... ...
@@ -364,8 +364,8 @@ enum AVColorRange {
364 364
  */
365 365
 enum AVChromaLocation {
366 366
     AVCHROMA_LOC_UNSPECIFIED = 0,
367
-    AVCHROMA_LOC_LEFT        = 1, ///< mpeg2/4, h264 default
368
-    AVCHROMA_LOC_CENTER      = 2, ///< mpeg1, jpeg, h263
367
+    AVCHROMA_LOC_LEFT        = 1, ///< MPEG-2/4, H.264 default
368
+    AVCHROMA_LOC_CENTER      = 2, ///< MPEG-1, JPEG, H.263
369 369
     AVCHROMA_LOC_TOPLEFT     = 3, ///< DV
370 370
     AVCHROMA_LOC_TOP         = 4,
371 371
     AVCHROMA_LOC_BOTTOMLEFT  = 5,
... ...
@@ -79,7 +79,7 @@ static uint32_t get_generic_seed(void)
79 79
     if (!sha) {
80 80
         uint32_t seed = 0;
81 81
         int j;
82
-        // Unable to allocate an sha context, just xor the buffer together
82
+        // Unable to allocate an SHA context, just XOR the buffer together
83 83
         // to create something hopefully unique.
84 84
         for (j = 0; j < 512; j++)
85 85
             seed ^= buffer[j];
... ...
@@ -180,7 +180,7 @@ int ff_get_cpu_flags_x86(void)
180 180
 
181 181
         /* Similar to the above but for AVX functions on AMD processors.
182 182
            This is necessary only for functions using YMM registers on Bulldozer
183
-           based CPUs as they lack 256-bits execution units. SSE/AVX functions
183
+           based CPUs as they lack 256-bit execution units. SSE/AVX functions
184 184
            using XMM registers are always faster on them.
185 185
            AV_CPU_FLAG_AVX and AV_CPU_FLAG_AVXSLOW are both set so that AVX is
186 186
            used unless explicitly disabled by checking AV_CPU_FLAG_AVXSLOW.
... ...
@@ -612,7 +612,7 @@ yuv2rgb48_X_c_template(SwsContext *c, const int16_t *lumFilter,
612 612
             V += chrVSrc[j][i] * chrFilter[j];
613 613
         }
614 614
 
615
-        // 8bit: 12+15=27; 16-bit: 12+19=31
615
+        // 8 bits: 12+15=27; 16 bits: 12+19=31
616 616
         Y1 >>= 14; // 10
617 617
         Y1 += 0x10000;
618 618
         Y2 >>= 14;
... ...
@@ -620,20 +620,20 @@ yuv2rgb48_X_c_template(SwsContext *c, const int16_t *lumFilter,
620 620
         U  >>= 14;
621 621
         V  >>= 14;
622 622
 
623
-        // 8bit: 27 -> 17bit, 16bit: 31 - 14 = 17bit
623
+        // 8 bits: 27 -> 17 bits, 16 bits: 31 - 14 = 17 bits
624 624
         Y1 -= c->yuv2rgb_y_offset;
625 625
         Y2 -= c->yuv2rgb_y_offset;
626 626
         Y1 *= c->yuv2rgb_y_coeff;
627 627
         Y2 *= c->yuv2rgb_y_coeff;
628 628
         Y1 += 1 << 13; // 21
629 629
         Y2 += 1 << 13;
630
-        // 8bit: 17 + 13bit = 30bit, 16bit: 17 + 13bit = 30bit
630
+        // 8 bits: 17 + 13 bits = 30 bits, 16 bits: 17 + 13 bits = 30 bits
631 631
 
632 632
         R = V * c->yuv2rgb_v2r_coeff;
633 633
         G = V * c->yuv2rgb_v2g_coeff + U * c->yuv2rgb_u2g_coeff;
634 634
         B =                            U * c->yuv2rgb_u2b_coeff;
635 635
 
636
-        // 8bit: 30 - 22 = 8bit, 16bit: 30bit - 14 = 16bit
636
+        // 8 bits: 30 - 22 = 8 bits, 16 bits: 30 bits - 14 = 16 bits
637 637
         output_pixel(&dest[0], av_clip_uintp2(R_B + Y1, 30) >> 14);
638 638
         output_pixel(&dest[1], av_clip_uintp2(  G + Y1, 30) >> 14);
639 639
         output_pixel(&dest[2], av_clip_uintp2(B_R + Y1, 30) >> 14);
... ...
@@ -895,7 +895,7 @@ yuv2rgb_write(uint8_t *_dest, int i, unsigned Y1, unsigned Y2,
895 895
 
896 896
         dest[i * 2 + 0] = r[Y1 + dr1] + g[Y1 + dg1] + b[Y1 + db1];
897 897
         dest[i * 2 + 1] = r[Y2 + dr2] + g[Y2 + dg2] + b[Y2 + db2];
898
-    } else /* 8/4-bit */ {
898
+    } else /* 8/4 bits */ {
899 899
         uint8_t *dest = (uint8_t *) _dest;
900 900
         const uint8_t *r = (const uint8_t *) _r;
901 901
         const uint8_t *g = (const uint8_t *) _g;
... ...
@@ -74,7 +74,7 @@ const char *swscale_license(void);
74 74
 #define SWS_PRINT_INFO              0x1000
75 75
 
76 76
 //the following 3 flags are not completely implemented
77
-//internal chrominace subsampling info
77
+//internal chrominance subsampling info
78 78
 #define SWS_FULL_CHR_H_INT    0x2000
79 79
 //input subsampling info
80 80
 #define SWS_FULL_CHR_H_INP    0x4000
... ...
@@ -66,9 +66,9 @@ typedef int (*SwsFunc)(struct SwsContext *context, const uint8_t *src[],
66 66
  * Write one line of horizontally scaled data to planar output
67 67
  * without any additional vertical scaling (or point-scaling).
68 68
  *
69
- * @param src     scaled source data, 15bit for 8-10bit output,
70
- *                19-bit for 16bit output (in int32_t)
71
- * @param dest    pointer to the output plane. For >8bit
69
+ * @param src     scaled source data, 15 bits for 8-10-bit output,
70
+ *                19 bits for 16-bit output (in int32_t)
71
+ * @param dest    pointer to the output plane. For >8-bit
72 72
  *                output, this is in uint16_t
73 73
  * @param dstW    width of destination in pixels
74 74
  * @param dither  ordered dither array of type int16_t and size 8
... ...
@@ -81,11 +81,11 @@ typedef void (*yuv2planar1_fn)(const int16_t *src, uint8_t *dest, int dstW,
81 81
  * Write one line of horizontally scaled data to planar output
82 82
  * with multi-point vertical scaling between input pixels.
83 83
  *
84
- * @param filter        vertical luma/alpha scaling coefficients, 12bit [0,4096]
85
- * @param src           scaled luma (Y) or alpha (A) source data, 15bit for 8-10bit output,
86
- *                      19-bit for 16bit output (in int32_t)
84
+ * @param filter        vertical luma/alpha scaling coefficients, 12 bits [0,4096]
85
+ * @param src           scaled luma (Y) or alpha (A) source data, 15 bits for
86
+ *                      8-10-bit output, 19 bits for 16-bit output (in int32_t)
87 87
  * @param filterSize    number of vertical input lines to scale
88
- * @param dest          pointer to output plane. For >8bit
88
+ * @param dest          pointer to output plane. For >8-bit
89 89
  *                      output, this is in uint16_t
90 90
  * @param dstW          width of destination pixels
91 91
  * @param offset        Dither offset
... ...
@@ -99,13 +99,13 @@ typedef void (*yuv2planarX_fn)(const int16_t *filter, int filterSize,
99 99
  * with multi-point vertical scaling between input pixels.
100 100
  *
101 101
  * @param c             SWS scaling context
102
- * @param chrFilter     vertical chroma scaling coefficients, 12bit [0,4096]
103
- * @param chrUSrc       scaled chroma (U) source data, 15bit for 8-10bit output,
104
- *                      19-bit for 16bit output (in int32_t)
105
- * @param chrVSrc       scaled chroma (V) source data, 15bit for 8-10bit output,
106
- *                      19-bit for 16bit output (in int32_t)
102
+ * @param chrFilter     vertical chroma scaling coefficients, 12 bits [0,4096]
103
+ * @param chrUSrc       scaled chroma (U) source data, 15 bits for 8-10-bit
104
+ *                      output, 19 bits for 16-bit output (in int32_t)
105
+ * @param chrVSrc       scaled chroma (V) source data, 15 bits for 8-10-bit
106
+ *                      output, 19 bits for 16-bit output (in int32_t)
107 107
  * @param chrFilterSize number of vertical chroma input lines to scale
108
- * @param dest          pointer to the output plane. For >8bit
108
+ * @param dest          pointer to the output plane. For >8-bit
109 109
  *                      output, this is in uint16_t
110 110
  * @param dstW          width of chroma planes
111 111
  */
... ...
@@ -122,15 +122,15 @@ typedef void (*yuv2interleavedX_fn)(struct SwsContext *c,
122 122
  * that this function may do chroma scaling, see the "uvalpha" argument.
123 123
  *
124 124
  * @param c       SWS scaling context
125
- * @param lumSrc  scaled luma (Y) source data, 15bit for 8-10bit output,
126
- *                19-bit for 16bit output (in int32_t)
127
- * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,
128
- *                19-bit for 16bit output (in int32_t)
129
- * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,
130
- *                19-bit for 16bit output (in int32_t)
131
- * @param alpSrc  scaled alpha (A) source data, 15bit for 8-10bit output,
132
- *                19-bit for 16bit output (in int32_t)
133
- * @param dest    pointer to the output plane. For 16bit output, this is
125
+ * @param lumSrc  scaled luma (Y) source data, 15 bits for 8-10-bit output,
126
+ *                19 bits for 16-bit output (in int32_t)
127
+ * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output,
128
+ *                19 bits for 16-bit output (in int32_t)
129
+ * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output,
130
+ *                19 bits for 16-bit output (in int32_t)
131
+ * @param alpSrc  scaled alpha (A) source data, 15 bits for 8-10-bit output,
132
+ *                19 bits for 16-bit output (in int32_t)
133
+ * @param dest    pointer to the output plane. For 16-bit output, this is
134 134
  *                uint16_t
135 135
  * @param dstW    width of lumSrc and alpSrc in pixels, number of pixels
136 136
  *                to write into dest[]
... ...
@@ -155,15 +155,15 @@ typedef void (*yuv2packed1_fn)(struct SwsContext *c, const int16_t *lumSrc,
155 155
  * output by doing bilinear scaling between two input lines.
156 156
  *
157 157
  * @param c       SWS scaling context
158
- * @param lumSrc  scaled luma (Y) source data, 15bit for 8-10bit output,
159
- *                19-bit for 16bit output (in int32_t)
160
- * @param chrUSrc scaled chroma (U) source data, 15bit for 8-10bit output,
161
- *                19-bit for 16bit output (in int32_t)
162
- * @param chrVSrc scaled chroma (V) source data, 15bit for 8-10bit output,
163
- *                19-bit for 16bit output (in int32_t)
164
- * @param alpSrc  scaled alpha (A) source data, 15bit for 8-10bit output,
165
- *                19-bit for 16bit output (in int32_t)
166
- * @param dest    pointer to the output plane. For 16bit output, this is
158
+ * @param lumSrc  scaled luma (Y) source data, 15 bits for 8-10-bit output,
159
+ *                19 bits for 16-bit output (in int32_t)
160
+ * @param chrUSrc scaled chroma (U) source data, 15 bits for 8-10-bit output,
161
+ *                19 bits for 16-bit output (in int32_t)
162
+ * @param chrVSrc scaled chroma (V) source data, 15 bits for 8-10-bit output,
163
+ *                19 bits for 16-bit output (in int32_t)
164
+ * @param alpSrc  scaled alpha (A) source data, 15 bits for 8-10-bit output,
165
+ *                19 bits for 16-bit output (in int32_t)
166
+ * @param dest    pointer to the output plane. For 16-bit output, this is
167 167
  *                uint16_t
168 168
  * @param dstW    width of lumSrc and alpSrc in pixels, number of pixels
169 169
  *                to write into dest[]
... ...
@@ -189,19 +189,19 @@ typedef void (*yuv2packed2_fn)(struct SwsContext *c, const int16_t *lumSrc[2],
189 189
  * output by doing multi-point vertical scaling between input pixels.
190 190
  *
191 191
  * @param c             SWS scaling context
192
- * @param lumFilter     vertical luma/alpha scaling coefficients, 12bit [0,4096]
193
- * @param lumSrc        scaled luma (Y) source data, 15bit for 8-10bit output,
194
- *                      19-bit for 16bit output (in int32_t)
192
+ * @param lumFilter     vertical luma/alpha scaling coefficients, 12 bits [0,4096]
193
+ * @param lumSrc        scaled luma (Y) source data, 15 bits for 8-10-bit output,
194
+ *                      19 bits for 16-bit output (in int32_t)
195 195
  * @param lumFilterSize number of vertical luma/alpha input lines to scale
196
- * @param chrFilter     vertical chroma scaling coefficients, 12bit [0,4096]
197
- * @param chrUSrc       scaled chroma (U) source data, 15bit for 8-10bit output,
198
- *                      19-bit for 16bit output (in int32_t)
199
- * @param chrVSrc       scaled chroma (V) source data, 15bit for 8-10bit output,
200
- *                      19-bit for 16bit output (in int32_t)
196
+ * @param chrFilter     vertical chroma scaling coefficients, 12 bits [0,4096]
197
+ * @param chrUSrc       scaled chroma (U) source data, 15 bits for 8-10-bit output,
198
+ *                      19 bits for 16-bit output (in int32_t)
199
+ * @param chrVSrc       scaled chroma (V) source data, 15 bits for 8-10-bit output,
200
+ *                      19 bits for 16-bit output (in int32_t)
201 201
  * @param chrFilterSize number of vertical chroma input lines to scale
202
- * @param alpSrc        scaled alpha (A) source data, 15bit for 8-10bit output,
203
- *                      19-bit for 16bit output (in int32_t)
204
- * @param dest          pointer to the output plane. For 16bit output, this is
202
+ * @param alpSrc        scaled alpha (A) source data, 15 bits for 8-10-bit output,
203
+ *                      19 bits for 16-bit output (in int32_t)
204
+ * @param dest          pointer to the output plane. For 16-bit output, this is
205 205
  *                      uint16_t
206 206
  * @param dstW          width of lumSrc and alpSrc in pixels, number of pixels
207 207
  *                      to write into dest[]
... ...
@@ -223,19 +223,19 @@ typedef void (*yuv2packedX_fn)(struct SwsContext *c, const int16_t *lumFilter,
223 223
  * output by doing multi-point vertical scaling between input pixels.
224 224
  *
225 225
  * @param c             SWS scaling context
226
- * @param lumFilter     vertical luma/alpha scaling coefficients, 12bit [0,4096]
227
- * @param lumSrc        scaled luma (Y) source data, 15bit for 8-10bit output,
228
- *                      19-bit for 16bit output (in int32_t)
226
+ * @param lumFilter     vertical luma/alpha scaling coefficients, 12 bits [0,4096]
227
+ * @param lumSrc        scaled luma (Y) source data, 15 bits for 8-10-bit output,
228
+ *                      19 bits for 16-bit output (in int32_t)
229 229
  * @param lumFilterSize number of vertical luma/alpha input lines to scale
230
- * @param chrFilter     vertical chroma scaling coefficients, 12bit [0,4096]
231
- * @param chrUSrc       scaled chroma (U) source data, 15bit for 8-10bit output,
232
- *                      19-bit for 16bit output (in int32_t)
233
- * @param chrVSrc       scaled chroma (V) source data, 15bit for 8-10bit output,
234
- *                      19-bit for 16bit output (in int32_t)
230
+ * @param chrFilter     vertical chroma scaling coefficients, 12 bits [0,4096]
231
+ * @param chrUSrc       scaled chroma (U) source data, 15 bits for 8-10-bit output,
232
+ *                      19 bits for 16-bit output (in int32_t)
233
+ * @param chrVSrc       scaled chroma (V) source data, 15 bits for 8-10-bit output,
234
+ *                      19 bits for 16-bit output (in int32_t)
235 235
  * @param chrFilterSize number of vertical chroma input lines to scale
236
- * @param alpSrc        scaled alpha (A) source data, 15bit for 8-10bit output,
237
- *                      19-bit for 16bit output (in int32_t)
238
- * @param dest          pointer to the output planes. For 16bit output, this is
236
+ * @param alpSrc        scaled alpha (A) source data, 15 bits for 8-10-bit output,
237
+ *                      19 bits for 16-bit output (in int32_t)
238
+ * @param dest          pointer to the output planes. For 16-bit output, this is
239 239
  *                      uint16_t
240 240
  * @param dstW          width of lumSrc and alpSrc in pixels, number of pixels
241 241
  *                      to write into dest[]
... ...
@@ -471,7 +471,7 @@ typedef struct SwsContext {
471 471
      * Scale one horizontal line of input data using a bilinear filter
472 472
      * to produce one line of output data. Compared to SwsContext->hScale(),
473 473
      * please take note of the following caveats when using these:
474
-     * - Scaling is done using only 7bit instead of 14bit coefficients.
474
+     * - Scaling is done using only 7 bits instead of 14-bit coefficients.
475 475
      * - You can use no more than 5 input pixels to produce 4 output
476 476
      *   pixels. Therefore, this filter should not be used for downscaling
477 477
      *   by more than ~20% in width (because that equals more than 5/4th
... ...
@@ -502,15 +502,15 @@ typedef struct SwsContext {
502 502
      * @param dst        pointer to destination buffer for horizontally scaled
503 503
      *                   data. If the number of bits per component of one
504 504
      *                   destination pixel (SwsContext->dstBpc) is <= 10, data
505
-     *                   will be 15bpc in 16bits (int16_t) width. Else (i.e.
505
+     *                   will be 15 bpc in 16 bits (int16_t) width. Else (i.e.
506 506
      *                   SwsContext->dstBpc == 16), data will be 19bpc in
507
-     *                   32bits (int32_t) width.
507
+     *                   32 bits (int32_t) width.
508 508
      * @param dstW       width of destination image
509 509
      * @param src        pointer to source data to be scaled. If the number of
510 510
      *                   bits per component of a source pixel (SwsContext->srcBpc)
511
-     *                   is 8, this is 8bpc in 8bits (uint8_t) width. Else
511
+     *                   is 8, this is 8bpc in 8 bits (uint8_t) width. Else
512 512
      *                   (i.e. SwsContext->dstBpc > 8), this is native depth
513
-     *                   in 16bits (uint16_t) width. In other words, for 9-bit
513
+     *                   in 16 bits (uint16_t) width. In other words, for 9-bit
514 514
      *                   YUV input, this is 9bpc, for 10-bit YUV input, this is
515 515
      *                   10bpc, and for 16-bit RGB or YUV, this is 16bpc.
516 516
      * @param filter     filter coefficients to be used per output pixel for
... ...
@@ -943,7 +943,7 @@ static int planarCopyWrapper(SwsContext *c, const uint8_t *src[],
943 943
                             COPY16TO9_OR_10(AV_RL16, AV_WL16);
944 944
                         }
945 945
                     }
946
-                } else /* 8bit */ {
946
+                } else /* 8 bits */ {
947 947
 #define COPY8TO9_OR_10(wfunc) \
948 948
                     if (shiftonly) { \
949 949
                         for (i = 0; i < height; i++) { \
... ...
@@ -50,8 +50,8 @@ 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
 
... ...
@@ -125,10 +125,10 @@ cglobal yuv2planeX_%1, %3, 8, %2, filter, fltsize, src, dst, w, dither, offset
125 125
 
126 126
 .pixelloop:
127 127
 %assign %%i 0
128
-    ; the rep here is for the 8bit output mmx case, where dither covers
128
+    ; the rep here is for the 8-bit output MMX case, where dither covers
129 129
     ; 8 pixels but we can only handle 2 pixels per register, and thus 4
130 130
     ; pixels per iteration. In order to not have to keep track of where
131
-    ; we are w.r.t. dithering, we unroll the mmx/8bit loop x2.
131
+    ; we are w.r.t. dithering, we unroll the MMX/8-bit loop x2.
132 132
 %if %1 == 8
133 133
 %assign %%repcnt 16/mmsize
134 134
 %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",