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
32883c06
Commit
32883c06
authored
Apr 20, 2012
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffv1: split init_slice_state() out so individual slices can be inited
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
d7a4c43f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
7 deletions
+14
-7
ffv1.c
libavcodec/ffv1.c
+14
-7
No files found.
libavcodec/ffv1.c
View file @
32883c06
...
...
@@ -696,11 +696,9 @@ static av_cold int common_init(AVCodecContext *avctx){
return
0
;
}
static
int
init_slice_state
(
FFV1Context
*
f
){
int
i
,
j
;
static
int
init_slice_state
(
FFV1Context
*
f
,
FFV1Context
*
fs
){
int
j
;
for
(
i
=
0
;
i
<
f
->
slice_count
;
i
++
){
FFV1Context
*
fs
=
f
->
slice_context
[
i
];
fs
->
plane_count
=
f
->
plane_count
;
fs
->
transparency
=
f
->
transparency
;
for
(
j
=
0
;
j
<
f
->
plane_count
;
j
++
){
...
...
@@ -724,11 +722,20 @@ static int init_slice_state(FFV1Context *f){
fs
->
c
.
zero_state
[
256
-
j
]
=
256
-
fs
->
c
.
one_state
[
j
];
}
}
}
return
0
;
}
static
int
init_slices_state
(
FFV1Context
*
f
){
int
i
;
for
(
i
=
0
;
i
<
f
->
slice_count
;
i
++
){
FFV1Context
*
fs
=
f
->
slice_context
[
i
];
if
(
init_slice_state
(
f
,
fs
)
<
0
)
return
-
1
;
}
return
0
;
}
static
av_cold
int
init_slice_contexts
(
FFV1Context
*
f
){
int
i
;
...
...
@@ -1089,7 +1096,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
if
(
init_slice_contexts
(
s
)
<
0
)
return
-
1
;
if
(
init_slice_state
(
s
)
<
0
)
if
(
init_slice
s
_state
(
s
)
<
0
)
return
-
1
;
#define STATS_OUT_SIZE 1024*1024*6
...
...
@@ -1824,7 +1831,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac
p
->
key_frame
=
1
;
if
(
read_header
(
f
)
<
0
)
return
-
1
;
if
(
init_slice_state
(
f
)
<
0
)
if
(
init_slice
s
_state
(
f
)
<
0
)
return
-
1
;
clear_state
(
f
);
...
...
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