aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/ralf.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-03-25 01:56:53 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-25 01:56:53 +0100
commit8bf95e8bd5c20eb940bd9583d3f947d8210eeb56 (patch)
tree43936a02f5da95392199e07b1ad38980e0ac2bc8 /libavcodec/ralf.c
parentf4c380a5e65c60422c6f62cab7bfe6155276d11d (diff)
parentd5ed5e7d0c1fa46de348db0de4c82b0f621db3d4 (diff)
downloadffmpeg-8bf95e8bd5c20eb940bd9583d3f947d8210eeb56.tar.gz
Merge remote-tracking branch 'qatar/master'
* qatar/master: avc: Add a function for converting mp4 style extradata to annex b pthread: free progress if buffer allocation failed. lavc/avconv: support changing frame sizes in codecs with frame mt. libavformat: Document who sets the AVStream.id field utvideo: mark output picture as keyframe. sunrast: Add support for negative linesize. vp8: fix update_lf_deltas in libavcodec/vp8.c ralf: read Huffman code lengths without GetBitContext Conflicts: ffmpeg.c libavcodec/sunrastenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ralf.c')
-rw-r--r--libavcodec/ralf.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/ralf.c b/libavcodec/ralf.c
index 38e7e69cb7..0e5b04663f 100644
--- a/libavcodec/ralf.c
+++ b/libavcodec/ralf.c
@@ -80,17 +80,17 @@ static int init_ralf_vlc(VLC *vlc, const uint8_t *data, int elems)
int counts[17], prefixes[18];
int i, cur_len;
int max_bits = 0;
- GetBitContext gb;
-
- init_get_bits(&gb, data, elems * 4);
+ int nb = 0;
for (i = 0; i <= 16; i++)
counts[i] = 0;
for (i = 0; i < elems; i++) {
- cur_len = get_bits(&gb, 4) + 1;
+ cur_len = (nb ? *data & 0xF : *data >> 4) + 1;
counts[cur_len]++;
max_bits = FFMAX(max_bits, cur_len);
lens[i] = cur_len;
+ data += nb;
+ nb ^= 1;
}
prefixes[1] = 0;
for (i = 1; i <= 16; i++)