Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
db9b7321
Commit
db9b7321
authored
Nov 03, 2015
by
John Stebbins
Committed by
Anton Khirnov
Nov 09, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vsrc_color: implement frame rate
Signed-off-by:
Anton Khirnov
<
anton@khirnov.net
>
parent
1339009c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
vsrc_color.c
libavfilter/vsrc_color.c
+5
-6
No files found.
libavfilter/vsrc_color.c
View file @
db9b7321
...
...
@@ -44,7 +44,7 @@ typedef struct ColorContext {
const
AVClass
*
class
;
int
w
,
h
;
uint8_t
color
[
4
];
AVRational
time_bas
e
;
AVRational
frame_rat
e
;
uint8_t
*
line
[
4
];
int
line_step
[
4
];
int
hsub
,
vsub
;
///< chroma subsampling values
...
...
@@ -65,13 +65,11 @@ static av_cold int color_init(AVFilterContext *ctx)
return
AVERROR
(
EINVAL
);
}
if
(
av_parse_video_rate
(
&
frame_rate_q
,
color
->
framerate_str
)
<
0
||
if
(
av_parse_video_rate
(
&
color
->
frame_rate
,
color
->
framerate_str
)
<
0
||
frame_rate_q
.
den
<=
0
||
frame_rate_q
.
num
<=
0
)
{
av_log
(
ctx
,
AV_LOG_ERROR
,
"Invalid frame rate: %s
\n
"
,
color
->
framerate_str
);
return
AVERROR
(
EINVAL
);
}
color
->
time_base
.
num
=
frame_rate_q
.
den
;
color
->
time_base
.
den
=
frame_rate_q
.
num
;
if
((
ret
=
av_parse_color
(
color
->
color
,
color
->
color_str
,
-
1
,
ctx
))
<
0
)
return
ret
;
...
...
@@ -132,12 +130,13 @@ static int color_config_props(AVFilterLink *inlink)
inlink
->
format
,
rgba_color
,
&
is_packed_rgba
,
NULL
);
av_log
(
ctx
,
AV_LOG_VERBOSE
,
"w:%d h:%d r:%d/%d color:0x%02x%02x%02x%02x[%s]
\n
"
,
color
->
w
,
color
->
h
,
color
->
time_base
.
den
,
color
->
time_base
.
num
,
color
->
w
,
color
->
h
,
color
->
frame_rate
.
num
,
color
->
frame_rate
.
den
,
color
->
color
[
0
],
color
->
color
[
1
],
color
->
color
[
2
],
color
->
color
[
3
],
is_packed_rgba
?
"rgba"
:
"yuva"
);
inlink
->
w
=
color
->
w
;
inlink
->
h
=
color
->
h
;
inlink
->
time_base
=
color
->
time_base
;
inlink
->
time_base
=
av_inv_q
(
color
->
frame_rate
);
inlink
->
frame_rate
=
color
->
frame_rate
;
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