Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
76821fb1
Commit
76821fb1
authored
Jan 07, 2012
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed motiondetect packed YUV filter function.
A filter shall not return an input buffer. It closes #5748.
parent
cdae44ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
15 deletions
+19
-15
modules/video_filter/motiondetect.c
modules/video_filter/motiondetect.c
+19
-15
No files found.
modules/video_filter/motiondetect.c
View file @
76821fb1
...
...
@@ -277,40 +277,44 @@ static picture_t *FilterPacked( filter_t *p_filter, picture_t *p_inpic )
const
video_format_t
*
p_fmt
=
&
p_filter
->
fmt_in
.
video
;
picture_t
*
p_outpic
;
const
uint8_t
*
p_inpix
=
p_inpic
->
p
[
Y_PLANE
].
p_pixels
;
const
int
i_src_pitch
=
p_inpic
->
p
[
Y_PLANE
].
i_pitch
;
uint8_t
*
p_oldpix
=
p_sys
->
p_old
->
p
[
Y_PLANE
].
p_pixels
;
const
int
i_old_pitch
=
p_sys
->
p_old
->
p
[
Y_PLANE
].
i_pitch
;
uint32_t
*
p_buf
=
p_sys
->
p_buf
;
uint32_t
*
p_buf2
=
p_sys
->
p_buf2
;
int
i_y_offset
,
i_u_offset
,
i_v_offset
;
unsigned
x
,
y
;
if
(
GetPackedYuvOffsets
(
p_fmt
->
i_chroma
,
&
i_y_offset
,
&
i_u_offset
,
&
i_v_offset
)
)
if
(
!
p_inpic
)
return
NULL
;
const
uint8_t
*
p_inpix
=
p_inpic
->
p
[
Y_PLANE
].
p_pixels
;
const
int
i_src_pitch
=
p_inpic
->
p
[
Y_PLANE
].
i_pitch
;
p_outpic
=
filter_NewPicture
(
p_filter
);
if
(
!
p_outpic
)
{
msg_Warn
(
p_filter
,
"Unsupported input chroma (%4.4s)"
,
(
char
*
)
&
p_fmt
->
i_chroma
);
return
p_inpic
;
picture_Release
(
p_inpic
);
return
NULL
;
}
picture_Copy
(
p_outpic
,
p_inpic
);
if
(
!
p_sys
->
b_old
)
{
picture_Copy
(
p_sys
->
p_old
,
p_inpic
);
picture_Release
(
p_inpic
);
p_sys
->
b_old
=
true
;
return
p_
in
pic
;
return
p_
out
pic
;
}
p_outpic
=
filter_NewPicture
(
p_filter
);
if
(
!
p_outpic
)
int
i_y_offset
,
i_u_offset
,
i_v_offset
;
if
(
GetPackedYuvOffsets
(
p_fmt
->
i_chroma
,
&
i_y_offset
,
&
i_u_offset
,
&
i_v_offset
)
)
{
msg_Warn
(
p_filter
,
"Unsupported input chroma (%4.4s)"
,
(
char
*
)
&
p_fmt
->
i_chroma
);
picture_Release
(
p_inpic
);
return
NULL
;
return
p_outpic
;
}
picture_Copy
(
p_outpic
,
p_inpic
);
/* Substract all planes at once */
...
...
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