diff options
author | Maarten Lankhorst <[email protected]> | 2011-12-24 12:33:30 +0100 |
---|---|---|
committer | Christian König <[email protected]> | 2011-12-24 15:36:46 +0100 |
commit | 1fdecef8868ce1a5ca6c2cb260294fb37d3bd69d (patch) | |
tree | 507c02e4cd1e88ca20c879292e5bc89fc0dca411 /src | |
parent | 3258cd9e611bb188e4b21d23cd5dd6cb0c0ff1ef (diff) |
vl: Fix inverted logic in vlc checks
Reported-by: Andy Furniss <[email protected]>
Signed-off-by: Maarten Lankhorst <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/vl/vl_vlc.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/auxiliary/vl/vl_vlc.h b/src/gallium/auxiliary/vl/vl_vlc.h index ff0c4b52490..baaa48a0fef 100644 --- a/src/gallium/auxiliary/vl/vl_vlc.h +++ b/src/gallium/auxiliary/vl/vl_vlc.h @@ -215,7 +215,7 @@ vl_vlc_bits_left(struct vl_vlc *vlc) static INLINE unsigned vl_vlc_peekbits(struct vl_vlc *vlc, unsigned num_bits) { - assert(vl_vlc_valid_bits(vlc) <= num_bits || vlc->data >= vlc->end); + assert(vl_vlc_valid_bits(vlc) >= num_bits || vlc->data >= vlc->end); return vlc->buffer >> (64 - num_bits); } @@ -225,7 +225,7 @@ vl_vlc_peekbits(struct vl_vlc *vlc, unsigned num_bits) static INLINE void vl_vlc_eatbits(struct vl_vlc *vlc, unsigned num_bits) { - assert(vl_vlc_valid_bits(vlc) <= num_bits); + assert(vl_vlc_valid_bits(vlc) >= num_bits); vlc->buffer <<= num_bits; vlc->invalid_bits += num_bits; @@ -239,7 +239,7 @@ vl_vlc_get_uimsbf(struct vl_vlc *vlc, unsigned num_bits) { unsigned value; - assert(vl_vlc_valid_bits(vlc) <= num_bits); + assert(vl_vlc_valid_bits(vlc) >= num_bits); value = vlc->buffer >> (64 - num_bits); vl_vlc_eatbits(vlc, num_bits); @@ -255,7 +255,7 @@ vl_vlc_get_simsbf(struct vl_vlc *vlc, unsigned num_bits) { signed value; - assert(vl_vlc_valid_bits(vlc) <= num_bits); + assert(vl_vlc_valid_bits(vlc) >= num_bits); value = ((int64_t)vlc->buffer) >> (64 - num_bits); vl_vlc_eatbits(vlc, num_bits); |