Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
56cfbeef
Commit
56cfbeef
authored
Oct 20, 2015
by
Ronald S. Bultje
Committed by
Gerrit Code Review
Oct 20, 2015
Browse files
Options
Browse Files
Download
Plain Diff
Merge "vp10: disallow coding zero-sized tiles-in-frame/frames-in-superframe."
parents
be3f2713
dec4405c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
6 deletions
+13
-6
vp10/decoder/decodeframe.c
vp10/decoder/decodeframe.c
+2
-2
vp10/decoder/decoder.c
vp10/decoder/decoder.c
+1
-0
vp10/encoder/bitstream.c
vp10/encoder/bitstream.c
+6
-2
vp10/vp10_cx_iface.c
vp10/vp10_cx_iface.c
+4
-2
No files found.
vp10/decoder/decodeframe.c
View file @
56cfbeef
...
...
@@ -1448,9 +1448,9 @@ static void get_tile_buffer(const uint8_t *const data_end,
if
(
decrypt_cb
)
{
uint8_t
be_data
[
4
];
decrypt_cb
(
decrypt_state
,
*
data
,
be_data
,
tile_sz_mag
+
1
);
size
=
mem_get_varsize
(
be_data
,
tile_sz_mag
);
size
=
mem_get_varsize
(
be_data
,
tile_sz_mag
)
+
CONFIG_MISC_FIXES
;
}
else
{
size
=
mem_get_varsize
(
*
data
,
tile_sz_mag
);
size
=
mem_get_varsize
(
*
data
,
tile_sz_mag
)
+
CONFIG_MISC_FIXES
;
}
*
data
+=
tile_sz_mag
+
1
;
...
...
vp10/decoder/decoder.c
View file @
56cfbeef
...
...
@@ -506,6 +506,7 @@ vpx_codec_err_t vp10_parse_superframe_index(const uint8_t *data,
for
(
j
=
0
;
j
<
mag
;
++
j
)
this_sz
|=
(
*
x
++
)
<<
(
j
*
8
);
this_sz
+=
CONFIG_MISC_FIXES
;
sizes
[
i
]
=
this_sz
;
#if CONFIG_MISC_FIXES
frame_sz_sum
+=
this_sz
;
...
...
vp10/encoder/bitstream.c
View file @
56cfbeef
...
...
@@ -1117,9 +1117,13 @@ static size_t encode_tiles(VP10_COMP *cpi, uint8_t *data_ptr,
assert
(
tok
==
tok_end
);
vpx_stop_encode
(
&
residual_bc
);
if
(
tile_col
<
tile_cols
-
1
||
tile_row
<
tile_rows
-
1
)
{
unsigned
int
tile_sz
;
// size of this tile
mem_put_le32
(
data_ptr
+
total_size
,
residual_bc
.
pos
);
max_tile
=
max_tile
>
residual_bc
.
pos
?
max_tile
:
residual_bc
.
pos
;
assert
(
residual_bc
.
pos
>
0
);
tile_sz
=
residual_bc
.
pos
-
CONFIG_MISC_FIXES
;
mem_put_le32
(
data_ptr
+
total_size
,
tile_sz
);
max_tile
=
max_tile
>
tile_sz
?
max_tile
:
tile_sz
;
total_size
+=
4
;
}
...
...
vp10/vp10_cx_iface.c
View file @
56cfbeef
...
...
@@ -795,7 +795,7 @@ static int write_superframe_index(vpx_codec_alg_priv_t *ctx) {
marker
|=
ctx
->
pending_frame_count
-
1
;
#if CONFIG_MISC_FIXES
for
(
i
=
0
;
i
<
ctx
->
pending_frame_count
-
1
;
i
++
)
{
const
size_t
frame_sz
=
(
unsigned
int
)
ctx
->
pending_frame_sizes
[
i
];
const
size_t
frame_sz
=
(
unsigned
int
)
ctx
->
pending_frame_sizes
[
i
]
-
1
;
max_frame_sz
=
frame_sz
>
max_frame_sz
?
frame_sz
:
max_frame_sz
;
}
#endif
...
...
@@ -836,8 +836,10 @@ static int write_superframe_index(vpx_codec_alg_priv_t *ctx) {
*
x
++
=
marker
;
for
(
i
=
0
;
i
<
ctx
->
pending_frame_count
-
CONFIG_MISC_FIXES
;
i
++
)
{
unsigned
int
this_sz
=
(
unsigned
int
)
ctx
->
pending_frame_sizes
[
i
]
;
unsigned
int
this_sz
;
assert
(
ctx
->
pending_frame_sizes
[
i
]
>
0
);
this_sz
=
(
unsigned
int
)
ctx
->
pending_frame_sizes
[
i
]
-
CONFIG_MISC_FIXES
;
for
(
j
=
0
;
j
<=
mag
;
j
++
)
{
*
x
++
=
this_sz
&
0xff
;
this_sz
>>=
8
;
...
...
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