[vlc-commits] Remove VDA plugin

Jean-Baptiste Kempf git at videolan.org
Mon Feb 27 16:41:53 CET 2017


vlc | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Mon Feb 27 16:37:37 2017 +0100| [dc14ecb4f25874c364e6dabc902c540c94ac5556] | committer: Jean-Baptiste Kempf

Remove VDA plugin

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dc14ecb4f25874c364e6dabc902c540c94ac5556
---

 NEWS                            |   1 +
 configure.ac                    |  39 ---------
 modules/MODULES_LIST            |   1 -
 modules/codec/Makefile.am       |  11 ---
 modules/codec/avcodec/avcodec.h |   3 -
 modules/codec/avcodec/va.c      |   4 -
 modules/codec/avcodec/vda.c     | 190 ----------------------------------------
 po/POTFILES.in                  |   1 -
 8 files changed, 1 insertion(+), 249 deletions(-)

diff --git a/NEWS b/NEWS
index f4bd065..21746f9 100644
--- a/NEWS
+++ b/NEWS
@@ -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:
diff --git a/configure.ac b/configure.ac
index c0e0714..4750e47 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2450,45 +2450,6 @@ 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
 
diff --git a/modules/MODULES_LIST b/modules/MODULES_LIST
index 973356e..62ff645 100644
--- a/modules/MODULES_LIST
+++ b/modules/MODULES_LIST
@@ -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
diff --git a/modules/codec/Makefile.am b/modules/codec/Makefile.am
index a08603c..c3be95a 100644
--- a/modules/codec/Makefile.am
+++ b/modules/codec/Makefile.am
@@ -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 += \
diff --git a/modules/codec/avcodec/avcodec.h b/modules/codec/avcodec/avcodec.h
index 59abaa3..e9b3c1a 100644
--- a/modules/codec/avcodec/avcodec.h
+++ b/modules/codec/avcodec/avcodec.h
@@ -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" )
 
diff --git a/modules/codec/avcodec/va.c b/modules/codec/avcodec/va.c
index 091c35a..de10736 100644
--- a/modules/codec/avcodec/va.c
+++ b/modules/codec/avcodec/va.c
@@ -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)
diff --git a/modules/codec/avcodec/vda.c b/modules/codec/avcodec/vda.c
deleted file mode 100644
index cdb1a66..0000000
--- a/modules/codec/avcodec/vda.c
+++ /dev/null
@@ -1,190 +0,0 @@
-/*****************************************************************************
- * vda.c: VDA helpers for the libavcodec decoder
- *****************************************************************************
- * Copyright (C) 2012-2015 VLC authors VideoLAN
- *
- * Authors: Sebastien Zwickert <dilaroga at 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;
-}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index caea988..456ae91 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -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



More information about the vlc-commits mailing list