Browse code

spelling fixes patch by Peter Robinson pbrobinson @ at @ gmail . dot . com and myself

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

Diego Biurrun authored on 2005/06/18 00:02:53
Showing 8 changed files
... ...
@@ -298,7 +298,7 @@ extern int motion_estimation_method;
298 298
 
299 299
 /* encoding support
300 300
    these flags can be passed in AVCodecContext.flags before initing 
301
-   Note: note not everything is supported yet 
301
+   Note: not everything is supported yet.
302 302
 */
303 303
 
304 304
 #define CODEC_FLAG_QSCALE 0x0002  ///< use fixed qscale 
... ...
@@ -314,7 +314,7 @@ extern int motion_estimation_method;
314 314
 #define CODEC_FLAG_PASS2 0x0400   ///< use internal 2pass ratecontrol in second pass mode 
315 315
 #define CODEC_FLAG_EXTERN_HUFF 0x1000 ///< use external huffman table (for mjpeg) 
316 316
 #define CODEC_FLAG_GRAY  0x2000   ///< only decode/encode grayscale 
317
-#define CODEC_FLAG_EMU_EDGE 0x4000///< dont draw edges 
317
+#define CODEC_FLAG_EMU_EDGE 0x4000///< don't draw edges
318 318
 #define CODEC_FLAG_PSNR           0x8000 ///< error[?] variables will be set during encoding 
319 319
 #define CODEC_FLAG_TRUNCATED  0x00010000 /** input bitstream might be truncated at a random location instead 
320 320
                                             of only at frame boundaries */
... ...
@@ -367,7 +367,7 @@ extern int motion_estimation_method;
367 367
  */
368 368
 #define CODEC_CAP_DELAY           0x0020
369 369
 
370
-//the following defines might change, so dont expect compatibility if u use them
370
+//the following defines may change, don't expect compatibility if you use them
371 371
 #define MB_TYPE_INTRA4x4   0x0001
372 372
 #define MB_TYPE_INTRA16x16 0x0002 //FIXME h264 specific
373 373
 #define MB_TYPE_INTRA_PCM  0x0004 //FIXME h264 specific
