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
cb8d3965
Commit
cb8d3965
authored
Jan 03, 2013
by
Stefano Sabatini
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavfi/yadif: add support to named constants
parent
f7dc6aa6
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
53 additions
and
38 deletions
+53
-38
filters.texi
doc/filters.texi
+14
-14
version.h
libavfilter/version.h
+1
-1
vf_yadif.c
libavfilter/vf_yadif.c
+17
-3
yadif.h
libavfilter/yadif.h
+21
-20
No files found.
doc/filters.texi
View file @
cb8d3965
...
@@ -4303,32 +4303,32 @@ Specify the interlacing mode to adopt. Accept one of the following
...
@@ -4303,32 +4303,32 @@ Specify the interlacing mode to adopt. Accept one of the following
values:
values:
@table @option
@table @option
@item 0
@item 0
, send_frame
output 1 frame for each frame
output 1 frame for each frame
@item 1
@item 1
, send_field
output 1 frame for each field
output 1 frame for each field
@item 2
@item 2
, send_frame_nospatial
like
0 but skips
spatial interlacing check
like
@code{send_frame} but skip
spatial interlacing check
@item 3
@item 3
, send_field_nospatial
like
1 but skips
spatial interlacing check
like
@code{send_field} but skip
spatial interlacing check
@end table
@end table
Default value is
0
.
Default value is
@code{send_frame}
.
@item parity
@item parity
Specify the picture field parity assumed for the input interlaced
Specify the picture field parity assumed for the input interlaced
video. Accept one of the following values:
video. Accept one of the following values:
@table @option
@table @option
@item 0
@item 0
, tff
assume top field first
assume top field first
@item 1
@item 1
, bff
assume bottom field first
assume bottom field first
@item -1
@item -1
, auto
enable automatic detection
enable automatic detection
@end table
@end table
Default value is
-1
.
Default value is
@code{auto}
.
If interlacing is unknown or decoder does not export this information,
If interlacing is unknown or decoder does not export this information,
top field first will be assumed.
top field first will be assumed.
...
@@ -4337,13 +4337,13 @@ Specify which frames to deinterlace. Accept one of the following
...
@@ -4337,13 +4337,13 @@ Specify which frames to deinterlace. Accept one of the following
values:
values:
@table @option
@table @option
@item 0
@item 0
, all
deinterlace all frames
deinterlace all frames
@item 1
@item 1
, interlaced
only deinterlace frames marked as interlaced
only deinterlace frames marked as interlaced
@end table
@end table
Default value is
0
.
Default value is
@code{all}
.
@end table
@end table
@c man end VIDEO FILTERS
@c man end VIDEO FILTERS
...
...
libavfilter/version.h
View file @
cb8d3965
...
@@ -30,7 +30,7 @@
...
@@ -30,7 +30,7 @@
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MAJOR 3
#define LIBAVFILTER_VERSION_MINOR 30
#define LIBAVFILTER_VERSION_MINOR 30
#define LIBAVFILTER_VERSION_MICRO 10
3
#define LIBAVFILTER_VERSION_MICRO 10
4
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
LIBAVFILTER_VERSION_MINOR, \
...
...
libavfilter/vf_yadif.c
View file @
cb8d3965
...
@@ -300,10 +300,24 @@ static int request_frame(AVFilterLink *link)
...
@@ -300,10 +300,24 @@ static int request_frame(AVFilterLink *link)
#define OFFSET(x) offsetof(YADIFContext, x)
#define OFFSET(x) offsetof(YADIFContext, x)
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
#define FLAGS AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
#define CONST(name, help, val, unit) { name, help, 0, AV_OPT_TYPE_CONST, {.i64=val}, INT_MIN, INT_MAX, FLAGS, unit }
static
const
AVOption
yadif_options
[]
=
{
static
const
AVOption
yadif_options
[]
=
{
{
"mode"
,
"specify the interlacing mode"
,
OFFSET
(
mode
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
3
,
FLAGS
},
{
"mode"
,
"specify the interlacing mode"
,
OFFSET
(
mode
),
AV_OPT_TYPE_INT
,
{.
i64
=
YADIF_MODE_SEND_FRAME
},
0
,
3
,
FLAGS
,
"mode"
},
{
"parity"
,
"specify the assumed picture field parity"
,
OFFSET
(
parity
),
AV_OPT_TYPE_INT
,
{.
i64
=-
1
},
-
1
,
1
,
FLAGS
},
CONST
(
"send_frame"
,
"send one frame for each frame"
,
YADIF_MODE_SEND_FRAME
,
"mode"
),
{
"deint"
,
"specify which frames to deinterlace"
,
OFFSET
(
deint
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
1
,
FLAGS
},
CONST
(
"send_field"
,
"send one frame for each field"
,
YADIF_MODE_SEND_FIELD
,
"mode"
),
CONST
(
"send_frame_nospatial"
,
"send one frame for each frame, but skip spatial interlacing check"
,
YADIF_MODE_SEND_FRAME_NOSPATIAL
,
"mode"
),
CONST
(
"send_field_nospatial"
,
"send one frame for each field, but skip spatial interlacing check"
,
YADIF_MODE_SEND_FIELD_NOSPATIAL
,
"mode"
),
{
"parity"
,
"specify the assumed picture field parity"
,
OFFSET
(
parity
),
AV_OPT_TYPE_INT
,
{.
i64
=
YADIF_PARITY_AUTO
},
-
1
,
1
,
FLAGS
,
"parity"
},
CONST
(
"tff"
,
"assume top field first"
,
YADIF_PARITY_TFF
,
"parity"
),
CONST
(
"bff"
,
"assume bottom field first"
,
YADIF_PARITY_BFF
,
"parity"
),
CONST
(
"auto"
,
"auto detect parity"
,
YADIF_PARITY_AUTO
,
"parity"
),
{
"deint"
,
"specify which frames to deinterlace"
,
OFFSET
(
deint
),
AV_OPT_TYPE_INT
,
{.
i64
=
YADIF_DEINT_ALL
},
0
,
1
,
FLAGS
,
"deint"
},
CONST
(
"all"
,
"deinterlace all frames"
,
YADIF_DEINT_ALL
,
"deint"
),
CONST
(
"interlaced"
,
"only deinterlace frames marked as interlaced"
,
YADIF_DEINT_INTERLACED
,
"deint"
),
{
NULL
},
{
NULL
},
};
};
...
...
libavfilter/yadif.h
View file @
cb8d3965
...
@@ -22,32 +22,33 @@
...
@@ -22,32 +22,33 @@
#include "libavutil/pixdesc.h"
#include "libavutil/pixdesc.h"
#include "avfilter.h"
#include "avfilter.h"
enum
YADIFMode
{
YADIF_MODE_SEND_FRAME
=
0
,
///< send 1 frame for each frame
YADIF_MODE_SEND_FIELD
=
1
,
///< send 1 frame for each field
YADIF_MODE_SEND_FRAME_NOSPATIAL
=
2
,
///< send 1 frame for each frame but skips spatial interlacing check
YADIF_MODE_SEND_FIELD_NOSPATIAL
=
3
,
///< send 1 frame for each field but skips spatial interlacing check
};
enum
YADIFParity
{
YADIF_PARITY_TFF
=
0
,
///< top field first
YADIF_PARITY_BFF
=
1
,
///< bottom field first
YADIF_PARITY_AUTO
=
-
1
,
///< auto detection
};
enum
YADIFDeint
{
YADIF_DEINT_ALL
=
0
,
///< deinterlace all frames
YADIF_DEINT_INTERLACED
=
1
,
///< only deinterlace frames marked as interlaced
};
typedef
struct
YADIFContext
{
typedef
struct
YADIFContext
{
const
AVClass
*
class
;
const
AVClass
*
class
;
/**
enum
YADIFMode
mode
;
* 0: send 1 frame for each frame
enum
YADIFParity
parity
;
* 1: send 1 frame for each field
enum
YADIFDeint
deint
;
* 2: like 0 but skips spatial interlacing check
* 3: like 1 but skips spatial interlacing check
*/
int
mode
;
/**
* 0: top field first
* 1: bottom field first
* -1: auto-detection
*/
int
parity
;
int
frame_pending
;
int
frame_pending
;
/**
* 0: deinterlace all frames
* 1: only deinterlace frames marked as interlaced
*/
int
deint
;
AVFilterBufferRef
*
cur
;
AVFilterBufferRef
*
cur
;
AVFilterBufferRef
*
next
;
AVFilterBufferRef
*
next
;
AVFilterBufferRef
*
prev
;
AVFilterBufferRef
*
prev
;
...
...
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