Mercurial > libavcodec.hg
comparison indeo2.c @ 2783:7a411f408d74 libavcodec
Here is the patch suggested by: unkaggregate, users sf net
Main reason is: deltas in interframes need scaling by 3/4 before applying.
Detailed description is at:
http://sourceforge.net/tracker/index.php?func=detail&aid=1222099&group_id=16082&atid=116082
He also mentioned some samples at:
http://www.nerdgrounds.com/indeo21_test/
patch posted to ffmpeg-devel by (Kostya: kostya shishkov, gmail com)
author | michael |
---|---|
date | Sat, 09 Jul 2005 21:39:29 +0000 |
parents | f20c1cdfce76 |
children | fd5d7c732c6b |
comparison
equal
deleted
inserted
replaced
2782:67ea9a5a8fff | 2783:7a411f408d74 |
---|---|
116 c = ir2_get_code(&ctx->gb); | 116 c = ir2_get_code(&ctx->gb); |
117 if(c >= 0x80) { /* we have a skip */ | 117 if(c >= 0x80) { /* we have a skip */ |
118 c -= 0x7F; | 118 c -= 0x7F; |
119 out += c * 2; | 119 out += c * 2; |
120 } else { /* add two deltas from table */ | 120 } else { /* add two deltas from table */ |
121 t = dst[out] + (table[c * 2] - 128); | 121 t = dst[out] + (((table[c * 2] - 128)*3) >> 2); |
122 t= clip_uint8(t); | 122 t= clip_uint8(t); |
123 dst[out] = t; | 123 dst[out] = t; |
124 out++; | 124 out++; |
125 t = dst[out] + (table[(c * 2) + 1] - 128); | 125 t = dst[out] + (((table[(c * 2) + 1] - 128)*3) >> 2); |
126 t= clip_uint8(t); | 126 t= clip_uint8(t); |
127 dst[out] = t; | 127 dst[out] = t; |
128 out++; | 128 out++; |
129 } | 129 } |
130 } | 130 } |