... ...
@@ -430,7 +430,7 @@ typedef struct AVPanScan{
430 430
     int linesize[4];\
431 431
     /**\
432 432
      * pointer to the first allocated byte of the picture. can be used in get_buffer/release_buffer\
433
-     * this isnt used by lavc unless the default get/release_buffer() is used\
433
+     * this isn't used by lavc unless the default get/release_buffer() is used\
434 434
      * - encoding: \
435 435
      * - decoding: \
436 436
      */\
... ...
@@ -632,8 +632,8 @@ typedef struct AVPanScan{
632 632
 
633 633
 #define FF_BUFFER_TYPE_INTERNAL 1
634 634
 #define FF_BUFFER_TYPE_USER     2 ///< Direct rendering buffers (image is (de)allocated by user)
635
-#define FF_BUFFER_TYPE_SHARED   4 ///< buffer from somewher else, dont dealloc image (data/base), all other tables are not shared
636
-#define FF_BUFFER_TYPE_COPY     8 ///< just a (modified) copy of some other buffer, dont dealloc anything
635
+#define FF_BUFFER_TYPE_SHARED   4 ///< buffer from somewhere else, don't dealloc image (data/base), all other tables are not shared
636
+#define FF_BUFFER_TYPE_COPY     8 ///< just a (modified) copy of some other buffer, don't dealloc anything
637 637
 
638 638
 
639 639
 #define FF_I_TYPE 1 // Intra
... ...
@@ -866,7 +866,7 @@ typedef struct AVCodecContext {
866 866
     /* unused, FIXME remove*/
867 867
     int rtp_mode;
868 868
     
869
-    int rtp_payload_size;   /* The size of the RTP payload, the coder will  */
869
+    int rtp_payload_size;   /* The size of the RTP payload: the coder will  */
870 870
                             /* do it's best to deliver a chunk with size    */
871 871
                             /* below rtp_payload_size, the chunk will start */
872 872
                             /* with a start code on some codecs like H.263  */
... ...
@@ -874,12 +874,12 @@ typedef struct AVCodecContext {
874 874
                             /* headers inside the transmited RTP payload    */
875 875
 
876 876
     
877
-    /* The RTP callcack: This function is called  */
878
-    /* every time the encoder as a packet to send */
879
-    /* Depends on the encoder if the data starts  */
880
-    /* with a Start Code (it should) H.263 does.  */
881
-    /* mb_nb contains the number of macroblocks   */
882
-    /* encoded in the RTP payload                 */
877
+    /* The RTP callback: This function is called   */
878
+    /* every time the encoder has a packet to send */
879
+    /* Depends on the encoder if the data starts   */
880
+    /* with a Start Code (it should) H.263 does.   */
881
+    /* mb_nb contains the number of macroblocks    */
882
+    /* encoded in the RTP payload                  */
883 883
     void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb); 
884 884
 
885 885
     /* statistics, used for 2-pass encoding */
... ...
@@ -1458,13 +1458,13 @@ typedef struct AVCodecContext {
1458 1458
     
1459 1459
     /**
1460 1460
      * internal_buffer count. 
1461
-     * Dont touch, used by lavc default_get_buffer()
1461
+     * Don't touch, used by lavc default_get_buffer()
1462 1462
      */
1463 1463
     int internal_buffer_count;
1464 1464
     
1465 1465
     /**
1466 1466
      * internal_buffers. 
1467
-     * Dont touch, used by lavc default_get_buffer()
1467
+     * Don't touch, used by lavc default_get_buffer()
1468 1468
      */
1469 1469
     void *internal_buffer;
1470 1470
 
... ...
@@ -2265,13 +2265,13 @@ int av_reduce(int *dst_nom, int *dst_den, int64_t nom, int64_t den, int64_t max)
2265 2265
 
2266 2266
 /**
2267 2267
  * rescale a 64bit integer with rounding to nearest.
2268
- * a simple a*b/c isnt possible as it can overflow
2268
+ * a simple a*b/c isn't possible as it can overflow
2269 2269
  */
2270 2270
 int64_t av_rescale(int64_t a, int64_t b, int64_t c);
2271 2271
 
2272 2272
 /**
2273 2273
  * rescale a 64bit integer with specified rounding.
2274
- * a simple a*b/c isnt possible as it can overflow
2274
+ * a simple a*b/c isn't possible as it can overflow
2275 2275
  */
2276 2276
 int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding);
2277 2277
 
... ...
@@ -334,14 +334,14 @@ GET_CACHE(name, gb)
334 334
     will output the contents of the internal cache, next bit is MSB of 32 or 64 bit (FIXME 64bit)
335 335
 
336 336
 SHOW_UBITS(name, gb, num)
337
-    will return the nest num bits
337
+    will return the next num bits
338 338
 
339 339
 SHOW_SBITS(name, gb, num)
340
-    will return the nest num bits and do sign extension
340
+    will return the next num bits and do sign extension
341 341
 
342 342
 SKIP_BITS(name, gb, num)
343 343
     will skip over the next num bits
344
-    note, this is equinvalent to SKIP_CACHE; SKIP_COUNTER
344
+    note, this is equivalent to SKIP_CACHE; SKIP_COUNTER
345 345
 
346 346
 SKIP_CACHE(name, gb, num)
347 347
     will remove the next num bits from the cache (note SKIP_COUNTER MUST be called before UPDATE_CACHE / CLOSE_READER)
... ...
@@ -353,7 +353,7 @@ LAST_SKIP_CACHE(name, gb, num)
353 353
     will remove the next num bits from the cache if it is needed for UPDATE_CACHE otherwise it will do nothing
354 354
 
355 355
 LAST_SKIP_BITS(name, gb, num)
356
-    is equinvalent to SKIP_LAST_CACHE; SKIP_COUNTER
356
+    is equivalent to SKIP_LAST_CACHE; SKIP_COUNTER
357 357
 
358 358
 for examples see get_bits, show_bits, skip_bits, get_vlc
359 359
 */
... ...
@@ -598,7 +598,7 @@ static inline int get_sbits(GetBitContext *s, int n){
598 598
 
599 599
 /**
600 600
  * reads 0-17 bits.
601
- * Note, the alt bitstream reader can read upto 25 bits, but the libmpeg2 reader cant
601
+ * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
602 602
  */
603 603
 static inline unsigned int get_bits(GetBitContext *s, int n){
604 604
     register int tmp;
... ...
@@ -614,7 +614,7 @@ unsigned int get_bits_long(GetBitContext *s, int n);
614 614
 
615 615
 /**
616 616
  * shows 0-17 bits.
617
- * Note, the alt bitstream reader can read upto 25 bits, but the libmpeg2 reader cant
617
+ * Note, the alt bitstream reader can read up to 25 bits, but the libmpeg2 reader can't
618 618
  */
619 619
 static inline unsigned int show_bits(GetBitContext *s, int n){
620 620
     register int tmp;
... ...
@@ -245,10 +245,10 @@ void h263_encode_picture_header(MpegEncContext * s, int picture_number)
245 245
         /* By now UMV IS DISABLED ON H.263v1, since the restrictions
246 246
         of H.263v1 UMV implies to check the predicted MV after
247 247
         calculation of the current MB to see if we're on the limits */
248
-        put_bits(&s->pb, 1, 0);	/* unrestricted motion vector: off */
248
+        put_bits(&s->pb, 1, 0);	/* Unrestricted Motion Vector: off */
249 249
         put_bits(&s->pb, 1, 0);	/* SAC: off */
250
-        put_bits(&s->pb, 1, s->obmc);	/* advanced prediction mode */
251
-        put_bits(&s->pb, 1, 0);	/* not PB frame */
250
+        put_bits(&s->pb, 1, s->obmc);	/* Advanced Prediction */
251
+        put_bits(&s->pb, 1, 0);	/* only I/P frames, no PB frame */
252 252
         put_bits(&s->pb, 5, s->qscale);
253 253
         put_bits(&s->pb, 1, 0);	/* Continuous Presence Multipoint mode: off */
254 254
     } else {
... ...
@@ -122,7 +122,7 @@ int ff_h263_decode_end(AVCodecContext *avctx)
122 122
 }
123 123
 
124 124
 /**
125
- * retunrs the number of bytes consumed for building the current frame
125
+ * returns the number of bytes consumed for building the current frame
126 126
  */
127 127
 static int get_consumed_bytes(MpegEncContext *s, int buf_size){
128 128
     int pos= (get_bits_count(&s->gb)+7)>>3;
... ...
@@ -279,7 +279,7 @@ static int decode_slice(MpegEncContext *s){
279 279
             s->workaround_bugs &= ~FF_BUG_NO_PADDING;
280 280
     }
281 281
 
282
-    // handle formats which dont have unique end markers
282
+    // handle formats which don't have unique end markers
283 283
     if(s->msmpeg4_version || (s->workaround_bugs&FF_BUG_NO_PADDING)){ //FIXME perhaps solve this more cleanly
284 284
         int left= s->gb.size_in_bits - get_bits_count(&s->gb);
285 285
         int max_extra=7;
... ...
@@ -669,7 +669,7 @@ retry:
669 669
     s->current_picture.pict_type= s->pict_type;
670 670
     s->current_picture.key_frame= s->pict_type == I_TYPE;
671 671
 
672
-    /* skip b frames if we dont have reference frames */
672
+    /* skip B-frames if we don't have reference frames */
673 673
     if(s->last_picture_ptr==NULL && (s->pict_type==B_TYPE || s->dropable)) return get_consumed_bytes(s, buf_size);
674 674
     /* skip b frames if we are in a hurry */
675 675
     if(avctx->hurry_up && s->pict_type==B_TYPE) return get_consumed_bytes(s, buf_size);
... ...
@@ -772,7 +772,7 @@ assert(s->current_picture.pict_type == s->pict_type);
772 772
     /* we substract 1 because it is added on utils.c    */
773 773
     avctx->frame_number = s->picture_number - 1;
774 774
 
775
-    /* dont output the last pic after seeking */
775
+    /* don't output the last pic after seeking */
776 776
     if(s->last_picture_ptr || s->low_delay)
777 777
         *data_size = sizeof(AVFrame);
778 778
 #ifdef PRINT_FRAME_TIME
... ...
@@ -664,7 +664,7 @@ static inline void set_p_mv_tables(MpegEncContext * s, int mx, int my, int mv4)
664 664
     s->p_mv_table[xy][0] = mx;
665 665
     s->p_mv_table[xy][1] = my;
666 666
 
667
-    /* has allready been set to the 4 MV if 4MV is done */
667
+    /* has already been set to the 4 MV if 4MV is done */
668 668
     if(mv4){
669 669
         int mot_xy= s->block_index[0];
670 670
 
... ...
@@ -364,7 +364,7 @@ static int alloc_picture(MpegEncContext *s, Picture *pic, int shared){
364 364
         }
365 365
 
366 366
         if(pic->linesize[1] != pic->linesize[2]){
367
-            av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed (uv stride missmatch)\n");
367
+            av_log(s->avctx, AV_LOG_ERROR, "get_buffer() failed (uv stride mismatch)\n");
368 368
             return -1;
369 369
         }
370 370
 
... ...
@@ -542,9 +542,9 @@ static void update_duplicate_context_after_me(MpegEncContext *dst, MpegEncContex
542 542
     COPY(lambda2);
543 543
     COPY(picture_in_gop_number);
544 544
     COPY(gop_picture_number);
545
-    COPY(frame_pred_frame_dct); //FIXME dont set in encode_header
546
-    COPY(progressive_frame); //FIXME dont set in encode_header
547
-    COPY(partitioned_frame); //FIXME dont set in encode_header
545
+    COPY(frame_pred_frame_dct); //FIXME don't set in encode_header
546
+    COPY(progressive_frame); //FIXME don't set in encode_header
547
+    COPY(partitioned_frame); //FIXME don't set in encode_header
548 548
 #undef COPY
549 549
 }
550 550
 
... ...
@@ -1475,7 +1475,7 @@ int MPV_frame_start(MpegEncContext *s, AVCodecContext *avctx)
1475 1475
     }
1476 1476
 alloc:
1477 1477
     if(!s->encoding){
1478
-        /* release non refernce frames */
1478
+        /* release non reference frames */
1479 1479
         for(i=0; i<MAX_PICTURE_COUNT; i++){
1480 1480
             if(s->picture[i].data[0] && !s->picture[i].reference /*&& s->picture[i].type!=FF_BUFFER_TYPE_SHARED*/){
1481 1481
                 s->avctx->release_buffer(s->avctx, (AVFrame*)&s->picture[i]);
... ...
@@ -1526,7 +1526,7 @@ alloc:
1526 1526
     
1527 1527
     if(s->pict_type != I_TYPE && (s->last_picture_ptr==NULL || s->last_picture_ptr->data[0]==NULL)){
1528 1528
         av_log(avctx, AV_LOG_ERROR, "warning: first frame is no keyframe\n");
1529
-        assert(s->pict_type != B_TYPE); //these should have been dropped if we dont have a reference
1529
+        assert(s->pict_type != B_TYPE); //these should have been dropped if we don't have a reference
1530 1530
         goto alloc;
1531 1531
     }
1532 1532
 
... ...
@@ -1548,8 +1548,8 @@ alloc:
1548 1548
     s->hurry_up= s->avctx->hurry_up;
1549 1549
     s->error_resilience= avctx->error_resilience;
1550 1550
 
1551
-    /* set dequantizer, we cant do it during init as it might change for mpeg4
1552
-       and we cant do it in the header decode as init isnt called for mpeg4 there yet */
1551
+    /* set dequantizer, we can't do it during init as it might change for mpeg4
1552
+       and we can't do it in the header decode as init isnt called for mpeg4 there yet */
1553 1553
     if(s->mpeg_quant || s->codec_id == CODEC_ID_MPEG2VIDEO){
1554 1554
         s->dct_unquantize_intra = s->dct_unquantize_mpeg2_intra;
1555 1555
         s->dct_unquantize_inter = s->dct_unquantize_mpeg2_inter;
... ...
@@ -1608,7 +1608,7 @@ void MPV_frame_end(MpegEncContext *s)
1608 1608
 #endif    
1609 1609
 
1610 1610
     if(s->encoding){
1611
-        /* release non refernce frames */
1611
+        /* release non-reference frames */
1612 1612
         for(i=0; i<MAX_PICTURE_COUNT; i++){
1613 1613
             if(s->picture[i].data[0] && !s->picture[i].reference /*&& s->picture[i].type!=FF_BUFFER_TYPE_SHARED*/){
1614 1614
                 s->avctx->release_buffer(s->avctx, (AVFrame*)&s->picture[i]);
... ...
@@ -2146,7 +2146,7 @@ static void select_input_picture(MpegEncContext *s){
2146 2146
         s->reordered_input_picture[i-1]= s->reordered_input_picture[i];
2147 2147
     s->reordered_input_picture[MAX_PICTURE_COUNT-1]= NULL;
2148 2148
 
2149
-    /* set next picture types & ordering */
2149
+    /* set next picture type & ordering */
2150 2150
     if(s->reordered_input_picture[0]==NULL && s->input_picture[0]){
2151 2151
         if(/*s->picture_in_gop_number >= s->gop_size ||*/ s->next_picture_ptr==NULL || s->intra_only){
2152 2152
             s->reordered_input_picture[0]= s->input_picture[0];
... ...
@@ -2263,7 +2263,7 @@ no_output_pic:
2263 2263
         copy_picture(&s->new_picture, s->reordered_input_picture[0]);
2264 2264
 
2265 2265
         if(s->reordered_input_picture[0]->type == FF_BUFFER_TYPE_SHARED){
2266
-            // input is a shared pix, so we cant modifiy it -> alloc a new one & ensure that the shared one is reuseable
2266
+            // input is a shared pix, so we can't modifiy it -> alloc a new one & ensure that the shared one is reuseable
2267 2267
         
2268 2268
             int i= ff_find_unused_picture(s, 0);
2269 2269
             Picture *pic= &s->picture[i];
... ...
@@ -3210,7 +3210,7 @@ static inline void chroma_4mv_motion_lowres(MpegEncContext *s,
3210 3210
 }
3211 3211
 
3212 3212
 /**
3213
- * motion compesation of a single macroblock
3213
+ * motion compensation of a single macroblock
3214 3214
  * @param s context
3215 3215
  * @param dest_y luma destination pointer
3216 3216
  * @param dest_cb chroma cb/u destination pointer
... ...
@@ -3459,7 +3459,7 @@ static inline void MPV_motion(MpegEncContext *s,
3459 3459
 }
3460 3460
 
3461 3461
 /**
3462
- * motion compesation of a single macroblock
3462
+ * motion compensation of a single macroblock
3463 3463
  * @param s context
3464 3464
  * @param dest_y luma destination pointer
3465 3465
  * @param dest_cb chroma cb/u destination pointer
... ...
@@ -4004,7 +4004,7 @@ void ff_draw_horiz_band(MpegEncContext *s, int y, int h){
4004 4004
 }
4005 4005
 
4006 4006
 void ff_init_block_index(MpegEncContext *s){ //FIXME maybe rename
4007
-    const int linesize= s->current_picture.linesize[0]; //not s->linesize as this woulnd be wrong for field pics
4007
+    const int linesize= s->current_picture.linesize[0]; //not s->linesize as this would be wrong for field pics
4008 4008
     const int uvlinesize= s->current_picture.linesize[1];
4009 4009
     const int mb_size= 4 - s->avctx->lowres;
4010 4010
         
... ...
@@ -181,7 +181,7 @@ typedef struct Picture{
181 181
     uint16_t *mb_var;           ///< Table for MB variances 
182 182
     uint16_t *mc_mb_var;        ///< Table for motion compensated MB variances 
183 183
     uint8_t *mb_mean;           ///< Table for MB luminance 
184
-    int32_t *mb_cmp_score;	///< Table for MB cmp scores, for mb decission FIXME remove
184
+    int32_t *mb_cmp_score;	///< Table for MB cmp scores, for mb decision FIXME remove
185 185
     int b_frame_score;          /* */
186 186
 } Picture;
187 187
 
... ...
@@ -292,10 +292,10 @@ typedef struct MpegEncContext {
292 292
     int b_frames_since_non_b;  ///< used for encoding, relative to not yet reordered input 
293 293
     int64_t user_specified_pts;///< last non zero pts from AVFrame which was passed into avcodec_encode_video()
294 294
     int mb_width, mb_height;   ///< number of MBs horizontally & vertically 
295
-    int mb_stride;             ///< mb_width+1 used for some arrays to allow simple addressng of left & top MBs withoutt sig11
296
-    int b8_stride;             ///< 2*mb_width+1 used for some 8x8 block arrays to allow simple addressng
297
-    int b4_stride;             ///< 4*mb_width+1 used for some 4x4 block arrays to allow simple addressng
298
-    int h_edge_pos, v_edge_pos;///< horizontal / vertical position of the right/bottom edge (pixel replicateion)
295
+    int mb_stride;             ///< mb_width+1 used for some arrays to allow simple addressing of left & top MBs without sig11
296
+    int b8_stride;             ///< 2*mb_width+1 used for some 8x8 block arrays to allow simple addressing
297
+    int b4_stride;             ///< 4*mb_width+1 used for some 4x4 block arrays to allow simple addressing
298
+    int h_edge_pos, v_edge_pos;///< horizontal / vertical position of the right/bottom edge (pixel replication)
299 299
     int mb_num;                ///< number of MBs of a picture 
300 300
     int linesize;              ///< line size, in bytes, may be different from width 
301 301
     int uvlinesize;            ///< line size, for chroma in bytes, may be different from width 
... ...
@@ -358,7 +358,7 @@ typedef struct MpegEncContext {
358 358
     uint8_t *pred_dir_table;      ///< used to store pred_dir for partitioned decoding 
359 359
     uint8_t *allocated_edge_emu_buffer;
360 360
     uint8_t *edge_emu_buffer;     ///< points into the middle of allocated_edge_emu_buffer
361
-    uint8_t *rd_scratchpad;       ///< scartchpad for rate distortion mb decission
361
+    uint8_t *rd_scratchpad;       ///< scratchpad for rate distortion mb decision
362 362
     uint8_t *obmc_scratchpad;
363 363
     uint8_t *b_scratchpad;        ///< scratchpad used for writing into write only buffers
364 364
 
... ...
@@ -380,7 +380,7 @@ typedef struct MpegEncContext {
380 380
     int h263_long_vectors;      ///< use horrible h263v1 long vector mode 
381 381
     int decode;                 ///< if 0 then decoding will be skipped (for encoding b frames for example)
382 382
 
383
-    DSPContext dsp;             ///< pointers for accelerated dsp fucntions 
383
+    DSPContext dsp;             ///< pointers for accelerated dsp functions
384 384
     int f_code;                 ///< forward MV resolution 
385 385
     int b_code;                 ///< backward MV resolution for B Frames (mpeg4) 
386 386
     int16_t (*p_mv_table_base)[2];
... ...
@@ -583,7 +583,7 @@ int avcodec_encode_video(AVCodecContext *avctx, uint8_t *buf, int buf_size,
583 583
     if((avctx->codec->capabilities & CODEC_CAP_DELAY) || pict){
584 584
         int ret = avctx->codec->encode(avctx, buf, buf_size, (void *)pict);
585 585
         avctx->frame_number++;
586
-        emms_c(); //needed to avoid a emms_c() call before every return;
586
+        emms_c(); //needed to avoid an emms_c() call before every return;
587 587
     
588 588
         return ret;
589 589
     }else
... ...
@@ -621,7 +621,7 @@ int avcodec_decode_video(AVCodecContext *avctx, AVFrame *picture,
621 621
         ret = avctx->codec->decode(avctx, picture, got_picture_ptr, 
622 622
                                 buf, buf_size);
623 623
 
624
-        emms_c(); //needed to avoid a emms_c() call before every return;
624
+        emms_c(); //needed to avoid an emms_c() call before every return;
625 625
     
626 626
         if (*got_picture_ptr)                           
627 627
             avctx->frame_number++;