Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
VideoLAN
dav1d
Commits
76646c7d
Commit
76646c7d
authored
Oct 06, 2018
by
Ronald S. Bultje
Browse files
Reset entropy/reference state after making a fwd_kf visible
Fixes
#48
.
parent
2483af97
Pipeline
#979
passed with stage
in 1 minute and 51 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
src/decode.c
View file @
76646c7d
...
...
@@ -2948,6 +2948,7 @@ int dav1d_submit_frame(Dav1dContext *const c) {
dav1d_ref_inc
(
f
->
mvs_ref
);
}
memcpy
(
c
->
refs
[
i
].
refpoc
,
f
->
refpoc
,
sizeof
(
f
->
refpoc
));
c
->
refs
[
i
].
qidx
=
f
->
frame_hdr
.
quant
.
yac
;
}
}
...
...
src/internal.h
View file @
76646c7d
...
...
@@ -96,6 +96,7 @@ struct Dav1dContext {
WarpedMotionParams
gmv
[
7
];
Av1LoopfilterModeRefDeltas
lf_mode_ref_deltas
;
Av1FilmGrainData
film_grain
;
uint8_t
qidx
;
}
refs
[
8
];
CdfThreadContext
cdf
[
8
];
...
...
src/obu.c
View file @
76646c7d
...
...
@@ -1102,6 +1102,35 @@ int dav1d_parse_obus(Dav1dContext *const c, Dav1dData *const in) {
pthread_mutex_unlock
(
&
f
->
frame_thread
.
td
.
lock
);
}
c
->
have_frame_hdr
=
0
;
if
(
c
->
refs
[
c
->
frame_hdr
.
existing_frame_idx
].
p
.
p
.
p
.
type
==
DAV1D_FRAME_TYPE_KEY
)
{
const
int
r
=
c
->
frame_hdr
.
existing_frame_idx
;
for
(
int
i
=
0
;
i
<
8
;
i
++
)
{
if
(
i
==
c
->
frame_hdr
.
existing_frame_idx
)
continue
;
if
(
c
->
refs
[
i
].
p
.
p
.
data
[
0
])
dav1d_thread_picture_unref
(
&
c
->
refs
[
i
].
p
);
dav1d_thread_picture_ref
(
&
c
->
refs
[
i
].
p
,
&
c
->
refs
[
r
].
p
);
if
(
c
->
cdf
[
i
].
cdf
)
dav1d_cdf_thread_unref
(
&
c
->
cdf
[
i
]);
dav1d_init_states
(
&
c
->
cdf
[
i
],
c
->
refs
[
r
].
qidx
);
c
->
refs
[
i
].
lf_mode_ref_deltas
=
c
->
refs
[
r
].
lf_mode_ref_deltas
;
c
->
refs
[
i
].
seg_data
=
c
->
refs
[
r
].
seg_data
;
for
(
int
j
=
0
;
j
<
7
;
j
++
)
c
->
refs
[
i
].
gmv
[
j
]
=
dav1d_default_wm_params
;
c
->
refs
[
i
].
film_grain
=
c
->
refs
[
r
].
film_grain
;
if
(
c
->
refs
[
i
].
segmap
)
dav1d_ref_dec
(
c
->
refs
[
i
].
segmap
);
c
->
refs
[
i
].
segmap
=
c
->
refs
[
r
].
segmap
;
if
(
c
->
refs
[
r
].
segmap
)
dav1d_ref_inc
(
c
->
refs
[
r
].
segmap
);
if
(
c
->
refs
[
i
].
refmvs
)
dav1d_ref_dec
(
c
->
refs
[
i
].
refmvs
);
c
->
refs
[
i
].
refmvs
=
NULL
;
c
->
refs
[
i
].
qidx
=
c
->
refs
[
r
].
qidx
;
}
}
}
return
len
+
init_off
;
...
...
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