Mercurial > libavcodec.hg
comparison bgmc.c @ 12024:fdafbcef52f5 libavcodec
Fix grammar errors in documentation
author | mru |
---|---|
date | Wed, 30 Jun 2010 15:38:06 +0000 |
parents | 7dd2a45249a9 |
children |
comparison
equal
deleted
inserted
replaced
12023:c7455450364d | 12024:fdafbcef52f5 |
---|---|
422 cf_tables_2[5], cf_tables_2[6], cf_tables_2[7], cf_tables_3[0], | 422 cf_tables_2[5], cf_tables_2[6], cf_tables_2[7], cf_tables_3[0], |
423 cf_tables_3[1], cf_tables_3[2], cf_tables_3[3], cf_tables_3[4] | 423 cf_tables_3[1], cf_tables_3[2], cf_tables_3[3], cf_tables_3[4] |
424 }; | 424 }; |
425 | 425 |
426 | 426 |
427 /** Initializes a given lookup table using a given delta | 427 /** Initialize a given lookup table using a given delta |
428 */ | 428 */ |
429 static void bgmc_lut_fillp(uint8_t *lut, unsigned int *lut_status, | 429 static void bgmc_lut_fillp(uint8_t *lut, unsigned int *lut_status, |
430 unsigned int delta) | 430 unsigned int delta) |
431 { | 431 { |
432 unsigned int sx, i; | 432 unsigned int sx, i; |
444 | 444 |
445 *lut_status = delta; | 445 *lut_status = delta; |
446 } | 446 } |
447 | 447 |
448 | 448 |
449 /** Retunes the index of a suitable lookup table for a given delta | 449 /** Retune the index of a suitable lookup table for a given delta |
450 */ | 450 */ |
451 static uint8_t* bgmc_lut_getp(uint8_t *lut, unsigned int *lut_status, | 451 static uint8_t* bgmc_lut_getp(uint8_t *lut, unsigned int *lut_status, |
452 unsigned int delta) | 452 unsigned int delta) |
453 { | 453 { |
454 unsigned int i = av_clip(delta, 0, LUT_BUFF - 1); | 454 unsigned int i = av_clip(delta, 0, LUT_BUFF - 1); |
460 | 460 |
461 return lut; | 461 return lut; |
462 } | 462 } |
463 | 463 |
464 | 464 |
465 /** Initializes the lookup table arrays | 465 /** Initialize the lookup table arrays |
466 */ | 466 */ |
467 int ff_bgmc_init(AVCodecContext *avctx, uint8_t **cf_lut, unsigned int **cf_lut_status) | 467 int ff_bgmc_init(AVCodecContext *avctx, uint8_t **cf_lut, unsigned int **cf_lut_status) |
468 { | 468 { |
469 *cf_lut = av_malloc(sizeof(*cf_lut ) * LUT_BUFF * 16 * LUT_SIZE); | 469 *cf_lut = av_malloc(sizeof(*cf_lut ) * LUT_BUFF * 16 * LUT_SIZE); |
470 *cf_lut_status = av_malloc(sizeof(*cf_lut_status) * LUT_BUFF); | 470 *cf_lut_status = av_malloc(sizeof(*cf_lut_status) * LUT_BUFF); |
477 | 477 |
478 return 0; | 478 return 0; |
479 } | 479 } |
480 | 480 |
481 | 481 |
482 /** Releases the lookup table arrays | 482 /** Release the lookup table arrays |
483 */ | 483 */ |
484 void ff_bgmc_end(uint8_t **cf_lut, unsigned int **cf_lut_status) | 484 void ff_bgmc_end(uint8_t **cf_lut, unsigned int **cf_lut_status) |
485 { | 485 { |
486 av_freep(cf_lut); | 486 av_freep(cf_lut); |
487 av_freep(cf_lut_status); | 487 av_freep(cf_lut_status); |
488 } | 488 } |
489 | 489 |
490 | 490 |
491 /** Initializes decoding and reads the first value | 491 /** Initialize decoding and reads the first value |
492 */ | 492 */ |
493 void ff_bgmc_decode_init(GetBitContext *gb, | 493 void ff_bgmc_decode_init(GetBitContext *gb, |
494 unsigned int *h, unsigned int *l, unsigned int *v) | 494 unsigned int *h, unsigned int *l, unsigned int *v) |
495 { | 495 { |
496 *h = TOP_VALUE; | 496 *h = TOP_VALUE; |
505 { | 505 { |
506 skip_bits_long(gb, -(VALUE_BITS - 2)); | 506 skip_bits_long(gb, -(VALUE_BITS - 2)); |
507 } | 507 } |
508 | 508 |
509 | 509 |
510 /** Reads and decodes a block Gilbert-Moore coded symbol | 510 /** Read and decode a block Gilbert-Moore coded symbol |
511 */ | 511 */ |
512 void ff_bgmc_decode(GetBitContext *gb, unsigned int num, int32_t *dst, | 512 void ff_bgmc_decode(GetBitContext *gb, unsigned int num, int32_t *dst, |
513 unsigned int delta, unsigned int sx, | 513 unsigned int delta, unsigned int sx, |
514 unsigned int *h, unsigned int *l, unsigned int *v, | 514 unsigned int *h, unsigned int *l, unsigned int *v, |
515 uint8_t *cf_lut, unsigned int *cf_lut_status) | 515 uint8_t *cf_lut, unsigned int *cf_lut_status) |