Skip to content

Commit

Permalink
lavc: drop VDA
Browse files Browse the repository at this point in the history
Deprecated (aka removed) in OSX 10.11, and we have a replacement for it
(VideoToolbox).
  • Loading branch information
cboesch-gpsw committed Oct 23, 2017
1 parent 3605b31 commit 2b32031
Show file tree
Hide file tree
Showing 19 changed files with 14 additions and 1,117 deletions.
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ version <next>:
- Bitstream filters for editing metadata in H.264, HEVC and MPEG-2 streams
- Dropped support for OpenJPEG versions 2.0 and below. Using OpenJPEG now
requires 2.1 (or later) and pkg-config.
- VDA dropped (use VideoToolbox instead)


version 3.4:
Expand Down
1 change: 0 additions & 1 deletion MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,6 @@ Codecs:
txd.c Ivo van Poorten
vc2* Rostislav Pehlivanov
vcr1.c Michael Niedermayer
vda_h264_dec.c Xidorn Quan
videotoolboxenc.c Rick Kern
vima.c Paul B Mahol
vorbisdec.c Denes Balatoni, David Conrad
Expand Down
14 changes: 0 additions & 14 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -318,7 +318,6 @@ External library support:
--enable-omx-rpi enable OpenMAX IL code for Raspberry Pi [no]
--enable-rkmpp enable Rockchip Media Process Platform code [no]
--disable-vaapi disable Video Acceleration API (mainly Unix/Intel) code [autodetect]
--disable-vda disable Apple Video Decode Acceleration code [autodetect]
--disable-vdpau disable Nvidia Video Decode and Presentation API for Unix code [autodetect]
--disable-videotoolbox disable VideoToolbox code [autodetect]
Expand Down Expand Up @@ -1650,7 +1649,6 @@ HWACCEL_AUTODETECT_LIBRARY_LIST="
dxva2
nvenc
vaapi
vda
vdpau
videotoolbox
v4l2_m2m
Expand Down Expand Up @@ -2660,10 +2658,6 @@ cuda_deps_any="libdl LoadLibrary"
cuvid_deps="cuda"
d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder ID3D11VideoContext"
dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode ole32 user32"
vda_framework_deps="VideoDecodeAcceleration_VDADecoder_h blocks_extension"
vda_framework_extralibs="-framework VideoDecodeAcceleration"
vda_deps="vda_framework pthreads corefoundation"
vda_extralibs="-framework QuartzCore"
videotoolbox_hwaccel_deps="videotoolbox pthreads"
videotoolbox_hwaccel_extralibs="-framework QuartzCore"
xvmc_deps="X11_extensions_XvMClib_h"
Expand All @@ -2685,10 +2679,6 @@ h264_mmal_hwaccel_deps="mmal"
h264_qsv_hwaccel_deps="libmfx"
h264_vaapi_hwaccel_deps="vaapi"
h264_vaapi_hwaccel_select="h264_decoder"
h264_vda_hwaccel_deps="vda"
h264_vda_hwaccel_select="h264_decoder"
h264_vda_old_hwaccel_deps="vda"
h264_vda_old_hwaccel_select="h264_decoder"
h264_vdpau_hwaccel_deps="vdpau"
h264_vdpau_hwaccel_select="h264_decoder"
h264_videotoolbox_hwaccel_deps="videotoolbox"
Expand Down Expand Up @@ -2822,8 +2812,6 @@ h264_rkmpp_decoder_deps="rkmpp"
h264_rkmpp_decoder_select="h264_mp4toannexb_bsf"
h264_vaapi_encoder_deps="VAEncPictureParameterBufferH264"
h264_vaapi_encoder_select="cbs_h264 vaapi_encode"
h264_vda_decoder_deps="vda"
h264_vda_decoder_select="h264_decoder"
h264_vdpau_decoder_deps="vdpau"
h264_vdpau_decoder_select="h264_decoder"
h264_v4l2m2m_decoder_deps="v4l2_m2m h264_v4l2_m2m"
Expand Down Expand Up @@ -3011,7 +2999,6 @@ libzvbi_teletext_decoder_deps="libzvbi"
videotoolbox_suggest="coreservices"
videotoolbox_deps="corefoundation coremedia corevideo"
videotoolbox_encoder_deps="videotoolbox VTCompressionSessionPrepareToEncodeFrames"
videotoolbox_encoder_suggest="vda_framework"

