diff options
author | Steve L'Homme <slhomme@divxcorp.com> | 2005-10-19 22:27:34 +0000 |
---|---|---|
committer | Roberto Togni <r_togni@tiscali.it> | 2005-10-19 22:27:34 +0000 |
commit | 065148e7734c88032a74e36d1a4278f8f467333d (patch) | |
tree | 90b88ea14a2831df72bcad38aa40e1af1d2e2824 /libavcodec/qdm2.c | |
parent | 9918aa24e4bb04a131062bac0fc54c6e46543f3d (diff) | |
download | ffmpeg-065148e7734c88032a74e36d1a4278f8f467333d.tar.gz |
init_get_bits() requires size in bits, not bytes
Patch by Steve Lhomme ||| steve | lhomme >at< free | fr |||
Originally committed as revision 4653 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/qdm2.c')
-rw-r--r-- | libavcodec/qdm2.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/qdm2.c b/libavcodec/qdm2.c index 31e0043db0..211859c465 100644 --- a/libavcodec/qdm2.c +++ b/libavcodec/qdm2.c @@ -1082,7 +1082,7 @@ static void process_subpacket_9 (QDM2Context *q, QDM2SubPNode *node) GetBitContext gb; int i, j, k, n, ch, run, level, diff; - init_get_bits(&gb, node->packet->data, node->packet->size); + init_get_bits(&gb, node->packet->data, node->packet->size*8); n = coeff_per_sb_for_avg[q->coeff_per_sb_select][QDM2_SB_USED(q->sub_sampling) - 1] + 1; // same as averagesomething function @@ -1120,7 +1120,7 @@ static void process_subpacket_10 (QDM2Context *q, QDM2SubPNode *node, int length { GetBitContext gb; - init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size)); + init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size*8)); if (length != 0) { init_tone_level_dequantization(q, &gb, length); @@ -1142,7 +1142,7 @@ static void process_subpacket_11 (QDM2Context *q, QDM2SubPNode *node, int length { GetBitContext gb; - init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size)); + init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size*8)); if (length >= 32) { int c = get_bits (&gb, 13); @@ -1166,7 +1166,7 @@ static void process_subpacket_12 (QDM2Context *q, QDM2SubPNode *node, int length { GetBitContext gb; - init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size)); + init_get_bits(&gb, ((node == NULL) ? empty_buffer : node->packet->data), ((node == NULL) ? 0 : node->packet->size*8)); synthfilt_build_sb_samples(q, &gb, length, 8, QDM2_SB_USED(q->sub_sampling)); } @@ -1225,7 +1225,7 @@ static void qdm2_decode_super_block (QDM2Context *q) average_quantized_coeffs(q); // average elements in quantized_coeffs[max_ch][10][8] - init_get_bits(&gb, q->compressed_data, q->compressed_size); + init_get_bits(&gb, q->compressed_data, q->compressed_size*8); qdm2_decode_sub_packet_header(&gb, &header); if (header.type < 2 || header.type >= 8) { @@ -1237,7 +1237,7 @@ static void qdm2_decode_super_block (QDM2Context *q) q->superblocktype_2_3 = (header.type == 2 || header.type == 3); packet_bytes = (q->compressed_size - get_bits_count(&gb) / 8); - init_get_bits(&gb, header.data, header.size); + init_get_bits(&gb, header.data, header.size*8); if (header.type == 2 || header.type == 4 || header.type == 5) { int csum = 257 * get_bits(&gb, 8) + 2 * get_bits(&gb, 8); @@ -1267,7 +1267,7 @@ static void qdm2_decode_super_block (QDM2Context *q) q->sub_packet_list_A[i - 1].next = &q->sub_packet_list_A[i]; /* seek to next block */ - init_get_bits(&gb, header.data, header.size); + init_get_bits(&gb, header.data, header.size*8); skip_bits(&gb, next_index*8); if (next_index >= header.size) @@ -1455,7 +1455,7 @@ static void qdm2_decode_fft_packets (QDM2Context *q) return; /* decode FFT tones */ - init_get_bits (&gb, packet->data, packet->size); + init_get_bits (&gb, packet->data, packet->size*8); if (packet->type >= 32 && packet->type < 48 && !fft_subpackets[packet->type - 16]) unknown_flag = 1; |