Skip to content
GitLab
Menu
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
af62e096
Commit
af62e096
authored
Feb 27, 2014
by
Dmitry Kovalev
Browse files
Removing VP9D_PTR.
Change-Id: I17276e25db4592ffeff0961dd9eeaabe4bde110c
parent
e4e25ac9
Changes
3
Hide whitespace changes
Inline
Side-by-side
vp9/decoder/vp9_onyxd.h
View file @
af62e096
...
...
@@ -19,7 +19,7 @@
extern
"C"
{
#endif
typedef
void
*
VP9D_PTR
;
struct
VP9Decompressor
;
typedef
struct
{
int
width
;
...
...
@@ -39,28 +39,30 @@ typedef enum {
void
vp9_initialize_dec
();
int
vp9_receive_compressed_data
(
VP9D_PTR
comp
,
int
vp9_receive_compressed_data
(
struct
VP9Decompressor
*
pbi
,
size_t
size
,
const
uint8_t
**
dest
,
int64_t
time_stamp
);
int
vp9_get_raw_frame
(
VP9D_PTR
comp
,
YV12_BUFFER_CONFIG
*
sd
,
int
vp9_get_raw_frame
(
struct
VP9Decompressor
*
pbi
,
YV12_BUFFER_CONFIG
*
sd
,
int64_t
*
time_stamp
,
int64_t
*
time_end_stamp
,
vp9_ppflags_t
*
flags
);
vpx_codec_err_t
vp9_copy_reference_dec
(
VP9D_PTR
comp
,
vpx_codec_err_t
vp9_copy_reference_dec
(
struct
VP9Decompressor
*
pbi
,
VP9_REFFRAME
ref_frame_flag
,
YV12_BUFFER_CONFIG
*
sd
);
vpx_codec_err_t
vp9_set_reference_dec
(
VP9D_PTR
comp
,
vpx_codec_err_t
vp9_set_reference_dec
(
struct
VP9Decompressor
*
pbi
,
VP9_REFFRAME
ref_frame_flag
,
YV12_BUFFER_CONFIG
*
sd
);
int
vp9_get_reference_dec
(
VP9D_PTR
ptr
,
int
index
,
YV12_BUFFER_CONFIG
**
fb
);
int
vp9_get_reference_dec
(
struct
VP9Decompressor
*
pbi
,
int
index
,
YV12_BUFFER_CONFIG
**
fb
);
VP9D_PTR
vp9_create_decompressor
(
VP9D_CONFIG
*
oxcf
);
struct
VP9Decompressor
*
vp9_create_decompressor
(
VP9D_CONFIG
*
oxcf
);
void
vp9_remove_decompressor
(
VP9D_PTR
comp
);
void
vp9_remove_decompressor
(
struct
VP9Decompressor
*
pbi
);
#ifdef __cplusplus
}
// extern "C"
...
...
vp9/decoder/vp9_onyxd_if.c
View file @
af62e096
...
...
@@ -117,7 +117,7 @@ static void init_macroblockd(VP9D_COMP *const pbi) {
pd
[
i
].
dqcoeff
=
pbi
->
dqcoeff
[
i
];
}
VP9D_
PTR
vp9_create_decompressor
(
VP9D_CONFIG
*
oxcf
)
{
VP9D_
COMP
*
vp9_create_decompressor
(
VP9D_CONFIG
*
oxcf
)
{
VP9D_COMP
*
const
pbi
=
vpx_memalign
(
32
,
sizeof
(
VP9D_COMP
));
VP9_COMMON
*
const
cm
=
pbi
?
&
pbi
->
common
:
NULL
;
...
...
@@ -161,9 +161,8 @@ VP9D_PTR vp9_create_decompressor(VP9D_CONFIG *oxcf) {
return
pbi
;
}
void
vp9_remove_decompressor
(
VP9D_
PTR
ptr
)
{
void
vp9_remove_decompressor
(
VP9D_
COMP
*
pbi
)
{
int
i
;
VP9D_COMP
*
const
pbi
=
(
VP9D_COMP
*
)
ptr
;
if
(
!
pbi
)
return
;
...
...
@@ -200,10 +199,9 @@ static int equal_dimensions(const YV12_BUFFER_CONFIG *a,
a
->
uv_height
==
b
->
uv_height
&&
a
->
uv_width
==
b
->
uv_width
;
}
vpx_codec_err_t
vp9_copy_reference_dec
(
VP9D_
PTR
ptr
,
vpx_codec_err_t
vp9_copy_reference_dec
(
VP9D_
COMP
*
pbi
,
VP9_REFFRAME
ref_frame_flag
,
YV12_BUFFER_CONFIG
*
sd
)
{
VP9D_COMP
*
pbi
=
(
VP9D_COMP
*
)
ptr
;
VP9_COMMON
*
cm
=
&
pbi
->
common
;
/* TODO(jkoleszar): The decoder doesn't have any real knowledge of what the
...
...
@@ -228,9 +226,9 @@ vpx_codec_err_t vp9_copy_reference_dec(VP9D_PTR ptr,
}
vpx_codec_err_t
vp9_set_reference_dec
(
VP9D_PTR
ptr
,
VP9_REFFRAME
ref_frame_flag
,
vpx_codec_err_t
vp9_set_reference_dec
(
VP9D_COMP
*
pbi
,
VP9_REFFRAME
ref_frame_flag
,
YV12_BUFFER_CONFIG
*
sd
)
{
VP9D_COMP
*
pbi
=
(
VP9D_COMP
*
)
ptr
;
VP9_COMMON
*
cm
=
&
pbi
->
common
;
RefBuffer
*
ref_buf
=
NULL
;
...
...
@@ -273,8 +271,7 @@ vpx_codec_err_t vp9_set_reference_dec(VP9D_PTR ptr, VP9_REFFRAME ref_frame_flag,
}
int
vp9_get_reference_dec
(
VP9D_PTR
ptr
,
int
index
,
YV12_BUFFER_CONFIG
**
fb
)
{
VP9D_COMP
*
pbi
=
(
VP9D_COMP
*
)
ptr
;
int
vp9_get_reference_dec
(
VP9D_COMP
*
pbi
,
int
index
,
YV12_BUFFER_CONFIG
**
fb
)
{
VP9_COMMON
*
cm
=
&
pbi
->
common
;
if
(
index
<
0
||
index
>=
REF_FRAMES
)
...
...
@@ -309,20 +306,20 @@ static void swap_frame_buffers(VP9D_COMP *pbi) {
cm
->
frame_refs
[
ref_index
].
idx
=
INT_MAX
;
}
int
vp9_receive_compressed_data
(
VP9D_
PTR
ptr
,
int
vp9_receive_compressed_data
(
VP9D_
COMP
*
pbi
,
size_t
size
,
const
uint8_t
**
psource
,
int64_t
time_stamp
)
{
VP9D_COMP
*
pbi
=
(
VP9D_COMP
*
)
ptr
;
VP9_COMMON
*
cm
=
&
pbi
->
common
;
VP9_COMMON
*
cm
=
NULL
;
const
uint8_t
*
source
=
*
psource
;
int
retcode
=
0
;
/*if(pbi->ready_for_new_data == 0)
return -1;*/
if
(
ptr
==
0
)
if
(
!
pbi
)
return
-
1
;
cm
=
&
pbi
->
common
;
cm
->
error
.
error_code
=
VPX_CODEC_OK
;
pbi
->
source
=
source
;
...
...
@@ -454,11 +451,10 @@ int vp9_receive_compressed_data(VP9D_PTR ptr,
return
retcode
;
}
int
vp9_get_raw_frame
(
VP9D_
PTR
ptr
,
YV12_BUFFER_CONFIG
*
sd
,
int
vp9_get_raw_frame
(
VP9D_
COMP
*
pbi
,
YV12_BUFFER_CONFIG
*
sd
,
int64_t
*
time_stamp
,
int64_t
*
time_end_stamp
,
vp9_ppflags_t
*
flags
)
{
int
ret
=
-
1
;
VP9D_COMP
*
pbi
=
(
VP9D_COMP
*
)
ptr
;
if
(
pbi
->
ready_for_new_data
==
1
)
return
ret
;
...
...
vp9/vp9_dx_iface.c
View file @
af62e096
...
...
@@ -46,7 +46,7 @@ struct vpx_codec_alg_priv {
vp9_stream_info_t
si
;
int
defer_alloc
;
int
decoder_init
;
VP9D_PTR
pbi
;
struct
VP9Decompressor
*
pbi
;
int
postproc_cfg_set
;
vp8_postproc_cfg_t
postproc_cfg
;
#if CONFIG_POSTPROC_VISUALIZER
...
...
@@ -274,7 +274,7 @@ static vpx_codec_err_t decode_one(vpx_codec_alg_priv_t *ctx,
if
(
!
res
)
{
VP9D_CONFIG
oxcf
;
VP9D_PTR
optr
;
struct
VP9Decompressor
*
optr
;
vp9_initialize_dec
();
...
...
Write
Preview
Supports
Markdown
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