avcodec: Add NVENC encoder

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Timo Rothenpieler 2014-11-30 00:04:37 +01:00 committed by Michael Niedermayer
parent 97b65f6126
commit 2a428db5e2
6 changed files with 1199 additions and 0 deletions

View File

@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest within each release,
releases are sorted from youngest to oldest. releases are sorted from youngest to oldest.
version <next>: version <next>:
- nvenc encoder
version 2.5: version 2.5:

View File

@ -226,6 +226,7 @@ Codecs:
msvideo1.c Mike Melanson msvideo1.c Mike Melanson
nellymoserdec.c Benjamin Larsson nellymoserdec.c Benjamin Larsson
nuv.c Reimar Doeffinger nuv.c Reimar Doeffinger
nvenc.c Timo Rothenpieler
paf.* Paul B Mahol paf.* Paul B Mahol
pcx.c Ivo van Poorten pcx.c Ivo van Poorten
pgssubdec.c Reimar Doeffinger pgssubdec.c Reimar Doeffinger

6
configure vendored
View File

@ -263,6 +263,7 @@ External library support:
--enable-libzvbi enable teletext support via libzvbi [no] --enable-libzvbi enable teletext support via libzvbi [no]
--disable-lzma disable lzma [autodetect] --disable-lzma disable lzma [autodetect]
--enable-decklink enable Blackmagick DeckLink I/O support [no] --enable-decklink enable Blackmagick DeckLink I/O support [no]
--enable-nvenc enable NVIDIA NVENC support [no]
--enable-openal enable OpenAL 1.1 capture support [no] --enable-openal enable OpenAL 1.1 capture support [no]
--enable-opencl enable OpenCL code --enable-opencl enable OpenCL code
--enable-opengl enable OpenGL rendering [no] --enable-opengl enable OpenGL rendering [no]
@ -1400,6 +1401,7 @@ EXTERNAL_LIBRARY_LIST="
libzmq libzmq
libzvbi libzvbi
lzma lzma
nvenc
openal openal
opencl opencl
opengl opengl
@ -2399,6 +2401,7 @@ libxvid_encoder_deps="libxvid"
libutvideo_decoder_deps="libutvideo" libutvideo_decoder_deps="libutvideo"
libutvideo_encoder_deps="libutvideo" libutvideo_encoder_deps="libutvideo"
libzvbi_teletext_decoder_deps="libzvbi" libzvbi_teletext_decoder_deps="libzvbi"
nvenc_encoder_deps="nvenc"
# demuxers / muxers # demuxers / muxers
ac3_demuxer_select="ac3_parser" ac3_demuxer_select="ac3_parser"
@ -4357,6 +4360,7 @@ die_license_disabled gpl x11grab
die_license_disabled nonfree libaacplus die_license_disabled nonfree libaacplus
die_license_disabled nonfree libfaac die_license_disabled nonfree libfaac
die_license_disabled nonfree nvenc
enabled gpl && die_license_disabled_gpl nonfree libfdk_aac enabled gpl && die_license_disabled_gpl nonfree libfdk_aac
enabled gpl && die_license_disabled_gpl nonfree openssl enabled gpl && die_license_disabled_gpl nonfree openssl
@ -4666,6 +4670,7 @@ fi
frei0r_filter_extralibs='$ldl' frei0r_filter_extralibs='$ldl'
frei0r_src_filter_extralibs='$ldl' frei0r_src_filter_extralibs='$ldl'
ladspa_filter_extralibs='$ldl' ladspa_filter_extralibs='$ldl'
nvenc_encoder_extralibs='$ldl'
if ! disabled network; then if ! disabled network; then
check_func getaddrinfo $network_extralibs check_func getaddrinfo $network_extralibs
@ -4929,6 +4934,7 @@ enabled libxavs && require libxavs xavs.h xavs_encoder_encode -lxavs
enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore enabled libxvid && require libxvid xvid.h xvid_global -lxvidcore
enabled libzmq && require_pkg_config libzmq zmq.h zmq_ctx_new enabled libzmq && require_pkg_config libzmq zmq.h zmq_ctx_new
enabled libzvbi && require libzvbi libzvbi.h vbi_decoder_new -lzvbi enabled libzvbi && require libzvbi libzvbi.h vbi_decoder_new -lzvbi
enabled nvenc && { check_header nvEncodeAPI.h || die "ERROR: nvEncodeAPI.h not found."; }
enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do enabled openal && { { for al_libs in "${OPENAL_LIBS}" "-lopenal" "-lOpenAL32"; do
check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } || check_lib 'AL/al.h' alGetError "${al_libs}" && break; done } ||
die "ERROR: openal not found"; } && die "ERROR: openal not found"; } &&

View File

@ -347,6 +347,7 @@ OBJS-$(CONFIG_MXPEG_DECODER) += mxpegdec.o
OBJS-$(CONFIG_NELLYMOSER_DECODER) += nellymoserdec.o nellymoser.o OBJS-$(CONFIG_NELLYMOSER_DECODER) += nellymoserdec.o nellymoser.o
OBJS-$(CONFIG_NELLYMOSER_ENCODER) += nellymoserenc.o nellymoser.o OBJS-$(CONFIG_NELLYMOSER_ENCODER) += nellymoserenc.o nellymoser.o
OBJS-$(CONFIG_NUV_DECODER) += nuv.o rtjpeg.o OBJS-$(CONFIG_NUV_DECODER) += nuv.o rtjpeg.o
OBJS-$(CONFIG_NVENC_ENCODER) += nvenc.o
OBJS-$(CONFIG_ON2AVC_DECODER) += on2avc.o on2avcdata.o OBJS-$(CONFIG_ON2AVC_DECODER) += on2avc.o on2avcdata.o
OBJS-$(CONFIG_OPUS_DECODER) += opusdec.o opus.o opus_celt.o \ OBJS-$(CONFIG_OPUS_DECODER) += opusdec.o opus.o opus_celt.o \
opus_imdct.o opus_silk.o \ opus_imdct.o opus_silk.o \

View File

@ -223,6 +223,7 @@ void avcodec_register_all(void)
REGISTER_DECODER(MVC2, mvc2); REGISTER_DECODER(MVC2, mvc2);
REGISTER_DECODER(MXPEG, mxpeg); REGISTER_DECODER(MXPEG, mxpeg);
REGISTER_DECODER(NUV, nuv); REGISTER_DECODER(NUV, nuv);
REGISTER_ENCODER(NVENC, nvenc);
REGISTER_DECODER(PAF_VIDEO, paf_video); REGISTER_DECODER(PAF_VIDEO, paf_video);
REGISTER_ENCDEC (PAM, pam); REGISTER_ENCDEC (PAM, pam);
REGISTER_ENCDEC (PBM, pbm); REGISTER_ENCDEC (PBM, pbm);

1189
libavcodec/nvenc.c Normal file

File diff suppressed because it is too large Load Diff