diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-03-25 01:56:53 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-03-25 01:56:53 +0100 |
commit | 8bf95e8bd5c20eb940bd9583d3f947d8210eeb56 (patch) | |
tree | 43936a02f5da95392199e07b1ad38980e0ac2bc8 /libavcodec/vp8.c | |
parent | f4c380a5e65c60422c6f62cab7bfe6155276d11d (diff) | |
parent | d5ed5e7d0c1fa46de348db0de4c82b0f621db3d4 (diff) | |
download | ffmpeg-streaming-8bf95e8bd5c20eb940bd9583d3f947d8210eeb56.zip ffmpeg-streaming-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/vp8.c')
-rw-r--r-- | libavcodec/vp8.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/libavcodec/vp8.c b/libavcodec/vp8.c index 9b12aa8..a7a1512 100644 --- a/libavcodec/vp8.c +++ b/libavcodec/vp8.c @@ -162,11 +162,23 @@ static void update_lf_deltas(VP8Context *s) VP56RangeCoder *c = &s->c; int i; - for (i = 0; i < 4; i++) - s->lf_delta.ref[i] = vp8_rac_get_sint(c, 6); + for (i = 0; i < 4; i++) { + if (vp8_rac_get(c)) { + s->lf_delta.ref[i] = vp8_rac_get_uint(c, 6); + + if (vp8_rac_get(c)) + s->lf_delta.ref[i] = -s->lf_delta.ref[i]; + } + } + + for (i = MODE_I4x4; i <= VP8_MVMODE_SPLIT; i++) { + if (vp8_rac_get(c)) { + s->lf_delta.mode[i] = vp8_rac_get_uint(c, 6); - for (i = MODE_I4x4; i <= VP8_MVMODE_SPLIT; i++) - s->lf_delta.mode[i] = vp8_rac_get_sint(c, 6); + if (vp8_rac_get(c)) + s->lf_delta.mode[i] = -s->lf_delta.mode[i]; + } + } } static int setup_partitions(VP8Context *s, const uint8_t *buf, int buf_size) |