Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
cfad00bf
Commit
cfad00bf
authored
Jul 24, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
postproc: factor common code
parent
f88544ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
23 deletions
+19
-23
modules/video_filter/postproc.c
modules/video_filter/postproc.c
+19
-23
No files found.
modules/video_filter/postproc.c
View file @
cfad00bf
...
...
@@ -286,11 +286,6 @@ static picture_t *PostprocPict( filter_t *p_filter, picture_t *p_pic )
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
const
uint8_t
*
src
[
3
];
uint8_t
*
dst
[
3
];
int
i_plane
;
int
i_src_stride
[
3
],
i_dst_stride
[
3
];
picture_t
*
p_outpic
=
filter_NewPicture
(
p_filter
);
if
(
!
p_outpic
)
{
...
...
@@ -300,29 +295,30 @@ static picture_t *PostprocPict( filter_t *p_filter, picture_t *p_pic )
/* Lock to prevent issues if pp_mode is changed */
vlc_mutex_lock
(
&
p_sys
->
lock
);
if
(
!
p_sys
->
pp_mode
)
if
(
p_sys
->
pp_mode
!=
NULL
)
{
vlc_mutex_unlock
(
&
p_sys
->
lock
);
picture_CopyPixels
(
p_outpic
,
p_pic
);
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
}
const
uint8_t
*
src
[
3
];
uint8_t
*
dst
[
3
];
int
i_src_stride
[
3
],
i_dst_stride
[
3
];
for
(
int
i_plane
=
0
;
i_plane
<
p_pic
->
i_planes
;
i_plane
++
)
{
src
[
i_plane
]
=
p_pic
->
p
[
i_plane
].
p_pixels
;
dst
[
i_plane
]
=
p_outpic
->
p
[
i_plane
].
p_pixels
;
for
(
i_plane
=
0
;
i_plane
<
p_pic
->
i_planes
;
i_plane
++
)
{
src
[
i_plane
]
=
p_pic
->
p
[
i_plane
].
p_pixels
;
dst
[
i_plane
]
=
p_outpic
->
p
[
i_plane
].
p_pixels
;
/* I'm not sure what happens if i_pitch != i_visible_pitch ...
* at least it shouldn't crash. */
i_src_stride
[
i_plane
]
=
p_pic
->
p
[
i_plane
].
i_pitch
;
i_dst_stride
[
i_plane
]
=
p_outpic
->
p
[
i_plane
].
i_pitch
;
}
/* I'm not sure what happens if i_pitch != i_visible_pitch ...
* at least it shouldn't crash. */
i_src_stride
[
i_plane
]
=
p_pic
->
p
[
i_plane
].
i_pitch
;
i_dst_stride
[
i_plane
]
=
p_outpic
->
p
[
i_plane
].
i_pitch
;
pp_postprocess
(
src
,
i_src_stride
,
dst
,
i_dst_stride
,
p_filter
->
fmt_in
.
video
.
i_width
,
p_filter
->
fmt_in
.
video
.
i_height
,
NULL
,
0
,
p_sys
->
pp_mode
,
p_sys
->
pp_context
,
0
)
;
}
pp_postprocess
(
src
,
i_src_stride
,
dst
,
i_dst_stride
,
p_filter
->
fmt_in
.
video
.
i_width
,
p_filter
->
fmt_in
.
video
.
i_height
,
NULL
,
0
,
p_sys
->
pp_mode
,
p_sys
->
pp_context
,
0
);
else
picture_CopyPixels
(
p_outpic
,
p_pic
);
vlc_mutex_unlock
(
&
p_sys
->
lock
);
return
CopyInfoAndRelease
(
p_outpic
,
p_pic
);
...
...
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