Re: [FFmpeg-devel] [PATCH] Adding a flag to give user the option to have ffmpeg fail instead of warn when mismatches are found in rtmp url stream or application names.
On 2019-09-27T19:37:40+0200, William Martin wrote: > On Wed, Sep 25, 2019 at 2:36 PM Reino Wijnsma wrote: >> On 2019-09-25T20:57:08+0200, William Martin >> wrote: >>> +av_log(s, AV_LOG_ERROR, "App field don't match up: %s <-> %s. " >> Although I'm not a native English speaker, since "field" isn't plural, I'm >> pretty confident "don't" should be "doesn't". >> >> -- Reino > > Hi Reino - good point. Though, that was an existing log message that I did > not modify. Should the old typo be addressed in a separate patch, or should > I update it here? > I believe that's good practise here, yes. However, I'm not a FFmpeg coder, so someone else would to correct me otherwise. Please don't top-post on this mailinglist! -- Reino ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH V1 4/5] lavf/utils: Cosmetics: fix indentation for estimate_timings
From: Jun Zhao fix indentation for estimate_timings when dump start_time/duartion. Signed-off-by: Jun Zhao --- libavformat/utils.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index f62a5cb..c0ccd8c 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2980,9 +2980,9 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset) for (i = 0; i < ic->nb_streams; i++) { st = ic->streams[i]; if (st->time_base.den) -av_log(ic, AV_LOG_TRACE, "stream %d: start_time: %0.3f duration: %0.3f\n", i, - (double) st->start_time * av_q2d(st->time_base), - (double) st->duration * av_q2d(st->time_base)); +av_log(ic, AV_LOG_TRACE, "stream %d: start_time: %0.3f duration: %0.3f\n", i, + (double) st->start_time * av_q2d(st->time_base), + (double) st->duration * av_q2d(st->time_base)); } av_log(ic, AV_LOG_TRACE, "format: start_time: %0.3f duration: %0.3f bitrate=%"PRId64" kb/s\n", -- 1.7.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH V1 2/5] lavf/nutdec: add logging context to log
From: Jun Zhao Add logging context to log, it's will help debuging. Signed-off-by: Jun Zhao --- libavformat/nutdec.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c index 979cb9a..2b5adcb 100644 --- a/libavformat/nutdec.c +++ b/libavformat/nutdec.c @@ -1275,13 +1275,13 @@ static int read_seek(AVFormatContext *s, int stream_index, av_assert0(sp); pos2 = sp->back_ptr - 15; } -av_log(NULL, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos2); +av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos2); pos = find_startcode(s->pb, SYNCPOINT_STARTCODE, pos2); avio_seek(s->pb, pos, SEEK_SET); nut->last_syncpoint_pos = pos; -av_log(NULL, AV_LOG_DEBUG, "SP: %"PRId64"\n", pos); +av_log(s, AV_LOG_DEBUG, "SP: %"PRId64"\n", pos); if (pos2 > pos || pos2 + 15 < pos) -av_log(NULL, AV_LOG_ERROR, "no syncpoint at backptr pos\n"); +av_log(s, AV_LOG_ERROR, "no syncpoint at backptr pos\n"); for (i = 0; i < s->nb_streams; i++) nut->stream[i].skip_until_key_frame = 1; -- 1.7.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH V1 2/5] lavf/nutdec: add logging context to log
lgtm On 9/28/19, Jun Zhao wrote: > From: Jun Zhao > > Add logging context to log, it's will help debuging. > > Signed-off-by: Jun Zhao > --- > libavformat/nutdec.c |6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/libavformat/nutdec.c b/libavformat/nutdec.c > index 979cb9a..2b5adcb 100644 > --- a/libavformat/nutdec.c > +++ b/libavformat/nutdec.c > @@ -1275,13 +1275,13 @@ static int read_seek(AVFormatContext *s, int > stream_index, > av_assert0(sp); > pos2 = sp->back_ptr - 15; > } > -av_log(NULL, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos2); > +av_log(s, AV_LOG_DEBUG, "SEEKTO: %"PRId64"\n", pos2); > pos = find_startcode(s->pb, SYNCPOINT_STARTCODE, pos2); > avio_seek(s->pb, pos, SEEK_SET); > nut->last_syncpoint_pos = pos; > -av_log(NULL, AV_LOG_DEBUG, "SP: %"PRId64"\n", pos); > +av_log(s, AV_LOG_DEBUG, "SP: %"PRId64"\n", pos); > if (pos2 > pos || pos2 + 15 < pos) > -av_log(NULL, AV_LOG_ERROR, "no syncpoint at backptr pos\n"); > +av_log(s, AV_LOG_ERROR, "no syncpoint at backptr pos\n"); > for (i = 0; i < s->nb_streams; i++) > nut->stream[i].skip_until_key_frame = 1; > > -- > 1.7.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH V1 1/5] lavf/utils: change the log level to warning if can't get duration
From: Jun Zhao change the log level to warning if can't get duration, it's will help to debug some duration issue Signed-off-by: vacingfang Signed-off-by: Jun Zhao --- libavformat/utils.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 9f8a5bf..45cd6b8 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2918,9 +2918,9 @@ static void estimate_timings_from_pts(AVFormatContext *ic, int64_t old_offset) case AVMEDIA_TYPE_VIDEO: case AVMEDIA_TYPE_AUDIO: if (st->start_time != AV_NOPTS_VALUE || st->first_dts != AV_NOPTS_VALUE) { -av_log(ic, AV_LOG_DEBUG, "stream %d : no PTS found at end of file, duration not set\n", i); +av_log(ic, AV_LOG_WARNING, "stream %d : no PTS found at end of file, duration not set\n", i); } else -av_log(ic, AV_LOG_DEBUG, "stream %d : no TS found at start of file, duration not set\n", i); +av_log(ic, AV_LOG_WARNING, "stream %d : no TS found at start of file, duration not set\n", i); } } } -- 1.7.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH V1 3/5] lavf/utils: correct the duration estimation method for nut demuxer
From: Jun Zhao in fact, nut demuxer use the PTS for duration estimation. Signed-off-by: Jun Zhao --- libavformat/utils.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 45cd6b8..f62a5cb 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2962,7 +2962,11 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset) /* at least one component has timings - we use them for all * the components */ fill_all_stream_timings(ic); -ic->duration_estimation_method = AVFMT_DURATION_FROM_STREAM; +/* nut demuxer estimate the duration from PTS */ +if(!strcmp(ic->iformat->name, "nut")) +ic->duration_estimation_method = AVFMT_DURATION_FROM_PTS; +else +ic->duration_estimation_method = AVFMT_DURATION_FROM_STREAM; } else { /* less precise: use bitrate info */ estimate_timings_from_bit_rate(ic); -- 1.7.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH V1 5/5] lavf/utils: add duration estimate method trace
From: Jun Zhao add duration estimate method trace, it's can help to some duration issue trace or debug. Signed-off-by: Jun Zhao --- libavformat/utils.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index c0ccd8c..8620c6f 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -2977,6 +2977,16 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset) { int i; AVStream av_unused *st; +const char *duration_method; +struct duration_mode { +enum AVDurationEstimationMethod mode; +const char *name; ///< short name for the duration estimation method +}; +struct duration_mode duration_modes[] = { +{ AVFMT_DURATION_FROM_PTS,"pts" }, +{ AVFMT_DURATION_FROM_STREAM, "stream"}, +{ AVFMT_DURATION_FROM_BITRATE,"bit rate" }, +}; for (i = 0; i < ic->nb_streams; i++) { st = ic->streams[i]; if (st->time_base.den) @@ -2984,10 +2994,14 @@ static void estimate_timings(AVFormatContext *ic, int64_t old_offset) (double) st->start_time * av_q2d(st->time_base), (double) st->duration * av_q2d(st->time_base)); } +for (i = 0; i < FF_ARRAY_ELEMS(duration_modes); i++) +if (ic->duration_estimation_method == duration_modes[i].mode) +duration_method = duration_modes[i].name; av_log(ic, AV_LOG_TRACE, -"format: start_time: %0.3f duration: %0.3f bitrate=%"PRId64" kb/s\n", +"format: start_time: %0.3f duration: %0.3f (estimate from %s) bitrate=%"PRId64" kb/s\n", (double) ic->start_time / AV_TIME_BASE, (double) ic->duration / AV_TIME_BASE, +duration_method, (int64_t)ic->bit_rate / 1000); } } -- 1.7.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 02/15] avfilter/vf_hqx: Fix undefined left shifts of negative numbers
lgtm On 9/28/19, Andreas Rheinhardt wrote: > Affected every usage of this filter; in particular, it affected the > FATE-tests filter-2xbr, filter-3xbr and filter-4xbr. > > Signed-off-by: Andreas Rheinhardt > --- > libavfilter/vf_hqx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavfilter/vf_hqx.c b/libavfilter/vf_hqx.c > index 16a1be7bd4..4f768c7a13 100644 > --- a/libavfilter/vf_hqx.c > +++ b/libavfilter/vf_hqx.c > @@ -523,7 +523,7 @@ static av_cold int init(AVFilterContext *ctx) > int startg = FFMAX3(-bg, -rg, 0); > int endg = FFMIN3(255-bg, 255-rg, 255); > uint32_t y = (uint32_t)(( 299*rg + 1000*startg + 114*bg)/1000); > -c = bg + (rg<<16) + 0x010101 * startg; > +c = bg + rg * (1 << 16) + 0x010101 * startg; > for (g = startg; g <= endg; g++) { > hqx->rgbtoyuv[c] = ((y++) << 16) + (u << 8) + v; > c+= 0x010101; > -- > 2.20.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 01/15] avfilter/vf_xbr: Fix left shift of negative number
lgtm On 9/28/19, Andreas Rheinhardt wrote: > Affected every usage of vf_xbr, e.g. the FATE-tests filter-2xbr, > filter-3xbr, filter-4xbr. > > Signed-off-by: Andreas Rheinhardt > --- > libavfilter/vf_xbr.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavfilter/vf_xbr.c b/libavfilter/vf_xbr.c > index 2c71871d22..87810c88f1 100644 > --- a/libavfilter/vf_xbr.c > +++ b/libavfilter/vf_xbr.c > @@ -395,7 +395,7 @@ static int init(AVFilterContext *ctx) > int startg = FFMAX3(-bg, -rg, 0); > int endg = FFMIN3(255-bg, 255-rg, 255); > uint32_t y = (uint32_t)(( 299*rg + 1000*startg + 114*bg)/1000); > -c = bg + (rg<<16) + 0x010101 * startg; > +c = bg + rg * (1 << 16) + 0x010101 * startg; > for (g = startg; g <= endg; g++) { > s->rgbtoyuv[c] = ((y++) << 16) + (u << 8) + v; > c+= 0x010101; > -- > 2.20.1 > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 10/15] avcodec/cinepakenc: Fix invalid shifts
lör 2019-09-28 klockan 04:26 +0200 skrev Andreas Rheinhardt: > Fixes: left shift of 1 by 31 places cannot be represented in type 'int'. > Affected the FATE-tests vsynth1-cinepak, vsynth2-cinepak and > vsynth_lena-cinepak. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/cinepakenc.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/libavcodec/cinepakenc.c b/libavcodec/cinepakenc.c > index 93917fafe8..6024df0fba 100644 > --- a/libavcodec/cinepakenc.c > +++ b/libavcodec/cinepakenc.c > @@ -544,8 +544,9 @@ static int encode_mode(CinepakEncContext *s, int h, > uint8_t *last_data[4], int last_linesize[4], > strip_info *info, unsigned char *buf) > { > -int x, y, z, flags, bits, temp_size, header_ofs, ret = 0, mb_count = > s->w * h / MB_AREA; > +int x, y, z, bits, temp_size, header_ofs, ret = 0, mb_count = s->w * h / > MB_AREA; > int needs_extra_bit, should_write_temp; > +uint32_t flags; > unsigned char temp[64]; // 32/2 = 16 V4 blocks at 4 B each -> 64 B > mb_info *mb; > uint8_t *sub_scratch_data[4] = { 0 }, *sub_last_data[4] = { 0 }; > @@ -599,7 +600,7 @@ static int encode_mode(CinepakEncContext *s, int h, > flags = 0; > for (y = x; y < FFMIN(x + 32, mb_count); y++) > if (s->mb[y].best_encoding == ENC_V4) > -flags |= 1 << (31 - y + x); > +flags |= 1U << (31 - y + x); > > AV_WB32(&buf[ret], flags); > ret += 4; > @@ -626,13 +627,13 @@ static int encode_mode(CinepakEncContext *s, int h, > > for (x = 0; x < mb_count; x++) { > mb= &s->mb[x]; > -flags|= (mb->best_encoding != ENC_SKIP) << (31 - > bits++); > +flags|= (uint32_t)(mb->best_encoding != ENC_SKIP) << > (31 - bits++); > needs_extra_bit = 0; > should_write_temp = 0; > > if (mb->best_encoding != ENC_SKIP) { > if (bits < 32) > -flags |= (mb->best_encoding == ENC_V4) << (31 - bits++); > +flags |= (uint32_t)(mb->best_encoding == ENC_V4) << (31 > - bits++); > else > needs_extra_bit = 1; > } > @@ -651,7 +652,7 @@ static int encode_mode(CinepakEncContext *s, int h, > } > > if (needs_extra_bit) { > -flags = (mb->best_encoding == ENC_V4) << 31; > +flags = (uint32_t)(mb->best_encoding == ENC_V4) << 31; > bits = 1; > } > Looks OK /Tomas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 5/5] avcodec/flicvideo: Use bytestream2_get_buffer() in flic_decode_frame_15_16BPP() for FLI_COPY
tor 2019-09-26 klockan 23:10 +0200 skrev Michael Niedermayer: > Fixes: Timeout(103sec -> 3sec) > Fixes: > 17678/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLIC_fuzzer-5715436989054976 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/flicvideo.c | 4 > 1 file changed, 4 insertions(+) > > diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c > index 276c2ff2a6..e559f3d449 100644 > --- a/libavcodec/flicvideo.c > +++ b/libavcodec/flicvideo.c > @@ -738,6 +738,7 @@ static int flic_decode_frame_15_16BPP(AVCodecContext > *avctx, > for (y_ptr = 0; y_ptr < s->frame->linesize[0] * > s->avctx->height; > y_ptr += s->frame->linesize[0]) { > > +#if HAVE_BIGENDIAN > pixel_countdown = s->avctx->width; > pixel_ptr = 0; > while (pixel_countdown > 0) { > @@ -745,6 +746,9 @@ static int flic_decode_frame_15_16BPP(AVCodecContext > *avctx, >pixel_ptr += 2; >pixel_countdown--; > } > +#else > +bytestream2_get_buffer(&g2, pixels + y_ptr, > 2*s->avctx->width); > +#endif > if (s->avctx->width & 1) > bytestream2_skip(&g2, 2); > } Why not do the same kind of BE->LE conversion as with FLI_BRUN? Read first, convert if necessary. They could share code even. /Tomas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avfilter: add arnndn filter
Signed-off-by: Paul B Mahol --- doc/filters.texi | 11 + libavfilter/Makefile |1 + libavfilter/af_arnndn.c | 1544 ++ libavfilter/allfilters.c |1 + 4 files changed, 1557 insertions(+) create mode 100644 libavfilter/af_arnndn.c diff --git a/doc/filters.texi b/doc/filters.texi index 5ad3927a95..a73160e4f0 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -2029,6 +2029,17 @@ atrim=end=5,areverse @end example @end itemize +@section arnndn + +Reduce noise from speech using Recurrent Neural Networks. + +This filter accepts the following options: + +@table @option +@item model, m +Set train model file to load. This option is always required. +@end table + @section asetnsamples Set the number of samples per each output audio frame. diff --git a/libavfilter/Makefile b/libavfilter/Makefile index b99ecc8c26..b54cfd7cc9 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -71,6 +71,7 @@ OBJS-$(CONFIG_APULSATOR_FILTER) += af_apulsator.o OBJS-$(CONFIG_AREALTIME_FILTER) += f_realtime.o OBJS-$(CONFIG_ARESAMPLE_FILTER) += af_aresample.o OBJS-$(CONFIG_AREVERSE_FILTER) += f_reverse.o +OBJS-$(CONFIG_ARNNDN_FILTER) += af_arnndn.o OBJS-$(CONFIG_ASELECT_FILTER)+= f_select.o OBJS-$(CONFIG_ASENDCMD_FILTER) += f_sendcmd.o OBJS-$(CONFIG_ASETNSAMPLES_FILTER) += af_asetnsamples.o diff --git a/libavfilter/af_arnndn.c b/libavfilter/af_arnndn.c new file mode 100644 index 00..1b9b6acbc1 --- /dev/null +++ b/libavfilter/af_arnndn.c @@ -0,0 +1,1544 @@ +/* Copyright (c) 2018 Gregor Richards + * Copyright (c) 2017 Mozilla + * Copyright (c) 2005-2009 Xiph.Org Foundation + * Copyright (c) 2007-2008 CSIRO + * Copyright (c) 2008-2011 Octasic Inc. + * Copyright (c) Jean-Marc Valin + * Copyright (c) 2019 Paul B Mahol + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * - Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * - Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR + * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include + +#include "libavutil/avassert.h" +#include "libavutil/avstring.h" +#include "libavutil/float_dsp.h" +#include "libavutil/opt.h" +#include "libavutil/tx.h" +#include "avfilter.h" +#include "audio.h" +#include "filters.h" +#include "formats.h" + +#define FRAME_SIZE_SHIFT 2 +#define FRAME_SIZE (120name->input_weights); \ +av_free((void *) model->name->bias); \ +av_free((void *) model->name); \ +} \ +} while (0) +#define FREE_GRU(name) do { \ +if (model->name) { \ +av_free((void *) model->name->input_weights); \ +av_free((void *) model->name->recurrent_weights); \ +av_free((void *) model->name->bias); \ +av_free((void *) model->name); \ +} \ +} while (0) + +if (!model) +return; +FREE_DENSE(input_dense); +FREE_GRU(vad_gru); +FREE_GRU(noise_gru); +FREE_GRU(denoise_gru); +FREE_DENSE(denoise_output); +FREE_DENSE(vad_output); +av_free(model); +} + +static RNNModel *rnnoise_model_from_file(FILE *f) +{ +RNNModel *ret; +DenseLayer *input_dense; +GRULayer *vad_gru; +GRULayer *noise_gru; +GRULayer *denoise_gru; +DenseLayer *denoise_output; +DenseLayer *vad_output; +int in; + +if (fscanf(f, "rnnoise-nu model file version %d\n", &in) != 1 || in != 1) +return NULL; + +ret = av_calloc(1, sizeof(RNNModel)); +if (!ret) +return NULL; + +#define ALLOC_LAYER(type, name) \ +name = av_calloc(1, sizeof(type)); \ +if (!name) { \ +rnnoise_model_free(ret); \ +return NULL; \ +} \ +ret->name = name + +ALLOC_LAYER(DenseLayer, input_dense); +ALLOC_LAYER(GRULayer, vad_gru); +ALLOC_LAYER(GRU
Re: [FFmpeg-devel] [PATCH V1 5/5] lavf/utils: add duration estimate method trace
On Sat, Sep 28, 2019 at 08:23:57PM +0800, Jun Zhao wrote: > From: Jun Zhao > > add duration estimate method trace, it's can help to some duration > issue trace or debug. theres some english grammer issue here > > Signed-off-by: Jun Zhao > --- > libavformat/utils.c | 16 +++- > 1 files changed, 15 insertions(+), 1 deletions(-) > > diff --git a/libavformat/utils.c b/libavformat/utils.c > index c0ccd8c..8620c6f 100644 > --- a/libavformat/utils.c > +++ b/libavformat/utils.c > @@ -2977,6 +2977,16 @@ static void estimate_timings(AVFormatContext *ic, > int64_t old_offset) > { > int i; > AVStream av_unused *st; > +const char *duration_method; > +struct duration_mode { > +enum AVDurationEstimationMethod mode; > +const char *name; ///< short name for the duration estimation > method > +}; > +struct duration_mode duration_modes[] = { > +{ AVFMT_DURATION_FROM_PTS,"pts" }, > +{ AVFMT_DURATION_FROM_STREAM, "stream"}, > +{ AVFMT_DURATION_FROM_BITRATE,"bit rate" }, > +}; This maybe could be in a seperate function > for (i = 0; i < ic->nb_streams; i++) { > st = ic->streams[i]; > if (st->time_base.den) > @@ -2984,10 +2994,14 @@ static void estimate_timings(AVFormatContext *ic, > int64_t old_offset) > (double) st->start_time * av_q2d(st->time_base), > (double) st->duration * av_q2d(st->time_base)); > } > +for (i = 0; i < FF_ARRAY_ELEMS(duration_modes); i++) > +if (ic->duration_estimation_method == duration_modes[i].mode) > +duration_method = duration_modes[i].name; > av_log(ic, AV_LOG_TRACE, > -"format: start_time: %0.3f duration: %0.3f bitrate=%"PRId64" > kb/s\n", > +"format: start_time: %0.3f duration: %0.3f (estimate from > %s) bitrate=%"PRId64" kb/s\n", > (double) ic->start_time / AV_TIME_BASE, > (double) ic->duration / AV_TIME_BASE, > +duration_method, > (int64_t)ic->bit_rate / 1000); > } rest LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Observe your enemies, for they first find out your faults. -- Antisthenes signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 15/15] avcodec/jpeg2000dwt: Fix undefined shifts of negative numbers
On Sat, Sep 28, 2019 at 04:26:10AM +0200, Andreas Rheinhardt wrote: > Affected the vsynth*-jpeg2000 and the vsynth*-jpeg2000-97 FATE tests > (where * ranges over { 1, 2, 3, _lena }) as well as ticket #7983. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/jpeg2000dwt.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Never trust a computer, one day, it may think you are the virus. -- Compn signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avfilter: add arnndn filter
On 9/28/2019 12:05 PM, Paul B Mahol wrote: > +static void frame_analysis(AudioRNNContext *s, DenoiseState *st, > AVComplexFloat *X, float *Ex, const float *in) > +{ > +LOCAL_ALIGNED_32(float, x, [WINDOW_SIZE]); > + > +RNN_COPY(x, st->analysis_mem, FRAME_SIZE); > +RNN_COPY(x + FRAME_SIZE, in, FRAME_SIZE); > +RNN_COPY(st->analysis_mem, in, FRAME_SIZE); > +s->fdsp->vector_fmul(x, x, s->window, WINDOW_SIZE); > +emms_c(); > +forward_transform(st, X, x); > +compute_band_energy(Ex, X); > +} > + > +static void frame_synthesis(AudioRNNContext *s, DenoiseState *st, float > *out, const AVComplexFloat *y) > +{ > +LOCAL_ALIGNED_32(float, x, [WINDOW_SIZE]); > + > +inverse_transform(st, x, y); > +s->fdsp->vector_fmul(x, x, s->window, WINDOW_SIZE); > +s->fdsp->vector_fmac_scalar(x, st->synthesis_mem, 1.f, FRAME_SIZE); > +emms_c(); > +RNN_COPY(out, x, FRAME_SIZE); > +RNN_COPY(st->synthesis_mem, &x[FRAME_SIZE], FRAME_SIZE); > +} emms isn't needed for either of those two AVFloatDSPContext functions. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 03/15] swscale/x86/swscale: Fix undefined left shifts of negative numbers
On Sat, Sep 28, 2019 at 04:25:58AM +0200, Andreas Rheinhardt wrote: > This affected many FATE-tests: The number of failing tests went down > from 663 to 344. (Both numbers exclude tests that failed because of > unaligned accesses in code that is inside #if HAVE_FAST_UNALIGNED.) > > Signed-off-by: Andreas Rheinhardt > --- > libswscale/x86/swscale.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Asymptotically faster algorithms should always be preferred if you have asymptotical amounts of data signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 06/15] avcodec/ffv1enc: Fix out-of-bounds-array access
On Sat, Sep 28, 2019 at 04:26:01AM +0200, Andreas Rheinhardt wrote: > libavcodec/ffv1enc.c accessed an array of uint8_t [32] via array[0][j] > in order to loop over all the uint8_t in this array of arrays. Of course > this implied an out-of-bounds access for array[0] and UBSan complained > about this. So replace this with nested loops; furthermore, factor this > out into a function of its own to easily break out of the nested loops. > > This affected the FATE-tests vsynth1-ffv1, vsynth1-ffv1-v3-yuv420p, > vsynth1-ffv1-v3-yuv422p10, vsynth1-ffv1-v3-yuv444p16, > vsynth1-ffv1-v3-bgr0, vsynth1-ffv1-ffv1-v3-rgb48 as well as the > corresponding vsynth2-*, vsynth3-* and the vsynth_lena-* tests. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/ffv1enc.c | 17 + > 1 file changed, 13 insertions(+), 4 deletions(-) will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB What does censorship reveal? It reveals fear. -- Julian Assange signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 07/15] swscale/utils: Fix invalid left shifts of negative numbers
On Sat, Sep 28, 2019 at 04:26:02AM +0200, Andreas Rheinhardt wrote: > Affected the FATE-tests vsynth_lena-dv-411, vsynth1-dv-411, > vsynth2-dv-411 and hevc-paramchange-yuv420p.yuv420p10. > > Signed-off-by: Andreas Rheinhardt > --- > libswscale/utils.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities wherein our enemies excel us and endeavor to excel them, by avoiding what is faulty, and imitating what is excellent in them. -- Plutarch signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 11/15] avcodec/dnxhdenc: Fix undefined left shifts of negative numbers
On Sat, Sep 28, 2019 at 04:26:06AM +0200, Andreas Rheinhardt wrote: > Affected 61 FATE-tests: 60 vsynth tests and lavf-mxf_opatom. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/dnxhdenc.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No great genius has ever existed without some touch of madness. -- Aristotle signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 12/15] avcodec/ituh263dec: Fix undefined left shift of negative number
On Sat, Sep 28, 2019 at 04:26:07AM +0200, Andreas Rheinhardt wrote: > Fixes ticket #8160. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/ituh263dec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Take away the freedom of one citizen and you will be jailed, take away the freedom of all citizens and you will be congratulated by your peers in Parliament. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 02/15] avfilter/vf_hqx: Fix undefined left shifts of negative numbers
On Sat, Sep 28, 2019 at 03:09:07PM +0200, Paul B Mahol wrote: > lgtm will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Many that live deserve death. And some that die deserve life. Can you give it to them? Then do not be too eager to deal out death in judgement. For even the very wise cannot see all ends. -- Gandalf signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 01/15] avfilter/vf_xbr: Fix left shift of negative number
On Sat, Sep 28, 2019 at 03:09:35PM +0200, Paul B Mahol wrote: > lgtm will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The worst form of inequality is to try to make unequal things equal. -- Aristotle signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/g2meet: Check for end of input in jpg_decode_block()
On Thu, Sep 12, 2019 at 11:09:16PM +0200, Tomas Härdin wrote: > tor 2019-09-12 klockan 00:21 +0200 skrev Michael Niedermayer: > > On Wed, Sep 11, 2019 at 11:18:47PM +0200, Tomas Härdin wrote: > > > tis 2019-09-10 klockan 16:16 +0200 skrev Michael Niedermayer: > > > > On Mon, Sep 09, 2019 at 11:04:32PM +0200, Tomas Härdin wrote: > > > > > mån 2019-09-09 klockan 22:16 +0200 skrev Michael Niedermayer: > > > > > > Fixes: Timeout (100sec -> 0.7sec) > > > > > > Fixes: > > > > > > 8668/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_G2M_fuzzer-5174143888130048 > > > > > > > > > > > > Found-by: continuous fuzzing process > > > > > > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > > > > > > Signed-off-by: Michael Niedermayer > > > > > > --- > > > > > > libavcodec/g2meet.c | 3 +++ > > > > > > 1 file changed, 3 insertions(+) > > > > > > > > > > > > diff --git a/libavcodec/g2meet.c b/libavcodec/g2meet.c > > > > > > index 19e1c130ce..731d29a5d4 100644 > > > > > > --- a/libavcodec/g2meet.c > > > > > > +++ b/libavcodec/g2meet.c > > > > > > @@ -244,6 +244,9 @@ static int jpg_decode_block(JPGContext *c, > > > > > > GetBitContext *gb, > > > > > > const int is_chroma = !!plane; > > > > > > const uint8_t *qmat = is_chroma ? chroma_quant : luma_quant; > > > > > > > > > > > > +if (get_bits_left(gb) < 1) > > > > > > +return AVERROR_INVALIDDATA; > > > > > > + > > > > > > c->bdsp.clear_block(block); > > > > > > dc = get_vlc2(gb, c->dc_vlc[is_chroma].table, 9, 3); > > > > > > > > > > Why doesn't the VLC stuff have EOF handling? > > > > > > > > Because it doesnt need it in most of the cases and the get_vlc code > > > > is quite speed critical in some codecs. > > > > Also it would add a error return to cases that previously never > > > > could receive an error. That would require callers to be changed > > > > and check for this error in some cases > > > > > > > > > > > > > There's bound to be a > > > > > metric bajillion of cases like this strewn across the codebase.. > > > > > > > > if that was the case, the fuzzer would have likely found more cases. > > > That's only a matter of time. > > > > There is something wrong with this argument. > > Because one could say this about anything that is not static > > no matter if true or false. And theres no practical way to > > disproof it even if one waited, because maybe one just didnt wait > > long enough ... > > You can actually prove this in many cases, which is something I've been > on about for a while now. The exception is formats that approach Turing > completeness, for obvious reasons. Even context-sensitive formats can > be tricky. The common case of nested length fields can take O(N²) to > parse and validate, if I understand the literature correctly. Pointer > based formats certainly do, like ZIP. > > That is of course not really something we can do anything about, > formats are a given. > > > [...] > > > I've said multiple times that worrying about these timeout things is > > > mostly a waste of time since any serious user will know to put time > > > limits on jobs. > > > > Everyone probably has timelimits on jobs but these timeouts are still > > a big problem. And i think this was discussed before ... > > > > I think if you just think about what timeout to use for each case > > A. a web browser loading image, video and audio files > > Presumably browser devs know how to use TBB and friends. They also > don't use g2meet, or cinepak, or anything else that isn't H.26* or VP* > etc. Closest thing is GIF > > > > Resources would be better spent gearing the fuzzing > > > toward finding memory corruption issues, since the harm from them is > > > far more serious. > > > > Then fixing the timeouts would be a priority as they hold the fuzzer > > up from finding other issues. > > Time spend waiting for a timeout is time the fuzzer cannot search for > > other issues > > I see this more as a fuzzer tuning thing. When I last did fuzzing with > afl I certainly made sure to give it tiny samples and not a lot of time > per round > > Question: is the fuzzer really allowed to spend 120 seconds on a test > case like this one? Or is that timing just an after-the-fact thing? The fuzzer has a timeout of 25 seconds IIRC. Thats on the machiene google runs it on. So local times (which is what would be listed in a patch) will always differ a bit So what shall we do about these 2 patches here ? Ok to push or do you want me to do something else ? Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Let us carefully observe those good qualities wherein our enemies excel us and endeavor to excel them, by avoiding what is faulty, and imitating what is excellent in them. -- Plutarch signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit
Re: [FFmpeg-devel] [PATCH] avcodec/tiff: Try to fix subsampling default
This ensures the default ycbcr_subsampling is 2 while also ensuring the subsampling values are correct for all pixel formats. This solution while it takes a few lines more code should be more robust In TIFF specification only CbCr subsampling is allowed. The field is explicitly named "YCbCrSubsampling", so introducing another subsampling variable serves no purpose other than introducing confusion. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 5/5] avcodec/apedec: Check max_samples
On Tue, Sep 03, 2019 at 02:39:27PM -0300, James Almer wrote: > On 9/3/2019 8:13 AM, Michael Niedermayer wrote: > > On Mon, Sep 02, 2019 at 09:40:47PM -0300, James Almer wrote: > >> On 9/2/2019 9:14 PM, Michael Niedermayer wrote: > >>> Fixes: OOM > >>> Fixes: > >>> 16627/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5638059583864832 > >>> > >>> Found-by: continuous fuzzing process > >>> https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > >>> Signed-off-by: Michael Niedermayer > >>> --- > >>> libavcodec/apedec.c | 3 +++ > >>> 1 file changed, 3 insertions(+) > >>> > >>> diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c > >>> index e218f7c043..774ce18531 100644 > >>> --- a/libavcodec/apedec.c > >>> +++ b/libavcodec/apedec.c > >>> @@ -1475,6 +1475,9 @@ static int ape_decode_frame(AVCodecContext *avctx, > >>> void *data, > >>> return AVERROR_INVALIDDATA; > >>> } > >>> > >>> +if (nblocks * (int64_t)avctx->channels > avctx->max_samples) > >>> +return AVERROR(EINVAL); > >>> + > >> > >> Shouldn't this be checked in ff_get_buffer()? Same as max_pixels, but > >> checking "frame->nb_samples > avctx->max_samples" instead or > >> width/height. Otherwise it will barely be used. > > > > you are correct, it should be checked in *get_buffer somewhere too. > > But the offending allocation occurs before any *get_buffer calls so > > this check here is what is neccessary and sufficient for this specific > > bug > > If the allocation you're talking about is > https://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/apedec.c;h=490b11b94e0b1666f18248b2b247c874fed6e0bc;hb=HEAD#l1500 > then you could just move it (and the five lines that follow it) right > below the ff_get_buffer() call. will apply with these changes and some more to reset the incorrect samples in case of ff_get_buffer failure thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety -- Benjamin Franklin signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/3] avcodec/hevc_cabac: Tighten the limit on k in ff_hevc_cu_qp_delta_abs()
On Tue, Sep 10, 2019 at 01:36:49AM +0200, Michael Niedermayer wrote: > Values larger would fail subsequent tests. > > Fixes: signed integer overflow: 5 + 2147483646 cannot be represented in type > 'int' > Fixes: > 16966/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5695709549953024 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/hevc_cabac.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) will apply patchset [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB I know you won't believe me, but the highest form of Human Excellence is to question oneself and others. -- Socrates signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/5] avcodec/apedec: Fix several integer overflows in predictor_update_filter() and do_apply_filter()
On Tue, Sep 03, 2019 at 02:14:23AM +0200, Michael Niedermayer wrote: > Fixes: negation of -2147483648 cannot be represented in type 'int'; cast to > an unsigned type to negate this value to itself > Fixes: signed integer overflow: -14527961 - 2147483425 cannot be represented > in type 'int' > Fixes: > 16380/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5645957131141120 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/apedec.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) will apply [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/5] avcodec/vc1: check REFDIST
On Sun, Sep 01, 2019 at 12:32:36AM +0200, Michael Niedermayer wrote: > "9.1.1.43 P Reference Distance (REFDIST)" > "The value of REFDIST shall be less than, or equal to, 16." > > Signed-off-by: Michael Niedermayer > --- > libavcodec/vc1.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) will apply [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Asymptotically faster algorithms should always be preferred if you have asymptotical amounts of data signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/3] avcodec/vc1_block: Fix invalid shift with rangeredfrm
On Wed, Sep 11, 2019 at 02:18:41AM +0200, Michael Niedermayer wrote: > Fixes: left shift of negative value -7 > Fixes: > 16959/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMV3_fuzzer-5200360825683968 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/vc1_block.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) will apply patchset [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB When the tyrant has disposed of foreign enemies by conquest or treaty, and there is nothing more to fear from them, then he is always stirring up some war or other, in order that the people may require a leader. -- Plato signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/3] tools/target_dec_fuzzer: Adjust threshold for binkvideo
On Sat, Sep 14, 2019 at 11:39:49PM +0200, Michael Niedermayer wrote: > Fixes: Timeout (89sec -> 7sec) > Fixes: > 17035/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_BINK_fuzzer-5737222422134784 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > tools/target_dec_fuzzer.c | 1 + > 1 file changed, 1 insertion(+) will apply patchset [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB If you fake or manipulate statistics in a paper in physics you will never get a job again. If you fake or manipulate statistics in a paper in medicin you will get a job for life at the pharma industry. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/motionpixels: Mark 2 functions as always_inline
On Wed, Sep 18, 2019 at 01:43:54AM +0200, Michael Niedermayer wrote: > Fixes: Timeout (30sec -> 25sec) > Fixes: > 17050/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOTIONPIXELS_fuzzer-5719149803732992 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/motionpixels.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) will apply [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Its not that you shouldnt use gotos but rather that you should write readable code and code with gotos often but not always is less readable signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/matroskadec: Fix demuxing ProRes
The structure of a ProRes frame in mov/mp4 is that of a typical atom: First a 32 bit BE size field, then a tag detailling the content. Said size field includes the eight bytes of the atom header. This header is actually redundant, as the size of the atom is already known from the containing atom. It is therefore stripped away when muxed into Matroska and so the Matroska demuxer has to recreate upon demuxing. But it did not account for the fact that the size field includes the size of the header and this can lead to problems when a decoder uses the in-band size field. Fixes ticket #8210. Signed-off-by: Andreas Rheinhardt --- libavformat/matroskadec.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/libavformat/matroskadec.c b/libavformat/matroskadec.c index 10c398856b..a5f120b54d 100644 --- a/libavformat/matroskadec.c +++ b/libavformat/matroskadec.c @@ -3280,15 +3280,16 @@ static int matroska_parse_prores(MatroskaTrack *track, uint8_t *src, int dstlen = *size; if (AV_RB32(&src[4]) != MKBETAG('i', 'c', 'p', 'f')) { -dst = av_malloc(dstlen + 8 + AV_INPUT_BUFFER_PADDING_SIZE); +dstlen += 8; + +dst = av_malloc(dstlen + AV_INPUT_BUFFER_PADDING_SIZE); if (!dst) return AVERROR(ENOMEM); AV_WB32(dst, dstlen); AV_WB32(dst + 4, MKBETAG('i', 'c', 'p', 'f')); -memcpy(dst + 8, src, dstlen); -memset(dst + 8 + dstlen, 0, AV_INPUT_BUFFER_PADDING_SIZE); -dstlen += 8; +memcpy(dst + 8, src, dstlen - 8); +memset(dst + dstlen, 0, AV_INPUT_BUFFER_PADDING_SIZE); } *pdst = dst; -- 2.21.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 5/5] avcodec/flicvideo: Use bytestream2_get_buffer() in flic_decode_frame_15_16BPP() for FLI_COPY
Am Sa., 28. Sept. 2019 um 16:52 Uhr schrieb Tomas Härdin : > > tor 2019-09-26 klockan 23:10 +0200 skrev Michael Niedermayer: > > Fixes: Timeout(103sec -> 3sec) > > Fixes: > > 17678/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FLIC_fuzzer-5715436989054976 > > > > Found-by: continuous fuzzing process > > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/flicvideo.c | 4 > > 1 file changed, 4 insertions(+) > > > > diff --git a/libavcodec/flicvideo.c b/libavcodec/flicvideo.c > > index 276c2ff2a6..e559f3d449 100644 > > --- a/libavcodec/flicvideo.c > > +++ b/libavcodec/flicvideo.c > > @@ -738,6 +738,7 @@ static int flic_decode_frame_15_16BPP(AVCodecContext > > *avctx, > > for (y_ptr = 0; y_ptr < s->frame->linesize[0] * > > s->avctx->height; > > y_ptr += s->frame->linesize[0]) { > > > > +#if HAVE_BIGENDIAN > > pixel_countdown = s->avctx->width; > > pixel_ptr = 0; > > while (pixel_countdown > 0) { > > @@ -745,6 +746,9 @@ static int flic_decode_frame_15_16BPP(AVCodecContext > > *avctx, > >pixel_ptr += 2; > >pixel_countdown--; > > } > > +#else > > +bytestream2_get_buffer(&g2, pixels + y_ptr, > > 2*s->avctx->width); > > +#endif > > if (s->avctx->width & 1) > > bytestream2_skip(&g2, 2); > > } > > Why not do the same kind of BE->LE conversion as with FLI_BRUN? Read > first, convert if necessary. They could share code even. I wanted to suggest to completely remove the conversion but it was hard to find samples and then the samples crashed on be, so I wondered if there are more important issues... Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v2 1/3] avfilter/vf_framerate: limit the scene level max range
On Fri, 27 Sep 2019, Limin Wang wrote: ping, please help push it or comments for further changes. Applied the patchset with some minor cosmetic changes. Thanks, Marton On Tue, Sep 24, 2019 at 06:18:07PM +0800, lance.lmw...@gmail.com wrote: From: Limin Wang Reviewed-by: Paul B Mahol Signed-off-by: Limin Wang --- libavfilter/vf_framerate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_framerate.c b/libavfilter/vf_framerate.c index 06e463e4d7..a5dad3c769 100644 --- a/libavfilter/vf_framerate.c +++ b/libavfilter/vf_framerate.c @@ -51,7 +51,7 @@ static const AVOption framerate_options[] = { {"interp_start","point to start linear interpolation", OFFSET(interp_start),AV_OPT_TYPE_INT, {.i64=15}, 0, 255, V|F }, {"interp_end", "point to end linear interpolation", OFFSET(interp_end), AV_OPT_TYPE_INT, {.i64=240},0, 255, V|F }, -{"scene", "scene change level", OFFSET(scene_score), AV_OPT_TYPE_DOUBLE, {.dbl=8.2},0, INT_MAX, V|F }, +{"scene", "scene change level", OFFSET(scene_score), AV_OPT_TYPE_DOUBLE, {.dbl=8.2},0, 100., V|F }, {"flags", "set flags", OFFSET(flags), AV_OPT_TYPE_FLAGS,{.i64=1}, 0, INT_MAX, V|F, "flags" }, {"scene_change_detect", "enable scene change detection", 0, AV_OPT_TYPE_CONST,{.i64=FRAMERATE_FLAG_SCD}, INT_MIN, INT_MAX, V|F, "flags" }, -- 2.21.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v4 7/9] avformat/utils: Avoid copying packets unnecessarily
On 9/27/2019 11:52 PM, Andreas Rheinhardt wrote: > James Almer: >> On 9/20/2019 5:39 PM, Andreas Rheinhardt wrote: >>> Up until now, read_frame_internal in avformat/utils.c uses a spare >>> packet on the stack that serves no real purpose: At no point in this >>> function is there a need for another packet besides the packet destined >>> for output: >>> 1. If the packet doesn't need a parser, but is output as is, the content >>> of the spare packet (that at this point contains a freshly read packet) >>> is simply copied into the output packet (via simple assignment, not >>> av_packet_move_ref, thereby confusing ownership). >>> 2. If the packet needs parsing, the spare packet will be reset after >>> parsing and any packets resulting from the packet read will be put into >>> a packet list; the output packet is not used here at all. >>> 3. If the stream should be discarded, the spare packet will be >>> unreferenced; the output packet is not used here at all either. >>> >>> Therefore the spare packet and the copies can be removed in principle. >>> In practice, one more thing needs to be taken care of: If ff_read_packet >>> failed, the output packet was not affected, now it is. But given that >>> ff_read_packet returns a blank (as if reset via av_packet_unref) packet >>> on failure, there is no problem from this side either. >> >> There's still the "if (!pktl && st->request_probe <= 0)" check in >> ff_read_packet(), which returns without unreferencing the packet. >> > And that's how it should be, because this is not failure. It is the > ordinary way to return from ff_read_packet() when reading was > successfull and the probing is unnecessary. In this case, there is no > need for the overhead of the packet list. > > - Andreas It should return 0 rather than ret, then, if anything to be less confusing, but also because otherwise it depends on what last set that variable, and right now that's AVFormatInput->read_packet(). In any case, this one and the rest of the patchset pushed. Thanks. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v4 2/9] avformat/utils: unref packet on AVInputFormat.read_packet() failure
On 9/20/2019 5:39 PM, Andreas Rheinhardt wrote: > From: James Almer > > Demuxers may have allocated a packet before encountering an error and > aborting. Fun thing about this, the doxy states that packets should be freed on error before returning from the demuxer, so technically the apng demuxer is misbehaving. Still, i think the generic code doing some cleaning is a good idea. But of course, if people prefer to enforce the expected behavior from documentation, we could replace the unref call introduced by this patch with an assert. > > Fixes ticket #8150 > > Signed-off-by: James Almer > --- > Earlier versions of this patchset used av_init_packet() together with > setting the size and data to zero/NULL. This would have caused memleaks > when the packet contained data that needs to be freed/unreferenced, > whereas this approach here runs the risk of double freeing. I consider > the risk of the latter much lower than the risk of the former and have > therefore included this patch in this patchset. > > libavformat/utils.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/libavformat/utils.c b/libavformat/utils.c > index 652642a71b..e348df3269 100644 > --- a/libavformat/utils.c > +++ b/libavformat/utils.c > @@ -854,6 +854,8 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt) > av_init_packet(pkt); > ret = s->iformat->read_packet(s, pkt); > if (ret < 0) { > +av_packet_unref(pkt); > + > /* Some demuxers return FFERROR_REDO when they consume > data and discard it (ignored streams, junk, extradata). > We must re-call the demuxer to get the real packet. */ > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] avformat/mov: parse sdtp atom and set the pkt disposable flag accordingly
Matthieu Bouron: > On Fri, Sep 27, 2019 at 04:14:33PM +0100, Derek Buitenhuis wrote: >> On 27/09/2019 15:37, Matthieu Bouron wrote: >>> Allows the creation of the sdtp atom while remuxing MP4 to MP4. This >>> atom is required by Apple devices (iPhone, Apple TV) in order to accept >>> 2160p medias. >> >> Can you point to a document about this (for informational purposes)? > > For the MP4 container, tt is part of ISO/IEC14496-12 but it looks like it > is not public. > ISO/IEC 14496-12 is one of the publicly available ISO standards [1], as are two amendments to it. - Andreas [1]: https://standards.iso.org/ittf/PubliclyAvailableStandards/index.html ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v4 2/9] avformat/utils: unref packet on AVInputFormat.read_packet() failure
James Almer: > On 9/20/2019 5:39 PM, Andreas Rheinhardt wrote: >> From: James Almer >> >> Demuxers may have allocated a packet before encountering an error and >> aborting. > > Fun thing about this, the doxy states that packets should be freed on > error before returning from the demuxer, so technically the apng demuxer > is misbehaving. > > Still, i think the generic code doing some cleaning is a good idea. But > of course, if people prefer to enforce the expected behavior from > documentation, we could replace the unref call introduced by this patch > with an assert. > IMO this change is very good and I have already begun work on removing unnecessary av_packet_unref() calls in various demuxers [1]. I'll add changes to the doxy when I'm done. - Andreas [1]: https://github.com/mkver/FFmpeg/commit/1930edf0e225fc541ffacbdff1921d4743e998cc ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/5] avcodec/vc1_block: Check for end of bitstream at the top of vc1_decode_i_blocks_adv()
Fixes: Timeout (147sec -> 2sec) Fixes: 17704/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5723851098423296 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/vc1_block.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index e293a4..e43856037a 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -2661,7 +2661,7 @@ static void vc1_decode_i_blocks(VC1Context *v) /** Decode blocks of I-frame for advanced profile */ -static void vc1_decode_i_blocks_adv(VC1Context *v) +static int vc1_decode_i_blocks_adv(VC1Context *v) { int k; MpegEncContext *s = &v->s; @@ -2672,6 +2672,9 @@ static void vc1_decode_i_blocks_adv(VC1Context *v) int mqdiff; GetBitContext *gb = &s->gb; +if (get_bits_left(gb) <= 1) +return AVERROR_INVALIDDATA; + /* select coding mode used for VLC tables selection */ switch (v->y_ac_table_index) { case 0: @@ -2775,7 +2778,7 @@ static void vc1_decode_i_blocks_adv(VC1Context *v) ff_er_add_slice(&s->er, 0, s->start_mb_y, s->mb_x, s->mb_y, ER_MB_ERROR); av_log(s->avctx, AV_LOG_ERROR, "Bits overconsumption: %i > %i\n", get_bits_count(&s->gb), v->bits); -return; +return 0; } inc_blk_idx(v->topleft_blk_idx); inc_blk_idx(v->top_blk_idx); @@ -2793,6 +2796,7 @@ static void vc1_decode_i_blocks_adv(VC1Context *v) ff_mpeg_draw_horiz_band(s, (s->end_mb_y - 1) * 16, 16); ff_er_add_slice(&s->er, 0, s->start_mb_y << v->field_mode, s->mb_width - 1, (s->end_mb_y << v->field_mode) - 1, ER_MB_END); +return 0; } static void vc1_decode_p_blocks(VC1Context *v) -- 2.23.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/5] avcodec/vc1_block: Fixes integer overflow in vc1_decode_i_block_adv()
Fixes: signed integer overflow: 62220 * 262144 cannot be represented in type 'int' Fixes: 17145/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VC1IMAGE_fuzzer-5667394743173120 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/vc1_block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vc1_block.c b/libavcodec/vc1_block.c index fe7dbf8b1d..e293a4 100644 --- a/libavcodec/vc1_block.c +++ b/libavcodec/vc1_block.c @@ -846,7 +846,7 @@ static int vc1_decode_i_block_adv(VC1Context *v, int16_t block[64], int n, q2 = FFABS(q2) * 2 + ((q2 < 0) ? 0 : v->halfpq) - 1; if (q2 && q1 != q2) { for (k = 1; k < 8; k++) -block[k << sh] += (ac_val[k] * q2 * ff_vc1_dqscale[q1 - 1] + 0x2) >> 18; +block[k << sh] += (int)(ac_val[k] * (unsigned)q2 * ff_vc1_dqscale[q1 - 1] + 0x2) >> 18; } else { for (k = 1; k < 8; k++) block[k << sh] += ac_val[k]; -- 2.23.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 5/5] avcodec/pcm: Check bits_per_coded_sample
Fixes: shift exponent -2 is negative Fixes: 17736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PCM_F16LE_fuzzer-5742815929171968 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/pcm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index 83850cc793..abd61e281c 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -264,6 +264,9 @@ static av_cold int pcm_decode_init(AVCodecContext *avctx) break; case AV_CODEC_ID_PCM_F16LE: case AV_CODEC_ID_PCM_F24LE: +if (avctx->bits_per_coded_sample < 1) +return AVERROR_INVALIDDATA; + s->scale = 1. / (1 << (avctx->bits_per_coded_sample - 1)); s->fdsp = avpriv_float_dsp_alloc(0); if (!s->fdsp) -- 2.23.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 4/5] tools/target_dec_fuzzer: Adjust threshold for DXV
Fixes: TImeout (20sec -> 4sec) Fixes: 17735/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DXV_fuzzer-5723368317255680 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index a2c59be318..e51514f994 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -138,6 +138,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { // Allows a small input to generate gigantic output case AV_CODEC_ID_BINKVIDEO: maxpixels /= 32; break; case AV_CODEC_ID_DIRAC: maxpixels /= 8192; break; +case AV_CODEC_ID_DXV: maxpixels /= 32; break; case AV_CODEC_ID_MSRLE: maxpixels /= 16; break; case AV_CODEC_ID_QTRLE: maxpixels /= 16; break; case AV_CODEC_ID_SANM: maxpixels /= 16; break; -- 2.23.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 3/5] tools/target_dec_fuzzer: Adjust VP7 threshold
Fixes: Timeout (110sec -> 10sec) Fixes: 17705/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP7_fuzzer-5765834135306240 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- tools/target_dec_fuzzer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 4af7b26e54..a2c59be318 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -153,6 +153,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { case AV_CODEC_ID_MSS2:maxpixels /= 16384; break; case AV_CODEC_ID_SNOW:maxpixels /= 128; break; case AV_CODEC_ID_TRUEMOTION2: maxpixels /= 1024; break; +case AV_CODEC_ID_VP7: maxpixels /= 256; break; } -- 2.23.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] cmdutils: trailing options may be ignored
On Sat, Sep 28, 2019 at 6:52 AM Lou Logan wrote: > > Signed-off-by: Lou Logan > --- > fftools/cmdutils.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c > index 6f4031fbb9..84f98b7c04 100644 > --- a/fftools/cmdutils.c > +++ b/fftools/cmdutils.c > @@ -848,8 +848,8 @@ do { > \ > } > > if (octx->cur_group.nb_opts || codec_opts || format_opts || > resample_opts) > -av_log(NULL, AV_LOG_WARNING, "Trailing options were found on the " > - "commandline.\n"); > +av_log(NULL, AV_LOG_WARNING, "Trailing option(s) found in the " > + "command: may be ignored.\n"); > > av_log(NULL, AV_LOG_DEBUG, "Finished splitting the commandline.\n"); > > -- LGTM ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH, v2] lavc/vaapi_encode: grow packet if vaMapBuffer returns multiple buffers
> -Original Message- > From: Li, Zhong > Sent: Friday, September 13, 2019 00:05 > To: FFmpeg development discussions and patches de...@ffmpeg.org> > Cc: Fu, Linjie > Subject: RE: [FFmpeg-devel] [PATCH, v2] lavc/vaapi_encode: grow packet if > vaMapBuffer returns multiple buffers > > > From: ffmpeg-devel On Behalf Of > Linjie Fu > > Sent: Friday, May 31, 2019 8:35 AM > > To: ffmpeg-devel@ffmpeg.org > > Cc: Fu, Linjie > > Subject: [FFmpeg-devel] [PATCH, v2] lavc/vaapi_encode: grow packet if > > vaMapBuffer returns multiple buffers > > > > It seems that VA_CODED_BUF_STATUS_SINGLE_NALU allows driver to > map > > buffer for each slice. > > > > Currently, assigning new buffer for pkt when multiple buffer returns from > > vaMapBuffer will cover the previous encoded pkt data and lead to encode > issues. > > > > Iterate through the buf_list first to find out the total buffer size needed > > for > the > > pkt, allocate the whole pkt to avoid repeated reallocation and memcpy, > then copy > > data from each buf to pkt. > > > > Signed-off-by: Linjie Fu > > --- > > [v2]: allocate the whole pkt to avoid repeated reallocation and memcpy > > > > libavcodec/vaapi_encode.c | 18 +- > > 1 file changed, 13 insertions(+), 5 deletions(-) > > > > diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c index > > 2dda451..9c9e5dd 100644 > > --- a/libavcodec/vaapi_encode.c > > +++ b/libavcodec/vaapi_encode.c > > @@ -489,6 +489,8 @@ static int vaapi_encode_output(AVCodecContext > *avctx, > > VAAPIEncodeContext *ctx = avctx->priv_data; > > VACodedBufferSegment *buf_list, *buf; > > VAStatus vas; > > +int total_size = 0; > > +uint8_t *ptr; > > int err; > > > > err = vaapi_encode_wait(avctx, pic); @@ -505,15 +507,21 @@ static int > > vaapi_encode_output(AVCodecContext *avctx, > > goto fail; > > } > > > > +for (buf = buf_list; buf; buf = buf->next) > > +total_size += buf->size; > > + > > +err = av_new_packet(pkt, total_size); > > +ptr = pkt->data; > > + > > +if (err < 0) > > +goto fail_mapped; > > + > > for (buf = buf_list; buf; buf = buf->next) { > > av_log(avctx, AV_LOG_DEBUG, "Output buffer: %u bytes " > > "(status %08x).\n", buf->size, buf->status); > > > > -err = av_new_packet(pkt, buf->size); > > -if (err < 0) > > -goto fail_mapped; > > - > > -memcpy(pkt->data, buf->buf, buf->size); > > +memcpy(ptr, buf->buf, buf->size); > > +ptr += buf->size; > > } > > > > if (pic->type == PICTURE_TYPE_IDR) > > -- > > 2.7.4 > > LGTM Thanks for review. A kindly ping. - linjie ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH V1 5/5] lavf/utils: add duration estimate method trace
On Sat, Sep 28, 2019 at 11:29 PM Michael Niedermayer wrote: > > On Sat, Sep 28, 2019 at 08:23:57PM +0800, Jun Zhao wrote: > > From: Jun Zhao > > > > add duration estimate method trace, it's can help to some duration > > issue trace or debug. > > theres some english grammer issue here > Will fix, thx > > > > > Signed-off-by: Jun Zhao > > --- > > libavformat/utils.c | 16 +++- > > 1 files changed, 15 insertions(+), 1 deletions(-) > > > > diff --git a/libavformat/utils.c b/libavformat/utils.c > > index c0ccd8c..8620c6f 100644 > > --- a/libavformat/utils.c > > +++ b/libavformat/utils.c > > @@ -2977,6 +2977,16 @@ static void estimate_timings(AVFormatContext *ic, > > int64_t old_offset) > > { > > int i; > > AVStream av_unused *st; > > +const char *duration_method; > > > +struct duration_mode { > > +enum AVDurationEstimationMethod mode; > > +const char *name; ///< short name for the duration estimation > > method > > +}; > > +struct duration_mode duration_modes[] = { > > +{ AVFMT_DURATION_FROM_PTS,"pts" }, > > +{ AVFMT_DURATION_FROM_STREAM, "stream"}, > > +{ AVFMT_DURATION_FROM_BITRATE,"bit rate" }, > > +}; > > This maybe could be in a seperate function > Will split as a seperate function > > > for (i = 0; i < ic->nb_streams; i++) { > > st = ic->streams[i]; > > if (st->time_base.den) > > @@ -2984,10 +2994,14 @@ static void estimate_timings(AVFormatContext *ic, > > int64_t old_offset) > > (double) st->start_time * av_q2d(st->time_base), > > (double) st->duration * av_q2d(st->time_base)); > > } > > +for (i = 0; i < FF_ARRAY_ELEMS(duration_modes); i++) > > +if (ic->duration_estimation_method == duration_modes[i].mode) > > +duration_method = duration_modes[i].name; > > av_log(ic, AV_LOG_TRACE, > > -"format: start_time: %0.3f duration: %0.3f > > bitrate=%"PRId64" kb/s\n", > > +"format: start_time: %0.3f duration: %0.3f (estimate from > > %s) bitrate=%"PRId64" kb/s\n", > > (double) ic->start_time / AV_TIME_BASE, > > (double) ic->duration / AV_TIME_BASE, > > +duration_method, > > (int64_t)ic->bit_rate / 1000); > > } > > rest LGTM > > thx > > [...] > > -- ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avcodec/fitsdec: fix use of uninitialised values
header.data_max and header.data_min are not necessarely set on all decoding scenarios. Fixes a Valgrind reported regression since cfa193779103c97bbfc28273a0ab12c114b6786d. Signed-off-by: James Almer --- libavcodec/fitsdec.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libavcodec/fitsdec.c b/libavcodec/fitsdec.c index 88b841a964..a20b8faf9e 100644 --- a/libavcodec/fitsdec.c +++ b/libavcodec/fitsdec.c @@ -195,7 +195,6 @@ static int fits_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, uint8_t *dst8; uint16_t *dst16; uint64_t t; -double scale; FITSHeader header; FITSContext * fitsctx = avctx->priv_data; @@ -205,12 +204,6 @@ static int fits_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, if (ret < 0) return ret; -scale = header.data_max - header.data_min; -if (scale <= 0 || !isfinite(scale)) { -scale = 1; -} -scale = 1/scale; - if (header.rgb) { if (header.bitpix == 8) { if (header.naxisn[2] == 3) { @@ -271,6 +264,13 @@ static int fits_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, CASE_RGB(16, dst16, uint16_t, AV_RB16); } } else { +double scale = header.data_max - header.data_min; + +if (scale <= 0 || !isfinite(scale)) { +scale = 1; +} +scale = 1/scale; + switch (header.bitpix) { #define CASE_GRAY(cas, dst, type, t, rd) \ case cas: \ -- 2.22.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/utils: Fix confusing return value
Replace a return ret with return 0 to more clearly indicate success. Also don't use separate ret and err variables. Signed-off-by: Andreas Rheinhardt --- libavformat/utils.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/libavformat/utils.c b/libavformat/utils.c index 7545d75d5b..f5034c684f 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -832,7 +832,7 @@ static int update_wrap_reference(AVFormatContext *s, AVStream *st, int stream_in int ff_read_packet(AVFormatContext *s, AVPacket *pkt) { -int ret, i, err; +int i, err; AVStream *st; pkt->data = NULL; @@ -856,17 +856,17 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt) } } -ret = s->iformat->read_packet(s, pkt); -if (ret < 0) { +err = s->iformat->read_packet(s, pkt); +if (err < 0) { av_packet_unref(pkt); /* Some demuxers return FFERROR_REDO when they consume data and discard it (ignored streams, junk, extradata). We must re-call the demuxer to get the real packet. */ -if (ret == FFERROR_REDO) +if (err == FFERROR_REDO) continue; -if (!pktl || ret == AVERROR(EAGAIN)) -return ret; +if (!pktl || err == AVERROR(EAGAIN)) +return err; for (i = 0; i < s->nb_streams; i++) { st = s->streams[i]; if (st->probe_packets || st->request_probe > 0) @@ -917,7 +917,7 @@ int ff_read_packet(AVFormatContext *s, AVPacket *pkt) pkt->dts = pkt->pts = av_rescale_q(av_gettime(), AV_TIME_BASE_Q, st->time_base); if (!pktl && st->request_probe <= 0) -return ret; +return 0; err = ff_packet_list_put(&s->internal->raw_packet_buffer, &s->internal->raw_packet_buffer_end, @@ -1597,7 +1597,6 @@ static int read_frame_internal(AVFormatContext *s, AVPacket *pkt) * really terminate parsing */ break; } -ret = 0; st = s->streams[pkt->stream_index]; /* update context if required */ -- 2.21.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v4 7/9] avformat/utils: Avoid copying packets unnecessarily
James Almer: > On 9/27/2019 11:52 PM, Andreas Rheinhardt wrote: >> James Almer: >>> On 9/20/2019 5:39 PM, Andreas Rheinhardt wrote: Up until now, read_frame_internal in avformat/utils.c uses a spare packet on the stack that serves no real purpose: At no point in this function is there a need for another packet besides the packet destined for output: 1. If the packet doesn't need a parser, but is output as is, the content of the spare packet (that at this point contains a freshly read packet) is simply copied into the output packet (via simple assignment, not av_packet_move_ref, thereby confusing ownership). 2. If the packet needs parsing, the spare packet will be reset after parsing and any packets resulting from the packet read will be put into a packet list; the output packet is not used here at all. 3. If the stream should be discarded, the spare packet will be unreferenced; the output packet is not used here at all either. Therefore the spare packet and the copies can be removed in principle. In practice, one more thing needs to be taken care of: If ff_read_packet failed, the output packet was not affected, now it is. But given that ff_read_packet returns a blank (as if reset via av_packet_unref) packet on failure, there is no problem from this side either. >>> >>> There's still the "if (!pktl && st->request_probe <= 0)" check in >>> ff_read_packet(), which returns without unreferencing the packet. >>> >> And that's how it should be, because this is not failure. It is the >> ordinary way to return from ff_read_packet() when reading was >> successfull and the probing is unnecessary. In this case, there is no >> need for the overhead of the packet list. >> >> - Andreas > > It should return 0 rather than ret, then, if anything to be less > confusing, but also because otherwise it depends on what last set that > variable, and right now that's AVFormatInput->read_packet(). > > In any case, this one and the rest of the patchset pushed. Thanks. I also found this strange, but I thought that this was intentional (why else would one use two variables (ret and err) for the return values?). But on closer inspection, it seems that all callers are fine with returning 0 in this case: - estimate_timings_from_pts() checks for whether the return value is != 0. But it seems that both the mpegts as well as the mpegps demuxer (estimate_timings_from_pts() is only used with them) only return 0 on success. - asfrtp_parse_packet() also checks whether the return value is != 0, but the asf demuxers never return a value > 0 on success, so this seems fine, too. - The calls in avidec.c are either unchecked or check for < 0. - read_frame_internal() overwrites the return value with 0 on success. So I made a patch to change this [1]. - Andreas [1]: https://ffmpeg.org/pipermail/ffmpeg-devel/2019-September/250740.html PS: All read_packet functions should return 0 on success according to the doxy, but not all of them abide by this. Some demuxers (e.g. ogg) return the size of the returned packet's data. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH, v2] lavc/qsvdec: Add GPU-accelerated memory copy support
> From: ffmpeg-devel On Behalf Of Linjie Fu > Sent: Friday, September 27, 2019 1:47 PM > To: ffmpeg-devel@ffmpeg.org > Cc: ChaoX A Liu ; Fu, Linjie > Subject: [FFmpeg-devel] [PATCH, v2] lavc/qsvdec: Add GPU-accelerated memory > copy support > > GPU copy enables or disables GPU accelerated copying between video and > system memory. This may lead to a notable performance improvement. > Memory must be sequent and aligned with 128x64. > (first introduced in FFmpeg 3.3.1) This line should be removed. FFmpeg 3.3.1 mainline never support GPU copy. > > CMD: > ffmpeg -init_hw_device qsv=hw -filter_hw_device hw -c:v h264_qsv > -gpu_copy on -i input.h264 -f null - > or: > ffmpeg -c:v h264_qsv -gpu_copy on -i input.h264 -f null - > > Signed-off-by: Linjie Fu > Signed-off-by: ChaoX A Liu > --- > Rebased and send again. > > libavcodec/qsv.c | 31 +--- > libavcodec/qsv_internal.h | 7 +++--- > libavcodec/qsvdec.c | 50 ++- > libavcodec/qsvdec.h | 2 ++ > libavcodec/qsvdec_h2645.c | 10 libavcodec/qsvdec_other.c | 5 > libavcodec/qsvenc.c | 8 --- > 7 files changed, 92 insertions(+), 21 deletions(-) > > diff --git a/libavcodec/qsv.c b/libavcodec/qsv.c index 994c9ebcb0..9e66fbc9da > 100644 > --- a/libavcodec/qsv.c > +++ b/libavcodec/qsv.c > @@ -412,15 +412,19 @@ static int ff_qsv_set_display_handle(AVCodecContext > *avctx, QSVSession *qs) #endif //AVCODEC_QSV_LINUX_SESSION_HANDLE > > int ff_qsv_init_internal_session(AVCodecContext *avctx, QSVSession *qs, > - const char *load_plugins) > + const char *load_plugins, int > + gpu_copy) > { > -mfxIMPL impl = MFX_IMPL_AUTO_ANY; > -mfxVersion ver = { { QSV_VERSION_MINOR, QSV_VERSION_MAJOR } }; > +mfxIMPL impl = MFX_IMPL_AUTO_ANY; > +mfxVersionver = { { QSV_VERSION_MINOR, QSV_VERSION_MAJOR } }; > +mfxInitParam init_par = { MFX_IMPL_AUTO_ANY }; > > const char *desc; > int ret; > > -ret = MFXInit(impl, &ver, &qs->session); > +init_par.GPUCopy= gpu_copy; GPUCopy field is introduced from API 1.16, would better to check it to avoid compile issue with old API. > +init_par.Implementation = impl; > +init_par.Version= ver; > +ret = MFXInitEx(init_par, &qs->session); > if (ret < 0) > return ff_qsv_print_error(avctx, ret, >"Error initializing an internal MFX > session"); @@ -712,7 > +716,8 @@ static mfxStatus qsv_frame_get_hdl(mfxHDL pthis, mfxMemId mid, > mfxHDL *hdl) } > > int ff_qsv_init_session_device(AVCodecContext *avctx, mfxSession *psession, > - AVBufferRef *device_ref, const char > *load_plugins) > + AVBufferRef *device_ref, const char > *load_plugins, > + int gpu_copy) > { > static const mfxHandleType handle_types[] = { > MFX_HANDLE_VA_DISPLAY, > @@ -722,11 +727,12 @@ int ff_qsv_init_session_device(AVCodecContext > *avctx, mfxSession *psession, > AVHWDeviceContext*device_ctx = (AVHWDeviceContext*)device_ref- > >data; > AVQSVDeviceContext *device_hwctx = device_ctx->hwctx; > mfxSessionparent_session = device_hwctx->session; > +mfxInitParaminit_par = { MFX_IMPL_AUTO_ANY }; > +mfxHDLhandle = NULL; > > mfxSessionsession; > mfxVersionver; > mfxIMPL impl; > -mfxHDLhandle = NULL; > mfxHandleType handle_type; > mfxStatus err; > > @@ -752,7 +758,10 @@ int ff_qsv_init_session_device(AVCodecContext *avctx, > mfxSession *psession, > "from the session\n"); > } > > -err = MFXInit(impl, &ver, &session); > +init_par.GPUCopy= gpu_copy; > +init_par.Implementation = impl; > +init_par.Version= ver; > +err = MFXInitEx(init_par, &session); > if (err != MFX_ERR_NONE) > return ff_qsv_print_error(avctx, err, >"Error initializing a child MFX session"); > @@ -783,7 +792,7 > @@ int ff_qsv_init_session_device(AVCodecContext *avctx, mfxSession > *psession, > > int ff_qsv_init_session_frames(AVCodecContext *avctx, mfxSession *psession, > QSVFramesContext *qsv_frames_ctx, > - const char *load_plugins, int opaque) > + const char *load_plugins, int opaque, > + int gpu_copy) > { > mfxFrameAllocator frame_allocator = { > .pthis = qsv_frames_ctx, > @@ -802,8 +811,12 @@ int ff_qsv_init_session_frames(AVCodecContext *avctx, > mfxSession *psession, > > int ret; > > +if (gpu_copy == MFX_GPUCOPY_ON) > +av_log(avctx, AV_LOG_WARNING, "GPU-accelerated memory copy " > +"only works in > + MFX_
Re: [FFmpeg-devel] [PATCH 3/5] tools/target_dec_fuzzer: Adjust VP7 threshold
On Sun, Sep 29, 2019 at 01:53:43AM +0200, Michael Niedermayer wrote: > Fixes: Timeout (110sec -> 10sec) > Fixes: > 17705/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_VP7_fuzzer-5765834135306240 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > tools/target_dec_fuzzer.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c > index 4af7b26e54..a2c59be318 100644 > --- a/tools/target_dec_fuzzer.c > +++ b/tools/target_dec_fuzzer.c > @@ -153,6 +153,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t > size) { > case AV_CODEC_ID_MSS2:maxpixels /= 16384; break; > case AV_CODEC_ID_SNOW:maxpixels /= 128; break; > case AV_CODEC_ID_TRUEMOTION2: maxpixels /= 1024; break; > +case AV_CODEC_ID_VP7: maxpixels /= 256; break; > } ok. however i am curious why this is needed for vp7 and not vp8. -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B) signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".