# demuxers / muxers
ac3_demuxer_select="ac3_parser"
Expand Down Expand Up @@ -5847,7 +5834,6 @@ check_header sys/un.h
check_header termios.h
check_header unistd.h
check_header valgrind/valgrind.h
check_header VideoDecodeAcceleration/VDADecoder.h
check_func_headers VideoToolbox/VTCompressionSession.h VTCompressionSessionPrepareToEncodeFrames -framework VideoToolbox
check_header windows.h
check_header X11/extensions/XvMClib.h
Expand Down
3 changes: 0 additions & 3 deletions doc/ffmpeg.texi
Original file line number Diff line number Diff line change
Expand Up @@ -786,9 +786,6 @@ Do not use any hardware acceleration (the default).
@item auto
Automatically select the hardware acceleration method.

@item vda
Use Apple VDA hardware acceleration.

@item vdpau
Use VDPAU (Video Decode and Presentation API for Unix) hardware acceleration.

Expand Down
2 changes: 0 additions & 2 deletions fftools/ffmpeg.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ enum HWAccelID {
HWACCEL_AUTO,
HWACCEL_VDPAU,
HWACCEL_DXVA2,
HWACCEL_VDA,
HWACCEL_VIDEOTOOLBOX,
HWACCEL_QSV,
HWACCEL_VAAPI,
Expand Down Expand Up @@ -661,7 +660,6 @@ int ifilter_parameters_from_frame(InputFilter *ifilter, const AVFrame *frame);

int ffmpeg_parse_options(int argc, char **argv);

int vda_init(AVCodecContext *s);
int videotoolbox_init(AVCodecContext *s);
int qsv_init(AVCodecContext *s);
int cuvid_init(AVCodecContext *s);
Expand Down
6 changes: 1 addition & 5 deletions fftools/ffmpeg_opt.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,6 @@ const HWAccel hwaccels[] = {
{ "dxva2", hwaccel_decode_init, HWACCEL_DXVA2, AV_PIX_FMT_DXVA2_VLD,
AV_HWDEVICE_TYPE_DXVA2 },
#endif
#if CONFIG_VDA
{ "vda", videotoolbox_init, HWACCEL_VDA, AV_PIX_FMT_VDA,
AV_HWDEVICE_TYPE_NONE },
#endif
#if CONFIG_VIDEOTOOLBOX
{ "videotoolbox", videotoolbox_init, HWACCEL_VIDEOTOOLBOX, AV_PIX_FMT_VIDEOTOOLBOX,
AV_HWDEVICE_TYPE_NONE },
Expand Down Expand Up @@ -3631,7 +3627,7 @@ const OptionDef options[] = {
{ "hwaccel_output_format", OPT_VIDEO | OPT_STRING | HAS_ARG | OPT_EXPERT |
OPT_SPEC | OPT_INPUT, { .off = OFFSET(hwaccel_output_formats) },
"select output format used with HW accelerated decoding", "format" },
#if CONFIG_VDA || CONFIG_VIDEOTOOLBOX
#if CONFIG_VIDEOTOOLBOX
{ "videotoolbox_pixfmt", HAS_ARG | OPT_STRING | OPT_EXPERT, { &videotoolbox_pixfmt}, "" },
#endif
{ "hwaccels", OPT_EXIT, { .func_arg = show_hwaccels },
Expand Down
45 changes: 4 additions & 41 deletions fftools/ffmpeg_videotoolbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,7 @@
#endif

#include "libavcodec/avcodec.h"
#if CONFIG_VDA
# include "libavcodec/vda.h"
#endif
#if CONFIG_VIDEOTOOLBOX
# include "libavcodec/videotoolbox.h"
#endif
#include "libavcodec/videotoolbox.h"
#include "libavutil/imgutils.h"
#include "ffmpeg.h"

Expand Down Expand Up @@ -114,15 +109,7 @@ static void videotoolbox_uninit(AVCodecContext *s)

av_frame_free(&vt->tmp_frame);

if (ist->hwaccel_id == HWACCEL_VIDEOTOOLBOX) {
#if CONFIG_VIDEOTOOLBOX
av_videotoolbox_default_free(s);
#endif
} else {
#if CONFIG_VDA
av_vda_default_free(s);
#endif
}
av_videotoolbox_default_free(s);
av_freep(&ist->hwaccel_ctx);
}

Expand All @@ -147,8 +134,7 @@ int videotoolbox_init(AVCodecContext *s)
goto fail;
}

if (ist->hwaccel_id == HWACCEL_VIDEOTOOLBOX) {
#if CONFIG_VIDEOTOOLBOX
// TODO: reindent
if (!videotoolbox_pixfmt) {
ret = av_videotoolbox_default_init(s);
} else {
Expand All @@ -166,31 +152,8 @@ int videotoolbox_init(AVCodecContext *s)
ret = av_videotoolbox_default_init2(s, vtctx);
CFRelease(pixfmt_str);
}
#endif
} else {
#if CONFIG_VDA
if (!videotoolbox_pixfmt) {
ret = av_vda_default_init(s);
} else {
AVVDAContext *vdactx = av_vda_alloc_context();
CFStringRef pixfmt_str = CFStringCreateWithCString(kCFAllocatorDefault,
videotoolbox_pixfmt,
kCFStringEncodingUTF8);
#if HAVE_UTGETOSTYPEFROMSTRING
vdactx->cv_pix_fmt_type = UTGetOSTypeFromString(pixfmt_str);
#else
av_log(s, loglevel, "UTGetOSTypeFromString() is not available "
"on this platform, %s pixel format can not be honored from "
"the command line\n", videotoolbox_pixfmt);
#endif
ret = av_vda_default_init2(s, vdactx);
CFRelease(pixfmt_str);
}
#endif
}
if (ret < 0) {
av_log(NULL, loglevel,
"Error creating %s decoder.\n", ist->hwaccel_id == HWACCEL_VIDEOTOOLBOX ? "Videotoolbox" : "VDA");
av_log(NULL, loglevel, "Error creating Videotoolbox decoder.\n");
goto fail;
}

Expand Down
7 changes: 1 addition & 6 deletions libavcodec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ HEADERS = avcodec.h \
mediacodec.h \
qsv.h \
vaapi.h \
vda.h \
vdpau.h \
version.h \
videotoolbox.h \
Expand Down Expand Up @@ -338,7 +337,6 @@ OBJS-$(CONFIG_H264_MMAL_DECODER) += mmaldec.o
OBJS-$(CONFIG_H264_NVENC_ENCODER) += nvenc_h264.o
OBJS-$(CONFIG_NVENC_ENCODER) += nvenc_h264.o
OBJS-$(CONFIG_NVENC_H264_ENCODER) += nvenc_h264.o
OBJS-$(CONFIG_H264_VDA_DECODER) += vda_h264_dec.o
OBJS-$(CONFIG_H264_OMX_ENCODER) += omx.o
OBJS-$(CONFIG_H264_QSV_DECODER) += qsvdec_h2645.o
OBJS-$(CONFIG_H264_QSV_ENCODER) += qsvenc_h264.o
Expand Down Expand Up @@ -824,7 +822,6 @@ OBJS-$(CONFIG_ADPCM_YAMAHA_ENCODER) += adpcmenc.o adpcm_data.o
OBJS-$(CONFIG_D3D11VA) += dxva2.o
OBJS-$(CONFIG_DXVA2) += dxva2.o
OBJS-$(CONFIG_VAAPI) += vaapi_decode.o
OBJS-$(CONFIG_VDA) += vda.o videotoolbox.o
OBJS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.o
OBJS-$(CONFIG_VDPAU) += vdpau.o

Expand All @@ -834,7 +831,6 @@ OBJS-$(CONFIG_H264_D3D11VA_HWACCEL) += dxva2_h264.o
OBJS-$(CONFIG_H264_DXVA2_HWACCEL) += dxva2_h264.o
OBJS-$(CONFIG_H264_QSV_HWACCEL) += qsvdec_h2645.o
OBJS-$(CONFIG_H264_VAAPI_HWACCEL) += vaapi_h264.o
OBJS-$(CONFIG_H264_VDA_HWACCEL) += vda_h264.o
OBJS-$(CONFIG_H264_VDPAU_HWACCEL) += vdpau_h264.o
OBJS-$(CONFIG_H264_VIDEOTOOLBOX_HWACCEL) += videotoolbox.o
OBJS-$(CONFIG_HEVC_D3D11VA_HWACCEL) += dxva2_hevc.o
Expand Down Expand Up @@ -1066,9 +1062,8 @@ SKIPHEADERS-$(CONFIG_QSVDEC) += qsvdec.h
SKIPHEADERS-$(CONFIG_QSVENC) += qsvenc.h
SKIPHEADERS-$(CONFIG_XVMC) += xvmc.h
SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_decode.h vaapi_encode.h
SKIPHEADERS-$(CONFIG_VDA) += vda.h vda_vt_internal.h
SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h
SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.h vda_vt_internal.h
SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.h vt_internal.h
SKIPHEADERS-$(CONFIG_V4L2_M2M) += v4l2_buffers.h v4l2_context.h v4l2_m2m.h

TESTPROGS = avpacket \
Expand Down
3 changes: 0 additions & 3 deletions libavcodec/allcodecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ static void register_all(void)
REGISTER_HWACCEL(H264_MMAL, h264_mmal);
REGISTER_HWACCEL(H264_QSV, h264_qsv);
REGISTER_HWACCEL(H264_VAAPI, h264_vaapi);
REGISTER_HWACCEL(H264_VDA, h264_vda);
REGISTER_HWACCEL(H264_VDA_OLD, h264_vda_old);
REGISTER_HWACCEL(H264_VDPAU, h264_vdpau);
REGISTER_HWACCEL(H264_VIDEOTOOLBOX, h264_videotoolbox);
REGISTER_HWACCEL(HEVC_CUVID, hevc_cuvid);
Expand Down Expand Up @@ -217,7 +215,6 @@ static void register_all(void)
REGISTER_DECODER(H264_MMAL, h264_mmal);
REGISTER_DECODER(H264_QSV, h264_qsv);
REGISTER_DECODER(H264_RKMPP, h264_rkmpp);
REGISTER_DECODER(H264_VDA, h264_vda);
#if FF_API_VDPAU
REGISTER_DECODER(H264_VDPAU, h264_vdpau);
#endif
Expand Down
5 changes: 0 additions & 5 deletions libavcodec/h264_slice.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,7 +755,6 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
#define HWACCEL_MAX (CONFIG_H264_DXVA2_HWACCEL + \
(CONFIG_H264_D3D11VA_HWACCEL * 2) + \
CONFIG_H264_VAAPI_HWACCEL + \
(CONFIG_H264_VDA_HWACCEL * 2) + \
CONFIG_H264_VIDEOTOOLBOX_HWACCEL + \
CONFIG_H264_VDPAU_HWACCEL)
enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmt = pix_fmts;
Expand Down Expand Up @@ -834,10 +833,6 @@ static enum AVPixelFormat get_pixel_format(H264Context *h, int force_callback)
#if CONFIG_H264_VAAPI_HWACCEL
*fmt++ = AV_PIX_FMT_VAAPI;
#endif
#if CONFIG_H264_VDA_HWACCEL
*fmt++ = AV_PIX_FMT_VDA_VLD;
*fmt++ = AV_PIX_FMT_VDA;
#endif
#if CONFIG_H264_VIDEOTOOLBOX_HWACCEL
*fmt++ = AV_PIX_FMT_VIDEOTOOLBOX;
#endif
Expand Down
84 changes: 0 additions & 84 deletions libavcodec/vda.c

This file was deleted.

Loading

0 comments on commit 2b32031

Please sign in to comment.