Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
8b45e87f
Commit
8b45e87f
authored
Sep 02, 2015
by
Ronald S. Bultje
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vp9: fix segmentation map retention across keyframe boundaries.
parent
7cc7d13f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
vp9.c
libavcodec/vp9.c
+3
-3
No files found.
libavcodec/vp9.c
View file @
8b45e87f
...
...
@@ -289,6 +289,7 @@ static void vp9_unref_frame(AVCodecContext *ctx, VP9Frame *f)
{
ff_thread_release_buffer
(
ctx
,
&
f
->
tf
);
av_buffer_unref
(
&
f
->
extradata
);
f
->
segmentation_map
=
NULL
;
}
static
int
vp9_ref_frame
(
AVCodecContext
*
ctx
,
VP9Frame
*
dst
,
VP9Frame
*
src
)
...
...
@@ -4002,8 +4003,7 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
VP9Context
*
s
=
ctx
->
priv_data
;
int
res
,
tile_row
,
tile_col
,
i
,
ref
,
row
,
col
;
int
retain_segmap_ref
=
s
->
frames
[
REF_FRAME_SEGMAP
].
segmentation_map
&&
!
(
s
->
segmentation
.
enabled
&&
(
s
->
segmentation
.
update_map
||
s
->
keyframe
||
s
->
intraonly
));
(
!
s
->
segmentation
.
enabled
||
!
s
->
segmentation
.
update_map
);
ptrdiff_t
yoff
,
uvoff
,
ls_y
,
ls_uv
;
AVFrame
*
f
;
int
bytesperpixel
;
...
...
@@ -4032,7 +4032,7 @@ static int vp9_decode_frame(AVCodecContext *ctx, void *frame,
data
+=
res
;
size
-=
res
;
if
(
!
retain_segmap_ref
)
{
if
(
!
retain_segmap_ref
||
s
->
keyframe
||
s
->
intraonly
)
{
if
(
s
->
frames
[
REF_FRAME_SEGMAP
].
tf
.
f
->
data
[
0
])
vp9_unref_frame
(
ctx
,
&
s
->
frames
[
REF_FRAME_SEGMAP
]);
if
(
!
s
->
keyframe
&&
!
s
->
intraonly
&&
!
s
->
errorres
&&
s
->
frames
[
CUR_FRAME
].
tf
.
f
->
data
[
0
]
&&
...
...
Write
Preview
Markdown
is supported
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