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
4101b5c5
Commit
4101b5c5
authored
Jun 01, 2011
by
John Koleszar
Committed by
Code Review
Jun 01, 2011
Browse files
Merge "Bugfix in vp8dx_set_reference"
parents
5610970f
69ba6bd1
Changes
1
Show whitespace changes
Inline
Side-by-side
vp8/decoder/onyxd_if.c
View file @
4101b5c5
...
...
@@ -24,6 +24,7 @@
#include "vp8/common/threading.h"
#include "decoderthreading.h"
#include <stdio.h>
#include <assert.h>
#include "vp8/common/quant_common.h"
#include "vpx_scale/vpxscale.h"
...
...
@@ -161,16 +162,19 @@ int vp8dx_set_reference(VP8D_PTR ptr, VP8_REFFRAME ref_frame_flag, YV12_BUFFER_C
int
free_fb
;
if
(
ref_frame_flag
==
VP8_LAST_FLAG
)
*
ref_fb_ptr
=
cm
->
lst_fb_idx
;
ref_fb_ptr
=
&
cm
->
lst_fb_idx
;
else
if
(
ref_frame_flag
==
VP8_GOLD_FLAG
)
*
ref_fb_ptr
=
cm
->
gld_fb_idx
;
ref_fb_ptr
=
&
cm
->
gld_fb_idx
;
else
if
(
ref_frame_flag
==
VP8_ALT_FLAG
)
*
ref_fb_ptr
=
cm
->
alt_fb_idx
;
ref_fb_ptr
=
&
cm
->
alt_fb_idx
;
else
return
-
1
;
/* Find an empty frame buffer. */
free_fb
=
get_free_fb
(
cm
);
/* Decrease fb_idx_ref_cnt since it will be increased again in
* ref_cnt_fb() below. */
cm
->
fb_idx_ref_cnt
[
free_fb
]
--
;
/* Manage the reference counters and copy image. */
ref_cnt_fb
(
cm
->
fb_idx_ref_cnt
,
ref_fb_ptr
,
free_fb
);
...
...
@@ -192,6 +196,7 @@ static int get_free_fb (VP8_COMMON *cm)
if
(
cm
->
fb_idx_ref_cnt
[
i
]
==
0
)
break
;
assert
(
i
<
NUM_YV12_BUFFERS
);
cm
->
fb_idx_ref_cnt
[
i
]
=
1
;
return
i
;
}
...
...
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