Re: [FFmpeg-devel] [PATCH v10] - Added Turing codec interface for ffmpeg
On Tue, 16 May 2017 07:45:14 + Saverio Blasi wrote: > Dear all, > > We would appreciate if you could let us know the procedure and expected > timeline for integration of our patch related with the Turing codec within > the ffmpeg project. FFmpeg is a project by volunteers and open source enthusiasts (with some people being paid for implementing specific features or fixing specific bugs), so there is no planning, no roadmaps, no project management, no predictable behavior, no guarantees, and no official responses of any kind. In the end, nobody felt responsible or compelled to apply it. Since we made you go through all that review, I'd apply your patch, though. Can you send it again as a new thread (since some time has passed)? Then I'd apply it after a 3 day timeout. Also, please don't top post. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v10] - Added Turing codec interface for ffmpeg
Hello, Could you please provide us with some feedback on this patch? Thanks, Saverio -Original Message- From: Saverio Blasi [mailto:saverio.bl...@bbc.co.uk] Sent: 09 May 2017 11:08 To: ffmpeg-devel@ffmpeg.org Cc: Saverio Blasi Subject: [PATCH v10] - Added Turing codec interface for ffmpeg - This patch contains the changes to interface the Turing codec (http://turingcodec.org/) with ffmpeg. The patch was modified to address the comments in the review as follows: - Added a pkg-config file to list all dependencies required by libturing. This should address the issue pointed out by Hendrik Leppkes on Fri 18/11/2016 - As per suggestions of wm4, two functions (add_option and finalise_options) have been created. The former appends new options while the latter sets up the argv array of pointers to char* accordingly. add_option re-allocates the buffer for options using av_realloc - Additionally, both these functions handle the errors in case the memory wasn't allocated correctly - malloc|free|realloc have been substituted with their corresponding av_{malloc|free|realloc} version - Check on bit-depth has been removed since the ffmpeg already casts the right pix_fmt and bit depth - pix_fmts is now set in ff_libturing_encoder as in h264dec.c. - Changed usage of av_free with av_freep and fixed calls to free arrays - Added brackets to all if and for statements - Avoid repetition of code to free arrays in case of failure to initialise the libturing encoder - Some fixes to address the review from wm4 and Mark Thompson received on Wed 08/02/2017 - Fixed indentation --- LICENSE.md | 1 + configure | 6 + libavcodec/Makefile| 1 + libavcodec/allcodecs.c | 1 + libavcodec/libturing.c | 313 + 5 files changed, 322 insertions(+) create mode 100755 libavcodec/libturing.c diff --git a/LICENSE.md b/LICENSE.md index ba65b05..03787c0 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -84,6 +84,7 @@ The following libraries are under GPL: - frei0r - libcdio - librubberband +- libturing - libvidstab - libx264 - libx265 diff --git a/configure b/configure index 2e1786a..0adc4da 100755 --- a/configure +++ b/configure @@ -256,6 +256,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 H.265/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] @@ -1497,6 +1498,7 @@ EXTERNAL_LIBRARY_GPL_LIST=" frei0r libcdio librubberband +libturing libvidstab libx264 libx265 @@ -2875,6 +2877,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" @@ -5831,6 +5834,9 @@ 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_pkg_config libturing turing.h turing_version && + { check_cpp_condition turing.h "TURING_API_VERSION > 1" || + die "ERROR: libturing requires turing api +version 2 or greater."; } enabled libtwolame&& require libtwolame twolame.h twolame_init -ltwolame && { check_lib libtwolame 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 44acc95..0a11a6b 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -909,6 +909,7 @@ OBJS-$(CONFIG_LIBSHINE_ENCODER) += libshine.o OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o +OBJS-$(CONFIG_LIBTURING_ENCODER) += libturing.o OBJS-$(CONFIG_LIBTWOLAME_ENCODER) += libtwolame.o OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o OBJS-$(CONFIG_LIBVORBIS_DECODER) += libvorbisdec.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 7fcc26f..c729b8d 100644 --- a/libavcod
Re: [FFmpeg-devel] [PATCH v10] - Added Turing codec interface for ffmpeg
Dear all, We would appreciate if you could let us know the procedure and expected timeline for integration of our patch related with the Turing codec within the ffmpeg project. Thank you, All the best, Saverio -Original Message- From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of Saverio Blasi Sent: 11 May 2017 08:21 To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH v10] - Added Turing codec interface for ffmpeg Dear all, First of all thank you very much for all the help you provided with this patch. We are now at the tenth iteration, and the patch greatly improved since the first time we submitted it. In fact most of the lines of code in the current version of the patch were suggested by you or revised many times already. Regarding the implementation of the cmd parsing, as Hendrik is pointing out below, we followed other similar approaches (of other codecs). We already revised this implementation following your comments in previous iterations of this patch. At this stage, we would prefer to avoid changing again its structure and keep the implementation as it is, because this gives us more flexibility and also aligns it with other similar projects already integrated with ffmpeg. We would appreciate if you could let us know the procedure from here on for integration of this patch within the ffmpeg project. Thank you, All the best, Saverio >> Dear Michael, >> >>>> Why do you pass a single string of all options and then manually >>>> parse all options out of it instead of specifying the options each >>>> in teh AVOption array ? >>>> >>> We prefer to pass a single string so that we can be more flexible >>> how we then parse it and what to do with it. This gives us more >>> freedom in the future in case we decide to change some of the codec >>> APIs, so that we do not need to change the interface with FFmpeg. >> >> That is unacceptable. > libx264 and 265 pass options the same way, what exactly is the problem with > that? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v10] - Added Turing codec interface for ffmpeg
Dear all, First of all thank you very much for all the help you provided with this patch. We are now at the tenth iteration, and the patch greatly improved since the first time we submitted it. In fact most of the lines of code in the current version of the patch were suggested by you or revised many times already. Regarding the implementation of the cmd parsing, as Hendrik is pointing out below, we followed other similar approaches (of other codecs). We already revised this implementation following your comments in previous iterations of this patch. At this stage, we would prefer to avoid changing again its structure and keep the implementation as it is, because this gives us more flexibility and also aligns it with other similar projects already integrated with ffmpeg. We would appreciate if you could let us know the procedure from here on for integration of this patch within the ffmpeg project. Thank you, All the best, Saverio >> Dear Michael, >> Why do you pass a single string of all options and then manually parse all options out of it instead of specifying the options each in teh AVOption array ? >>> We prefer to pass a single string so that we can be more flexible how >>> we then parse it and what to do with it. This gives us more freedom >>> in the future in case we decide to change some of the codec APIs, so >>> that we do not need to change the interface with FFmpeg. >> >> That is unacceptable. > libx264 and 265 pass options the same way, what exactly is the problem with > that? - 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 v10] - Added Turing codec interface for ffmpeg
On Wed, May 10, 2017 at 8:14 PM, Paul B Mahol wrote: > On 5/10/17, Saverio Blasi wrote: >> Dear Michael, >> >> >> Why do you pass a single string of all options and then manually parse >> all options out of it instead of specifying the options each in teh AVOption >> array ? >> >> We prefer to pass a single string so that we can be more flexible how we >> then parse it and what to do with it. This gives us more freedom in the >> future in case we decide to change some of the codec APIs, so that we do not >> need to change the interface with FFmpeg. > > That is unacceptable. libx264 and 265 pass options the same way, what exactly is the problem with that? - Hendrik ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v10] - Added Turing codec interface for ffmpeg
On 5/10/17, Saverio Blasi wrote: > Dear Michael, > > >> Why do you pass a single string of all options and then manually parse > all options out of it instead of specifying the options each in teh AVOption > array ? > > We prefer to pass a single string so that we can be more flexible how we > then parse it and what to do with it. This gives us more freedom in the > future in case we decide to change some of the codec APIs, so that we do not > need to change the interface with FFmpeg. That is unacceptable. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v10] - Added Turing codec interface for ffmpeg
Dear Michael, >> Why do you pass a single string of all options and then manually parse all >> options out of it instead of specifying the options each in teh AVOption >> array ? We prefer to pass a single string so that we can be more flexible how we then parse it and what to do with it. This gives us more freedom in the future in case we decide to change some of the codec APIs, so that we do not need to change the interface with FFmpeg. Thanks, Saverio - 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 v10] - Added Turing codec interface for ffmpeg
On Tue, May 09, 2017 at 10:08:17AM +, Saverio Blasi wrote: > - This patch contains the changes to interface the Turing codec > (http://turingcodec.org/) with ffmpeg. The patch was modified to address the > comments in the review as follows: > - Added a pkg-config file to list all dependencies required by libturing. > This should address the issue pointed out by Hendrik Leppkes on Fri 18/11/2016 > - As per suggestions of wm4, two functions (add_option and > finalise_options) have been created. The former appends new options while the > latter sets up the argv array of pointers to char* accordingly. add_option > re-allocates the buffer for options using av_realloc > - Additionally, both these functions handle the errors in case the memory > wasn't allocated correctly > - malloc|free|realloc have been substituted with their corresponding > av_{malloc|free|realloc} version > - Check on bit-depth has been removed since the ffmpeg already casts the > right pix_fmt and bit depth > - pix_fmts is now set in ff_libturing_encoder as in h264dec.c. > - Changed usage of av_free with av_freep and fixed calls to free arrays > - Added brackets to all if and for statements > - Avoid repetition of code to free arrays in case of failure to initialise > the libturing encoder > - Some fixes to address the review from wm4 and Mark Thompson received on > Wed 08/02/2017 > - Fixed indentation > --- > LICENSE.md | 1 + > configure | 6 + > libavcodec/Makefile| 1 + > libavcodec/allcodecs.c | 1 + > libavcodec/libturing.c | 313 > + > 5 files changed, 322 insertions(+) > create mode 100755 libavcodec/libturing.c > > diff --git a/LICENSE.md b/LICENSE.md > index ba65b05..03787c0 100644 > --- a/LICENSE.md > +++ b/LICENSE.md > @@ -84,6 +84,7 @@ The following libraries are under GPL: > - frei0r > - libcdio > - librubberband > +- libturing > - libvidstab > - libx264 > - libx265 > diff --git a/configure b/configure > index 2e1786a..0adc4da 100755 > --- a/configure > +++ b/configure > @@ -256,6 +256,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 H.265/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] > @@ -1497,6 +1498,7 @@ EXTERNAL_LIBRARY_GPL_LIST=" > frei0r > libcdio > librubberband > +libturing > libvidstab > libx264 > libx265 > @@ -2875,6 +2877,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" > @@ -5831,6 +5834,9 @@ 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_pkg_config libturing turing.h > turing_version && > + { check_cpp_condition turing.h > "TURING_API_VERSION > 1" || > + die "ERROR: libturing requires turing api > version 2 or greater."; } > enabled libtwolame&& require libtwolame twolame.h twolame_init > -ltwolame && > { check_lib libtwolame 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 44acc95..0a11a6b 100644 > --- a/libavcodec/Makefile > +++ b/libavcodec/Makefile > @@ -909,6 +909,7 @@ OBJS-$(CONFIG_LIBSHINE_ENCODER) += libshine.o > OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o > OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o > OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o > +OBJS-$(CONFIG_LIBTURING_ENCODER) += libturing.o > OBJS-$(CONFIG_LIBTWOLAME_ENCODER) += libtwolame.o > OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o > OBJS-$(CONFIG_LIBVORBIS_DECODER) += libvorbisdec.o > diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c > index 7fcc26f..c729b8d 100644 > --- a/libavcodec/allcodecs.c > +++ b/liba
[FFmpeg-devel] [PATCH v10] - Added Turing codec interface for ffmpeg
- This patch contains the changes to interface the Turing codec (http://turingcodec.org/) with ffmpeg. The patch was modified to address the comments in the review as follows: - Added a pkg-config file to list all dependencies required by libturing. This should address the issue pointed out by Hendrik Leppkes on Fri 18/11/2016 - As per suggestions of wm4, two functions (add_option and finalise_options) have been created. The former appends new options while the latter sets up the argv array of pointers to char* accordingly. add_option re-allocates the buffer for options using av_realloc - Additionally, both these functions handle the errors in case the memory wasn't allocated correctly - malloc|free|realloc have been substituted with their corresponding av_{malloc|free|realloc} version - Check on bit-depth has been removed since the ffmpeg already casts the right pix_fmt and bit depth - pix_fmts is now set in ff_libturing_encoder as in h264dec.c. - Changed usage of av_free with av_freep and fixed calls to free arrays - Added brackets to all if and for statements - Avoid repetition of code to free arrays in case of failure to initialise the libturing encoder - Some fixes to address the review from wm4 and Mark Thompson received on Wed 08/02/2017 - Fixed indentation --- LICENSE.md | 1 + configure | 6 + libavcodec/Makefile| 1 + libavcodec/allcodecs.c | 1 + libavcodec/libturing.c | 313 + 5 files changed, 322 insertions(+) create mode 100755 libavcodec/libturing.c diff --git a/LICENSE.md b/LICENSE.md index ba65b05..03787c0 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -84,6 +84,7 @@ The following libraries are under GPL: - frei0r - libcdio - librubberband +- libturing - libvidstab - libx264 - libx265 diff --git a/configure b/configure index 2e1786a..0adc4da 100755 --- a/configure +++ b/configure @@ -256,6 +256,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 H.265/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] @@ -1497,6 +1498,7 @@ EXTERNAL_LIBRARY_GPL_LIST=" frei0r libcdio librubberband +libturing libvidstab libx264 libx265 @@ -2875,6 +2877,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" @@ -5831,6 +5834,9 @@ 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_pkg_config libturing turing.h turing_version && + { check_cpp_condition turing.h "TURING_API_VERSION > 1" || + die "ERROR: libturing requires turing api version 2 or greater."; } enabled libtwolame&& require libtwolame twolame.h twolame_init -ltwolame && { check_lib libtwolame 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 44acc95..0a11a6b 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -909,6 +909,7 @@ OBJS-$(CONFIG_LIBSHINE_ENCODER) += libshine.o OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o OBJS-$(CONFIG_LIBTHEORA_ENCODER) += libtheoraenc.o +OBJS-$(CONFIG_LIBTURING_ENCODER) += libturing.o OBJS-$(CONFIG_LIBTWOLAME_ENCODER) += libtwolame.o OBJS-$(CONFIG_LIBVO_AMRWBENC_ENCODER) += libvo-amrwbenc.o OBJS-$(CONFIG_LIBVORBIS_DECODER) += libvorbisdec.o diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c index 7fcc26f..c729b8d 100644 --- a/libavcodec/allcodecs.c +++ b/libavcodec/allcodecs.c @@ -620,6 +620,7 @@ static void register_all(void) REGISTER_ENCODER(LIBSHINE, libshine); REGISTER_ENCDEC (LIBSPEEX, libspeex); REGISTER_ENCODER(LIBTHEORA, libtheora); +REGISTER_ENCODER(LIBTURING, libturing);