[FFmpeg-devel] [PATCH] avcodec: add libkvazaar HECV encoder
Michael Niedermayer
michael at niedermayer.cc
Tue Jul 14 20:13:25 CEST 2015
On Tue, Jul 14, 2015 at 09:29:11AM +0200, Hendrik Leppkes wrote:
> On Tue, Jul 14, 2015 at 7:53 AM, Arttu Ylä-Outinen
> <arttu.yla-outinen at tut.fi> wrote:
> > Signed-off-by: Arttu Ylä-Outinen <arttu.yla-outinen at tut.fi>
> > ---
> > Changelog | 1 +
> > configure | 4 +
> > doc/encoders.texi | 24 +++++
> > doc/general.texi | 10 +-
> > libavcodec/Makefile | 1 +
> > libavcodec/allcodecs.c | 1 +
> > libavcodec/libkvazaar.c | 248 +++++++++++++++++++++++++++++++++++++++++++++++
> > libavcodec/version.h | 2 +-
> > 8 files changed, 289 insertions(+), 2 deletions(-)
> > create mode 100644 libavcodec/libkvazaar.c
> >
> > diff --git a/Changelog b/Changelog
> > index ccd8d4a..a4451f9 100644
> > --- a/Changelog
> > +++ b/Changelog
> > @@ -15,6 +15,7 @@ version <next>:
> > - adrawgraph audio and drawgraph video filter
> > - removegrain video filter
> > - Intel QSV-accelerated MPEG-2 video and HEVC encoding
> > +- libkvazaar HEVC encoder
> >
> >
> > version 2.7:
> > diff --git a/configure b/configure
> > index 88ee936..5616b59 100755
> > --- a/configure
> > +++ b/configure
> > @@ -222,6 +222,7 @@ External library support:
> > --enable-libgsm enable GSM de/encoding via libgsm [no]
> > --enable-libiec61883 enable iec61883 via libiec61883 [no]
> > --enable-libilbc enable iLBC de/encoding via libilbc [no]
> > + --enable-libkvazaar enable HEVC encoding via libkvazaar [no]
> > --enable-libmfx enable HW acceleration through libmfx
> > --enable-libmodplug enable ModPlug via libmodplug [no]
> > --enable-libmp3lame enable MP3 encoding via libmp3lame [no]
> > @@ -1386,6 +1387,7 @@ EXTERNAL_LIBRARY_LIST="
> > libgsm
> > libiec61883
> > libilbc
> > + libkvazaar
> > libmfx
> > libmodplug
> > libmp3lame
> > @@ -2464,6 +2466,7 @@ libgsm_ms_decoder_deps="libgsm"
> > libgsm_ms_encoder_deps="libgsm"
> > libilbc_decoder_deps="libilbc"
> > libilbc_encoder_deps="libilbc"
> > +libkvazaar_encoder_deps="libkvazaar"
> > libmodplug_demuxer_deps="libmodplug"
> > libmp3lame_encoder_deps="libmp3lame"
> > libmp3lame_encoder_select="audio_frame_queue"
> > @@ -5152,6 +5155,7 @@ enabled libgsm && { for gsm_hdr in "gsm.h" "gsm/gsm.h"; do
> > check_lib "${gsm_hdr}" gsm_create -lgsm && break;
> > done || die "ERROR: libgsm not found"; }
> > enabled libilbc && require libilbc ilbc.h WebRtcIlbcfix_InitDecode -lilbc
> > +enabled libkvazaar && require2 libkvazaar kvazaar.h kvz_api_get -lkvazaar
> > enabled libmfx && require_pkg_config libmfx "mfx/mfxvideo.h" MFXInit
> > enabled libmodplug && require_pkg_config libmodplug libmodplug/modplug.h ModPlug_Load
> > enabled libmp3lame && require "libmp3lame >= 3.98.3" lame/lame.h lame_set_VBR_quality -lmp3lame
> > diff --git a/doc/encoders.texi b/doc/encoders.texi
> > index 5946644..6e50a90 100644
> > --- a/doc/encoders.texi
> > +++ b/doc/encoders.texi
> > @@ -2315,6 +2315,30 @@ Setting a higher @option{bits_per_mb} limit will improve the speed.
> > For the fastest encoding speed set the @option{qscale} parameter (4 is the
> > recommended value) and do not set a size constraint.
> >
> > + at section libkvazaar
> > +
> > +Kvazaar H.265/HEVC encoder.
> > +
> > +Requires the presence of the libkvazaar headers and library during
> > +configuration. You need to explicitly configure the build with
> > + at option{--enable-libkvazaar}.
> > +
> > + at subsection Options
> > +
> > + at table @option
> > +
> > + at item b
> > +Set target video bitrate in bit/s and enable rate control.
> > +
> > + at item threads
> > +Set number of encoding threads.
> > +
> > + at item kvazaar-params
> > +Set kvazaar parameters as a list of @var{name}=@var{value} pairs separated
> > +by commas (,). See kvazaar documentation for a list of options.
> > +
> > + at end table
> > +
> > @c man end VIDEO ENCODERS
> >
> > @chapter Subtitles Encoders
> > diff --git a/doc/general.texi b/doc/general.texi
> > index 5089c36..dc22d90 100644
> > --- a/doc/general.texi
> > +++ b/doc/general.texi
> > @@ -145,6 +145,14 @@ x265 is under the GNU Public License Version 2 or later
> > details), you must upgrade FFmpeg's license to GPL in order to use it.
> > @end float
> >
> > + at section kvazaar
> > +
> > +FFmpeg can make use of the kvazaar library for HEVC encoding.
> > +
> > +Go to @url{https://github.com/ultravideo/kvazaar} and follow the
> > +instructions for installing the library. Then pass
> > + at code{--enable-libkvazaar} to configure to enable it.
> > +
> > @section libilbc
> >
> > iLBC is a narrowband speech codec that has been made freely available
> > @@ -688,7 +696,7 @@ following image formats are supported:
> > @item H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10 @tab E @tab X
> > @tab encoding supported through external library libx264 and OpenH264
> > @item HEVC @tab X @tab X
> > - @tab encoding supported through the external library libx265
> > + @tab encoding supported through external library libx265 and libkvazaar
> > @item HNM version 4 @tab @tab X
> > @item HuffYUV @tab X @tab X
> > @item HuffYUV FFmpeg variant @tab X @tab X
> > diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> > index 70755f6..b7fe1c9 100644
> > --- a/libavcodec/Makefile
> > +++ b/libavcodec/Makefile
> > @@ -768,6 +768,7 @@ OBJS-$(CONFIG_LIBGSM_MS_DECODER) += libgsmdec.o
> > OBJS-$(CONFIG_LIBGSM_MS_ENCODER) += libgsmenc.o
> > OBJS-$(CONFIG_LIBILBC_DECODER) += libilbc.o
> > OBJS-$(CONFIG_LIBILBC_ENCODER) += libilbc.o
> > +OBJS-$(CONFIG_LIBKVAZAAR_ENCODER) += libkvazaar.o
> > OBJS-$(CONFIG_LIBMP3LAME_ENCODER) += libmp3lame.o mpegaudiodecheader.o
> > OBJS-$(CONFIG_LIBOPENCORE_AMRNB_DECODER) += libopencore-amr.o
> > OBJS-$(CONFIG_LIBOPENCORE_AMRNB_ENCODER) += libopencore-amr.o
> > diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> > index 70c81c7..a352a47 100644
> > --- a/libavcodec/allcodecs.c
> > +++ b/libavcodec/allcodecs.c
> > @@ -530,6 +530,7 @@ void avcodec_register_all(void)
> > REGISTER_ENCDEC (LIBGSM, libgsm);
> > REGISTER_ENCDEC (LIBGSM_MS, libgsm_ms);
> > REGISTER_ENCDEC (LIBILBC, libilbc);
> > + REGISTER_ENCODER(LIBKVAZAAR, libkvazaar);
>
> This entry should be added further down in the file, in the section of
> "external libraries that shouldn't be used by default", so that
> libx265 remains the default if both are available.
> Unless you can convince us how this one is much better and more complete? :)
moved down
applied
thanks
PS: Arttu, you might want to send a patch which adds you to the
MAINTAINERs file
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150714/1d46b80b/attachment.sig>
More information about the ffmpeg-devel
mailing list