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
fbea3728
Commit
fbea3728
authored
May 24, 2011
by
John Koleszar
Committed by
Code Review
May 24, 2011
Browse files
Merge "Fixing bug in VP8_SET_REFERENCE decoder control command"
parents
69aad3a7
a126cd17
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp8/decoder/onyxd_if.c
View file @
fbea3728
...
...
@@ -39,6 +39,8 @@
extern
void
vp8_init_loop_filter
(
VP8_COMMON
*
cm
);
extern
void
vp8cx_init_de_quantizer
(
VP8D_COMP
*
pbi
);
static
int
get_free_fb
(
VP8_COMMON
*
cm
);
static
void
ref_cnt_fb
(
int
*
buf
,
int
*
idx
,
int
new_idx
);
void
vp8dx_initialize
()
...
...
@@ -155,18 +157,24 @@ int vp8dx_set_reference(VP8D_PTR ptr, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_C
{
VP8D_COMP
*
pbi
=
(
VP8D_COMP
*
)
ptr
;
VP8_COMMON
*
cm
=
&
pbi
->
common
;
int
ref_fb_idx
;
int
*
ref_fb_ptr
=
NULL
;
int
free_fb
;
if
(
ref_frame_flag
==
VP8_LAST_FLAG
)
ref_fb_
idx
=
cm
->
lst_fb_idx
;
*
ref_fb_
ptr
=
cm
->
lst_fb_idx
;
else
if
(
ref_frame_flag
==
VP8_GOLD_FLAG
)
ref_fb_
idx
=
cm
->
gld_fb_idx
;
*
ref_fb_
ptr
=
cm
->
gld_fb_idx
;
else
if
(
ref_frame_flag
==
VP8_ALT_FLAG
)
ref_fb_
idx
=
cm
->
alt_fb_idx
;
*
ref_fb_
ptr
=
cm
->
alt_fb_idx
;
else
return
-
1
;
vp8_yv12_copy_frame_ptr
(
sd
,
&
cm
->
yv12_fb
[
ref_fb_idx
]);
/* Find an empty frame buffer. */
free_fb
=
get_free_fb
(
cm
);
/* Manage the reference counters and copy image. */
ref_cnt_fb
(
cm
->
fb_idx_ref_cnt
,
ref_fb_ptr
,
free_fb
);
vp8_yv12_copy_frame_ptr
(
sd
,
&
cm
->
yv12_fb
[
*
ref_fb_ptr
]);
return
0
;
}
...
...
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