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
e8c5d5f4
Commit
e8c5d5f4
authored
Jan 28, 2016
by
Derek Buitenhuis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
snow: Move scenechange_threshold to a private option
Signed-off-by:
Derek Buitenhuis
<
derek.buitenhuis@gmail.com
>
parent
30c1bdb8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
snow.h
libavcodec/snow.h
+1
-0
snowenc.c
libavcodec/snowenc.c
+9
-1
No files found.
libavcodec/snow.h
View file @
e8c5d5f4
...
...
@@ -177,6 +177,7 @@ typedef struct SnowContext{
int
intra_penalty
;
int
motion_est
;
int
iterative_dia_size
;
int
scenechange_threshold
;
MpegEncContext
m
;
// needed for motion estimation, should not be used for anything else, the idea is to eventually make the motion estimation independent of MpegEncContext, so this will be removed then (FIXME/XXX)
...
...
libavcodec/snowenc.c
View file @
e8c5d5f4
...
...
@@ -1739,10 +1739,17 @@ redo_frame:
}
predict_plane
(
s
,
s
->
spatial_idwt_buffer
,
plane_index
,
0
);
#if FF_API_PRIVATE_OPT
FF_DISABLE_DEPRECATION_WARNINGS
if
(
s
->
avctx
->
scenechange_threshold
)
s
->
scenechange_threshold
=
s
->
avctx
->
scenechange_threshold
;
FF_ENABLE_DEPRECATION_WARNINGS
#endif
if
(
plane_index
==
0
&&
pic
->
pict_type
==
AV_PICTURE_TYPE_P
&&
!
(
avctx
->
flags
&
AV_CODEC_FLAG_PASS2
)
&&
s
->
m
.
me
.
scene_change_score
>
s
->
avctx
->
scenechange_threshold
){
&&
s
->
m
.
me
.
scene_change_score
>
s
->
scenechange_threshold
){
ff_init_range_encoder
(
c
,
pkt
->
data
,
pkt
->
size
);
ff_build_rac_states
(
c
,
(
1LL
<<
32
)
/
20
,
256
-
8
);
pic
->
pict_type
=
AV_PICTURE_TYPE_I
;
...
...
@@ -1909,6 +1916,7 @@ static const AVOption options[] = {
{
"no_bitstream"
,
"Skip final bitstream writeout."
,
OFFSET
(
no_bitstream
),
AV_OPT_TYPE_BOOL
,
{
.
i64
=
0
},
0
,
1
,
VE
},
{
"intra_penalty"
,
"Penalty for intra blocks in block decission"
,
OFFSET
(
intra_penalty
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
VE
},
{
"iterative_dia_size"
,
"Dia size for the iterative ME"
,
OFFSET
(
iterative_dia_size
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
0
,
INT_MAX
,
VE
},
{
"sc_threshold"
,
"Scene change threshold"
,
OFFSET
(
scenechange_threshold
),
AV_OPT_TYPE_INT
,
{
.
i64
=
0
},
INT_MIN
,
INT_MAX
,
VE
},
{
NULL
},
};
...
...
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