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
14b171cd
Commit
14b171cd
authored
Jan 31, 2011
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add sample_aspect_ratio to AVFilterLink
parent
b482c001
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
2 deletions
+29
-2
APIchanges
doc/APIchanges
+3
-0
avfilter.c
libavfilter/avfilter.c
+4
-0
avfilter.h
libavfilter/avfilter.h
+3
-2
vf_aspect.c
libavfilter/vf_aspect.c
+14
-0
vf_transpose.c
libavfilter/vf_transpose.c
+5
-0
No files found.
doc/APIchanges
View file @
14b171cd
...
@@ -13,6 +13,9 @@ libavutil: 2009-03-08
...
@@ -13,6 +13,9 @@ libavutil: 2009-03-08
API changes, most recent first:
API changes, most recent first:
2011-01-31 - X - lavfi 1.75.0 - AVFilterLink sample_aspect_ratio
Add sample_aspect_ratio field to AVFilterLink.
2011-01-15 - r26374 - lavfi 1.74.0 - AVFilterBufferRefAudioProps
2011-01-15 - r26374 - lavfi 1.74.0 - AVFilterBufferRefAudioProps
Rename AVFilterBufferRefAudioProps.samples_nb to nb_samples.
Rename AVFilterBufferRefAudioProps.samples_nb to nb_samples.
...
...
libavfilter/avfilter.c
View file @
14b171cd
...
@@ -194,6 +194,10 @@ int avfilter_config_links(AVFilterContext *filter)
...
@@ -194,6 +194,10 @@ int avfilter_config_links(AVFilterContext *filter)
link
->
time_base
=
link
->
src
&&
link
->
src
->
input_count
?
link
->
time_base
=
link
->
src
&&
link
->
src
->
input_count
?
link
->
src
->
inputs
[
0
]
->
time_base
:
AV_TIME_BASE_Q
;
link
->
src
->
inputs
[
0
]
->
time_base
:
AV_TIME_BASE_Q
;
if
(
link
->
sample_aspect_ratio
.
num
==
0
&&
link
->
sample_aspect_ratio
.
den
==
0
)
link
->
sample_aspect_ratio
=
link
->
src
->
input_count
?
link
->
src
->
inputs
[
0
]
->
sample_aspect_ratio
:
(
AVRational
){
1
,
1
};
if
((
config_link
=
link
->
dstpad
->
config_props
))
if
((
config_link
=
link
->
dstpad
->
config_props
))
if
((
ret
=
config_link
(
link
))
<
0
)
if
((
ret
=
config_link
(
link
))
<
0
)
return
ret
;
return
ret
;
...
...
libavfilter/avfilter.h
View file @
14b171cd
...
@@ -27,7 +27,7 @@
...
@@ -27,7 +27,7 @@
#include "libavcore/samplefmt.h"
#include "libavcore/samplefmt.h"
#define LIBAVFILTER_VERSION_MAJOR 1
#define LIBAVFILTER_VERSION_MAJOR 1
#define LIBAVFILTER_VERSION_MINOR 7
4
#define LIBAVFILTER_VERSION_MINOR 7
5
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
...
@@ -580,9 +580,10 @@ struct AVFilterLink {
...
@@ -580,9 +580,10 @@ struct AVFilterLink {
enum
AVMediaType
type
;
///< filter media type
enum
AVMediaType
type
;
///< filter media type
/* These
two
parameters apply only to video */
/* These parameters apply only to video */
int
w
;
///< agreed upon image width
int
w
;
///< agreed upon image width
int
h
;
///< agreed upon image height
int
h
;
///< agreed upon image height
AVRational
sample_aspect_ratio
;
///< agreed upon sample aspect ratio
/* These two parameters apply only to audio */
/* These two parameters apply only to audio */
int64_t
channel_layout
;
///< channel layout of current buffer (see libavcore/audioconvert.h)
int64_t
channel_layout
;
///< channel layout of current buffer (see libavcore/audioconvert.h)
int64_t
sample_rate
;
///< samples per second
int64_t
sample_rate
;
///< samples per second
...
...
libavfilter/vf_aspect.c
View file @
14b171cd
...
@@ -82,6 +82,9 @@ static int setdar_config_props(AVFilterLink *inlink)
...
@@ -82,6 +82,9 @@ static int setdar_config_props(AVFilterLink *inlink)
av_log
(
inlink
->
dst
,
AV_LOG_INFO
,
"w:%d h:%d -> dar:%d/%d par:%d/%d
\n
"
,
av_log
(
inlink
->
dst
,
AV_LOG_INFO
,
"w:%d h:%d -> dar:%d/%d par:%d/%d
\n
"
,
inlink
->
w
,
inlink
->
h
,
dar
.
num
,
dar
.
den
,
aspect
->
aspect
.
num
,
aspect
->
aspect
.
den
);
inlink
->
w
,
inlink
->
h
,
dar
.
num
,
dar
.
den
,
aspect
->
aspect
.
num
,
aspect
->
aspect
.
den
);
inlink
->
sample_aspect_ratio
=
aspect
->
aspect
;
return
0
;
return
0
;
}
}
...
@@ -108,6 +111,16 @@ AVFilter avfilter_vf_setdar = {
...
@@ -108,6 +111,16 @@ AVFilter avfilter_vf_setdar = {
#endif
/* CONFIG_SETDAR_FILTER */
#endif
/* CONFIG_SETDAR_FILTER */
#if CONFIG_SETSAR_FILTER
#if CONFIG_SETSAR_FILTER
/* for setdar filter, convert from frame aspect ratio to pixel aspect ratio */
static
int
setsar_config_props
(
AVFilterLink
*
inlink
)
{
AspectContext
*
aspect
=
inlink
->
dst
->
priv
;
inlink
->
sample_aspect_ratio
=
aspect
->
aspect
;
return
0
;
}
AVFilter
avfilter_vf_setsar
=
{
AVFilter
avfilter_vf_setsar
=
{
.
name
=
"setsar"
,
.
name
=
"setsar"
,
.
description
=
NULL_IF_CONFIG_SMALL
(
"Set the pixel sample aspect ratio."
),
.
description
=
NULL_IF_CONFIG_SMALL
(
"Set the pixel sample aspect ratio."
),
...
@@ -118,6 +131,7 @@ AVFilter avfilter_vf_setsar = {
...
@@ -118,6 +131,7 @@ AVFilter avfilter_vf_setsar = {
.
inputs
=
(
AVFilterPad
[])
{{
.
name
=
"default"
,
.
inputs
=
(
AVFilterPad
[])
{{
.
name
=
"default"
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
type
=
AVMEDIA_TYPE_VIDEO
,
.
config_props
=
setsar_config_props
,
.
get_video_buffer
=
avfilter_null_get_video_buffer
,
.
get_video_buffer
=
avfilter_null_get_video_buffer
,
.
start_frame
=
start_frame
,
.
start_frame
=
start_frame
,
.
end_frame
=
avfilter_null_end_frame
},
.
end_frame
=
avfilter_null_end_frame
},
...
...
libavfilter/vf_transpose.c
View file @
14b171cd
...
@@ -102,6 +102,11 @@ static int config_props_output(AVFilterLink *outlink)
...
@@ -102,6 +102,11 @@ static int config_props_output(AVFilterLink *outlink)
outlink
->
w
=
inlink
->
h
;
outlink
->
w
=
inlink
->
h
;
outlink
->
h
=
inlink
->
w
;
outlink
->
h
=
inlink
->
w
;
if
(
inlink
->
sample_aspect_ratio
.
num
){
outlink
->
sample_aspect_ratio
=
av_div_q
((
AVRational
){
1
,
1
},
inlink
->
sample_aspect_ratio
);
}
else
outlink
->
sample_aspect_ratio
=
inlink
->
sample_aspect_ratio
;
av_log
(
ctx
,
AV_LOG_INFO
,
"w:%d h:%d dir:%d -> w:%d h:%d rotation:%s vflip:%d
\n
"
,
av_log
(
ctx
,
AV_LOG_INFO
,
"w:%d h:%d dir:%d -> w:%d h:%d rotation:%s vflip:%d
\n
"
,
inlink
->
w
,
inlink
->
h
,
trans
->
dir
,
outlink
->
w
,
outlink
->
h
,
inlink
->
w
,
inlink
->
h
,
trans
->
dir
,
outlink
->
w
,
outlink
->
h
,
trans
->
dir
==
1
||
trans
->
dir
==
3
?
"clockwise"
:
"counterclockwise"
,
trans
->
dir
==
1
||
trans
->
dir
==
3
?
"clockwise"
:
"counterclockwise"
,
...
...
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