[FFmpeg-devel] [PATCH 2/2] avcodec/tests/dct: Add Mean square error test

2017-07-08 Thread Michael Niedermayer
based on quotes of IEEE 1180 / ISO/IEC 23002-1 Signed-off-by: Michael Niedermayer --- libavcodec/tests/dct.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libavcodec/tests/dct.c b/libavcodec/tests/dct.c index cf71b96508..b44c66f427 100644

[FFmpeg-devel] [PATCH 1/2] avcodec/tests/dct: Add peak mean error check

2017-07-08 Thread Michael Niedermayer
based on quotes of IEEE 1180 / ISO/IEC 23002-1 Signed-off-by: Michael Niedermayer --- libavcodec/tests/dct.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavcodec/tests/dct.c b/libavcodec/tests/dct.c index 29af3fea8a..cf71b96508 100644 ---

[FFmpeg-devel] [WIP][PATCH]v4 Opus Pyramid Vector Quantization Search in x86 SIMD asm

2017-07-08 Thread Ivan Kalvachev
This should be the final work-in-progress patch. What's changed: 1. Removed macros conditional defines. The defaults seems to be optimal on all machines that I got benchmarks from. HADDPS and PHADDD are always slower, "BLEND"s are never slower than the emulation. 2. Remove SHORT_SYY_UPDATE. It

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/aacpsdsp_template: Fixes integer overflow in ps_add_squares_c()

2017-07-08 Thread Ronald S. Bultje
Hi, On Sat, Jul 8, 2017 at 5:17 PM, Michael Niedermayer wrote: > On Mon, Jul 03, 2017 at 01:37:09AM +0200, Michael Niedermayer wrote: > > On Sun, Jul 02, 2017 at 02:24:53PM +0100, Rostislav Pehlivanov wrote: > > > On 2 July 2017 at 03:28, Michael Niedermayer

Re: [FFmpeg-devel] [PATCH] pthread_frame: save the FF_DEBUG_THREADS option in FrameThreadContext.

2017-07-08 Thread Michael Niedermayer
On Sat, Jul 08, 2017 at 03:38:11PM -0700, Wan-Teh Chang wrote: > Hi Ronald, > > On Sat, Jul 8, 2017 at 2:33 PM, Ronald S. Bultje wrote: > > > > I can see the design from the patch. > > > > What's missing is a justification for the downside of the design, which is > > that

Re: [FFmpeg-devel] [PATCH] pthread_frame: save the FF_DEBUG_THREADS option in FrameThreadContext.

2017-07-08 Thread Wan-Teh Chang
Hi Ronald, On Sat, Jul 8, 2017 at 2:33 PM, Ronald S. Bultje wrote: > > I can see the design from the patch. > > What's missing is a justification for the downside of the design, which is > that updates to this variable by the user are no longer propagated to the > worker

Re: [FFmpeg-devel] [PATCH] pthread_frame: save the FF_DEBUG_THREADS option in FrameThreadContext.

2017-07-08 Thread Ronald S. Bultje
Hi, On Sat, Jul 8, 2017 at 5:28 PM, Wan-Teh Chang wrote: > Hi Ronald, > > On Sat, Jul 8, 2017 at 6:19 AM, Ronald S. Bultje > wrote: > > Hi, > > > > On Fri, Jul 7, 2017 at 5:02 PM, Wan-Teh Chang < > wtc-at-google@ffmpeg.org> > > wrote: > > >

Re: [FFmpeg-devel] [PATCH] pthread_frame: save the FF_DEBUG_THREADS option in FrameThreadContext.

2017-07-08 Thread Wan-Teh Chang
Hi Ronald, On Sat, Jul 8, 2017 at 6:19 AM, Ronald S. Bultje wrote: > Hi, > > On Fri, Jul 7, 2017 at 5:02 PM, Wan-Teh Chang > wrote: > >> @@ -763,6 +764,7 @@ int ff_frame_thread_init(AVCodecContext *avctx) >> >> fctx->async_lock = 1; >>

