Re: [FFmpeg-devel] [PATCH] avcodec/mpegaudio_tablegen: more dynamic initialization speedups

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 8:48 AM, Ronald S. Bultje wrote: > Hi, > > On Sat, Nov 28, 2015 at 12:46 AM, Ganesh Ajjanagadde > wrote: >> >> I personally consider this net ~ 10x and overall perf numbers sufficient >> for using dynamic initialization all the

Re: [FFmpeg-devel] [PATCH 1/5] lavf: add FFERROR_REDO to let demuxer return no packet.

2015-11-28 Thread Nicolas George
Le septidi 7 frimaire, an CCXXIV, Clement Boesch a écrit : > "returned internally by demuxers" maybe That sounds to me like an oxymoron. IMHO, being in internal.h and named FFERROR instead of AVERROR should be enough (even separately). > nit: space issue Locally fixed. > when they data?

Re: [FFmpeg-devel] [PATCHv2] avcodec/aac_tablegen: get rid of hardcoded tables entirely

2015-11-28 Thread Rostislav Pehlivanov
On Fri, 2015-11-27 at 19:35 -0500, Ganesh Ajjanagadde wrote: >   > @@ -40,6 +39,57 @@ >   * Tables in this file are shared by the AAC decoders and encoder >   */ >   > +#define POW_SF2_ZERO200///< ff_aac_pow2sf_tab index > corresponding to pow(2, 0); Move POW_SF2_ZERO to aac.h, which is

Re: [FFmpeg-devel] [PATCH] avcodec/mpegaudio_tablegen: more dynamic initialization speedups

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 7:27 AM, Ganesh Ajjanagadde wrote: > On Sat, Nov 28, 2015 at 4:41 AM, Michael Niedermayer wrote: >> On Sat, Nov 28, 2015 at 12:46:31AM -0500, Ganesh Ajjanagadde wrote: >>> This further speeds up runtime initialization, with identical

Re: [FFmpeg-devel] [PATCH] avcodec/mpegaudio_tablegen: more dynamic initialization speedups

2015-11-28 Thread Ronald S. Bultje
Hi, On Sat, Nov 28, 2015 at 12:46 AM, Ganesh Ajjanagadde wrote: > I personally consider this net ~ 10x and overall perf numbers sufficient > for using dynamic initialization all the time here, especially since the > tables are large. This is a logical fallacy. By this

Re: [FFmpeg-devel] [PATCHv2] avcodec/aac_tablegen: get rid of hardcoded tables entirely

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 3:38 AM, Rostislav Pehlivanov wrote: > On Fri, 2015-11-27 at 19:35 -0500, Ganesh Ajjanagadde wrote: >> >> @@ -40,6 +39,57 @@ >> * Tables in this file are shared by the AAC decoders and encoder >> */ >> >> +#define POW_SF2_ZERO200///<

Re: [FFmpeg-devel] [PATCH] avcodec/mpegaudio_tablegen: more dynamic initialization speedups

2015-11-28 Thread Michael Niedermayer
On Sat, Nov 28, 2015 at 12:46:31AM -0500, Ganesh Ajjanagadde wrote: > This further speeds up runtime initialization, with identical generated > tables. > > Sample benchmark (x86-64, Haswell, GNU/Linux): > > old: > 34441423 decicycles in mpegaudio_tableinit,8192 runs, 0 skips > > new:

Re: [FFmpeg-devel] [PATCH] configure: Add user options to enable gcrypt/gmp for rtmp(t)e support.

2015-11-28 Thread Matt Oliver
On 22 November 2015 at 04:20, Matt Oliver wrote: > On 22 November 2015 at 03:48, Ricardo Constantino > wrote: > >> >+ --enable-gcrypt enable gmp, needed for rtmp(t)e support >> >+ if openssl, librtmp or gmp is not used

Re: [FFmpeg-devel] [PATCH] avcodec/mpegaudio_tablegen: more dynamic initialization speedups

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 4:41 AM, Michael Niedermayer wrote: > On Sat, Nov 28, 2015 at 12:46:31AM -0500, Ganesh Ajjanagadde wrote: >> This further speeds up runtime initialization, with identical generated >> tables. >> >> Sample benchmark (x86-64, Haswell, GNU/Linux): >> >>

Re: [FFmpeg-devel] [PATCH v3] Added VideoToolbox H.264 encoder.

