comparison ac3dec.c @ 8254:be0f5221ccd0 libavcodec

ac3dec: use uint8_t for band sizes
author jbr
date Thu, 04 Dec 2008 02:51:39 +0000
parents 5057047bcc52
children 1c4ec499557e
comparison
equal deleted inserted replaced
8253:d1724ad564e7 8254:be0f5221ccd0
726 */ 726 */
727 static void decode_band_structure(GetBitContext *gbc, int blk, int eac3, 727 static void decode_band_structure(GetBitContext *gbc, int blk, int eac3,
728 int ecpl, int start_subband, int end_subband, 728 int ecpl, int start_subband, int end_subband,
729 const uint8_t *default_band_struct, 729 const uint8_t *default_band_struct,
730 uint8_t *band_struct, int *num_subbands, 730 uint8_t *band_struct, int *num_subbands,
731 int *num_bands, int *band_sizes) 731 int *num_bands, uint8_t *band_sizes)
732 { 732 {
733 int subbnd, bnd, n_subbands, n_bands, bnd_sz[22]; 733 int subbnd, bnd, n_subbands, n_bands;
734 uint8_t bnd_sz[22];
734 735
735 n_subbands = end_subband - start_subband; 736 n_subbands = end_subband - start_subband;
736 737
737 /* decode band structure from bitstream or use default */ 738 /* decode band structure from bitstream or use default */
738 if (!eac3 || get_bits1(gbc)) { 739 if (!eac3 || get_bits1(gbc)) {
767 if (num_subbands) 768 if (num_subbands)
768 *num_subbands = n_subbands; 769 *num_subbands = n_subbands;
769 if (num_bands) 770 if (num_bands)
770 *num_bands = n_bands; 771 *num_bands = n_bands;
771 if (band_sizes) 772 if (band_sizes)
772 memcpy(band_sizes, bnd_sz, sizeof(int)*n_bands); 773 memcpy(band_sizes, bnd_sz, n_bands);
773 } 774 }
774 775
775 /** 776 /**
776 * Decode a single audio block from the AC-3 bitstream. 777 * Decode a single audio block from the AC-3 bitstream.
777 */ 778 */