Re: [FFmpeg-devel] [PATCH] avcodec/ylc: Fix vlc of 31 bits

2017-07-08 Thread Michael Niedermayer
On Sat, Jul 08, 2017 at 10:59:02PM +0200, Paul B Mahol wrote: > On 7/8/17, Michael Niedermayer wrote: > > Fixes: runtime error: left shift of 1 by 31 places cannot be represented in > > type 'int' > > Fixes: 2515/clusterfuzz-testcase-minimized-6197200012967936 > > > >

Re: [FFmpeg-devel] [PATCH 2/3] avcodec/sbrdsp_fixed: Fix integer overflow in sbr_hf_apply_noise()

2017-07-08 Thread Michael Niedermayer
On Sun, Jul 02, 2017 at 04:28:55AM +0200, Michael Niedermayer wrote: > Fixes: runtime error: signed integer overflow: -2049425300 + -117591631 > cannot be represented in type 'int' > Fixes: part of 2096/clusterfuzz-testcase-minimized-4901566068817920 > > Found-by: continuous fuzzing process >

Re: [FFmpeg-devel] [PATCH 3/3] avcodec/aacpsdsp_template: Fixes integer overflow in ps_add_squares_c()

2017-07-08 Thread Michael Niedermayer
On Mon, Jul 03, 2017 at 01:37:09AM +0200, Michael Niedermayer wrote: > On Sun, Jul 02, 2017 at 02:24:53PM +0100, Rostislav Pehlivanov wrote: > > On 2 July 2017 at 03:28, Michael Niedermayer wrote: > > > > > Fixes: runtime error: signed integer overflow: 1965219850 +

Re: [FFmpeg-devel] [PATCH] Add FITS Demuxer

2017-07-08 Thread Reimar Döffinger
On Tue, Jul 04, 2017 at 09:50:31PM +0530, Paras Chadha wrote: > On Tue, Jul 4, 2017 at 4:12 AM, Reimar Döffinger > wrote: > > > +data_size *= naxisn[i]; > > > +if (data_size < 0) > > > +return AVERROR_INVALIDDATA; > > > > If this

Re: [FFmpeg-devel] [PATCH] avcodec/htmlsubtitles: Be a bit more picky on syntax

2017-07-08 Thread Michael Niedermayer
On Mon, Jul 03, 2017 at 05:50:08PM +0200, Michael Niedermayer wrote: > On Mon, Jul 03, 2017 at 12:40:13PM +0200, wm4 wrote: > > On Sun, 2 Jul 2017 13:43:57 +0200 > > Michael Niedermayer wrote: > > > > > On Sun, Jul 02, 2017 at 01:14:00PM +0200, wm4 wrote: > > > > On Sun,

Re: [FFmpeg-devel] [PATCH] avcodec/ylc: Fix vlc of 31 bits

2017-07-08 Thread Paul B Mahol
On 7/8/17, Michael Niedermayer wrote: > Fixes: runtime error: left shift of 1 by 31 places cannot be represented in > type 'int' > Fixes: 2515/clusterfuzz-testcase-minimized-6197200012967936 > > Found-by: continuous fuzzing process >

[FFmpeg-devel] [PATCH] avcodec/ylc: Fix vlc of 31 bits

2017-07-08 Thread Michael Niedermayer
Fixes: runtime error: left shift of 1 by 31 places cannot be represented in type 'int' Fixes: 2515/clusterfuzz-testcase-minimized-6197200012967936 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer

Re: [FFmpeg-devel] [PATCH] Add FITS Demuxer

