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
46f534bd
Commit
46f534bd
authored
Dec 11, 2017
by
Martin Vignali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/vf_hflip : move context func init in ff_hflip_init
parent
88e2dc7d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
4 deletions
+11
-4
hflip.h
libavfilter/hflip.h
+1
-0
vf_hflip.c
libavfilter/vf_hflip.c
+10
-4
No files found.
libavfilter/hflip.h
View file @
46f534bd
...
...
@@ -33,6 +33,7 @@ typedef struct FlipContext {
void
(
*
flip_line
[
4
])(
const
uint8_t
*
src
,
uint8_t
*
dst
,
int
w
);
}
FlipContext
;
int
ff_hflip_init
(
FlipContext
*
s
,
int
step
[
4
],
int
nb_planes
);
void
ff_hflip_init_x86
(
FlipContext
*
s
,
int
step
[
4
],
int
nb_planes
);
#endif
/* AVFILTER_HFLIP_H */
libavfilter/vf_hflip.c
View file @
46f534bd
...
...
@@ -131,7 +131,7 @@ static int config_props(AVFilterLink *inlink)
const
AVPixFmtDescriptor
*
pix_desc
=
av_pix_fmt_desc_get
(
inlink
->
format
);
const
int
hsub
=
pix_desc
->
log2_chroma_w
;
const
int
vsub
=
pix_desc
->
log2_chroma_h
;
int
nb_planes
,
i
;
int
nb_planes
;
av_image_fill_max_pixsteps
(
s
->
max_step
,
NULL
,
pix_desc
);
s
->
planewidth
[
0
]
=
s
->
planewidth
[
3
]
=
inlink
->
w
;
...
...
@@ -141,8 +141,15 @@ static int config_props(AVFilterLink *inlink)
nb_planes
=
av_pix_fmt_count_planes
(
inlink
->
format
);
return
ff_hflip_init
(
s
,
s
->
max_step
,
nb_planes
);
}
int
ff_hflip_init
(
FlipContext
*
s
,
int
step
[
4
],
int
nb_planes
)
{
int
i
;
for
(
i
=
0
;
i
<
nb_planes
;
i
++
)
{
switch
(
s
->
max_s
tep
[
i
])
{
switch
(
step
[
i
])
{
case
1
:
s
->
flip_line
[
i
]
=
hflip_byte_c
;
break
;
case
2
:
s
->
flip_line
[
i
]
=
hflip_short_c
;
break
;
case
3
:
s
->
flip_line
[
i
]
=
hflip_b24_c
;
break
;
...
...
@@ -153,9 +160,8 @@ static int config_props(AVFilterLink *inlink)
return
AVERROR_BUG
;
}
}
if
(
ARCH_X86
)
ff_hflip_init_x86
(
s
,
s
->
max_s
tep
,
nb_planes
);
ff_hflip_init_x86
(
s
,
step
,
nb_planes
);
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