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
d6e74e0d
Commit
d6e74e0d
authored
Jul 19, 2013
by
Dmitry Kovalev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving vp9_reader into decode_tiles function.
Change-Id: Ic741054836d6c1b89c4f1c75cc6bd938a7d56723
parent
e71a4a77
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
19 deletions
+18
-19
vp9/decoder/vp9_decodframe.c
vp9/decoder/vp9_decodframe.c
+18
-19
No files found.
vp9/decoder/vp9_decodframe.c
View file @
d6e74e0d
...
...
@@ -645,12 +645,11 @@ static void setup_tile_info(VP9_COMMON *cm, struct vp9_read_bit_buffer *rb) {
cm
->
log2_tile_rows
+=
vp9_rb_read_bit
(
rb
);
}
static
void
decode_tiles
(
VP9D_COMP
*
pbi
,
const
uint8_t
*
data
,
size_t
first_partition_size
,
vp9_reader
*
residual_bc
)
{
static
const
uint8_t
*
decode_tiles
(
VP9D_COMP
*
pbi
,
const
uint8_t
*
data
)
{
vp9_reader
residual_bc
;
VP9_COMMON
*
const
pc
=
&
pbi
->
common
;
const
uint8_t
*
data_ptr
=
data
+
first_partition_size
;
const
uint8_t
*
const
data_end
=
pbi
->
source
+
pbi
->
source_sz
;
const
int
aligned_mi_cols
=
mi_cols_aligned_to_sb
(
pc
->
mi_cols
);
const
int
tile_cols
=
1
<<
pc
->
log2_tile_cols
;
...
...
@@ -670,7 +669,7 @@ static void decode_tiles(VP9D_COMP *pbi,
vp9_reader
bc_bak
=
{
0
};
// pre-initialize the offsets, we're going to read in inverse order
data_ptr2
[
0
][
0
]
=
data
_ptr
;
data_ptr2
[
0
][
0
]
=
data
;
for
(
tile_row
=
0
;
tile_row
<
tile_rows
;
tile_row
++
)
{
if
(
tile_row
)
{
const
int
size
=
read_be32
(
data_ptr2
[
tile_row
-
1
][
tile_cols
-
1
]);
...
...
@@ -692,13 +691,13 @@ static void decode_tiles(VP9D_COMP *pbi,
vp9_get_tile_col_offsets
(
pc
,
tile_col
);
setup_token_decoder
(
pbi
,
data_ptr2
[
tile_row
][
tile_col
],
data_end
-
data_ptr2
[
tile_row
][
tile_col
],
residual_bc
);
decode_tile
(
pbi
,
residual_bc
);
&
residual_bc
);
decode_tile
(
pbi
,
&
residual_bc
);
if
(
tile_row
==
tile_rows
-
1
&&
tile_col
==
tile_cols
-
1
)
bc_bak
=
*
residual_bc
;
bc_bak
=
residual_bc
;
}
}
*
residual_bc
=
bc_bak
;
residual_bc
=
bc_bak
;
}
else
{
int
has_more
;
...
...
@@ -711,22 +710,24 @@ static void decode_tiles(VP9D_COMP *pbi,
has_more
=
tile_col
<
tile_cols
-
1
||
tile_row
<
tile_rows
-
1
;
if
(
has_more
)
{
if
(
!
read_is_valid
(
data
_ptr
,
4
,
data_end
))
if
(
!
read_is_valid
(
data
,
4
,
data_end
))
vpx_internal_error
(
&
pc
->
error
,
VPX_CODEC_CORRUPT_FRAME
,
"Truncated packet or corrupt tile length"
);
size
=
read_be32
(
data
_ptr
);
data
_ptr
+=
4
;
size
=
read_be32
(
data
);
data
+=
4
;
}
else
{
size
=
data_end
-
data
_ptr
;
size
=
data_end
-
data
;
}
setup_token_decoder
(
pbi
,
data
_ptr
,
size
,
residual_bc
);
decode_tile
(
pbi
,
residual_bc
);
data
_ptr
+=
size
;
setup_token_decoder
(
pbi
,
data
,
size
,
&
residual_bc
);
decode_tile
(
pbi
,
&
residual_bc
);
data
+=
size
;
}
}
}
return
vp9_reader_find_end
(
&
residual_bc
);
}
static
void
check_sync_code
(
VP9_COMMON
*
cm
,
struct
vp9_read_bit_buffer
*
rb
)
{
...
...
@@ -923,7 +924,6 @@ void vp9_init_dequantizer(VP9_COMMON *cm) {
int
vp9_decode_frame
(
VP9D_COMP
*
pbi
,
const
uint8_t
**
p_data_end
)
{
int
i
;
vp9_reader
residual_bc
;
VP9_COMMON
*
const
pc
=
&
pbi
->
common
;
MACROBLOCKD
*
const
xd
=
&
pbi
->
mb
;
...
...
@@ -985,7 +985,7 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
set_prev_mi
(
pc
);
decode_tiles
(
pbi
,
data
,
first_partition_size
,
&
residual_bc
);
*
p_data_end
=
decode_tiles
(
pbi
,
data
+
first_partition_size
);
pc
->
last_width
=
pc
->
width
;
pc
->
last_height
=
pc
->
height
;
...
...
@@ -1013,6 +1013,5 @@ int vp9_decode_frame(VP9D_COMP *pbi, const uint8_t **p_data_end) {
if
(
pc
->
refresh_frame_context
)
pc
->
frame_contexts
[
pc
->
frame_context_idx
]
=
pc
->
fc
;
*
p_data_end
=
vp9_reader_find_end
(
&
residual_bc
);
return
0
;
}
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