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
f0af25ae
Commit
f0af25ae
authored
Aug 22, 2015
by
Timothy Gu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ffv1: Add missing ff_ prefixes
parent
ee4cc806
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
30 deletions
+30
-30
ffv1.c
libavcodec/ffv1.c
+8
-8
ffv1.h
libavcodec/ffv1.h
+7
-7
ffv1dec.c
libavcodec/ffv1dec.c
+8
-8
ffv1enc.c
libavcodec/ffv1enc.c
+7
-7
No files found.
libavcodec/ffv1.c
View file @
f0af25ae
...
...
@@ -39,7 +39,7 @@
#include "mathops.h"
#include "ffv1.h"
av_cold
int
ffv1_common_init
(
AVCodecContext
*
avctx
)
av_cold
int
ff
_ff
v1_common_init
(
AVCodecContext
*
avctx
)
{
FFV1Context
*
s
=
avctx
->
priv_data
;
...
...
@@ -64,7 +64,7 @@ av_cold int ffv1_common_init(AVCodecContext *avctx)
return
0
;
}
av_cold
int
ffv1_init_slice_state
(
FFV1Context
*
f
,
FFV1Context
*
fs
)
av_cold
int
ff
_ff
v1_init_slice_state
(
FFV1Context
*
f
,
FFV1Context
*
fs
)
{
int
j
;
...
...
@@ -98,18 +98,18 @@ av_cold int ffv1_init_slice_state(FFV1Context *f, FFV1Context *fs)
return
0
;
}
av_cold
int
ffv1_init_slices_state
(
FFV1Context
*
f
)
av_cold
int
ff
_ff
v1_init_slices_state
(
FFV1Context
*
f
)
{
int
i
,
ret
;
for
(
i
=
0
;
i
<
f
->
slice_count
;
i
++
)
{
FFV1Context
*
fs
=
f
->
slice_context
[
i
];
if
((
ret
=
ffv1_init_slice_state
(
f
,
fs
))
<
0
)
if
((
ret
=
ff
_ff
v1_init_slice_state
(
f
,
fs
))
<
0
)
return
AVERROR
(
ENOMEM
);
}
return
0
;
}
av_cold
int
ffv1_init_slice_contexts
(
FFV1Context
*
f
)
av_cold
int
ff
_ff
v1_init_slice_contexts
(
FFV1Context
*
f
)
{
int
i
;
...
...
@@ -154,7 +154,7 @@ memfail:
return
AVERROR
(
ENOMEM
);
}
int
ffv1_allocate_initial_states
(
FFV1Context
*
f
)
int
ff
_ff
v1_allocate_initial_states
(
FFV1Context
*
f
)
{
int
i
;
...
...
@@ -169,7 +169,7 @@ int ffv1_allocate_initial_states(FFV1Context *f)
return
0
;
}
void
ffv1_clear_slice_state
(
FFV1Context
*
f
,
FFV1Context
*
fs
)
void
ff
_ff
v1_clear_slice_state
(
FFV1Context
*
f
,
FFV1Context
*
fs
)
{
int
i
,
j
;
...
...
@@ -197,7 +197,7 @@ void ffv1_clear_slice_state(FFV1Context *f, FFV1Context *fs)
}
av_cold
int
ffv1_close
(
AVCodecContext
*
avctx
)
av_cold
int
ff
_ff
v1_close
(
AVCodecContext
*
avctx
)
{
FFV1Context
*
s
=
avctx
->
priv_data
;
int
i
,
j
;
...
...
libavcodec/ffv1.h
View file @
f0af25ae
...
...
@@ -130,13 +130,13 @@ typedef struct FFV1Context {
int
slice_rct_ry_coef
;
}
FFV1Context
;
int
ffv1_common_init
(
AVCodecContext
*
avctx
);
int
ffv1_init_slice_state
(
FFV1Context
*
f
,
FFV1Context
*
fs
);
int
ffv1_init_slices_state
(
FFV1Context
*
f
);
int
ffv1_init_slice_contexts
(
FFV1Context
*
f
);
int
ffv1_allocate_initial_states
(
FFV1Context
*
f
);
void
ffv1_clear_slice_state
(
FFV1Context
*
f
,
FFV1Context
*
fs
);
int
ffv1_close
(
AVCodecContext
*
avctx
);
int
ff
_ff
v1_common_init
(
AVCodecContext
*
avctx
);
int
ff
_ff
v1_init_slice_state
(
FFV1Context
*
f
,
FFV1Context
*
fs
);
int
ff
_ff
v1_init_slices_state
(
FFV1Context
*
f
);
int
ff
_ff
v1_init_slice_contexts
(
FFV1Context
*
f
);
int
ff
_ff
v1_allocate_initial_states
(
FFV1Context
*
f
);
void
ff
_ff
v1_clear_slice_state
(
FFV1Context
*
f
,
FFV1Context
*
fs
);
int
ff
_ff
v1_close
(
AVCodecContext
*
avctx
);
static
av_always_inline
int
fold
(
int
diff
,
int
bits
)
{
...
...
libavcodec/ffv1dec.c
View file @
f0af25ae
...
...
@@ -402,17 +402,17 @@ static int decode_slice(AVCodecContext *c, void *arg)
fs
->
slice_rct_ry_coef
=
1
;
if
(
f
->
version
>
2
)
{
if
(
ffv1_init_slice_state
(
f
,
fs
)
<
0
)
if
(
ff
_ff
v1_init_slice_state
(
f
,
fs
)
<
0
)
return
AVERROR
(
ENOMEM
);
if
(
decode_slice_header
(
f
,
fs
)
<
0
)
{
fs
->
slice_damaged
=
1
;
return
AVERROR_INVALIDDATA
;
}
}
if
((
ret
=
ffv1_init_slice_state
(
f
,
fs
))
<
0
)
if
((
ret
=
ff
_ff
v1_init_slice_state
(
f
,
fs
))
<
0
)
return
ret
;
if
(
f
->
cur
->
key_frame
||
fs
->
slice_reset_contexts
)
ffv1_clear_slice_state
(
f
,
fs
);
ff
_ff
v1_clear_slice_state
(
f
,
fs
);
width
=
fs
->
slice_width
;
height
=
fs
->
slice_height
;
...
...
@@ -571,7 +571,7 @@ static int read_extra_header(FFV1Context *f)
return
AVERROR_INVALIDDATA
;
}
}
if
((
ret
=
ffv1_allocate_initial_states
(
f
))
<
0
)
if
((
ret
=
ff
_ff
v1_allocate_initial_states
(
f
))
<
0
)
return
ret
;
for
(
i
=
0
;
i
<
f
->
quant_table_count
;
i
++
)
...
...
@@ -852,13 +852,13 @@ static av_cold int decode_init(AVCodecContext *avctx)
FFV1Context
*
f
=
avctx
->
priv_data
;
int
ret
;
if
((
ret
=
ffv1_common_init
(
avctx
))
<
0
)
if
((
ret
=
ff
_ff
v1_common_init
(
avctx
))
<
0
)
return
ret
;
if
(
avctx
->
extradata
&&
(
ret
=
read_extra_header
(
f
))
<
0
)
return
ret
;
if
((
ret
=
ffv1_init_slice_contexts
(
f
))
<
0
)
if
((
ret
=
ff
_ff
v1_init_slice_contexts
(
f
))
<
0
)
return
ret
;
avctx
->
internal
->
allocate_progress
=
1
;
...
...
@@ -1021,7 +1021,7 @@ static int init_thread_copy(AVCodecContext *avctx)
f
->
picture
.
f
=
av_frame_alloc
();
f
->
last_picture
.
f
=
av_frame_alloc
();
if
((
ret
=
ffv1_init_slice_contexts
(
f
))
<
0
)
if
((
ret
=
ff
_ff
v1_init_slice_contexts
(
f
))
<
0
)
return
ret
;
return
0
;
...
...
@@ -1106,7 +1106,7 @@ AVCodec ff_ffv1_decoder = {
.
id
=
AV_CODEC_ID_FFV1
,
.
priv_data_size
=
sizeof
(
FFV1Context
),
.
init
=
decode_init
,
.
close
=
ffv1_close
,
.
close
=
ff
_ff
v1_close
,
.
decode
=
decode_frame
,
.
init_thread_copy
=
ONLY_IF_THREADS_ENABLED
(
init_thread_copy
),
.
update_thread_context
=
ONLY_IF_THREADS_ENABLED
(
update_thread_context
),
...
...
libavcodec/ffv1enc.c
View file @
f0af25ae
...
...
@@ -667,7 +667,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
avctx
->
pix_fmt
);
int
i
,
j
,
k
,
m
,
ret
;
if
((
ret
=
ffv1_common_init
(
avctx
))
<
0
)
if
((
ret
=
ff
_ff
v1_common_init
(
avctx
))
<
0
)
return
ret
;
s
->
version
=
0
;
...
...
@@ -851,7 +851,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
p
->
context_count
=
s
->
context_count
[
p
->
quant_table_index
];
}
if
((
ret
=
ffv1_allocate_initial_states
(
s
))
<
0
)
if
((
ret
=
ff
_ff
v1_allocate_initial_states
(
s
))
<
0
)
return
ret
;
#if FF_API_CODED_FRAME
...
...
@@ -975,9 +975,9 @@ slices_ok:
return
ret
;
}
if
((
ret
=
ffv1_init_slice_contexts
(
s
))
<
0
)
if
((
ret
=
ff
_ff
v1_init_slice_contexts
(
s
))
<
0
)
return
ret
;
if
((
ret
=
ffv1_init_slices_state
(
s
))
<
0
)
if
((
ret
=
ff
_ff
v1_init_slices_state
(
s
))
<
0
)
return
ret
;
#define STATS_OUT_SIZE 1024 * 1024 * 6
...
...
@@ -1023,7 +1023,7 @@ static void encode_slice_header(FFV1Context *f, FFV1Context *fs)
if
(
f
->
version
>
3
)
{
put_rac
(
c
,
state
,
fs
->
slice_coding_mode
==
1
);
if
(
fs
->
slice_coding_mode
==
1
)
ffv1_clear_slice_state
(
f
,
fs
);
ff
_ff
v1_clear_slice_state
(
f
,
fs
);
put_symbol
(
c
,
state
,
fs
->
slice_coding_mode
,
0
);
if
(
fs
->
slice_coding_mode
!=
1
)
{
put_symbol
(
c
,
state
,
fs
->
slice_rct_by_coef
,
0
);
...
...
@@ -1140,7 +1140,7 @@ static int encode_slice(AVCodecContext *c, void *arg)
retry:
if
(
f
->
key_frame
)
ffv1_clear_slice_state
(
f
,
fs
);
ff
_ff
v1_clear_slice_state
(
f
,
fs
);
if
(
f
->
version
>
2
)
{
encode_slice_header
(
f
,
fs
);
}
...
...
@@ -1337,7 +1337,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
static
av_cold
int
encode_close
(
AVCodecContext
*
avctx
)
{
ffv1_close
(
avctx
);
ff
_ff
v1_close
(
avctx
);
return
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