Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Xiph.Org
aom-rav1e
Commits
b0bafd04
Commit
b0bafd04
authored
Jun 10, 2015
by
James Zern
Browse files
vp9_decodeframe: move public funcs to end of file
Change-Id: Iaea9850890b726c7b5552c5f02b3a309086edc85
parent
38dd0448
Changes
2
Hide whitespace changes
Inline
Side-by-side
vp9/decoder/vp9_decodeframe.c
View file @
b0bafd04
...
...
@@ -1020,12 +1020,6 @@ static INTERP_FILTER read_interp_filter(struct vp9_read_bit_buffer *rb) {
:
literal_to_filter
[
vp9_rb_read_literal
(
rb
,
2
)];
}
void
vp9_read_frame_size
(
struct
vp9_read_bit_buffer
*
rb
,
int
*
width
,
int
*
height
)
{
*
width
=
vp9_rb_read_literal
(
rb
,
16
)
+
1
;
*
height
=
vp9_rb_read_literal
(
rb
,
16
)
+
1
;
}
static
void
setup_display_size
(
VP9_COMMON
*
cm
,
struct
vp9_read_bit_buffer
*
rb
)
{
cm
->
display_width
=
cm
->
width
;
cm
->
display_height
=
cm
->
height
;
...
...
@@ -1604,20 +1598,6 @@ static void error_handler(void *data) {
vpx_internal_error
(
&
cm
->
error
,
VPX_CODEC_CORRUPT_FRAME
,
"Truncated packet"
);
}
int
vp9_read_sync_code
(
struct
vp9_read_bit_buffer
*
const
rb
)
{
return
vp9_rb_read_literal
(
rb
,
8
)
==
VP9_SYNC_CODE_0
&&
vp9_rb_read_literal
(
rb
,
8
)
==
VP9_SYNC_CODE_1
&&
vp9_rb_read_literal
(
rb
,
8
)
==
VP9_SYNC_CODE_2
;
}
BITSTREAM_PROFILE
vp9_read_profile
(
struct
vp9_read_bit_buffer
*
rb
)
{
int
profile
=
vp9_rb_read_bit
(
rb
);
profile
|=
vp9_rb_read_bit
(
rb
)
<<
1
;
if
(
profile
>
2
)
profile
+=
vp9_rb_read_bit
(
rb
);
return
(
BITSTREAM_PROFILE
)
profile
;
}
static
void
read_bitdepth_colorspace_sampling
(
VP9_COMMON
*
cm
,
struct
vp9_read_bit_buffer
*
rb
)
{
if
(
cm
->
profile
>=
PROFILE_2
)
{
...
...
@@ -1967,6 +1947,28 @@ static struct vp9_read_bit_buffer* init_read_bit_buffer(
return
rb
;
}
//------------------------------------------------------------------------------
int
vp9_read_sync_code
(
struct
vp9_read_bit_buffer
*
const
rb
)
{
return
vp9_rb_read_literal
(
rb
,
8
)
==
VP9_SYNC_CODE_0
&&
vp9_rb_read_literal
(
rb
,
8
)
==
VP9_SYNC_CODE_1
&&
vp9_rb_read_literal
(
rb
,
8
)
==
VP9_SYNC_CODE_2
;
}
void
vp9_read_frame_size
(
struct
vp9_read_bit_buffer
*
rb
,
int
*
width
,
int
*
height
)
{
*
width
=
vp9_rb_read_literal
(
rb
,
16
)
+
1
;
*
height
=
vp9_rb_read_literal
(
rb
,
16
)
+
1
;
}
BITSTREAM_PROFILE
vp9_read_profile
(
struct
vp9_read_bit_buffer
*
rb
)
{
int
profile
=
vp9_rb_read_bit
(
rb
);
profile
|=
vp9_rb_read_bit
(
rb
)
<<
1
;
if
(
profile
>
2
)
profile
+=
vp9_rb_read_bit
(
rb
);
return
(
BITSTREAM_PROFILE
)
profile
;
}
void
vp9_decode_frame
(
VP9Decoder
*
pbi
,
const
uint8_t
*
data
,
const
uint8_t
*
data_end
,
const
uint8_t
**
p_data_end
)
{
...
...
vp9/decoder/vp9_decodeframe.h
View file @
b0bafd04
...
...
@@ -22,15 +22,15 @@ struct vp9_read_bit_buffer;
void
vp9_init_dequantizer
(
struct
VP9Common
*
cm
);
void
vp9_decode_frame
(
struct
VP9Decoder
*
pbi
,
const
uint8_t
*
data
,
const
uint8_t
*
data_end
,
const
uint8_t
**
p_data_end
);
int
vp9_read_sync_code
(
struct
vp9_read_bit_buffer
*
const
rb
);
void
vp9_read_frame_size
(
struct
vp9_read_bit_buffer
*
rb
,
int
*
width
,
int
*
height
);
BITSTREAM_PROFILE
vp9_read_profile
(
struct
vp9_read_bit_buffer
*
rb
);
void
vp9_decode_frame
(
struct
VP9Decoder
*
pbi
,
const
uint8_t
*
data
,
const
uint8_t
*
data_end
,
const
uint8_t
**
p_data_end
);
#ifdef __cplusplus
}
// extern "C"
#endif
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment