lavc: add VideoToolbox H.264 Encoder
Autodetected by default. Encode using -codec:v h264_videotoolbox. Signed-off-by: Rick Kern <kernrj@gmail.com> Signed-off-by: wm4 <nfxjfg@googlemail.com>
This commit is contained in:
parent
2be0366a7f
commit
3af71ac3f9
@ -279,6 +279,7 @@ Codecs:
|
|||||||
vc2* Rostislav Pehlivanov
|
vc2* Rostislav Pehlivanov
|
||||||
vcr1.c Michael Niedermayer
|
vcr1.c Michael Niedermayer
|
||||||
vda_h264_dec.c Xidorn Quan
|
vda_h264_dec.c Xidorn Quan
|
||||||
|
videotoolboxenc.c Rick Kern
|
||||||
vima.c Paul B Mahol
|
vima.c Paul B Mahol
|
||||||
vmnc.c Kostya Shishkov
|
vmnc.c Kostya Shishkov
|
||||||
vorbisdec.c Denes Balatoni, David Conrad
|
vorbisdec.c Denes Balatoni, David Conrad
|
||||||
|
26
configure
vendored
26
configure
vendored
@ -155,7 +155,6 @@ Hardware accelerators:
|
|||||||
--disable-vaapi disable VAAPI code [autodetect]
|
--disable-vaapi disable VAAPI code [autodetect]
|
||||||
--disable-vda disable VDA code [autodetect]
|
--disable-vda disable VDA code [autodetect]
|
||||||
--disable-vdpau disable VDPAU code [autodetect]
|
--disable-vdpau disable VDPAU code [autodetect]
|
||||||
--enable-videotoolbox enable VideoToolbox code [autodetect]
|
|
||||||
|
|
||||||
Individual component options:
|
Individual component options:
|
||||||
--disable-everything disable all components listed below
|
--disable-everything disable all components listed below
|
||||||
@ -289,6 +288,7 @@ External library support:
|
|||||||
--disable-sdl disable sdl [autodetect]
|
--disable-sdl disable sdl [autodetect]
|
||||||
--disable-securetransport disable Secure Transport, needed for TLS support
|
--disable-securetransport disable Secure Transport, needed for TLS support
|
||||||
on OSX if openssl and gnutls are not used [autodetect]
|
on OSX if openssl and gnutls are not used [autodetect]
|
||||||
|
--disable-videotoolbox disable VideoToolbox code [autodetect]
|
||||||
--enable-x11grab enable X11 grabbing (legacy) [no]
|
--enable-x11grab enable X11 grabbing (legacy) [no]
|
||||||
--disable-xlib disable xlib [autodetect]
|
--disable-xlib disable xlib [autodetect]
|
||||||
--disable-zlib disable zlib [autodetect]
|
--disable-zlib disable zlib [autodetect]
|
||||||
@ -1509,6 +1509,7 @@ EXTERNAL_LIBRARY_LIST="
|
|||||||
schannel
|
schannel
|
||||||
sdl
|
sdl
|
||||||
securetransport
|
securetransport
|
||||||
|
videotoolbox
|
||||||
x11grab
|
x11grab
|
||||||
xlib
|
xlib
|
||||||
zlib
|
zlib
|
||||||
@ -1540,7 +1541,7 @@ HWACCEL_LIST="
|
|||||||
vaapi
|
vaapi
|
||||||
vda
|
vda
|
||||||
vdpau
|
vdpau
|
||||||
videotoolbox
|
videotoolbox_hwaccel
|
||||||
xvmc
|
xvmc
|
||||||
"
|
"
|
||||||
|
|
||||||
@ -2484,11 +2485,13 @@ crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
|
|||||||
d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder ID3D11VideoContext"
|
d3d11va_deps="d3d11_h dxva_h ID3D11VideoDecoder ID3D11VideoContext"
|
||||||
dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode"
|
dxva2_deps="dxva2api_h DXVA2_ConfigPictureDecode"
|
||||||
vaapi_deps="va_va_h"
|
vaapi_deps="va_va_h"
|
||||||
vda_deps="VideoDecodeAcceleration_VDADecoder_h pthreads"
|
vda_framework_deps="VideoDecodeAcceleration_VDADecoder_h"
|
||||||
vda_extralibs="-framework CoreFoundation -framework VideoDecodeAcceleration -framework QuartzCore"
|
vda_framework_extralibs="-framework VideoDecodeAcceleration"
|
||||||
|
vda_deps="vda_framework pthreads"
|
||||||
|
vda_extralibs="-framework CoreFoundation -framework QuartzCore"
|
||||||
vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
|
vdpau_deps="vdpau_vdpau_h vdpau_vdpau_x11_h"
|
||||||
videotoolbox_deps="VideoToolbox_VideoToolbox_h pthreads"
|
videotoolbox_hwaccel_deps="videotoolbox pthreads"
|
||||||
videotoolbox_extralibs="-framework CoreFoundation -framework VideoToolbox -framework CoreMedia -framework QuartzCore -framework CoreVideo"
|
videotoolbox_hwaccel_extralibs="-framework QuartzCore"
|
||||||
xvmc_deps="X11_extensions_XvMClib_h"
|
xvmc_deps="X11_extensions_XvMClib_h"
|
||||||
|
|
||||||
h263_vaapi_hwaccel_deps="vaapi"
|
h263_vaapi_hwaccel_deps="vaapi"
|
||||||
@ -2611,6 +2614,8 @@ mjpeg2jpeg_bsf_select="jpegtables"
|
|||||||
|
|
||||||
# external libraries
|
# external libraries
|
||||||
chromaprint_muxer_deps="chromaprint"
|
chromaprint_muxer_deps="chromaprint"
|
||||||
|
h264_videotoolbox_encoder_deps="videotoolbox_encoder pthreads"
|
||||||
|
h264_videotoolbox_encoder_select="bzlib zlib iconv"
|
||||||
libcelt_decoder_deps="libcelt"
|
libcelt_decoder_deps="libcelt"
|
||||||
libdcadec_decoder_deps="libdcadec"
|
libdcadec_decoder_deps="libdcadec"
|
||||||
libfaac_encoder_deps="libfaac"
|
libfaac_encoder_deps="libfaac"
|
||||||
@ -2672,6 +2677,10 @@ libzvbi_teletext_decoder_deps="libzvbi"
|
|||||||
nvenc_encoder_deps="nvenc"
|
nvenc_encoder_deps="nvenc"
|
||||||
nvenc_h264_encoder_deps="nvenc"
|
nvenc_h264_encoder_deps="nvenc"
|
||||||
nvenc_hevc_encoder_deps="nvenc"
|
nvenc_hevc_encoder_deps="nvenc"
|
||||||
|
videotoolbox_deps="VideoToolbox_VideoToolbox_h"
|
||||||
|
videotoolbox_extralibs="-framework CoreFoundation -framework VideoToolbox -framework CoreMedia -framework CoreVideo"
|
||||||
|
videotoolbox_encoder_deps="videotoolbox VTCompressionSessionPrepareToEncodeFrames"
|
||||||
|
videotoolbox_encoder_suggest="vda_framework"
|
||||||
|
|
||||||
# demuxers / muxers
|
# demuxers / muxers
|
||||||
ac3_demuxer_select="ac3_parser"
|
ac3_demuxer_select="ac3_parser"
|
||||||
@ -3052,9 +3061,11 @@ sws_max_filter_size_default=256
|
|||||||
set_default sws_max_filter_size
|
set_default sws_max_filter_size
|
||||||
|
|
||||||
# Enable hwaccels by default.
|
# Enable hwaccels by default.
|
||||||
enable d3d11va dxva2 vaapi vda vdpau videotoolbox xvmc
|
enable d3d11va dxva2 vaapi vda vdpau videotoolbox_hwaccel xvmc
|
||||||
enable xlib
|
enable xlib
|
||||||
|
|
||||||
|
enable vda_framework videotoolbox videotoolbox_encoder
|
||||||
|
|
||||||
# build settings
|
# build settings
|
||||||
SHFLAGS='-shared -Wl,-soname,$$(@F)'
|
SHFLAGS='-shared -Wl,-soname,$$(@F)'
|
||||||
LIBPREF="lib"
|
LIBPREF="lib"
|
||||||
@ -5449,6 +5460,7 @@ check_header vdpau/vdpau.h
|
|||||||
check_header vdpau/vdpau_x11.h
|
check_header vdpau/vdpau_x11.h
|
||||||
check_header VideoDecodeAcceleration/VDADecoder.h
|
check_header VideoDecodeAcceleration/VDADecoder.h
|
||||||
check_header VideoToolbox/VideoToolbox.h
|
check_header VideoToolbox/VideoToolbox.h
|
||||||
|
check_func_headers VideoToolbox/VTCompressionSession.h VTCompressionSessionPrepareToEncodeFrames -framework VideoToolbox
|
||||||
check_header windows.h
|
check_header windows.h
|
||||||
check_header X11/extensions/XvMClib.h
|
check_header X11/extensions/XvMClib.h
|
||||||
check_header asm/types.h
|
check_header asm/types.h
|
||||||
|
@ -69,6 +69,7 @@ OBJS-$(CONFIG_H264CHROMA) += h264chroma.o
|
|||||||
OBJS-$(CONFIG_H264DSP) += h264dsp.o h264idct.o
|
OBJS-$(CONFIG_H264DSP) += h264dsp.o h264idct.o
|
||||||
OBJS-$(CONFIG_H264PRED) += h264pred.o
|
OBJS-$(CONFIG_H264PRED) += h264pred.o
|
||||||
OBJS-$(CONFIG_H264QPEL) += h264qpel.o
|
OBJS-$(CONFIG_H264QPEL) += h264qpel.o
|
||||||
|
OBJS-$(CONFIG_H264_VIDEOTOOLBOX_ENCODER) += videotoolboxenc.o
|
||||||
OBJS-$(CONFIG_HPELDSP) += hpeldsp.o
|
OBJS-$(CONFIG_HPELDSP) += hpeldsp.o
|
||||||
OBJS-$(CONFIG_HUFFMAN) += huffman.o
|
OBJS-$(CONFIG_HUFFMAN) += huffman.o
|
||||||
OBJS-$(CONFIG_HUFFYUVDSP) += huffyuvdsp.o
|
OBJS-$(CONFIG_HUFFYUVDSP) += huffyuvdsp.o
|
||||||
|
@ -604,6 +604,7 @@ void avcodec_register_all(void)
|
|||||||
* above is available */
|
* above is available */
|
||||||
REGISTER_ENCODER(LIBOPENH264, libopenh264);
|
REGISTER_ENCODER(LIBOPENH264, libopenh264);
|
||||||
REGISTER_ENCODER(H264_QSV, h264_qsv);
|
REGISTER_ENCODER(H264_QSV, h264_qsv);
|
||||||
|
REGISTER_ENCODER(H264_VIDEOTOOLBOX, h264_videotoolbox);
|
||||||
REGISTER_ENCODER(NVENC, nvenc);
|
REGISTER_ENCODER(NVENC, nvenc);
|
||||||
REGISTER_ENCODER(NVENC_H264, nvenc_h264);
|
REGISTER_ENCODER(NVENC_H264, nvenc_h264);
|
||||||
REGISTER_ENCODER(NVENC_HEVC, nvenc_hevc);
|
REGISTER_ENCODER(NVENC_HEVC, nvenc_hevc);
|
||||||
|
1339
libavcodec/videotoolboxenc.c
Normal file
1339
libavcodec/videotoolboxenc.c
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user