2015-11-28 Thread Paul B Mahol
On 11/28/15, Rick Kern wrote: > Enable with configure --enable-vtenc and encode using -codec:v vtenc_h264. > > Signed-off-by: Rick Kern > --- > MAINTAINERS|1 + > configure |4 + > libavcodec/Makefile|1 + >

Re: [FFmpeg-devel] [PATCHv2] avcodec/aac_tablegen: get rid of hardcoded tables entirely

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 10:21 AM, Ganesh Ajjanagadde wrote: > On Sat, Nov 28, 2015 at 10:06 AM, Rostislav Pehlivanov > wrote: >> On Sat, 2015-11-28 at 09:45 -0500, Ganesh Ajjanagadde wrote: >>> >>> Removed the av_cold, did not find a way to cleanly get rid

Re: [FFmpeg-devel] [PATCHv2] avcodec/aac_tablegen: get rid of hardcoded tables entirely

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 10:06 AM, Rostislav Pehlivanov wrote: > On Sat, 2015-11-28 at 09:45 -0500, Ganesh Ajjanagadde wrote: >> >> Removed the av_cold, did not find a way to cleanly get rid of the >> inline. I do suggest giving it some thought; it is needless >> executable >>

[FFmpeg-devel] [PATCH 3/4] avcodec/mpegaudio_tablegen: more dynamic table creation speedups

2015-11-28 Thread Ganesh Ajjanagadde
This further speeds up runtime initialization, with identical generated tables. Sample benchmark (x86-64, Haswell, GNU/Linux): old: 34441423 decicycles in mpegaudio_tableinit,8192 runs, 0 skips new: 10776291 decicycles in mpegaudio_tableinit,8192 runs, 0 skips Most low

[FFmpeg-devel] [PATCH 2/4] avcodec/mpegaudio_tablegen: speed up dynamic table creation

2015-11-28 Thread Ganesh Ajjanagadde
This does some miscellaneous stuff mainly avoiding the usage of pow to achieve significant speedups. This is not speed critical, but is unnecessary latency and cycles wasted for a user. All tables tested and are identical to the old ones (bit-exact even in floating point case). Sample benchmark

[FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Ganesh Ajjanagadde
This is useful for build-time table generation (--enable-hardcoded-tables), by providing compat shims for hosts that have broken libms. This file is deliberately kept minimal; functions can always be added on an as-needed basis. Reviewed-by: Clément Bœsch Reviewed-by: Ronald S.

[FFmpeg-devel] [PATCH v3] Added VideoToolbox H.264 encoder.

2015-11-28 Thread Rick Kern
Enable with configure --enable-vtenc and encode using -codec:v vtenc_h264. Signed-off-by: Rick Kern --- MAINTAINERS|1 + configure |4 + libavcodec/Makefile|1 + libavcodec/allcodecs.c |1 + libavcodec/vtenc.c | 1212

[FFmpeg-devel] [PATCH v3] Added VideoToolbox H.264 encoder.

2015-11-28 Thread Rick Kern
Fixed code review issues. Rick Kern (1): Added VideoToolbox H.264 encoder. MAINTAINERS|1 + configure |4 + libavcodec/Makefile|1 + libavcodec/allcodecs.c |1 + libavcodec/vtenc.c | 1212 5

Re: [FFmpeg-devel] [PATCHv2] avcodec/aac_tablegen: get rid of hardcoded tables entirely

2015-11-28 Thread Rostislav Pehlivanov
On Sat, 2015-11-28 at 09:45 -0500, Ganesh Ajjanagadde wrote: > > Removed the av_cold, did not find a way to cleanly get rid of the > inline. I do suggest giving it some thought; it is needless > executable > bloat since the inline does not help perf. Pushed, thanks. > Hardly a blot as it's

Re: [FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Derek Buitenhuis
On 11/28/2015 5:03 PM, Ganesh Ajjanagadde wrote: > +static inline double ff_cbrt(double x) > +{ > +return x < 0 ? -pow(-x, 1.0 / 3.0) : pow(x, 1.0 / 3.0); > +} > +#define cbrt ff_cbrt Didn't Clément say to not pollute the global namespace like this? - Derek

[FFmpeg-devel] [PATCH 4/4] avcodec/cbrt_tablegen: speed up dynamic table creation

2015-11-28 Thread Ganesh Ajjanagadde
On systems having cbrt, there is no reason to use the slow pow function. Sample benchmark (x86-64, Haswell, GNU/Linux): new: 5124920 decicycles in cbrt_tableinit, 1 runs, 0 skips old: 12321680 decicycles in cbrt_tableinit, 1 runs, 0 skips Reviewed-by: Ronald S. Bultje

Re: [FFmpeg-devel] [PATCHv2] avcodec/aac_tablegen: get rid of hardcoded tables entirely

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 7:50 AM, Ganesh Ajjanagadde wrote: > On Sat, Nov 28, 2015 at 3:38 AM, Rostislav Pehlivanov > wrote: >> On Fri, 2015-11-27 at 19:35 -0500, Ganesh Ajjanagadde wrote: >>> >>> @@ -40,6 +39,57 @@ >>> * Tables in this file are shared by

Re: [FFmpeg-devel] [PATCH 1/5] lavf: add FFERROR_REDO to let demuxer return no packet.

2015-11-28 Thread Clément Bœsch
On Sat, Nov 28, 2015 at 09:08:52AM +0100, Nicolas George wrote: > Le septidi 7 frimaire, an CCXXIV, Clement Boesch a écrit : > > "returned internally by demuxers" maybe > > That sounds to me like an oxymoron. IMHO, being in internal.h and named > FFERROR instead of AVERROR should be enough (even

[FFmpeg-devel] [PATCH 0/4] dynamic table generation improvements

2015-11-28 Thread Ganesh Ajjanagadde
This is a patch set that significantly speeds up dynamic table initialization (the default) on all platforms. The degree of speedup may vary; best results are obtained on a fully C99 compliant libm. In particular, benchmarks refer to the GNU/Linux platform. Patches tested with FATE with and

Re: [FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 1:31 PM, Derek Buitenhuis wrote: > On 11/28/2015 5:03 PM, Ganesh Ajjanagadde wrote: >> +static inline double ff_cbrt(double x) >> +{ >> +return x < 0 ? -pow(-x, 1.0 / 3.0) : pow(x, 1.0 / 3.0); >> +} >> +#define cbrt ff_cbrt > > Didn't

Re: [FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 2:45 PM, Derek Buitenhuis wrote: > On 11/28/2015 7:33 PM, Ganesh Ajjanagadde wrote: >> 2. Clement's idea AFAIK does not work, since the names must be >> identical to the standard C names for the build to work with/without >> hardcoded tables. >

Re: [FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Derek Buitenhuis
On 11/28/2015 7:51 PM, Ganesh Ajjanagadde wrote: > In principle of course, e.g with more ifdefry, configure, or something > of that sort. I do not believe this is what he meant. I will await his reply to clarify, then. Perhaps do not write so matter-of-factly. > In any case, the point is moot -

Re: [FFmpeg-devel] [PATCH 3/4] avcodec/mpegaudio_tablegen: more dynamic table creation speedups

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 3:29 PM, Derek Buitenhuis wrote: > On 11/28/2015 5:03 PM, Ganesh Ajjanagadde wrote: >> +if (i % 4 == 0) > > I doubt it particularly matters in this case, but you can > avoid a modulo operator here with i & 3, like elsewhere > in the

[FFmpeg-devel] [PATCH] developer.texi: Call out K coding style.

2015-11-28 Thread Rick Kern
K coding style is implied but not listed in 'Coding Rules'. Signed-off-by: Rick Kern --- doc/developer.texi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/developer.texi b/doc/developer.texi index cad1c29..9a901d8 100644 --- a/doc/developer.texi +++

[FFmpeg-devel] [PATCH v4] Added VideoToolbox H.264 encoder.

2015-11-28 Thread Rick Kern
Enable with configure --enable-vtenc and encode using -codec:v vtenc_h264. Signed-off-by: Rick Kern --- MAINTAINERS|1 + configure |4 + libavcodec/Makefile|1 + libavcodec/allcodecs.c |1 + libavcodec/vtenc.c | 1269

[FFmpeg-devel] [PATCH v4] Added VideoToolbox H.264 encoder.

2015-11-28 Thread Rick Kern
vtenc.c was updated to match the coding style of the project. I used several other files to get a feel for the project's coding style. Is there documentation for this? Rick Kern (1): Added VideoToolbox H.264 encoder. MAINTAINERS|1 + configure |4 +

Re: [FFmpeg-devel] [PATCH 3/4] avcodec/mpegaudio_tablegen: more dynamic table creation speedups

2015-11-28 Thread Derek Buitenhuis
On 11/28/2015 5:03 PM, Ganesh Ajjanagadde wrote: > +if (i % 4 == 0) I doubt it particularly matters in this case, but you can avoid a modulo operator here with i & 3, like elsewhere in the file. I doubt the compiler is that dumb, though. Same for other occurrences. - Derek

Re: [FFmpeg-devel] [PATCH 3/4] avcodec/mpegaudio_tablegen: more dynamic table creation speedups

2015-11-28 Thread Derek Buitenhuis
On 11/28/2015 9:19 PM, Ganesh Ajjanagadde wrote: > I actually prefer keeping all at i % 4, since that conveys intent > better IMHO, and would change uniformly to that. It takes a reader a > couple of seconds extra to register what i & 3 is doing for no gain in > C code. No compiler I know of in

Re: [FFmpeg-devel] [PATCH v4] Added VideoToolbox H.264 encoder.

2015-11-28 Thread Timothy Gu
On Sat, Nov 28, 2015 at 02:06:07PM -0500, Rick Kern wrote: > vtenc.c was updated to match the coding style of the project. > > I used several other files to get a feel for the project's coding > style. Is there documentation for this? Yes: https://ffmpeg.org/developer.html#Coding-Rules-1

Re: [FFmpeg-devel] [PATCH 3/4] avcodec/mpegaudio_tablegen: more dynamic table creation speedups

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 4:35 PM, Derek Buitenhuis wrote: > On 11/28/2015 9:26 PM, Derek Buitenhuis wrote: >> Changing all of them sounds fine to me. > > [21:31] <@ubitux> re: i%4 vs i&3; you should ask him to make sure the > compiler is smart enough regarding the

[FFmpeg-devel] [PATCH] avfilter: add audio pulsator filter

2015-11-28 Thread Paul B Mahol
Signed-off-by: Paul B Mahol --- doc/filters.texi | 57 ++ libavfilter/Makefile | 1 + libavfilter/af_apulsator.c | 270 + libavfilter/allfilters.c | 1 + 4 files changed, 329 insertions(+) create mode

Re: [FFmpeg-devel] [PATCH] avfilter: add audio pulsator filter

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 5:26 PM, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol [...] > +case SQUARE: > +val = (phs < 0.5) ? -1 : +1; Something I missed: consider using e.g FFSIGN(phs - 0.5) or FFSIGN(0.5 - phase), can't recall. This is

Re: [FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Derek Buitenhuis
On 11/28/2015 7:33 PM, Ganesh Ajjanagadde wrote: > 2. Clement's idea AFAIK does not work, since the names must be > identical to the standard C names for the build to work with/without > hardcoded tables. ... yes it can. It doesn't work without more work, but it it sure can work. Anyway,

Re: [FFmpeg-devel] [PATCH 1/4] avutil/tablegen: add tablegen libm compatibility shims

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 3:19 PM, Derek Buitenhuis wrote: > On 11/28/2015 7:51 PM, Ganesh Ajjanagadde wrote: >> In principle of course, e.g with more ifdefry, configure, or something >> of that sort. I do not believe this is what he meant. > > I will await his reply to

Re: [FFmpeg-devel] [PATCH 3/4] avcodec/mpegaudio_tablegen: more dynamic table creation speedups

2015-11-28 Thread Derek Buitenhuis
On 11/28/2015 9:26 PM, Derek Buitenhuis wrote: > Changing all of them sounds fine to me. [21:31] <@ubitux> re: i%4 vs i&3; you should ask him to make sure the compiler is smart enough regarding the signess of i - Derek ___ ffmpeg-devel mailing list

Re: [FFmpeg-devel] [PATCH v4] Added VideoToolbox H.264 encoder.

2015-11-28 Thread Richard Kern
On Nov 28, 2015, at 5:07 PM, Timothy Gu wrote: > > On Sat, Nov 28, 2015 at 02:06:07PM -0500, Rick Kern wrote: >> vtenc.c was updated to match the coding style of the project. >> >> I used several other files to get a feel for the project's coding >> style. Is there

Re: [FFmpeg-devel] [PATCH] avfilter: add audio pulsator filter

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 5:26 PM, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol > --- > doc/filters.texi | 57 ++ > libavfilter/Makefile | 1 + > libavfilter/af_apulsator.c | 270 > + >

Re: [FFmpeg-devel] [PATCH] avfilter: add audio pulsator filter

2015-11-28 Thread Ganesh Ajjanagadde
On Sat, Nov 28, 2015 at 6:21 PM, Ganesh Ajjanagadde wrote: > On Sat, Nov 28, 2015 at 5:26 PM, Paul B Mahol wrote: >> Signed-off-by: Paul B Mahol > [...] > >> +case SQUARE: >> +val = (phs < 0.5) ? -1 : +1; > > Something I missed: