Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
dc14ecb4
Commit
dc14ecb4
authored
Feb 27, 2017
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove VDA plugin
parent
60d6dc70
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1 addition
and
249 deletions
+1
-249
NEWS
NEWS
+1
-0
configure.ac
configure.ac
+0
-39
modules/MODULES_LIST
modules/MODULES_LIST
+0
-1
modules/codec/Makefile.am
modules/codec/Makefile.am
+0
-11
modules/codec/avcodec/avcodec.h
modules/codec/avcodec/avcodec.h
+0
-3
modules/codec/avcodec/va.c
modules/codec/avcodec/va.c
+0
-4
modules/codec/avcodec/vda.c
modules/codec/avcodec/vda.c
+0
-190
po/POTFILES.in
po/POTFILES.in
+0
-1
No files found.
NEWS
View file @
dc14ecb4
...
...
@@ -281,6 +281,7 @@ Removed modules
* Direct2D module (use Direct3D11)
* EyeTV access module
* Rar access and stream filter: use libarchive
* VDA decoder: use VT
Changes between 2.2.0 and 2.2.1:
...
...
configure.ac
View file @
dc14ecb4
...
...
@@ -2449,45 +2449,6 @@ dnl DXGI debug
dnl
AC_CHECK_HEADERS(dxgidebug.h)
dnl
dnl vda needs avcodec
dnl
AC_ARG_ENABLE(vda,
[ --enable-vda VDA support (default auto)])
have_avcodec_vda="no"
AS_IF([test "${enable_vda}" != "no"], [
if test "${SYS}" = "darwin"; then
AS_IF([test "x${have_avcodec}" = "xyes"], [
AC_CHECK_HEADERS(VideoDecodeAcceleration/VDADecoder.h,
[
AC_CHECK_HEADERS(libavcodec/vda.h, [
have_avcodec_vda="yes"
],[
AS_IF([test "${enable_vda}" = "yes"],
[AC_MSG_ERROR([vda is present but libavcodec/vda.h is missing])],
[AC_MSG_WARN([vda is present but libavcodec/vda.h is missing ])])
])
],[
AS_IF([test "${enable_vda}" = "yes"],
[AC_MSG_ERROR([Could not find required VideoDecodeAcceleration/VDADecoder.h])],
[AC_MSG_WARN([VideoDecodeAcceleration/VDADecoder.h not found])])
])
],[
AS_IF([test "x${enable_vda}" != "x"], [
AC_MSG_ERROR([--enable-vda and --disable-avcodec options are mutually exclusive.])
])
])
AS_IF([test "${have_avcodec_vda}" = "yes"], [
SAVE_LIBS=$LIBS
LIBS="$LIBS $AVCODEC_LIBS"
AC_CHECK_FUNCS([av_vda_alloc_context])
LIBS=$SAVE_LIBS
])
fi
])
AM_CONDITIONAL([HAVE_AVCODEC_VDA], [test "${have_avcodec_vda}" = "yes"])
dnl
dnl avformat demuxer/muxer plugin
dnl
...
...
modules/MODULES_LIST
View file @
dc14ecb4
...
...
@@ -419,7 +419,6 @@ $Id$
* vaapi_x11: VAAPI hardware-accelerated decoding with x11 backend
* vc1: VC-1 Video demuxer
* vcd: input module for accessing Video CDs
* vda: VDADecoder hardware-accelerated decoding
* vdpau_adjust: VDPAU color adjust video filter
* vdpau_avcodec: VDPAU hardware-accelerated decoding
* vdpau_chroma: VDPAU hardware surfaces conversion and rendering
...
...
modules/codec/Makefile.am
View file @
dc14ecb4
...
...
@@ -413,17 +413,6 @@ if HAVE_AVCODEC_D3D11VA
codec_LTLIBRARIES
+=
libd3d11va_plugin.la
endif
libvda_plugin_la_SOURCES
=
\
video_chroma/copy.c video_chroma/copy.h
\
codec/avcodec/vda.c
libvda_plugin_la_CFLAGS
=
$(AM_CFLAGS)
$(AVCODEC_CFLAGS)
libvda_plugin_la_LDFLAGS
=
-Wl
,-framework,CoreFoundation,-framework,VideoDecodeAcceleration,-framework,QuartzCore
libvda_plugin_la_LIBADD
=
$(AVCODEC_LIBS)
if
HAVE_AVCODEC_VDA
codec_LTLIBRARIES
+=
libvda_plugin.la
endif
### OpenMAX ###
noinst_HEADERS
+=
\
...
...
modules/codec/avcodec/avcodec.h
View file @
dc14ecb4
...
...
@@ -110,9 +110,6 @@ void ffmpeg_CloseCodec( decoder_t *p_dec );
#define HW_TEXT N_("Hardware decoding")
#define HW_LONGTEXT N_("This allows hardware decoding when available.")
#define VDA_PIX_FMT_TEXT N_("VDA output pixel format")
#define VDA_PIX_FMT_LONGTEXT N_("The pixel format for output image buffers.")
#define THREADS_TEXT N_( "Threads" )
#define THREADS_LONGTEXT N_( "Number of threads used for decoding, 0 meaning auto" )
...
...
modules/codec/avcodec/va.c
View file @
dc14ecb4
...
...
@@ -61,10 +61,6 @@ vlc_fourcc_t vlc_va_GetChroma(enum PixelFormat hwfmt, enum PixelFormat swfmt)
}
break
;
#endif
#if (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(53, 14, 0))
case
AV_PIX_FMT_VDA
:
return
VLC_CODEC_I420
;
#endif
#if (LIBAVUTIL_VERSION_INT >= AV_VERSION_INT(52, 4, 0))
case
AV_PIX_FMT_VDPAU
:
switch
(
swfmt
)
...
...
modules/codec/avcodec/vda.c
deleted
100644 → 0
View file @
60d6dc70
/*****************************************************************************
* vda.c: VDA helpers for the libavcodec decoder
*****************************************************************************
* Copyright (C) 2012-2015 VLC authors VideoLAN
*
* Authors: Sebastien Zwickert <dilaroga@free.fr>
* Rémi Denis-Courmont <remi # remlab : net>
* Felix Paul Kühne <fkuehne # videolan org>
* David Fuhrmann <david.fuhrmann # googlemail com>
*
* 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.
*****************************************************************************/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <assert.h>
#include <vlc_common.h>
#include <vlc_vout.h>
#include <vlc_plugin.h>
#include <libavcodec/avcodec.h>
#include "avcodec.h"
#include "va.h"
#include "../../video_chroma/copy.h"
#include <libavcodec/vda.h>
#include <VideoDecodeAcceleration/VDADecoder.h>
#pragma mark prototypes and definitions
static
int
Open
(
vlc_va_t
*
,
AVCodecContext
*
,
enum
PixelFormat
,
const
es_format_t
*
,
picture_sys_t
*
);
static
void
Close
(
vlc_va_t
*
,
AVCodecContext
*
);
static
int
Get
(
vlc_va_t
*
,
picture_t
*
,
uint8_t
**
);
static
int
Extract
(
vlc_va_t
*
,
picture_t
*
,
uint8_t
*
);
static
void
Release
(
void
*
opaque
,
uint8_t
*
data
);
static
void
copy420YpCbCr8Planar
(
picture_t
*
p_pic
,
CVPixelBufferRef
buffer
,
unsigned
i_height
)
{
uint8_t
*
pp_plane
[
2
];
size_t
pi_pitch
[
2
];
if
(
!
buffer
)
return
;
CVPixelBufferLockBaseAddress
(
buffer
,
0
);
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
pp_plane
[
i
]
=
CVPixelBufferGetBaseAddressOfPlane
(
buffer
,
i
);
pi_pitch
[
i
]
=
CVPixelBufferGetBytesPerRowOfPlane
(
buffer
,
i
);
}
CopyFromNv12ToI420
(
p_pic
,
pp_plane
,
pi_pitch
,
i_height
);
CVPixelBufferUnlockBaseAddress
(
buffer
,
0
);
}
vlc_module_begin
()
set_description
(
N_
(
"Video Decode Acceleration Framework (VDA)"
)
)
set_capability
(
"hw decoder"
,
0
)
set_category
(
CAT_INPUT
)
set_subcategory
(
SUBCAT_INPUT_VCODEC
)
set_callbacks
(
Open
,
Close
)
add_obsolete_integer
(
"avcodec-vda-pix-fmt"
)
/* since 3.0.0 */
vlc_module_end
()
struct
vlc_va_sys_t
{
AVVDAContext
*
vdactx
;
int
i_height
;
};
static
int
Open
(
vlc_va_t
*
va
,
AVCodecContext
*
avctx
,
enum
PixelFormat
pix_fmt
,
const
es_format_t
*
fmt
,
picture_sys_t
*
p_sys
)
{
if
(
pix_fmt
!=
AV_PIX_FMT_VDA
)
return
VLC_EGENERIC
;
(
void
)
fmt
;
(
void
)
p_sys
;
switch
(
avctx
->
codec_id
)
{
case
AV_CODEC_ID_H264
:
msg_Dbg
(
va
,
"trying to decode MPEG-4 Part 10: profile %d, level %d"
,
avctx
->
profile
,
avctx
->
level
);
switch
(
avctx
->
profile
&
~
FF_PROFILE_H264_INTRA
)
{
case
FF_PROFILE_H264_CONSTRAINED_BASELINE
:
case
FF_PROFILE_H264_BASELINE
:
case
FF_PROFILE_H264_MAIN
:
case
FF_PROFILE_H264_HIGH
:
break
;
default:
msg_Dbg
(
va
,
"unsupported H264 profile %d"
,
avctx
->
profile
);
return
-
1
;
}
break
;
default:
#ifndef NDEBUG
msg_Err
(
va
,
"codec %d is not supported"
,
avctx
->
codec_id
);
#endif
return
VLC_EGENERIC
;
}
vlc_va_sys_t
*
sys
=
calloc
(
1
,
sizeof
(
*
sys
));
if
(
unlikely
(
sys
==
NULL
))
return
VLC_ENOMEM
;
sys
->
vdactx
=
av_vda_alloc_context
();
sys
->
vdactx
->
cv_pix_fmt_type
=
kCVPixelFormatType_420YpCbCr8BiPlanarVideoRange
;
sys
->
i_height
=
avctx
->
height
;
int
i_ret
=
av_vda_default_init2
(
avctx
,
sys
->
vdactx
);
msg_Dbg
(
va
,
"Creating VDA decoder %i"
,
i_ret
);
if
(
i_ret
!=
0
)
{
av_vda_default_free
(
avctx
);
return
VLC_EGENERIC
;
}
va
->
sys
=
sys
;
va
->
description
=
(
char
*
)
"VDA"
;
va
->
get
=
Get
;
va
->
release
=
Release
;
va
->
extract
=
Extract
;
return
VLC_SUCCESS
;
}
static
void
Close
(
vlc_va_t
*
va
,
AVCodecContext
*
avctx
)
{
av_vda_default_free
(
avctx
);
(
void
)
va
;
}
// Never called
static
int
Get
(
vlc_va_t
*
va
,
picture_t
*
p_picture
,
uint8_t
**
data
)
{
VLC_UNUSED
(
va
);
(
void
)
p_picture
;
(
void
)
data
;
return
VLC_SUCCESS
;
}
// Never called
static
void
Release
(
void
*
opaque
,
uint8_t
*
data
)
{
VLC_UNUSED
(
opaque
);
VLC_UNUSED
(
data
);
}
static
int
Extract
(
vlc_va_t
*
va
,
picture_t
*
p_picture
,
uint8_t
*
data
)
{
vlc_va_sys_t
*
sys
=
va
->
sys
;
CVPixelBufferRef
cv_buffer
=
(
CVPixelBufferRef
)
data
;
if
(
!
cv_buffer
||
!
CVPixelBufferGetDataSize
(
cv_buffer
)
)
{
msg_Dbg
(
va
,
"Frame buffer is empty."
);
return
VLC_EGENERIC
;
}
copy420YpCbCr8Planar
(
p_picture
,
cv_buffer
,
sys
->
i_height
);
return
VLC_SUCCESS
;
}
po/POTFILES.in
View file @
dc14ecb4
...
...
@@ -336,7 +336,6 @@ modules/codec/avcodec/dxva2.c
modules/codec/avcodec/encoder.c
modules/codec/avcodec/fourcc.c
modules/codec/avcodec/vaapi.c
modules/codec/avcodec/vda.c
modules/codec/avcodec/video.c
modules/codec/bpg.c
modules/codec/cc.c
...
...
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