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
c1fd92f2
Commit
c1fd92f2
authored
Mar 09, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec: drop deprecated deinterlacing filter
parent
4579b28b
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
160 deletions
+0
-160
modules/codec/Modules.am
modules/codec/Modules.am
+0
-1
modules/codec/avcodec/avcodec.c
modules/codec/avcodec/avcodec.c
+0
-7
modules/codec/avcodec/deinterlace.c
modules/codec/avcodec/deinterlace.c
+0
-152
No files found.
modules/codec/Modules.am
View file @
c1fd92f2
...
...
@@ -96,7 +96,6 @@ libavcodec_plugin_la_SOURCES = \
avcodec/subtitle.c \
avcodec/audio.c \
avcodec/cpu.c \
avcodec/deinterlace.c \
avcodec/fourcc.c \
avcodec/chroma.c avcodec/chroma.h \
avcodec/va.h \
...
...
modules/codec/avcodec/avcodec.c
View file @
c1fd92f2
...
...
@@ -239,13 +239,6 @@ vlc_module_begin ()
ENC_PROFILE_TEXT
,
ENC_PROFILE_LONGTEXT
,
true
)
#endif
/* ENABLE_SOUT */
/* video filter submodule */
add_submodule
()
set_capability
(
"video filter2"
,
0
)
set_callbacks
(
OpenDeinterlace
,
CloseDeinterlace
)
set_description
(
N_
(
"FFmpeg deinterlace video filter"
)
)
add_shortcut
(
"ffmpeg-deinterlace"
)
#ifdef MERGE_FFMPEG
add_submodule
()
# include "../../demux/avformat/avformat.c"
...
...
modules/codec/avcodec/deinterlace.c
deleted
100644 → 0
View file @
4579b28b
/*****************************************************************************
* deinterlace.c: video filter doing chroma conversion and resizing
* using the libavcodec library
*****************************************************************************
* Copyright (C) 1999-2001 VLC authors and VideoLAN
* $Id$
*
* Authors: Gildas Bazin <gbazin@videolan.org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/*****************************************************************************
* Preamble
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <vlc_common.h>
#include <vlc_codec.h>
#include <vlc_filter.h>
#include <libavcodec/avcodec.h>
#include "avcodec.h"
#include "avcommon.h"
static
picture_t
*
Deinterlace
(
filter_t
*
p_filter
,
picture_t
*
p_pic
);
/*****************************************************************************
* filter_sys_t : filter descriptor
*****************************************************************************/
struct
filter_sys_t
{
bool
b_resize
;
bool
b_convert
;
bool
b_resize_first
;
bool
b_enable_croppadd
;
es_format_t
fmt_in
;
int
i_src_ffmpeg_chroma
;
es_format_t
fmt_out
;
int
i_dst_ffmpeg_chroma
;
AVPicture
tmp_pic
;
};
/*****************************************************************************
* OpenDeinterlace: probe the filter and return score
*****************************************************************************/
int
OpenDeinterlace
(
vlc_object_t
*
p_this
)
{
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
;
/* libavcodec needs to be initialized for some chroma conversions */
vlc_init_avcodec
();
/* 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
,
"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 */
p_sys
=
malloc
(
sizeof
(
*
p_sys
)
);
if
(
unlikely
(
p_sys
==
NULL
)
)
return
VLC_ENOMEM
;
/* Misc init */
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
;
}
/*****************************************************************************
* CloseDeinterlace: clean up the filter
*****************************************************************************/
void
CloseDeinterlace
(
vlc_object_t
*
p_this
)
{
filter_t
*
p_filter
=
(
filter_t
*
)
p_this
;
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
free
(
p_sys
);
}
/*****************************************************************************
* Do the processing here
*****************************************************************************/
static
picture_t
*
Deinterlace
(
filter_t
*
p_filter
,
picture_t
*
p_pic
)
{
filter_sys_t
*
p_sys
=
p_filter
->
p_sys
;
AVPicture
src_pic
,
dest_pic
;
picture_t
*
p_pic_dst
;
int
i
,
i_res
=
-
1
;
/* Request output picture */
p_pic_dst
=
filter_NewPicture
(
p_filter
);
if
(
!
p_pic_dst
)
{
picture_Release
(
p_pic
);
return
NULL
;
}
/* Prepare the AVPictures for the conversion */
for
(
i
=
0
;
i
<
p_pic
->
i_planes
;
i
++
)
{
src_pic
.
data
[
i
]
=
p_pic
->
p
[
i
].
p_pixels
;
src_pic
.
linesize
[
i
]
=
p_pic
->
p
[
i
].
i_pitch
;
}
for
(
i
=
0
;
i
<
p_pic_dst
->
i_planes
;
i
++
)
{
dest_pic
.
data
[
i
]
=
p_pic_dst
->
p
[
i
].
p_pixels
;
dest_pic
.
linesize
[
i
]
=
p_pic_dst
->
p
[
i
].
i_pitch
;
}
i_res
=
avpicture_deinterlace
(
&
dest_pic
,
&
src_pic
,
p_sys
->
i_src_ffmpeg_chroma
,
p_filter
->
fmt_in
.
video
.
i_width
,
p_filter
->
fmt_in
.
video
.
i_height
);
if
(
i_res
==
-
1
)
{
msg_Err
(
p_filter
,
"deinterlacing picture failed"
);
filter_DeletePicture
(
p_filter
,
p_pic_dst
);
picture_Release
(
p_pic
);
return
NULL
;
}
picture_CopyProperties
(
p_pic_dst
,
p_pic
);
p_pic_dst
->
b_progressive
=
true
;
picture_Release
(
p_pic
);
return
p_pic_dst
;
}
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