detokenize: use SEG_LVL_EOB feature consistently
authorJohn Koleszar <jkoleszar@google.com>
Wed, 14 Nov 2012 17:51:23 +0000 (09:51 -0800)
committerPaul Wilkins <paulwilkins@google.com>
Thu, 15 Nov 2012 11:44:29 +0000 (11:44 +0000)
commit6becad426cddf8d98c35172eeac8bcc3282e27ec
tree9f844bc1f646caac6b1d31c5c4c4c9f0db80ef43
parent5a955973d9949e57a419c6b420b83702d9108640
detokenize: use SEG_LVL_EOB feature consistently

Update decode_coefs() to break when c >= eob, since it's possible that
c starts the loop from 1 and eob is 0. The loop won't terminate in that
case.

Add new get_eob() function to consistently clamp the eob based on the
segment level EOB and the block size. It's possible to code a segment
level EOB that's greater than the block size, and that leads to an
out of bounds access.

Change-Id: I859563b30414615cf1b30dcc2aef8a1de358c42d
vp9/common/seg_common.c
vp9/decoder/detokenize.c