Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
aom-rav1e
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Xiph.Org
aom-rav1e
Commits
f8ffecb1
Commit
f8ffecb1
authored
13 years ago
by
John Koleszar
Committed by
Code Review
13 years ago
Browse files
Options
Downloads
Plain Diff
Merge "Update VP8DX_BOOL_DECODER_FILL to better detect EOS"
parents
db5057c7
9594370e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vp8/decoder/dboolhuff.h
+14
-13
14 additions, 13 deletions
vp8/decoder/dboolhuff.h
with
14 additions
and
13 deletions
vp8/decoder/dboolhuff.h
+
14
−
13
View file @
f8ffecb1
...
...
@@ -55,7 +55,7 @@ void vp8dx_bool_decoder_fill(BOOL_DECODER *br);
for(shift = VP8_BD_VALUE_SIZE - 8 - ((_count) + 8); shift >= 0; ) \
{ \
if((_bufptr) >= (_bufend)) { \
(_count) = VP8_LOTS_OF_BITS; \
(_count)
+
= VP8_LOTS_OF_BITS; \
break; \
} \
(_count) += 8; \
...
...
@@ -119,18 +119,19 @@ static int vp8_decode_value(BOOL_DECODER *br, int bits)
static
int
vp8dx_bool_error
(
BOOL_DECODER
*
br
)
{
/* Check if we have reached the end of the buffer.
*
* Variable 'count' stores the number of bits in the 'value' buffer,
* minus 8. So if count == 8, there are 16 bits available to be read.
* Normally, count is filled with 8 and one byte is filled into the
* value buffer. When we reach the end of the buffer, count is instead
* filled with VP8_LOTS_OF_BITS, 8 of which represent the last 8 real
* bits from the bitstream. So the last bit in the bitstream will be
* represented by count == VP8_LOTS_OF_BITS - 16.
*/
if
((
br
->
count
>
VP8_BD_VALUE_SIZE
)
&&
(
br
->
count
<=
VP8_LOTS_OF_BITS
-
16
))
/* Check if we have reached the end of the buffer.
*
* Variable 'count' stores the number of bits in the 'value' buffer, minus
* 8. The top byte is part of the algorithm, and the remainder is buffered
* to be shifted into it. So if count == 8, the top 16 bits of 'value' are
* occupied, 8 for the algorithm and 8 in the buffer.
*
* When reading a byte from the user's buffer, count is filled with 8 and
* one byte is filled into the value buffer. When we reach the end of the
* data, count is additionally filled with VP8_LOTS_OF_BITS. So when
* count == VP8_LOTS_OF_BITS - 1, the user's data has been exhausted.
*/
if
((
br
->
count
>
VP8_BD_VALUE_SIZE
)
&&
(
br
->
count
<
VP8_LOTS_OF_BITS
))
{
/* We have tried to decode bits after the end of
* stream was encountered.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment