Re: [FFmpeg-devel] [PATCH] Added the interface for the Turing codec

2016-11-28 Thread Matteo Naccari
>   I hope it copes well with multiple definitions of the same option, like the 
> last
> overwriting the previous ones.

The latest stable version of the Turing codec deals correctly with multiple 
definitions of the same option.

Matteo Naccari

___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Added the interface for the Turing codec

2016-11-28 Thread Matteo Naccari
> Back to the review: From first glance, the libturing codec/library (or the
> executable only???) seems to have speed presets. Why are these not
> exposed to the libavcodec user?

All options, including the speed presets, can be specified using -turing-params 
(e.g. -turing-params speed=value). The reason why we decided to go for this 
option is because we want to be as less invasive as possible so that if we 
decide to change the name for a given option the changes will be transparent to 
FFmpeg.

Matteo Naccari

> -Original Message-
> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf
> Of Moritz Barsnick
> Sent: 19 November 2016 13:29
> To: FFmpeg development discussions and patches  de...@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] Added the interface for the Turing
> codec
> 
> On Fri, Nov 18, 2016 at 20:15:30 +0100, wm4 wrote:
> > This lib has a really weird API...
> 
> I can't judge the algorithms or the development direction and stuff - I'm sure
> it's all state of the art. But the API sure gives me goosebumps, and I don't
> mean the sexy feelgood type.
> 
> Sure, it has all the flexibility, but also almost all the disadvantages of 
> calling an
> external program. This makes it look so much like a proof of concept.
> 
> But I'm sure that's not the point. If it turns out to be here to stay, to 
> compete
> with x265 in one or the other way, it's probably worth integrating.
> 
> Back to the review: From first glance, the libturing codec/library (or the
> executable only???) seems to have speed presets. Why are these not
> exposed to the libavcodec user?
> 
> Furthermore: Documentation is missing.
> 
> £0.02,
> Moritz
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Added the interface for the Turing codec

2016-11-28 Thread Matteo Naccari
> This lib has a really weird API... Anyway, access to p++ seems unbounded and
> could go past the argv array. The string overflow checks also look
> questionable. snprintf() returns the size the string would have had and isn't
> limited by the buffer passed to it, so the s pointer can go out of bounds
> (which is undefined behavior). Also, "end - s"
> will underflow, making the attempt to avoid a buffer overflow pointless.

The patch we just submitted should address this point: now the buffer size for 
the command line option depends on the actual number of options passed by the 
user for the Turing codec.

Matteo Naccari


-
http://www.bbc.co.uk
This e-mail (and any attachments) is confidential and
may contain personal views which are not the views of the BBC unless 
specifically stated.
If you have received it in
error, please delete it from your system.
Do not use, copy or disclose the
information in any way nor act in reliance on it and notify the sender
immediately.
Please note that the BBC monitors e-mails
sent or received.
Further communication will signify your consent to
this.
-
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Added the interface for the Turing codec

2016-11-28 Thread Matteo Naccari
> These dependencies are kind of a mess. Maybe you can make libturning
> include a pkg_config file so we don't have to maintain your library list here?

The new patch we just submitted addresses this point: the Turing codec will 
install a pkg-config file to list the dependencies as suggested

Matteo Naccari

> -Original Message-
> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf
> Of Hendrik Leppkes
> Sent: 18 November 2016 18:51
> To: FFmpeg development discussions and patches  de...@ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH] Added the interface for the Turing
> codec
> 
> On Fri, Nov 18, 2016 at 4:25 PM, Matteo Naccari <matteo.nacc...@bbc.co.uk>
> wrote:
> > - The Turing codec is an open source HEVC encoder licensed under GPLv2
> > - More information at http://turingcodec.org/
> > ---
> >  LICENSE.md |   1 +
> >  configure  |   5 ++
> >  libavcodec/Makefile|   1 +
> >  libavcodec/allcodecs.c |   1 +
> >  libavcodec/libturing.c | 229
> > +
> >  5 files changed, 237 insertions(+)
> >  create mode 100644 libavcodec/libturing.c
> >
> > diff --git a/LICENSE.md b/LICENSE.md
> > index a384fa0..6f9fab8 100644
> > --- a/LICENSE.md
> > +++ b/LICENSE.md
> > @@ -86,6 +86,7 @@ The following libraries are under GPL:
> >  - frei0r
> >  - libcdio
> >  - librubberband
> > +- libturing
> >  - libvidstab
> >  - libx264
> >  - libx265
> > diff --git a/configure b/configure
> > index b5bfad6..47d6b93 100755
> > --- a/configure
> > +++ b/configure
> > @@ -255,6 +255,7 @@ External library support:
> >--enable-libssh  enable SFTP protocol via libssh [no]
> >--enable-libtesseractenable Tesseract, needed for ocr filter [no]
> >--enable-libtheora   enable Theora encoding via libtheora [no]
> > +  --enable-libturing   enable HEVC encoding via libturing [no]
> >--enable-libtwolame  enable MP2 encoding via libtwolame [no]
> >--enable-libv4l2 enable libv4l2/v4l-utils [no]
> >--enable-libvidstab  enable video stabilization using vid.stab [no]
> > @@ -1521,6 +1522,7 @@ EXTERNAL_LIBRARY_LIST="
> >  libssh
> >  libtesseract
> >  libtheora
> > +libturing
> >  libtwolame
> >  libv4l2
> >  libvidstab
> > @@ -2814,6 +2816,7 @@ libspeex_decoder_deps="libspeex"
> >  libspeex_encoder_deps="libspeex"
> >  libspeex_encoder_select="audio_frame_queue"
> >  libtheora_encoder_deps="libtheora"
> > +libturing_encoder_deps="libturing"
> >  libtwolame_encoder_deps="libtwolame"
> >  libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
> >  libvorbis_decoder_deps="libvorbis"
> > @@ -5072,6 +5075,7 @@ die_license_disabled gpl frei0r
> > die_license_disabled gpl libcdio  die_license_disabled gpl
> > librubberband  die_license_disabled gpl libsmbclient
> > +die_license_disabled gpl libturing
> >  die_license_disabled gpl libvidstab
> >  die_license_disabled gpl libx264
> >  die_license_disabled gpl libx265
> > @@ -5735,6 +5739,7 @@ enabled libssh&& require_pkg_config libssh
> libssh/sftp.h sftp_init
> >  enabled libspeex  && require_pkg_config speex speex/speex.h
> speex_decoder_init -lspeex
> >  enabled libtesseract  && require_pkg_config tesseract tesseract/capi.h
> TessBaseAPICreate
> >  enabled libtheora && require libtheora theora/theoraenc.h
> th_info_init -ltheoraenc -ltheoradec -logg
> > +enabled libturing && require libturing turing.h turing_version 
> > -lturing -
> lstdc++ -lboost_chrono -lboost_program_options -lboost_timer -
> lboost_system -lboost_filesystem -lhavoc
> 
> These dependencies are kind of a mess. Maybe you can make libturning
> include a pkg_config file so we don't have to maintain your library list here?
> 
> - Hendrik
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


-
http://www.bbc.co.uk
This e-mail (and any attachments) is confidential and 
may contain personal views which are not the views of the BBC unless 
specifically stated.
If you have received it in 
error, please delete it from your system.
Do not use, copy or disclose the 
information in any way nor act in reliance on it and notify the sender 
immediately.
Please note that the BBC monitors e-mails 
sent or received.
Further communication will signify your consent to 
this.
-
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Added the interface for the Turing codec

2016-11-20 Thread Carl Eugen Hoyos
2016-11-18 17:45 GMT+01:00 Josh de Kock :

