[FFmpeg-cvslog] avfilter/af_amultiply: use pts from frame from first input
ffmpeg | branch: master | Paul B Mahol | Sat May 4 11:28:14 2019 +0200| [e94447cd49e117aef26cc46c23c54d38eea56d5f] | committer: Paul B Mahol avfilter/af_amultiply: use pts from frame from first input > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e94447cd49e117aef26cc46c23c54d38eea56d5f --- libavfilter/af_amultiply.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/libavfilter/af_amultiply.c b/libavfilter/af_amultiply.c index b35eca7250..cc032846fa 100644 --- a/libavfilter/af_amultiply.c +++ b/libavfilter/af_amultiply.c @@ -34,7 +34,6 @@ typedef struct AudioMultiplyContext { const AVClass *class; AVFrame *frames[2]; -int64_t pts; int planes; int channels; int samples_align; @@ -95,21 +94,20 @@ static int activate(AVFilterContext *ctx) } } -if (nb_samples > 0 && s->frames[0] && s->frames[1]) { +if (s->frames[0] && s->frames[1]) { AVFrame *out; int plane_samples; if (av_sample_fmt_is_planar(ctx->inputs[0]->format)) -plane_samples = FFALIGN(nb_samples, s->samples_align); +plane_samples = FFALIGN(s->frames[0]->nb_samples, s->samples_align); else -plane_samples = FFALIGN(nb_samples * s->channels, s->samples_align); +plane_samples = FFALIGN(s->frames[0]->nb_samples * s->channels, s->samples_align); -out = ff_get_audio_buffer(ctx->outputs[0], nb_samples); +out = ff_get_audio_buffer(ctx->outputs[0], s->frames[0]->nb_samples); if (!out) return AVERROR(ENOMEM); -out->pts = s->pts; -s->pts += nb_samples; +out->pts = s->frames[0]->pts; if (av_get_packed_sample_fmt(ctx->inputs[0]->format) == AV_SAMPLE_FMT_FLT) { for (i = 0; i < s->planes; i++) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/vf_vmafmotion: remove unused header
ffmpeg | branch: master | Paul B Mahol | Sat May 4 11:09:47 2019 +0200| [3d8e99eba3cdeb2cb1fd09f419465f808190f3d1] | committer: Paul B Mahol avfilter/vf_vmafmotion: remove unused header > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3d8e99eba3cdeb2cb1fd09f419465f808190f3d1 --- libavfilter/vf_vmafmotion.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libavfilter/vf_vmafmotion.c b/libavfilter/vf_vmafmotion.c index 9bcc4ff16f..5c2a974538 100644 --- a/libavfilter/vf_vmafmotion.c +++ b/libavfilter/vf_vmafmotion.c @@ -27,7 +27,6 @@ #include "libavutil/opt.h" #include "libavutil/pixdesc.h" #include "avfilter.h" -#include "drawutils.h" #include "formats.h" #include "internal.h" #include "vmaf_motion.h" ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avfilter/f_realtime: add option to scale speed
ffmpeg | branch: master | Moritz Barsnick | Wed May 1 16:12:59 2019 +0200| [98541f70320bc42be277f0fadf74639c190bb827] | committer: Paul B Mahol avfilter/f_realtime: add option to scale speed > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=98541f70320bc42be277f0fadf74639c190bb827 --- doc/filters.texi | 8 libavfilter/f_realtime.c | 7 +-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/doc/filters.texi b/doc/filters.texi index cd82869849..2f9333c3f3 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -21136,6 +21136,14 @@ They accept the following options: @item limit Time limit for the pauses. Any pause longer than that will be considered a timestamp discontinuity and reset the timer. Default is 2 seconds. +@item speed +Speed factor for processing. The value must be a float larger than zero. +Values larger than 1.0 will result in faster than realtime processing, +smaller will slow processing down. The @var{limit} is automatically adapted +accordingly. Default is 1.0. + +A processing speed faster than what is possible without these filters cannot +be achieved. @end table @anchor{select} diff --git a/libavfilter/f_realtime.c b/libavfilter/f_realtime.c index 171c16..6fd3559dac 100644 --- a/libavfilter/f_realtime.c +++ b/libavfilter/f_realtime.c @@ -22,11 +22,13 @@ #include "libavutil/time.h" #include "avfilter.h" #include "internal.h" +#include typedef struct RealtimeContext { const AVClass *class; int64_t delta; int64_t limit; +double speed; unsigned inited; } RealtimeContext; @@ -36,7 +38,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) RealtimeContext *s = ctx->priv; if (frame->pts != AV_NOPTS_VALUE) { -int64_t pts = av_rescale_q(frame->pts, inlink->time_base, AV_TIME_BASE_Q); +int64_t pts = av_rescale_q(frame->pts, inlink->time_base, AV_TIME_BASE_Q) / s->speed; int64_t now = av_gettime_relative(); int64_t sleep = pts - now + s->delta; if (!s->inited) { @@ -44,7 +46,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) sleep = 0; s->delta = now - pts; } -if (sleep > s->limit || sleep < -s->limit) { +if (FFABS(sleep) > s->limit / s->speed) { av_log(ctx, AV_LOG_WARNING, "time discontinuity detected: %"PRIi64" us, resetting\n", sleep); @@ -65,6 +67,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) #define FLAGS AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_FILTERING_PARAM static const AVOption options[] = { { "limit", "sleep time limit", OFFSET(limit), AV_OPT_TYPE_DURATION, { .i64 = 200 }, 0, INT64_MAX, FLAGS }, +{ "speed", "speed factor", OFFSET(speed), AV_OPT_TYPE_DOUBLE, { .dbl = 1.0 }, DBL_MIN, DBL_MAX, FLAGS }, { NULL } }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/pnm_parser: clear state if buffer is discarded
ffmpeg | branch: master | Michael Niedermayer | Fri May 3 23:21:19 2019 +0200| [3afdd3e11a2d1239aca7c6350110aee7371d862e] | committer: Michael Niedermayer avcodec/pnm_parser: clear state if buffer is discarded Fixes: Assertion failure Fixes: 14484/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5150016408125440 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3afdd3e11a2d1239aca7c6350110aee7371d862e --- libavcodec/pnm_parser.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/pnm_parser.c b/libavcodec/pnm_parser.c index de0e32ba9c..5339bebde9 100644 --- a/libavcodec/pnm_parser.c +++ b/libavcodec/pnm_parser.c @@ -69,6 +69,7 @@ retry: if (pnmctx.bytestream < pnmctx.bytestream_end) { if (pc->index) { pc->index = 0; +pnmpc->ascii_scan = 0; } else { unsigned step = FFMAX(1, pnmctx.bytestream - pnmctx.bytestream_start); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/jvdec: Use ff_get_buffer() when the content is not reused
ffmpeg | branch: master | Michael Niedermayer | Sat May 4 00:15:33 2019 +0200| [09edcd35726c9ebea8a175b54dfe05483f7154f2] | committer: Michael Niedermayer avcodec/jvdec: Use ff_get_buffer() when the content is not reused Fixes: Timeout (11sec -> 5sec) Fixes: 14473/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_JV_fuzzer-5761630857592832 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Peter Ross Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=09edcd35726c9ebea8a175b54dfe05483f7154f2 --- libavcodec/jvdec.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libavcodec/jvdec.c b/libavcodec/jvdec.c index 4337d5681e..b06e7cf2bf 100644 --- a/libavcodec/jvdec.c +++ b/libavcodec/jvdec.c @@ -163,13 +163,14 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, av_log(avctx, AV_LOG_ERROR, "video size %d invalid\n", video_size); return AVERROR_INVALIDDATA; } -if ((ret = ff_reget_buffer(avctx, s->frame)) < 0) -return ret; if (video_type == 0 || video_type == 1) { GetBitContext gb; init_get_bits(&gb, buf, 8 * video_size); +if ((ret = ff_reget_buffer(avctx, s->frame)) < 0) +return ret; + if (avctx->height/8 * (avctx->width/8) > 4 * video_size) { av_log(avctx, AV_LOG_ERROR, "Insufficient input data for dimensions\n"); return AVERROR_INVALIDDATA; @@ -184,6 +185,11 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, buf += video_size; } else if (video_type == 2) { int v = *buf++; + +av_frame_unref(s->frame); +if ((ret = ff_get_buffer(avctx, s->frame, AV_GET_BUFFER_FLAG_REF)) < 0) +return ret; + for (j = 0; j < avctx->height; j++) memset(s->frame->data[0] + j * s->frame->linesize[0], v, avctx->width); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] configure: Do not overwrite src symlink if it already exists.
ffmpeg | branch: master | Carl Eugen Hoyos | Thu Apr 25 00:42:48 2019 +0200| [60df54ebd23eba60cb9c53bdaabc5b560100e580] | committer: Carl Eugen Hoyos configure: Do not overwrite src symlink if it already exists. Allows running fate from out-of-tree builds on wsl. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=60df54ebd23eba60cb9c53bdaabc5b560100e580 --- configure | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/configure b/configure index 8af41fde9a..d644a5b1d4 100755 --- a/configure +++ b/configure @@ -3742,6 +3742,8 @@ mkdir -p ffbuild # find source path if test -f configure; then source_path=. +elif test -f src/configure; then +source_path=src else source_path=$(cd $(dirname "$0"); pwd) case "$source_path" in @@ -5416,7 +5418,7 @@ link_name=$(mktemp -u $TMPDIR/name_) mkdir "$link_dest" $ln_s "$link_dest" "$link_name" touch "$link_dest/test_file" -if [ "$source_path" != "." ] && ([ ! -d src ] || [ -L src ]) && [ -e "$link_name/test_file" ]; then +if [ "$source_path" != "." ] && [ "$source_path" != "src" ] && ([ ! -d src ] || [ -L src ]) && [ -e "$link_name/test_file" ]; then # create link to source path [ -e src ] && rm src $ln_s "$source_path" src ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-cvslog] avcodec/h263dec: Fixed VA API, VDPAU, and VideoToolbox hardware acceleration due to missing `hw_configs` property.
ffmpeg | branch: master | fumoboy007 | Mon Apr 29 14:12:33 2019 -0700| [e384f6f2f903b4956c8a89c3038b6df6f3f5770c] | committer: Carl Eugen Hoyos avcodec/h263dec: Fixed VA API, VDPAU, and VideoToolbox hardware acceleration due to missing `hw_configs` property. Bug originally introduced in commit 758fbc54fef2f31957b5c5f22e05e5fd9b04f631. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e384f6f2f903b4956c8a89c3038b6df6f3f5770c --- libavcodec/h263dec.c | 27 +++ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 8385ddfe2e..6f001f6d47 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -743,6 +743,19 @@ const enum AVPixelFormat ff_h263_hwaccel_pixfmt_list_420[] = { AV_PIX_FMT_NONE }; +const AVCodecHWConfigInternal *ff_h263_hw_config_list[] = { +#if CONFIG_H263_VAAPI_HWACCEL +HWACCEL_VAAPI(h263), +#endif +#if CONFIG_MPEG4_VDPAU_HWACCEL +HWACCEL_VDPAU(mpeg4), +#endif +#if CONFIG_H263_VIDEOTOOLBOX_HWACCEL +HWACCEL_VIDEOTOOLBOX(h263), +#endif +NULL +}; + AVCodec ff_h263_decoder = { .name = "h263", .long_name = NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"), @@ -758,6 +771,7 @@ AVCodec ff_h263_decoder = { .flush = ff_mpeg_flush, .max_lowres = 3, .pix_fmts = ff_h263_hwaccel_pixfmt_list_420, +.hw_configs = ff_h263_hw_config_list, }; AVCodec ff_h263p_decoder = { @@ -775,16 +789,5 @@ AVCodec ff_h263p_decoder = { .flush = ff_mpeg_flush, .max_lowres = 3, .pix_fmts = ff_h263_hwaccel_pixfmt_list_420, -.hw_configs = (const AVCodecHWConfigInternal*[]) { -#if CONFIG_H263_VAAPI_HWACCEL -HWACCEL_VAAPI(h263), -#endif -#if CONFIG_MPEG4_VDPAU_HWACCEL -HWACCEL_VDPAU(mpeg4), -#endif -#if CONFIG_H263_VIDEOTOOLBOX_HWACCEL -HWACCEL_VIDEOTOOLBOX(h263), -#endif -NULL -}, +.hw_configs = ff_h263_hw_config_list, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".