projects
/
nihav.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
codec_support/h263: fix DC clipping function
[nihav.git]
/
nihav-codec-support
/
src
/
codecs
/
h263
/
decoder.rs
diff --git
a/nihav-codec-support/src/codecs/h263/decoder.rs
b/nihav-codec-support/src/codecs/h263/decoder.rs
index 929854af4929608baf96cd43b0d471d1760d0be3..2707e76ee4561be7764a8c4ccf86b1ca0151d797 100644
(file)
--- a/
nihav-codec-support/src/codecs/h263/decoder.rs
+++ b/
nihav-codec-support/src/codecs/h263/decoder.rs
@@
-141,9
+141,9
@@
pub struct H263BaseDecoder {
#[inline]
fn clip_dc(dc: i16) -> i16 {
- if dc < 0 { 0 }
- else if dc > 2046 { 204
6
}
- else {
(dc + 1) & !
1 }
+ if dc <
=
0 { 0 }
+ else if dc > 2046 { 204
7
}
+ else {
dc |
1 }
}
#[inline]