Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
640ddcab
Commit
640ddcab
authored
Nov 22, 2011
by
Johann
Committed by
Gerrit Code Review
Nov 22, 2011
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Validate encoder buffer writes for single token partition"
parents
c5434abc
c84d42f8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
3 deletions
+40
-3
vp8/encoder/bitstream.c
vp8/encoder/bitstream.c
+35
-0
vp8/encoder/onyx_if.c
vp8/encoder/onyx_if.c
+5
-3
No files found.
vp8/encoder/bitstream.c
View file @
640ddcab
...
...
@@ -221,6 +221,11 @@ static void pack_tokens_c(vp8_writer *w, const TOKENEXTRA *p, int xcount)
w
->
buffer
[
x
]
+=
1
;
}
validate_buffer
(
w
->
buffer
+
w
->
pos
,
1
,
w
->
buffer_end
,
w
->
error
);
w
->
buffer
[
w
->
pos
++
]
=
(
lowvalue
>>
(
24
-
offset
));
lowvalue
<<=
offset
;
shift
=
count
;
...
...
@@ -281,6 +286,11 @@ static void pack_tokens_c(vp8_writer *w, const TOKENEXTRA *p, int xcount)
w
->
buffer
[
x
]
+=
1
;
}
validate_buffer
(
w
->
buffer
+
w
->
pos
,
1
,
w
->
buffer_end
,
w
->
error
);
w
->
buffer
[
w
->
pos
++
]
=
(
lowvalue
>>
(
24
-
offset
));
lowvalue
<<=
offset
;
shift
=
count
;
...
...
@@ -329,6 +339,12 @@ static void pack_tokens_c(vp8_writer *w, const TOKENEXTRA *p, int xcount)
if
(
!++
count
)
{
count
=
-
8
;
validate_buffer
(
w
->
buffer
+
w
->
pos
,
1
,
w
->
buffer_end
,
w
->
error
);
w
->
buffer
[
w
->
pos
++
]
=
(
lowvalue
>>
24
);
lowvalue
&=
0xffffff
;
}
...
...
@@ -664,6 +680,11 @@ static void pack_mb_row_tokens_c(VP8_COMP *cpi, vp8_writer *w)
w
->
buffer
[
x
]
+=
1
;
}
validate_buffer
(
w
->
buffer
+
w
->
pos
,
1
,
w
->
buffer_end
,
w
->
error
);
w
->
buffer
[
w
->
pos
++
]
=
(
lowvalue
>>
(
24
-
offset
));
lowvalue
<<=
offset
;
shift
=
count
;
...
...
@@ -724,6 +745,11 @@ static void pack_mb_row_tokens_c(VP8_COMP *cpi, vp8_writer *w)
w
->
buffer
[
x
]
+=
1
;
}
validate_buffer
(
w
->
buffer
+
w
->
pos
,
1
,
w
->
buffer_end
,
w
->
error
);
w
->
buffer
[
w
->
pos
++
]
=
(
lowvalue
>>
(
24
-
offset
));
lowvalue
<<=
offset
;
shift
=
count
;
...
...
@@ -770,6 +796,12 @@ static void pack_mb_row_tokens_c(VP8_COMP *cpi, vp8_writer *w)
if
(
!++
count
)
{
count
=
-
8
;
validate_buffer
(
w
->
buffer
+
w
->
pos
,
1
,
w
->
buffer_end
,
w
->
error
);
w
->
buffer
[
w
->
pos
++
]
=
(
lowvalue
>>
24
);
lowvalue
&=
0xffffff
;
}
...
...
@@ -1566,6 +1598,9 @@ void vp8_pack_bitstream(VP8_COMP *cpi, unsigned char *dest, unsigned char * dest
mb_feature_data_bits
=
vp8_mb_feature_data_bits
;
cpi
->
bc
.
error
=
&
pc
->
error
;
cpi
->
bc2
.
error
=
&
pc
->
error
;
validate_buffer
(
cx_data
,
3
,
cx_data_end
,
&
cpi
->
common
.
error
);
cx_data
+=
3
;
...
...
vp8/encoder/onyx_if.c
View file @
640ddcab
...
...
@@ -4940,7 +4940,7 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
int64_t
store_reg
[
8
];
#endif
VP8_COMP
*
cpi
=
(
VP8_COMP
*
)
ptr
;
VP8_COMMON
*
cm
=
&
cpi
->
common
;
VP8_COMMON
*
cm
;
struct
vpx_usec_timer
tsctimer
;
struct
vpx_usec_timer
ticktimer
;
struct
vpx_usec_timer
cmptimer
;
...
...
@@ -4949,12 +4949,14 @@ int vp8_get_compressed_data(VP8_PTR ptr, unsigned int *frame_flags, unsigned lon
if
(
!
cpi
)
return
-
1
;
if
(
setjmp
(
cpi
->
common
.
error
.
jmp
)){
cm
=
&
cpi
->
common
;
if
(
setjmp
(
cpi
->
common
.
error
.
jmp
))
{
cpi
->
common
.
error
.
setjmp
=
0
;
return
VPX_CODEC_CORRUPT_FRAME
;
}
cpi
->
bc
.
error
=
&
cpi
->
common
.
error
;
cpi
->
common
.
error
.
setjmp
=
1
;
#if HAVE_ARMV7
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment