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
05fbd0a2
Commit
05fbd0a2
authored
Sep 16, 2003
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scenechange_threshold
Originally committed as revision 2281 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
dd6ee74e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
2 deletions
+10
-2
avcodec.h
libavcodec/avcodec.h
+9
-1
mpegvideo.c
libavcodec/mpegvideo.c
+1
-1
No files found.
libavcodec/avcodec.h
View file @
05fbd0a2
...
...
@@ -15,7 +15,7 @@ extern "C" {
#define FFMPEG_VERSION_INT 0x000408
#define FFMPEG_VERSION "0.4.8"
#define LIBAVCODEC_BUILD 46
79
#define LIBAVCODEC_BUILD 46
80
#define LIBAVCODEC_VERSION_INT FFMPEG_VERSION_INT
#define LIBAVCODEC_VERSION FFMPEG_VERSION
...
...
@@ -1242,6 +1242,14 @@ typedef struct AVCodecContext {
* - decoding: set by user, will be converted to upper case by lavc during init
*/
unsigned
int
stream_codec_tag
;
/**
* scene change detection threshold.
* 0 is default, larger means fewer detected scene changes
* - encoding: set by user.
* - decoding: unused
*/
int
scenechange_threshold
;
}
AVCodecContext
;
...
...
libavcodec/mpegvideo.c
View file @
05fbd0a2
...
...
@@ -3416,7 +3416,7 @@ static void encode_picture(MpegEncContext *s, int picture_number)
}
emms_c
();
if
(
s
->
scene_change_score
>
0
&&
s
->
pict_type
==
P_TYPE
){
if
(
s
->
scene_change_score
>
s
->
avctx
->
scenechange_threshold
&&
s
->
pict_type
==
P_TYPE
){
s
->
pict_type
=
I_TYPE
;
memset
(
s
->
mb_type
,
MB_TYPE_INTRA
,
sizeof
(
uint8_t
)
*
s
->
mb_stride
*
s
->
mb_height
);
//printf("Scene change detected, encoding as I Frame %d %d\n", s->current_picture.mb_var_sum, s->current_picture.mc_mb_var_sum);
...
...
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