2017-07-08 Thread Reimar Döffinger
On Sat, Jul 08, 2017 at 12:59:09PM +0200, Nicolas George wrote: > Le sextidi 16 messidor, an CCXXV, Paras Chadha a écrit : > > So, now should i do this ? > > Based on what you explained here, FITS seems like just an image format, > without provisions for animations like GIF or PNG. Therefore, it

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-08 Thread Paul B Mahol
On 7/8/17, foo86 wrote: > On Sat, Jul 08, 2017 at 08:07:49PM +0200, Hendrik Leppkes wrote: >> On Sat, Jul 8, 2017 at 7:09 PM, foo86 wrote: >> >> +static inline void skip_bits_long(GetBitContext *s, int n) >> >> +{ >> >> +#ifdef CACHED_BITSTREAM_READER >>

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-08 Thread foo86
On Sat, Jul 08, 2017 at 08:07:49PM +0200, Hendrik Leppkes wrote: > On Sat, Jul 8, 2017 at 7:09 PM, foo86 wrote: > >> +static inline void skip_bits_long(GetBitContext *s, int n) > >> +{ > >> +#ifdef CACHED_BITSTREAM_READER > >> +skip_bits(s, n); > >> +#else > >> +#if

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-08 Thread foo86
On Sat, Jul 08, 2017 at 07:25:52PM +0200, Paul B Mahol wrote: > On 7/8/17, foo86 wrote: > > On Sat, Jul 08, 2017 at 11:12:06AM +0200, Paul B Mahol wrote: > >> [...] > > > >> static inline void skip_bits(GetBitContext *s, int n) > >> { > >> +#ifdef CACHED_BITSTREAM_READER >

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-08 Thread Hendrik Leppkes
On Sat, Jul 8, 2017 at 7:23 PM, Rostislav Pehlivanov wrote: > On 8 July 2017 at 10:12, Paul B Mahol wrote: > >> Signed-off-by: Paul B Mahol >> --- >> libavcodec/get_bits.h | 261 ++ >> +++- >>

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-08 Thread Hendrik Leppkes
On Sat, Jul 8, 2017 at 7:09 PM, foo86 wrote: > On Sat, Jul 08, 2017 at 11:12:06AM +0200, Paul B Mahol wrote: >> [...] > >> static inline void skip_bits(GetBitContext *s, int n) >> { >> +#ifdef CACHED_BITSTREAM_READER >> +if (n <= s->bits_left) >> +

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-08 Thread Rostislav Pehlivanov
On 8 July 2017 at 10:12, Paul B Mahol wrote: > Signed-off-by: Paul B Mahol > --- > libavcodec/get_bits.h | 261 ++ > +++- > 1 file changed, 235 insertions(+), 26 deletions(-) > > > I still say it should be enabled

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-08 Thread Paul B Mahol
On 7/8/17, foo86 wrote: > On Sat, Jul 08, 2017 at 11:12:06AM +0200, Paul B Mahol wrote: >> [...] > >> static inline void skip_bits(GetBitContext *s, int n) >> { >> +#ifdef CACHED_BITSTREAM_READER >> +if (n <= s->bits_left) >> +skip_remaining(s, n); >> +else {

Re: [FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-08 Thread foo86
On Sat, Jul 08, 2017 at 11:12:06AM +0200, Paul B Mahol wrote: > [...] > static inline void skip_bits(GetBitContext *s, int n) > { > +#ifdef CACHED_BITSTREAM_READER > +if (n <= s->bits_left) > +skip_remaining(s, n); > +else { > +n -= s->bits_left; > +

Re: [FFmpeg-devel] [PATCH] avcodec/noise_bsf: add support for dropping packets

2017-07-08 Thread Michael Niedermayer
On Sat, Jul 08, 2017 at 01:21:32PM +0200, Marton Balint wrote: > Signed-off-by: Marton Balint > --- > doc/bitstream_filters.texi | 14 +++--- > libavcodec/noise_bsf.c | 8 > libavcodec/version.h | 2 +- > 3 files changed, 20 insertions(+), 4

Re: [FFmpeg-devel] [PATCH] libswresample: check input to swr_convert_frame for NULL

2017-07-08 Thread Michael Niedermayer
On Sat, Jul 08, 2017 at 03:56:53PM +0200, hexpointer wrote: > > Sent: Saturday, July 08, 2017 at 2:19 AM > > From: "Michael Niedermayer" > > To: "FFmpeg development discussions and patches" > > Subject: Re: [FFmpeg-devel] [PATCH] libswresample:

[FFmpeg-devel] [PATCH v2 1/2] pixdesc: Improve scoring for opaque/unknown pixel formats

2017-07-08 Thread Mark Thompson
Hardware pixel formats do not tell you anything about their actual contents, but should still score higher than formats with completely unknown properties, which in turn should score higher than invalid formats. Do not return an AVERROR code as a score. Fixes a hang in libavfilter where format

[FFmpeg-devel] [PATCH v2 2/2] pixdesc: Add a test for av_find_best_pix_fmt_of_2()

2017-07-08 Thread Mark Thompson
--- On 07/07/17 01:42, Michael Niedermayer wrote: > On Thu, Jul 06, 2017 at 11:00:31PM +0100, Mark Thompson wrote: >> --- >> libavutil/Makefile| 1 + >> libavutil/tests/pixfmt_best.c | 115 >> ++ >> tests/fate/libavutil.mak | 4 ++ >>

Re: [FFmpeg-devel] [PATCH] libswresample: check input to swr_convert_frame for NULL

2017-07-08 Thread hexpointer
> Sent: Saturday, July 08, 2017 at 2:19 AM > From: "Michael Niedermayer" > To: "FFmpeg development discussions and patches" > Subject: Re: [FFmpeg-devel] [PATCH] libswresample: check input to > swr_convert_frame for NULL > > Is the author value

Re: [FFmpeg-devel] [PATCH] pthread_frame: save the FF_DEBUG_THREADS option in FrameThreadContext.

2017-07-08 Thread Ronald S. Bultje
Hi, On Fri, Jul 7, 2017 at 5:02 PM, Wan-Teh Chang wrote: > @@ -763,6 +764,7 @@ int ff_frame_thread_init(AVCodecContext *avctx) > > fctx->async_lock = 1; > fctx->delaying = 1; > +fctx->debug_threads = (avctx->debug & FF_DEBUG_THREADS) != 0; Shouldn't

Re: [FFmpeg-devel] [PATCH] pthread_frame: save the FF_DEBUG_THREADS option in FrameThreadContext.

2017-07-08 Thread Ronald S. Bultje
Hi, On Fri, Jul 7, 2017 at 5:31 PM, Ronald S. Bultje wrote: > Hi, > > On Fri, Jul 7, 2017 at 5:30 PM, Wan-Teh Chang < > wtc-at-google@ffmpeg.org> wrote: > >> Note: I suspect we can simply delete the following line from >> update_context_from_user() in

[FFmpeg-devel] [PATCH] avcodec/noise_bsf: add support for dropping packets

2017-07-08 Thread Marton Balint
Signed-off-by: Marton Balint --- doc/bitstream_filters.texi | 14 +++--- libavcodec/noise_bsf.c | 8 libavcodec/version.h | 2 +- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi

Re: [FFmpeg-devel] [PATCH] Add FITS Demuxer

2017-07-08 Thread Nicolas George
Le sextidi 16 messidor, an CCXXV, Paras Chadha a écrit : > So, now should i do this ? Based on what you explained here, FITS seems like just an image format, without provisions for animations like GIF or PNG. Therefore, it should have been integrated in the img2 framework in the first place and

[FFmpeg-devel] [PATCH 1/3] avcodec/get_bits: add cached bitstream reader

2017-07-08 Thread Paul B Mahol
Signed-off-by: Paul B Mahol --- libavcodec/get_bits.h | 261 +- 1 file changed, 235 insertions(+), 26 deletions(-) diff --git a/libavcodec/get_bits.h b/libavcodec/get_bits.h index c530015..f404b80 100644 ---