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
371d37fc
Commit
371d37fc
authored
Jul 16, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffv1: keep last_frame (to be used for error concealment)
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
8486c8cc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
ffv1.c
libavcodec/ffv1.c
+6
-1
No files found.
libavcodec/ffv1.c
View file @
371d37fc
...
@@ -181,6 +181,7 @@ typedef struct FFV1Context{
...
@@ -181,6 +181,7 @@ typedef struct FFV1Context{
int
flags
;
int
flags
;
int
picture_number
;
int
picture_number
;
AVFrame
picture
;
AVFrame
picture
;
AVFrame
last_picture
;
int
plane_count
;
int
plane_count
;
int
ac
;
///< 1=range coder <-> 0=golomb rice
int
ac
;
///< 1=range coder <-> 0=golomb rice
int
ac_byte_count
;
///< number of bytes used for AC coding
int
ac_byte_count
;
///< number of bytes used for AC coding
...
@@ -1364,6 +1365,8 @@ static av_cold int common_end(AVCodecContext *avctx){
...
@@ -1364,6 +1365,8 @@ static av_cold int common_end(AVCodecContext *avctx){
if
(
avctx
->
codec
->
decode
&&
s
->
picture
.
data
[
0
])
if
(
avctx
->
codec
->
decode
&&
s
->
picture
.
data
[
0
])
avctx
->
release_buffer
(
avctx
,
&
s
->
picture
);
avctx
->
release_buffer
(
avctx
,
&
s
->
picture
);
if
(
avctx
->
codec
->
decode
&&
s
->
last_picture
.
data
[
0
])
avctx
->
release_buffer
(
avctx
,
&
s
->
last_picture
);
for
(
j
=
0
;
j
<
s
->
slice_count
;
j
++
){
for
(
j
=
0
;
j
<
s
->
slice_count
;
j
++
){
FFV1Context
*
fs
=
s
->
slice_context
[
j
];
FFV1Context
*
fs
=
s
->
slice_context
[
j
];
...
@@ -1988,7 +1991,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
...
@@ -1988,7 +1991,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
p
->
key_frame
=
0
;
p
->
key_frame
=
0
;
}
}
p
->
reference
=
0
;
p
->
reference
=
3
;
//for error concealment
if
(
avctx
->
get_buffer
(
avctx
,
p
)
<
0
){
if
(
avctx
->
get_buffer
(
avctx
,
p
)
<
0
){
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"get_buffer() failed
\n
"
);
return
-
1
;
return
-
1
;
...
@@ -2038,6 +2041,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
...
@@ -2038,6 +2041,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
*
picture
=
*
p
;
*
picture
=
*
p
;
*
data_size
=
sizeof
(
AVFrame
);
*
data_size
=
sizeof
(
AVFrame
);
FFSWAP
(
AVFrame
,
f
->
picture
,
f
->
last_picture
);
return
buf_size
;
return
buf_size
;
}
}
...
...
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