> Can't currently test on macOS as libturing doesn't have macOS
> support (https://github.com/bbc/turingcodec/issues/5), but it is
> being worked on (supposedly), so it may make sense to wait until
> then before this is applied.

I don't know if we should add support for libturing or not but I wonder
why this is related to libturing working on osx or not...

Or to say it differently: If libturing really is better than libx265 at least
in some situations (this is claimed afaiu), it should imo be added no
matter if it works on osx or not.

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Added the interface for the Turing codec

2016-11-19 Thread Alexander Strasser
On 2016-11-19 14:29 +0100, Moritz Barsnick wrote:
> On Fri, Nov 18, 2016 at 20:15:30 +0100, wm4 wrote:
> > This lib has a really weird API...
> 
> I can't judge the algorithms or the development direction and stuff -
> I'm sure it's all state of the art. But the API sure gives me
> goosebumps, and I don't mean the sexy feelgood type.
> 
> Sure, it has all the flexibility, but also almost all the disadvantages
> of calling an external program. This makes it look so much like a proof
> of concept.

  I looked at the source for fun yesterday to find out what
that was about.

  IMHO it is that the real encoder class takes C++ arguments 
(boost variables map) and they have a CLI program which also
needs to create that variables map for the encoder. Thus it
seems the quickest way to make a C interface was to use that
argument parsing code for initializing the encoder.

  I hope it copes well with multiple definitions of the same
option, like the last overwriting the previous ones.


[...]


  Alexander
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Added the interface for the Turing codec

2016-11-19 Thread Moritz Barsnick
On Fri, Nov 18, 2016 at 20:15:30 +0100, wm4 wrote:
> This lib has a really weird API...

I can't judge the algorithms or the development direction and stuff -
I'm sure it's all state of the art. But the API sure gives me
goosebumps, and I don't mean the sexy feelgood type.

Sure, it has all the flexibility, but also almost all the disadvantages
of calling an external program. This makes it look so much like a proof
of concept.

But I'm sure that's not the point. If it turns out to be here to stay,
to compete with x265 in one or the other way, it's probably worth
integrating.

Back to the review: From first glance, the libturing codec/library (or
the executable only???) seems to have speed presets. Why are these not
exposed to the libavcodec user?

Furthermore: Documentation is missing.

£0.02,
Moritz
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Added the interface for the Turing codec

2016-11-18 Thread wm4
On Fri, 18 Nov 2016 15:25:49 +
Matteo Naccari  wrote:

> - The Turing codec is an open source HEVC encoder licensed under GPLv2
> - More information at http://turingcodec.org/
> ---
>  LICENSE.md |   1 +
>  configure  |   5 ++
>  libavcodec/Makefile|   1 +
>  libavcodec/allcodecs.c |   1 +
>  libavcodec/libturing.c | 229 
> +
>  5 files changed, 237 insertions(+)
>  create mode 100644 libavcodec/libturing.c
> 
> diff --git a/LICENSE.md b/LICENSE.md
> index a384fa0..6f9fab8 100644
> --- a/LICENSE.md
> +++ b/LICENSE.md
> @@ -86,6 +86,7 @@ The following libraries are under GPL:
>  - frei0r
>  - libcdio
>  - librubberband
> +- libturing
>  - libvidstab
>  - libx264
>  - libx265
> diff --git a/configure b/configure
> index b5bfad6..47d6b93 100755
> --- a/configure
> +++ b/configure
> @@ -255,6 +255,7 @@ External library support:
>--enable-libssh  enable SFTP protocol via libssh [no]
>--enable-libtesseractenable Tesseract, needed for ocr filter [no]
>--enable-libtheora   enable Theora encoding via libtheora [no]
> +  --enable-libturing   enable HEVC encoding via libturing [no]
>--enable-libtwolame  enable MP2 encoding via libtwolame [no]
>--enable-libv4l2 enable libv4l2/v4l-utils [no]
>--enable-libvidstab  enable video stabilization using vid.stab [no]
> @@ -1521,6 +1522,7 @@ EXTERNAL_LIBRARY_LIST="
>  libssh
>  libtesseract
>  libtheora
> +libturing
>  libtwolame
>  libv4l2
>  libvidstab
> @@ -2814,6 +2816,7 @@ libspeex_decoder_deps="libspeex"
>  libspeex_encoder_deps="libspeex"
>  libspeex_encoder_select="audio_frame_queue"
>  libtheora_encoder_deps="libtheora"
> +libturing_encoder_deps="libturing"
>  libtwolame_encoder_deps="libtwolame"
>  libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
>  libvorbis_decoder_deps="libvorbis"
> @@ -5072,6 +5075,7 @@ die_license_disabled gpl frei0r
>  die_license_disabled gpl libcdio
>  die_license_disabled gpl librubberband
>  die_license_disabled gpl libsmbclient
> +die_license_disabled gpl libturing
>  die_license_disabled gpl libvidstab
>  die_license_disabled gpl libx264
>  die_license_disabled gpl libx265
> @@ -5735,6 +5739,7 @@ enabled libssh&& require_pkg_config libssh 
> libssh/sftp.h sftp_init
>  enabled libspeex  && require_pkg_config speex speex/speex.h 
> speex_decoder_init -lspeex
>  enabled libtesseract  && require_pkg_config tesseract tesseract/capi.h 
> TessBaseAPICreate
>  enabled libtheora && require libtheora theora/theoraenc.h 
> th_info_init -ltheoraenc -ltheoradec -logg
> +enabled libturing && require libturing turing.h turing_version 
> -lturing -lstdc++ -lboost_chrono -lboost_program_options -lboost_timer 
> -lboost_system -lboost_filesystem -lhavoc
>  enabled libtwolame&& require libtwolame twolame.h twolame_init 
> -ltwolame &&
>   { check_lib twolame.h 
> twolame_encode_buffer_float32_interleaved -ltwolame ||
> die "ERROR: libtwolame must be installed and 
> version must be >= 0.3.10"; }
> diff --git a/libavcodec/Makefile b/libavcodec/Makefile
> index 82f7fa2..cadefdc 100644
> --- a/libavcodec/Makefile
> +++ b/libavcodec/Makefile
> @@ -880,6 +880,7 @@ OBJS-$(CONFIG_LIBSPEEX_DECODER)   += libspeexdec.o
>  OBJS-$(CONFIG_LIBSPEEX_ENCODER)   += libspeexenc.o
>  OBJS-$(CONFIG_LIBTHEORA_ENCODER)  += libtheoraenc.o
>  OBJS-$(CONFIG_LIBTWOLAME_ENCODER) += libtwolame.o
> +OBJS-$(CONFIG_LIBTURING_ENCODER)  += libturing.o
>  OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o
>  OBJS-$(CONFIG_LIBVORBIS_DECODER)  += libvorbisdec.o
>  OBJS-$(CONFIG_LIBVORBIS_ENCODER)  += libvorbisenc.o \
> diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
> index ada9481..0e61a4a 100644
> --- a/libavcodec/allcodecs.c
> +++ b/libavcodec/allcodecs.c
> @@ -610,6 +610,7 @@ void avcodec_register_all(void)
>  REGISTER_ENCDEC (LIBSPEEX,  libspeex);
>  REGISTER_ENCODER(LIBTHEORA, libtheora);
>  REGISTER_ENCODER(LIBTWOLAME,libtwolame);
> +REGISTER_ENCODER(LIBTURING, libturing);
>  REGISTER_ENCODER(LIBVO_AMRWBENC,libvo_amrwbenc);
>  REGISTER_ENCDEC (LIBVORBIS, libvorbis);
>  REGISTER_ENCDEC (LIBVPX_VP8,libvpx_vp8);
> diff --git a/libavcodec/libturing.c b/libavcodec/libturing.c
> new file mode 100644
> index 000..3191a41
> --- /dev/null
> +++ b/libavcodec/libturing.c
> @@ -0,0 +1,229 @@
> +/*
> + * libturing encoder
> + *
> + * Copyright (c) 2016 Turing Codec contributors
> + *
> + * This file is part of FFmpeg.
> + *
> + * FFmpeg 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 

Re: [FFmpeg-devel] [PATCH] Added the interface for the Turing codec

2016-11-18 Thread Hendrik Leppkes
On Fri, Nov 18, 2016 at 4:25 PM, Matteo Naccari
 wrote:
> - The Turing codec is an open source HEVC encoder licensed under GPLv2
> - More information at http://turingcodec.org/
> ---
>  LICENSE.md |   1 +
>  configure  |   5 ++
>  libavcodec/Makefile|   1 +
>  libavcodec/allcodecs.c |   1 +
>  libavcodec/libturing.c | 229 
> +
>  5 files changed, 237 insertions(+)
>  create mode 100644 libavcodec/libturing.c
>
> diff --git a/LICENSE.md b/LICENSE.md
> index a384fa0..6f9fab8 100644
> --- a/LICENSE.md
> +++ b/LICENSE.md
> @@ -86,6 +86,7 @@ The following libraries are under GPL:
>  - frei0r
>  - libcdio
>  - librubberband
> +- libturing
>  - libvidstab
>  - libx264
>  - libx265
> diff --git a/configure b/configure
> index b5bfad6..47d6b93 100755
> --- a/configure
> +++ b/configure
> @@ -255,6 +255,7 @@ External library support:
>--enable-libssh  enable SFTP protocol via libssh [no]
>--enable-libtesseractenable Tesseract, needed for ocr filter [no]
>--enable-libtheora   enable Theora encoding via libtheora [no]
> +  --enable-libturing   enable HEVC encoding via libturing [no]
>--enable-libtwolame  enable MP2 encoding via libtwolame [no]
>--enable-libv4l2 enable libv4l2/v4l-utils [no]
>--enable-libvidstab  enable video stabilization using vid.stab [no]
> @@ -1521,6 +1522,7 @@ EXTERNAL_LIBRARY_LIST="
>  libssh
>  libtesseract
>  libtheora
> +libturing
>  libtwolame
>  libv4l2
>  libvidstab
> @@ -2814,6 +2816,7 @@ libspeex_decoder_deps="libspeex"
>  libspeex_encoder_deps="libspeex"
>  libspeex_encoder_select="audio_frame_queue"
>  libtheora_encoder_deps="libtheora"
> +libturing_encoder_deps="libturing"
>  libtwolame_encoder_deps="libtwolame"
>  libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
>  libvorbis_decoder_deps="libvorbis"
> @@ -5072,6 +5075,7 @@ die_license_disabled gpl frei0r
>  die_license_disabled gpl libcdio
>  die_license_disabled gpl librubberband
>  die_license_disabled gpl libsmbclient
> +die_license_disabled gpl libturing
>  die_license_disabled gpl libvidstab
>  die_license_disabled gpl libx264
>  die_license_disabled gpl libx265
> @@ -5735,6 +5739,7 @@ enabled libssh&& require_pkg_config libssh 
> libssh/sftp.h sftp_init
>  enabled libspeex  && require_pkg_config speex speex/speex.h 
> speex_decoder_init -lspeex
>  enabled libtesseract  && require_pkg_config tesseract tesseract/capi.h 
> TessBaseAPICreate
>  enabled libtheora && require libtheora theora/theoraenc.h 
> th_info_init -ltheoraenc -ltheoradec -logg
> +enabled libturing && require libturing turing.h turing_version 
> -lturing -lstdc++ -lboost_chrono -lboost_program_options -lboost_timer 
> -lboost_system -lboost_filesystem -lhavoc

These dependencies are kind of a mess. Maybe you can make libturning
include a pkg_config file so we don't have to maintain your library
list here?

- Hendrik
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Added the interface for the Turing codec

2016-11-18 Thread Matteo Naccari
> Can't currently test on macOS as libturing doesn't have macOS support
> (https://github.com/bbc/turingcodec/issues/5), but it is being worked on
> (supposedly), so it may make sense to wait until then before this is applied.
>

Ok we'll try to get this sorted out and then get back to you. Thanks for your 
reply.

Best regards,
Matteo



-
http://www.bbc.co.uk
This e-mail (and any attachments) is confidential and
may contain personal views which are not the views of the BBC unless 
specifically stated.
If you have received it in
error, please delete it from your system.
Do not use, copy or disclose the
information in any way nor act in reliance on it and notify the sender
immediately.
Please note that the BBC monitors e-mails
sent or received.
Further communication will signify your consent to
this.
-
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


Re: [FFmpeg-devel] [PATCH] Added the interface for the Turing codec

2016-11-18 Thread Josh de Kock

On 18/11/2016 15:25, Matteo Naccari wrote:

- The Turing codec is an open source HEVC encoder licensed under GPLv2
- More information at http://turingcodec.org/
---
 LICENSE.md |   1 +
 configure  |   5 ++
 libavcodec/Makefile|   1 +
 libavcodec/allcodecs.c |   1 +
 libavcodec/libturing.c | 229 +
 5 files changed, 237 insertions(+)
 create mode 100644 libavcodec/libturing.c

diff --git a/LICENSE.md b/LICENSE.md
index a384fa0..6f9fab8 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -86,6 +86,7 @@ The following libraries are under GPL:
 - frei0r
 - libcdio
 - librubberband
+- libturing
 - libvidstab
 - libx264
 - libx265
diff --git a/configure b/configure
index b5bfad6..47d6b93 100755
--- a/configure
+++ b/configure
@@ -255,6 +255,7 @@ External library support:
   --enable-libssh  enable SFTP protocol via libssh [no]
   --enable-libtesseractenable Tesseract, needed for ocr filter [no]
   --enable-libtheora   enable Theora encoding via libtheora [no]
+  --enable-libturing   enable HEVC encoding via libturing [no]
   --enable-libtwolame  enable MP2 encoding via libtwolame [no]
   --enable-libv4l2 enable libv4l2/v4l-utils [no]
   --enable-libvidstab  enable video stabilization using vid.stab [no]
@@ -1521,6 +1522,7 @@ EXTERNAL_LIBRARY_LIST="
 libssh
 libtesseract
 libtheora
+libturing
 libtwolame
 libv4l2
 libvidstab
@@ -2814,6 +2816,7 @@ libspeex_decoder_deps="libspeex"
 libspeex_encoder_deps="libspeex"
 libspeex_encoder_select="audio_frame_queue"
 libtheora_encoder_deps="libtheora"
+libturing_encoder_deps="libturing"
 libtwolame_encoder_deps="libtwolame"
 libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
 libvorbis_decoder_deps="libvorbis"
@@ -5072,6 +5075,7 @@ die_license_disabled gpl frei0r
 die_license_disabled gpl libcdio
 die_license_disabled gpl librubberband
 die_license_disabled gpl libsmbclient
+die_license_disabled gpl libturing
 die_license_disabled gpl libvidstab
 die_license_disabled gpl libx264
 die_license_disabled gpl libx265
@@ -5735,6 +5739,7 @@ enabled libssh&& require_pkg_config libssh 
libssh/sftp.h sftp_init
 enabled libspeex  && require_pkg_config speex speex/speex.h 
speex_decoder_init -lspeex
 enabled libtesseract  && require_pkg_config tesseract tesseract/capi.h 
TessBaseAPICreate
 enabled libtheora && require libtheora theora/theoraenc.h th_info_init 
-ltheoraenc -ltheoradec -logg
+enabled libturing && require libturing turing.h turing_version 
-lturing -lstdc++ -lboost_chrono -lboost_program_options -lboost_timer -lboost_system 
-lboost_filesystem -lhavoc
 enabled libtwolame&& require libtwolame twolame.h twolame_init -ltwolame 
&&
  { check_lib twolame.h 
twolame_encode_buffer_float32_interleaved -ltwolame ||
die "ERROR: libtwolame must be installed and version 
must be >= 0.3.10"; }
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 82f7fa2..cadefdc 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -880,6 +880,7 @@ OBJS-$(CONFIG_LIBSPEEX_DECODER)   += libspeexdec.o
 OBJS-$(CONFIG_LIBSPEEX_ENCODER)   += libspeexenc.o
 OBJS-$(CONFIG_LIBTHEORA_ENCODER)  += libtheoraenc.o
 OBJS-$(CONFIG_LIBTWOLAME_ENCODER) += libtwolame.o
+OBJS-$(CONFIG_LIBTURING_ENCODER)  += libturing.o
 OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o
 OBJS-$(CONFIG_LIBVORBIS_DECODER)  += libvorbisdec.o
 OBJS-$(CONFIG_LIBVORBIS_ENCODER)  += libvorbisenc.o \
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index ada9481..0e61a4a 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -610,6 +610,7 @@ void avcodec_register_all(void)
 REGISTER_ENCDEC (LIBSPEEX,  libspeex);
 REGISTER_ENCODER(LIBTHEORA, libtheora);
 REGISTER_ENCODER(LIBTWOLAME,libtwolame);
+REGISTER_ENCODER(LIBTURING, libturing);
 REGISTER_ENCODER(LIBVO_AMRWBENC,libvo_amrwbenc);
 REGISTER_ENCDEC (LIBVORBIS, libvorbis);
 REGISTER_ENCDEC (LIBVPX_VP8,libvpx_vp8);
diff --git a/libavcodec/libturing.c b/libavcodec/libturing.c
new file mode 100644
index 000..3191a41
--- /dev/null
+++ b/libavcodec/libturing.c
@@ -0,0 +1,229 @@
+/*
+ * libturing encoder
+ *
+ * Copyright (c) 2016 Turing Codec contributors
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg 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.
+ *
+ * FFmpeg 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 

[FFmpeg-devel] [PATCH] Added the interface for the Turing codec

2016-11-18 Thread Matteo Naccari
- The Turing codec is an open source HEVC encoder licensed under GPLv2
- More information at http://turingcodec.org/
---
 LICENSE.md |   1 +
 configure  |   5 ++
 libavcodec/Makefile|   1 +
 libavcodec/allcodecs.c |   1 +
 libavcodec/libturing.c | 229 +
 5 files changed, 237 insertions(+)
 create mode 100644 libavcodec/libturing.c

diff --git a/LICENSE.md b/LICENSE.md
index a384fa0..6f9fab8 100644
--- a/LICENSE.md
+++ b/LICENSE.md
@@ -86,6 +86,7 @@ The following libraries are under GPL:
 - frei0r
 - libcdio
 - librubberband
+- libturing
 - libvidstab
 - libx264
 - libx265
diff --git a/configure b/configure
index b5bfad6..47d6b93 100755
--- a/configure
+++ b/configure
@@ -255,6 +255,7 @@ External library support:
   --enable-libssh  enable SFTP protocol via libssh [no]
   --enable-libtesseractenable Tesseract, needed for ocr filter [no]
   --enable-libtheora   enable Theora encoding via libtheora [no]
+  --enable-libturing   enable HEVC encoding via libturing [no]
   --enable-libtwolame  enable MP2 encoding via libtwolame [no]
   --enable-libv4l2 enable libv4l2/v4l-utils [no]
   --enable-libvidstab  enable video stabilization using vid.stab [no]
@@ -1521,6 +1522,7 @@ EXTERNAL_LIBRARY_LIST="
 libssh
 libtesseract
 libtheora
+libturing
 libtwolame
 libv4l2
 libvidstab
@@ -2814,6 +2816,7 @@ libspeex_decoder_deps="libspeex"
 libspeex_encoder_deps="libspeex"
 libspeex_encoder_select="audio_frame_queue"
 libtheora_encoder_deps="libtheora"
+libturing_encoder_deps="libturing"
 libtwolame_encoder_deps="libtwolame"
 libvo_amrwbenc_encoder_deps="libvo_amrwbenc"
 libvorbis_decoder_deps="libvorbis"
@@ -5072,6 +5075,7 @@ die_license_disabled gpl frei0r
 die_license_disabled gpl libcdio
 die_license_disabled gpl librubberband
 die_license_disabled gpl libsmbclient
+die_license_disabled gpl libturing
 die_license_disabled gpl libvidstab
 die_license_disabled gpl libx264
 die_license_disabled gpl libx265
@@ -5735,6 +5739,7 @@ enabled libssh&& require_pkg_config libssh 
libssh/sftp.h sftp_init
 enabled libspeex  && require_pkg_config speex speex/speex.h 
speex_decoder_init -lspeex
 enabled libtesseract  && require_pkg_config tesseract tesseract/capi.h 
TessBaseAPICreate
 enabled libtheora && require libtheora theora/theoraenc.h th_info_init 
-ltheoraenc -ltheoradec -logg
+enabled libturing && require libturing turing.h turing_version 
-lturing -lstdc++ -lboost_chrono -lboost_program_options -lboost_timer 
-lboost_system -lboost_filesystem -lhavoc
 enabled libtwolame&& require libtwolame twolame.h twolame_init 
-ltwolame &&
  { check_lib twolame.h 
twolame_encode_buffer_float32_interleaved -ltwolame ||
die "ERROR: libtwolame must be installed and 
version must be >= 0.3.10"; }
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 82f7fa2..cadefdc 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -880,6 +880,7 @@ OBJS-$(CONFIG_LIBSPEEX_DECODER)   += libspeexdec.o
 OBJS-$(CONFIG_LIBSPEEX_ENCODER)   += libspeexenc.o
 OBJS-$(CONFIG_LIBTHEORA_ENCODER)  += libtheoraenc.o
 OBJS-$(CONFIG_LIBTWOLAME_ENCODER) += libtwolame.o
+OBJS-$(CONFIG_LIBTURING_ENCODER)  += libturing.o
 OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o
 OBJS-$(CONFIG_LIBVORBIS_DECODER)  += libvorbisdec.o
 OBJS-$(CONFIG_LIBVORBIS_ENCODER)  += libvorbisenc.o \
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index ada9481..0e61a4a 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -610,6 +610,7 @@ void avcodec_register_all(void)
 REGISTER_ENCDEC (LIBSPEEX,  libspeex);
 REGISTER_ENCODER(LIBTHEORA, libtheora);
 REGISTER_ENCODER(LIBTWOLAME,libtwolame);
+REGISTER_ENCODER(LIBTURING, libturing);
 REGISTER_ENCODER(LIBVO_AMRWBENC,libvo_amrwbenc);
 REGISTER_ENCDEC (LIBVORBIS, libvorbis);
 REGISTER_ENCDEC (LIBVPX_VP8,libvpx_vp8);
diff --git a/libavcodec/libturing.c b/libavcodec/libturing.c
new file mode 100644
index 000..3191a41
--- /dev/null
+++ b/libavcodec/libturing.c
@@ -0,0 +1,229 @@
+/*
+ * libturing encoder
+ *
+ * Copyright (c) 2016 Turing Codec contributors
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg 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.
+ *
+ * FFmpeg 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