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
fd6cead7
Commit
fd6cead7
authored
Jan 04, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: look up pix fmt only once during deinterlace initialization
parent
9aee7d49
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
modules/codec/avcodec/deinterlace.c
modules/codec/avcodec/deinterlace.c
+11
-15
No files found.
modules/codec/avcodec/deinterlace.c
View file @
fd6cead7
...
...
@@ -69,29 +69,25 @@ int OpenDeinterlace( vlc_object_t *p_this )
/* libavcodec needs to be initialized for some chroma conversions */
vlc_init_avcodec
();
/* Check if we can handle that formats */
if
(
TestFfmpegChroma
(
-
1
,
p_filter
->
fmt_in
.
i_codec
)
!=
VLC_SUCCESS
)
/* Check if the input format */
int
pix_fmt
;
p_filter
->
fmt_in
.
video
.
i_chroma
=
p_filter
->
fmt_in
.
i_codec
;
/* XXX ahem */
if
(
GetFfmpegChroma
(
&
pix_fmt
,
&
p_filter
->
fmt_in
.
video
)
!=
VLC_SUCCESS
)
{
msg_Err
(
p_filter
,
"Failed to match chroma type"
);
msg_Err
(
p_filter
,
"Unsupported chroma type %4.4s"
,
(
char
*
)
&
p_filter
->
fmt_in
.
video
.
i_chroma
);
return
VLC_EGENERIC
;
}
/* Allocate the memory needed to store the decoder's structure */
if
(
(
p_filter
->
p_sys
=
p_sys
=
(
filter_sys_t
*
)
malloc
(
sizeof
(
filter_sys_t
))
)
==
NULL
)
{
return
VLC_EGENERIC
;
}
p_sys
=
malloc
(
sizeof
(
*
p_sys
)
);
if
(
unlikely
(
p_sys
==
NULL
)
)
return
VLC_ENOMEM
;
/* Misc init */
p_filter
->
fmt_in
.
video
.
i_chroma
=
p_filter
->
fmt_in
.
i_codec
;
if
(
GetFfmpegChroma
(
&
p_sys
->
i_src_ffmpeg_chroma
,
&
p_filter
->
fmt_in
.
video
)
!=
VLC_SUCCESS
)
{
msg_Err
(
p_filter
,
"Failed to match chroma type"
);
return
VLC_EGENERIC
;
}
p_sys
->
i_src_ffmpeg_chroma
=
pix_fmt
;
p_filter
->
p_sys
=
p_sys
;
p_filter
->
pf_video_filter
=
Deinterlace
;
msg_Dbg
(
p_filter
,
"deinterlacing"
);
return
VLC_SUCCESS
;
...
...
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