[FFmpeg-cvslog] avfilter: add tpad filter
ffmpeg | branch: master | Paul B Mahol | Tue Oct 30 09:33:12 2018 +0100| [97e9e3504d36ef11efac60e300259689aaeb29fc] | committer: Paul B Mahol avfilter: add tpad filter > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=97e9e3504d36ef11efac60e300259689aaeb29fc --- Changelog| 1 + doc/filters.texi | 40 + libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/version.h| 2 +- libavfilter/vf_tpad.c| 218 +++ 6 files changed, 262 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 8430da3c6a..fe5692f93f 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,7 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. version : +- tpad filter version 4.1: - deblock filter diff --git a/doc/filters.texi b/doc/filters.texi index 4345a4931b..e67b8a647d 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -16755,6 +16755,46 @@ embedded peak information in display metadata is not reliable or when tone mapping from a lower range to a higher range. @end table +@section tpad + +Temporarily pad video frames. + +The filter accepts the following options: + +@table @option +@item start +Specify number of delay frames before input video stream. + +@item stop +Specify number of padding frames after input video stream. +Set to -1 to pad indefinitely. + +@item start_mode +Set kind of frames added to beginning of stream. +Can be either @var{add} or @var{clone}. +With @var{add} frames of solid-color are added. +With @var{clone} frames are clones of first frame. + +@item stop_mode +Set kind of frames added to end of stream. +Can be either @var{add} or @var{clone}. +With @var{add} frames of solid-color are added. +With @var{clone} frames are clones of last frame. + +@item start_duration, stop_duration +Specify the duration of the start/stop delay. See +@ref{time duration syntax,,the Time duration section in the ffmpeg-utils(1) manual,ffmpeg-utils} +for the accepted syntax. +These options override @var{start} and @var{stop}. + +@item color +Specify the color of the padded area. For the syntax of this option, +check the @ref{color syntax,,"Color" section in the ffmpeg-utils +manual,ffmpeg-utils}. + +The default value of @var{color} is "black". +@end table + @anchor{transpose} @section transpose diff --git a/libavfilter/Makefile b/libavfilter/Makefile index c35cd8f422..51e48efc2e 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -383,6 +383,7 @@ OBJS-$(CONFIG_TMIX_FILTER) += vf_mix.o framesync.o OBJS-$(CONFIG_TONEMAP_FILTER)+= vf_tonemap.o colorspace.o OBJS-$(CONFIG_TONEMAP_OPENCL_FILTER) += vf_tonemap_opencl.o colorspace.o opencl.o \ opencl/tonemap.o opencl/colorspace_common.o +OBJS-$(CONFIG_TPAD_FILTER) += vf_tpad.o OBJS-$(CONFIG_TRANSPOSE_FILTER) += vf_transpose.o OBJS-$(CONFIG_TRANSPOSE_NPP_FILTER) += vf_transpose_npp.o OBJS-$(CONFIG_TRIM_FILTER) += trim.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index d5a211bda5..6052cb8c3c 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -365,6 +365,7 @@ extern AVFilter ff_vf_tlut2; extern AVFilter ff_vf_tmix; extern AVFilter ff_vf_tonemap; extern AVFilter ff_vf_tonemap_opencl; +extern AVFilter ff_vf_tpad; extern AVFilter ff_vf_transpose; extern AVFilter ff_vf_transpose_npp; extern AVFilter ff_vf_trim; diff --git a/libavfilter/version.h b/libavfilter/version.h index 27901a710a..2ddbf735ea 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -30,7 +30,7 @@ #include "libavutil/version.h" #define LIBAVFILTER_VERSION_MAJOR 7 -#define LIBAVFILTER_VERSION_MINOR 41 +#define LIBAVFILTER_VERSION_MINOR 42 #define LIBAVFILTER_VERSION_MICRO 100 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ diff --git a/libavfilter/vf_tpad.c b/libavfilter/vf_tpad.c new file mode 100644 index 00..86e063090b --- /dev/null +++ b/libavfilter/vf_tpad.c @@ -0,0 +1,218 @@ +/* + * Copyright (c) 2018 Paul B Mahol + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Fran
[FFmpeg-cvslog] avfilter/f_loop: make sure duration of frame is never zero
ffmpeg | branch: master | Paul B Mahol | Fri Nov 2 11:20:30 2018 +0100| [4620e4c7ad2fd19d0bbe17c25c3466c40cc97279] | committer: Paul B Mahol avfilter/f_loop: make sure duration of frame is never zero > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4620e4c7ad2fd19d0bbe17c25c3466c40cc97279 --- libavfilter/f_loop.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/libavfilter/f_loop.c b/libavfilter/f_loop.c index 255fe643da..1f857abf8d 100644 --- a/libavfilter/f_loop.c +++ b/libavfilter/f_loop.c @@ -267,7 +267,7 @@ static int push_frame(AVFilterContext *ctx) { AVFilterLink *outlink = ctx->outputs[0]; LoopContext *s = ctx->priv; -int64_t pts; +int64_t pts, duration; int ret; AVFrame *out = av_frame_clone(s->frames[s->current_frame]); @@ -275,7 +275,11 @@ static int push_frame(AVFilterContext *ctx) if (!out) return AVERROR(ENOMEM); out->pts += s->duration - s->start_pts; -pts = out->pts + out->pkt_duration; +if (out->pkt_duration) +duration = out->pkt_duration; +else +duration = av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base); +pts = out->pts + duration; ret = ff_filter_frame(outlink, out); s->current_frame++; @@ -295,6 +299,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) AVFilterContext *ctx = inlink->dst; AVFilterLink *outlink = ctx->outputs[0]; LoopContext *s = ctx->priv; +int64_t duration; int ret = 0; if (inlink->frame_count_out >= s->start && s->size > 0 && s->loop != 0) { @@ -307,7 +312,11 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) return AVERROR(ENOMEM); } s->nb_frames++; -s->duration = frame->pts + frame->pkt_duration; +if (frame->pkt_duration) +duration = frame->pkt_duration; +else +duration = av_rescale_q(1, av_inv_q(outlink->frame_rate), outlink->time_base); +s->duration = frame->pts + duration; ret = ff_filter_frame(outlink, frame); } else { av_frame_free(&frame); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/f_loop: switch to activate
ffmpeg | branch: master | Paul B Mahol | Fri Nov 2 10:11:24 2018 +0100| [ef1aadffc785b48ed62c45d954289e754f43ef46] | committer: Paul B Mahol avfilter/f_loop: switch to activate > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ef1aadffc785b48ed62c45d954289e754f43ef46 --- libavfilter/f_loop.c | 56 +++- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/libavfilter/f_loop.c b/libavfilter/f_loop.c index 1f857abf8d..d9d55f9837 100644 --- a/libavfilter/f_loop.c +++ b/libavfilter/f_loop.c @@ -25,6 +25,7 @@ #include "libavutil/opt.h" #include "avfilter.h" #include "audio.h" +#include "filters.h" #include "formats.h" #include "internal.h" #include "video.h" @@ -44,6 +45,7 @@ typedef struct LoopContext { int64_t ignored_samples; int loop; +int eof; int64_t size; int64_t start; int64_t pts; @@ -330,25 +332,44 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *frame) return ret; } -static int request_frame(AVFilterLink *outlink) +static int activate(AVFilterContext *ctx) { -AVFilterContext *ctx = outlink->src; +AVFilterLink *inlink = ctx->inputs[0]; +AVFilterLink *outlink = ctx->outputs[0]; LoopContext *s = ctx->priv; -int ret = 0; +AVFrame *frame = NULL; +int ret, status; +int64_t pts; -if ((!s->size) || -(s->nb_frames < s->size) || -(s->nb_frames >= s->size && s->loop == 0)) { -ret = ff_request_frame(ctx->inputs[0]); -} else { -ret = push_frame(ctx); +FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink); + +if (!s->eof && (s->nb_frames < s->size || !s->loop)) { +ret = ff_inlink_consume_frame(inlink, &frame); +if (ret < 0) +return ret; +if (ret > 0) +return filter_frame(inlink, frame); } -if (ret == AVERROR_EOF && s->nb_frames > 0 && s->loop != 0) { -ret = push_frame(ctx); +if (!s->eof && ff_inlink_acknowledge_status(inlink, &status, &pts)) { +if (status == AVERROR_EOF) +s->eof = 1; } -return ret; +if (s->eof && (s->loop == 0 || s->nb_frames < s->size)) { +ff_outlink_set_status(outlink, AVERROR_EOF, s->duration); +return 0; +} + +if (!s->eof && (!s->size || +(s->nb_frames < s->size) || +(s->nb_frames >= s->size && s->loop == 0))) { +FF_FILTER_FORWARD_WANTED(outlink, inlink); +} else if (s->loop && s->nb_frames == s->size) { +return push_frame(ctx); +} + +return FFERROR_NOT_READY; } static const AVOption loop_options[] = { @@ -362,18 +383,16 @@ AVFILTER_DEFINE_CLASS(loop); static const AVFilterPad inputs[] = { { -.name = "default", -.type = AVMEDIA_TYPE_VIDEO, -.filter_frame = filter_frame, +.name = "default", +.type = AVMEDIA_TYPE_VIDEO, }, { NULL } }; static const AVFilterPad outputs[] = { { -.name = "default", -.type = AVMEDIA_TYPE_VIDEO, -.request_frame = request_frame, +.name = "default", +.type = AVMEDIA_TYPE_VIDEO, }, { NULL } }; @@ -385,6 +404,7 @@ AVFilter ff_vf_loop = { .priv_class = &loop_class, .init= init, .uninit = uninit, +.activate= activate, .inputs = inputs, .outputs = outputs, }; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avfilter/vf_yadif_cuda: CUDA accelerated yadif deinterlacer
ffmpeg | branch: master | Philip Langdale | Sun Oct 21 13:49:16 2018 -0700| [d5272e94ab22bfc8f01fa3174e2c4664161ddf5a] | committer: Philip Langdale avfilter/vf_yadif_cuda: CUDA accelerated yadif deinterlacer This is a cuda implementation of yadif, which gives us a way to do deinterlacing when using the nvdec hwaccel. In that scenario we don't have access to the nvidia deinterlacer. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d5272e94ab22bfc8f01fa3174e2c4664161ddf5a --- Changelog| 1 + configure| 1 + doc/filters.texi | 58 ++ libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/version.h| 2 +- libavfilter/vf_yadif_cuda.c | 426 +++ libavfilter/vf_yadif_cuda.cu | 296 ++ 8 files changed, 785 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index fe5692f93f..640ffe7c12 100644 --- a/Changelog +++ b/Changelog @@ -45,6 +45,7 @@ version 4.1: - xstack filter - pcm vidc decoder and encoder - (a)graphmonitor filter +- yadif_cuda filter version 4.0: diff --git a/configure b/configure index 2606b885b0..f3fa0cde86 100755 --- a/configure +++ b/configure @@ -3482,6 +3482,7 @@ zscale_filter_deps="libzimg const_nan" scale_vaapi_filter_deps="vaapi" vpp_qsv_filter_deps="libmfx" vpp_qsv_filter_select="qsvvpp" +yadif_cuda_filter_deps="cuda_sdk" # examples avio_dir_cmd_deps="avformat avutil" diff --git a/doc/filters.texi b/doc/filters.texi index e67b8a647d..e1798a53ef 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -18032,6 +18032,64 @@ Only deinterlace frames marked as interlaced. The default value is @code{all}. @end table +@section yadif_cuda + +Deinterlace the input video using the @ref{yadif} algorithm, but implemented +in CUDA so that it can work as part of a GPU accelerated pipeline with nvdec +and/or nvenc. + +It accepts the following parameters: + + +@table @option + +@item mode +The interlacing mode to adopt. It accepts one of the following values: + +@table @option +@item 0, send_frame +Output one frame for each frame. +@item 1, send_field +Output one frame for each field. +@item 2, send_frame_nospatial +Like @code{send_frame}, but it skips the spatial interlacing check. +@item 3, send_field_nospatial +Like @code{send_field}, but it skips the spatial interlacing check. +@end table + +The default value is @code{send_frame}. + +@item parity +The picture field parity assumed for the input interlaced video. It accepts one +of the following values: + +@table @option +@item 0, tff +Assume the top field is first. +@item 1, bff +Assume the bottom field is first. +@item -1, auto +Enable automatic detection of field parity. +@end table + +The default value is @code{auto}. +If the interlacing is unknown or the decoder does not export this information, +top field first will be assumed. + +@item deint +Specify which frames to deinterlace. Accept one of the following +values: + +@table @option +@item 0, all +Deinterlace all frames. +@item 1, interlaced +Only deinterlace frames marked as interlaced. +@end table + +The default value is @code{all}. +@end table + @section zoompan Apply Zoom & Pan effect. diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 4b96d805fd..79a89a1ab1 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -409,6 +409,7 @@ OBJS-$(CONFIG_WEAVE_FILTER) += vf_weave.o OBJS-$(CONFIG_XBR_FILTER)+= vf_xbr.o OBJS-$(CONFIG_XSTACK_FILTER) += vf_stack.o framesync.o OBJS-$(CONFIG_YADIF_FILTER) += vf_yadif.o yadif_common.o +OBJS-$(CONFIG_YADIF_CUDA_FILTER) += vf_yadif_cuda.o vf_yadif_cuda.ptx.o yadif_common.o OBJS-$(CONFIG_ZMQ_FILTER)+= f_zmq.o OBJS-$(CONFIG_ZOOMPAN_FILTER)+= vf_zoompan.o OBJS-$(CONFIG_ZSCALE_FILTER) += vf_zscale.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 6052cb8c3c..484b080dea 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -390,6 +390,7 @@ extern AVFilter ff_vf_weave; extern AVFilter ff_vf_xbr; extern AVFilter ff_vf_xstack; extern AVFilter ff_vf_yadif; +extern AVFilter ff_vf_yadif_cuda; extern AVFilter ff_vf_zmq; extern AVFilter ff_vf_zoompan; extern AVFilter ff_vf_zscale; diff --git a/libavfilter/version.h b/libavfilter/version.h index 2ddbf735ea..83b18008ce 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -30,7 +30,7 @@ #include "libavutil/version.h" #define LIBAVFILTER_VERSION_MAJOR 7 -#define LIBAVFILTER_VERSION_MINOR 42 +#define LIBAVFILTER_VERSION_MINOR 43 #define LIBAVFILTER_VERSION_MICRO 100 #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ diff --git a/libavfilter/vf_yadif_cuda.c b/libavfilter/vf_yadif_cuda.c new file mode 100644 index 00..be22344d9d --- /dev/null +++ b/li
[FFmpeg-cvslog] avcodec/nvdec: Increase frame pool size to help deinterlacing
ffmpeg | branch: master | Philip Langdale | Wed Oct 24 18:38:44 2018 -0700| [1b41115ef70896d9b98ce842dc5f21c465396ce2] | committer: Philip Langdale avcodec/nvdec: Increase frame pool size to help deinterlacing With the cuda yadif filter in use, the number of mapped decoder frames could increase by two, as the filter holds on to additional frames. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1b41115ef70896d9b98ce842dc5f21c465396ce2 --- libavcodec/nvdec.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/nvdec.c b/libavcodec/nvdec.c index 4dd6b1acf3..0426c9b319 100644 --- a/libavcodec/nvdec.c +++ b/libavcodec/nvdec.c @@ -601,7 +601,11 @@ int ff_nvdec_frame_params(AVCodecContext *avctx, frames_ctx->format= AV_PIX_FMT_CUDA; frames_ctx->width = (avctx->coded_width + 1) & ~1; frames_ctx->height= (avctx->coded_height + 1) & ~1; -frames_ctx->initial_pool_size = dpb_size; +/* + * We add two extra frames to the pool to account for deinterlacing filters + * holding onto their frames. + */ +frames_ctx->initial_pool_size = dpb_size + 2; frames_ctx->free = nvdec_free_dummy; frames_ctx->pool = av_buffer_pool_init(0, nvdec_alloc_dummy); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] libavfilter/vf_yadif: Make frame management logic and options shareable
ffmpeg | branch: master | Philip Langdale | Wed Oct 24 11:52:42 2018 -0700| [598f0f39271d6033588b4d8ccc672c5bdc85fec7] | committer: Philip Langdale libavfilter/vf_yadif: Make frame management logic and options shareable I'm writing a cuda implementation of yadif, and while this obviously has a very different implementation of the actual filtering, all the frame management is unchanged. To avoid duplicating that logic, let's make it shareable. From the perspective of the existing filter, the only real change is introducing a function pointer for the filter() function so it can be specified for the specific filter. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=598f0f39271d6033588b4d8ccc672c5bdc85fec7 --- libavfilter/Makefile | 2 +- libavfilter/vf_yadif.c | 196 ++ libavfilter/yadif.h| 9 ++ libavfilter/yadif_common.c | 209 + 4 files changed, 228 insertions(+), 188 deletions(-) diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 51e48efc2e..4b96d805fd 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -408,7 +408,7 @@ OBJS-$(CONFIG_WAVEFORM_FILTER) += vf_waveform.o OBJS-$(CONFIG_WEAVE_FILTER) += vf_weave.o OBJS-$(CONFIG_XBR_FILTER)+= vf_xbr.o OBJS-$(CONFIG_XSTACK_FILTER) += vf_stack.o framesync.o -OBJS-$(CONFIG_YADIF_FILTER) += vf_yadif.o +OBJS-$(CONFIG_YADIF_FILTER) += vf_yadif.o yadif_common.o OBJS-$(CONFIG_ZMQ_FILTER)+= f_zmq.o OBJS-$(CONFIG_ZOOMPAN_FILTER)+= vf_zoompan.o OBJS-$(CONFIG_ZSCALE_FILTER) += vf_zscale.o diff --git a/libavfilter/vf_yadif.c b/libavfilter/vf_yadif.c index f58d8ac2bc..3107924932 100644 --- a/libavfilter/vf_yadif.c +++ b/libavfilter/vf_yadif.c @@ -22,7 +22,6 @@ #include "libavutil/avassert.h" #include "libavutil/cpu.h" #include "libavutil/common.h" -#include "libavutil/opt.h" #include "libavutil/pixdesc.h" #include "libavutil/imgutils.h" #include "avfilter.h" @@ -254,166 +253,6 @@ static void filter(AVFilterContext *ctx, AVFrame *dstpic, emms_c(); } -static int return_frame(AVFilterContext *ctx, int is_second) -{ -YADIFContext *yadif = ctx->priv; -AVFilterLink *link = ctx->outputs[0]; -int tff, ret; - -if (yadif->parity == -1) { -tff = yadif->cur->interlaced_frame ? - yadif->cur->top_field_first : 1; -} else { -tff = yadif->parity ^ 1; -} - -if (is_second) { -yadif->out = ff_get_video_buffer(link, link->w, link->h); -if (!yadif->out) -return AVERROR(ENOMEM); - -av_frame_copy_props(yadif->out, yadif->cur); -yadif->out->interlaced_frame = 0; -} - -filter(ctx, yadif->out, tff ^ !is_second, tff); - -if (is_second) { -int64_t cur_pts = yadif->cur->pts; -int64_t next_pts = yadif->next->pts; - -if (next_pts != AV_NOPTS_VALUE && cur_pts != AV_NOPTS_VALUE) { -yadif->out->pts = cur_pts + next_pts; -} else { -yadif->out->pts = AV_NOPTS_VALUE; -} -} -ret = ff_filter_frame(ctx->outputs[0], yadif->out); - -yadif->frame_pending = (yadif->mode&1) && !is_second; -return ret; -} - -static int checkstride(YADIFContext *yadif, const AVFrame *a, const AVFrame *b) -{ -int i; -for (i = 0; i < yadif->csp->nb_components; i++) -if (a->linesize[i] != b->linesize[i]) -return 1; -return 0; -} - -static void fixstride(AVFilterLink *link, AVFrame *f) -{ -AVFrame *dst = ff_default_get_video_buffer(link, f->width, f->height); -if(!dst) -return; -av_frame_copy_props(dst, f); -av_image_copy(dst->data, dst->linesize, - (const uint8_t **)f->data, f->linesize, - dst->format, dst->width, dst->height); -av_frame_unref(f); -av_frame_move_ref(f, dst); -av_frame_free(&dst); -} - -static int filter_frame(AVFilterLink *link, AVFrame *frame) -{ -AVFilterContext *ctx = link->dst; -YADIFContext *yadif = ctx->priv; - -av_assert0(frame); - -if (yadif->frame_pending) -return_frame(ctx, 1); - -if (yadif->prev) -av_frame_free(&yadif->prev); -yadif->prev = yadif->cur; -yadif->cur = yadif->next; -yadif->next = frame; - -if (!yadif->cur && -!(yadif->cur = av_frame_clone(yadif->next))) -return AVERROR(ENOMEM); - -if (checkstride(yadif, yadif->next, yadif->cur)) { -av_log(ctx, AV_LOG_VERBOSE, "Reallocating frame due to differing stride\n"); -fixstride(link, yadif->next); -} -if (checkstride(yadif, yadif->next, yadif->cur)) -fixstride(link, yadif->cur); -if (yadif->prev && checkstride(yadif, yadif->next, yadif->prev)) -fixstride(link, yadif->prev); -if (checkstride(yadif, yadif->next, yadif->cur) || (yadif
[FFmpeg-cvslog] avfilter/vf_cuda_yadif: Avoid new syntax for vector initialisation
ffmpeg | branch: master | Philip Langdale | Fri Nov 2 14:08:18 2018 -0700| [8e50215b5e02074b0773dfcf55867654ee59c179] | committer: Philip Langdale avfilter/vf_cuda_yadif: Avoid new syntax for vector initialisation This requires a newer version of CUDA than we want to require. > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8e50215b5e02074b0773dfcf55867654ee59c179 --- libavfilter/vf_yadif_cuda.cu | 15 +-- 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/libavfilter/vf_yadif_cuda.cu b/libavfilter/vf_yadif_cuda.cu index 65a902c66b..12e7e4a443 100644 --- a/libavfilter/vf_yadif_cuda.cu +++ b/libavfilter/vf_yadif_cuda.cu @@ -201,9 +201,11 @@ __inline__ __device__ void yadif_double(T *dst, T m = tex2D(cur, xo + 2, yo + 1); T n = tex2D(cur, xo + 3, yo + 1); -T spatial_pred = { -spatial_predictor(a.x, b.x, c.x, d.x, e.x, f.x, g.x, h.x, i.x, j.x, k.x, l.x, m.x, n.x), -spatial_predictor(a.y, b.y, c.y, d.y, e.y, f.y, g.y, h.y, i.y, j.y, k.y, l.y, m.y, n.y) }; +T spatial_pred; +spatial_pred.x = +spatial_predictor(a.x, b.x, c.x, d.x, e.x, f.x, g.x, h.x, i.x, j.x, k.x, l.x, m.x, n.x); +spatial_pred.y = +spatial_predictor(a.y, b.y, c.y, d.y, e.y, f.y, g.y, h.y, i.y, j.y, k.y, l.y, m.y, n.y); // Calculate temporal prediction int is_second_field = !(parity ^ tff); @@ -226,11 +228,12 @@ __inline__ __device__ void yadif_double(T *dst, T K = tex2D(next2, xo, yo - 1); T L = tex2D(next2, xo, yo + 1); -spatial_pred = { +spatial_pred.x = temporal_predictor(A.x, B.x, C.x, D.x, E.x, F.x, G.x, H.x, I.x, J.x, K.x, L.x, - spatial_pred.x, skip_spatial_check), + spatial_pred.x, skip_spatial_check); +spatial_pred.y = temporal_predictor(A.y, B.y, C.y, D.y, E.y, F.y, G.y, H.y, I.y, J.y, K.y, L.y, - spatial_pred.y, skip_spatial_check) }; + spatial_pred.y, skip_spatial_check); dst[yo*dst_pitch+xo] = spatial_pred; } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/prosumer: Remove unneeded ()
ffmpeg | branch: master | Michael Niedermayer | Wed Oct 31 10:18:45 2018 +0100| [506839a3e9cc34c8f719937430008fc12d132fce] | committer: Michael Niedermayer avcodec/prosumer: Remove unneeded () Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=506839a3e9cc34c8f719937430008fc12d132fce --- libavcodec/prosumer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c index 2fd9880ee1..24905ac80f 100644 --- a/libavcodec/prosumer.c +++ b/libavcodec/prosumer.c @@ -59,7 +59,7 @@ static int decompress(GetByteContext *gb, int size, PutByteContext *pb, const ui while (1) { if (bytestream2_get_bytes_left_p(pb) <= 0 || bytestream2_get_eof(pb)) return 0; -if (((b & 0xFF00u) != 0x8000u) || (b & 0xFFu)) { +if ((b & 0xFF00u) != 0x8000u || (b & 0xFFu)) { if ((b & 0xFF00u) != 0x8000u) { bytestream2_put_le16(pb, b); } else if (b & 0xFFu) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/prosumer: Remove always true check in decompress()
ffmpeg | branch: master | Michael Niedermayer | Wed Oct 31 10:19:08 2018 +0100| [1dfa0b6f36d29293f2d0219c4095dc8bb7a4b0dc] | committer: Michael Niedermayer avcodec/prosumer: Remove always true check in decompress() Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1dfa0b6f36d29293f2d0219c4095dc8bb7a4b0dc --- libavcodec/prosumer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c index 24905ac80f..3125636cf1 100644 --- a/libavcodec/prosumer.c +++ b/libavcodec/prosumer.c @@ -62,7 +62,7 @@ static int decompress(GetByteContext *gb, int size, PutByteContext *pb, const ui if ((b & 0xFF00u) != 0x8000u || (b & 0xFFu)) { if ((b & 0xFF00u) != 0x8000u) { bytestream2_put_le16(pb, b); -} else if (b & 0xFFu) { +} else { idx = 0; for (int i = 0; i < (b & 0xFFu); i++) bytestream2_put_le32(pb, 0); ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/prosumer: Check for bytestream eof in decompress()
ffmpeg | branch: master | Michael Niedermayer | Wed Oct 31 03:06:59 2018 +0100| [9acdf17b2c30c44e6e6a3d3b3c22989b7e1117c3] | committer: Michael Niedermayer avcodec/prosumer: Check for bytestream eof in decompress() Fixes: Infinite loop Fixes: 10685/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PROSUMER_fuzzer-5652236881887232 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=9acdf17b2c30c44e6e6a3d3b3c22989b7e1117c3 --- libavcodec/prosumer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c index 6e98677b55..2fd9880ee1 100644 --- a/libavcodec/prosumer.c +++ b/libavcodec/prosumer.c @@ -57,7 +57,7 @@ static int decompress(GetByteContext *gb, int size, PutByteContext *pb, const ui b = lut[2 * idx]; while (1) { -if (bytestream2_get_bytes_left_p(pb) <= 0) +if (bytestream2_get_bytes_left_p(pb) <= 0 || bytestream2_get_eof(pb)) return 0; if (((b & 0xFF00u) != 0x8000u) || (b & 0xFFu)) { if ((b & 0xFF00u) != 0x8000u) { ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/prosumer: Simplify bit juggling of the c variable in decompress()
ffmpeg | branch: master | Michael Niedermayer | Wed Oct 31 10:19:43 2018 +0100| [66425add270cd262a22c0fdaf6aad09a0db6f8c0] | committer: Michael Niedermayer avcodec/prosumer: Simplify bit juggling of the c variable in decompress() Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=66425add270cd262a22c0fdaf6aad09a0db6f8c0 --- libavcodec/prosumer.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavcodec/prosumer.c b/libavcodec/prosumer.c index 3125636cf1..505de71980 100644 --- a/libavcodec/prosumer.c +++ b/libavcodec/prosumer.c @@ -69,15 +69,13 @@ static int decompress(GetByteContext *gb, int size, PutByteContext *pb, const ui } c = b >> 16; if (c & 0xFF00u) { -c = (((c >> 8) & 0xFFu) | (c & 0xFF00)) & 0xF00F; fill = lut[2 * idx + 1]; -if ((c & 0xFF00u) == 0x1000) { +if ((c & 0xF000u) == 0x1000) { bytestream2_put_le16(pb, fill); -c &= 0x00FFu; } else { bytestream2_put_le32(pb, fill); -c &= 0x00FFu; } +c = (c >> 8) & 0x0Fu; } while (c) { a <<= 4; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/msrle: Check that the input is large enough to contain a end of picture code
ffmpeg | branch: release/4.0 | Michael Niedermayer | Sun Oct 21 14:40:14 2018 +0200| [d2ce6472a77abd1653306ec5645a09b4c62add1b] | committer: Michael Niedermayer avcodec/msrle: Check that the input is large enough to contain a end of picture code Fixes: Timeout Fixes: 10625/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MSRLE_fuzzer-5659651283091456 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer (cherry picked from commit 203ccb874699ce66beadd53b4631d217b9cd) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d2ce6472a77abd1653306ec5645a09b4c62add1b --- libavcodec/msrle.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/msrle.c b/libavcodec/msrle.c index adb55b1302..1ab8a41985 100644 --- a/libavcodec/msrle.c +++ b/libavcodec/msrle.c @@ -95,6 +95,9 @@ static int msrle_decode_frame(AVCodecContext *avctx, s->buf = buf; s->size = buf_size; +if (buf_size < 2) //Minimally a end of picture code should be there +return AVERROR_INVALIDDATA; + if ((ret = ff_reget_buffer(avctx, s->frame)) < 0) return ret; ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avutil/integer: Fix integer overflow in av_mul_i()
ffmpeg | branch: release/4.0 | Michael Niedermayer | Wed Oct 24 01:44:12 2018 +0200| [b8aa7b9a6d8618cf8997f20602be11a2c31c83d6] | committer: Michael Niedermayer avutil/integer: Fix integer overflow in av_mul_i() Found-by: fate Signed-off-by: Michael Niedermayer (cherry picked from commit 3cc3cb663bf3061e40356392d2f7638de6a479fe) Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b8aa7b9a6d8618cf8997f20602be11a2c31c83d6 --- libavutil/integer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/integer.c b/libavutil/integer.c index 890e314dce..78e252fbde 100644 --- a/libavutil/integer.c +++ b/libavutil/integer.c @@ -74,7 +74,7 @@ AVInteger av_mul_i(AVInteger a, AVInteger b){ if(a.v[i]) for(j=i; j>16) + out.v[j] + a.v[i]*b.v[j-i]; +carry= (carry>>16) + out.v[j] + a.v[i]*(unsigned)b.v[j-i]; out.v[j]= carry; } } ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Changelog: update
ffmpeg | branch: release/4.0 | Michael Niedermayer | Sat Nov 3 00:51:11 2018 +0100| [fcbd117df3077bad495e99e20f01cf93737bce76] | committer: Michael Niedermayer Changelog: update Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=fcbd117df3077bad495e99e20f01cf93737bce76 --- Changelog | 4 1 file changed, 4 insertions(+) diff --git a/Changelog b/Changelog index 5fbe783021..e3aa4e30a0 100644 --- a/Changelog +++ b/Changelog @@ -2,6 +2,10 @@ Entries are sorted chronologically from oldest to youngest within each release, releases are sorted from youngest to oldest. version 4.0.3: +- avutil/integer: Fix integer overflow in av_mul_i() +- avcodec/msrle: Check that the input is large enough to contain a end of picture code +- avformat/ftp: return AVERROR_EOF for EOF +- avcodec/libx264: remove FF_CODEC_CAP_INIT_THREADSAFE flag - avcodec/jpeg2000dec: Fix off by 1 error in JPEG2000_PGOD_CPRL handling - avcodec/mpeg4videodec: Fix typo in sprite delta check - avcodec/h264_cavlc: Check mb_skip_run ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] Tag n4.0.3 : FFmpeg 4.0.3 release
[ffmpeg] [branch: refs/tags/n4.0.3] Tag:fb28a711f9d5091ce79971f505ad2979f9e0ce02 > http://git.videolan.org/gitweb.cgi/ffmpeg.git?a=tag;h=fb28a711f9d5091ce79971f505ad2979f9e0ce02 Tagger: Michael Niedermayer Date: Sat Nov 3 01:17:00 2018 +0100 FFmpeg 4.0.3 release ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] [ffmpeg-web] branch master updated. 77d7006 web/download: add FFmpeg 4.0.3
The branch, master has been updated via 77d70064b23f7b1f0c609c962885af08b94513d5 (commit) from 908fadd10fad067adc36a77c50e4ea3a202368af (commit) - Log - commit 77d70064b23f7b1f0c609c962885af08b94513d5 Author: Michael Niedermayer AuthorDate: Sat Nov 3 01:51:19 2018 +0100 Commit: Michael Niedermayer CommitDate: Sat Nov 3 01:51:19 2018 +0100 web/download: add FFmpeg 4.0.3 diff --git a/src/download b/src/download index bc9d4c3..1b2508c 100644 --- a/src/download +++ b/src/download @@ -1,10 +1,10 @@ -https://ffmpeg.org/releases/ffmpeg-4.0.2.tar.bz2"; class="btn btn-success"> +https://ffmpeg.org/releases/ffmpeg-4.0.3.tar.bz2"; class="btn btn-success"> Download - ffmpeg-4.0.2.tar.bz2 + ffmpeg-4.0.3.tar.bz2 More releases @@ -269,10 +269,10 @@ and much faster bug fixes such as additional features and security patches. - FFmpeg 4.0.2 "Wu" + FFmpeg 4.0.3 "Wu" -4.0.2 was released on 2018-07-18. It is the latest stable FFmpeg release +4.0.3 was released on 2018-11-03. It is the latest stable FFmpeg release from the 4.0 release branch, which was cut from master on 2018-04-16. It includes the following library versions: @@ -289,19 +289,19 @@ libpostproc55. 1.100 - Download xz tarball - PGP signature + Download xz tarball + PGP signature - Download bzip2 tarball - PGP signature + Download bzip2 tarball + PGP signature - Download gzip tarball - PGP signature + Download gzip tarball + PGP signature - https://git.ffmpeg.org/gitweb/ffmpeg.git/shortlog/n4.0.2";>Changelog + https://git.ffmpeg.org/gitweb/ffmpeg.git/shortlog/n4.0.3";>Changelog https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/refs/heads/release/4.0:/RELEASE_NOTES";>Release Notes --- Summary of changes: src/download | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) hooks/post-receive -- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] [ffmpeg-web] branch master updated. 45cc0ca web/security: Add CVEs for 4.0.3 and 3.4.5
The branch, master has been updated via 45cc0cafbbd06f5b33adf6d8fd907da218bce93d (commit) from 77d70064b23f7b1f0c609c962885af08b94513d5 (commit) - Log - commit 45cc0cafbbd06f5b33adf6d8fd907da218bce93d Author: Michael Niedermayer AuthorDate: Sat Nov 3 02:10:02 2018 +0100 Commit: Michael Niedermayer CommitDate: Sat Nov 3 02:10:02 2018 +0100 web/security: Add CVEs for 4.0.3 and 3.4.5 diff --git a/src/security b/src/security index 2dbed88..5f143a8 100644 --- a/src/security +++ b/src/security @@ -2,6 +2,14 @@ FFmpeg 4.0 +4.0.3 + +Fixes following vulnerabilities: + + +CVE-2018-15822, 386975d7a4aa4f41451f5895a689aedbf83c4ecd / 6b67d7f05918f7a1ee8fc6ff21355d7e8736aa10 + + 4.0.2 Fixes following vulnerabilities: @@ -38,6 +46,14 @@ CVE-2018-7557, 7414d0bda7763f9bd69c26c068e482ab297c1c96 FFmpeg 3.4 +3.4.5 + +Fixes following vulnerabilities: + + +CVE-2018-15822, 44e878d08674a15906badfb921443a44ebf6257d / 6b67d7f05918f7a1ee8fc6ff21355d7e8736aa10 + + 3.4.4 Fixes following vulnerabilities: --- Summary of changes: src/security | 16 1 file changed, 16 insertions(+) hooks/post-receive -- ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog
[FFmpeg-cvslog] avcodec/libaomenc: remove AVOption related to frame partitions
ffmpeg | branch: release/4.0 | James Almer | Wed Sep 12 11:44:56 2018 -0300| [dee8f4b01bfeca7cc4080d20b6be442184bbb233] | committer: James Almer avcodec/libaomenc: remove AVOption related to frame partitions Support for it was apparently never in the codebase, and the enum value was recently removed from the public headers [1] [1] https://aomedia.googlesource.com/aom/+/df4ffb73140fe31bebdabd17c1a7b53721e74838 Signed-off-by: James Almer (cherry picked from commit b69ea742ab23ad74b2ae2772764743642212a139) > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=dee8f4b01bfeca7cc4080d20b6be442184bbb233 --- libavcodec/libaomenc.c | 4 1 file changed, 4 deletions(-) diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c index 41b05dc1c0..3e1bbb5afc 100644 --- a/libavcodec/libaomenc.c +++ b/libavcodec/libaomenc.c @@ -697,10 +697,6 @@ static const AVOption options[] = { "alternate reference frame selection", OFFSET(lag_in_frames), AV_OPT_TYPE_INT, {.i64 = -1}, -1, INT_MAX, VE}, { "error-resilience", "Error resilience configuration", OFFSET(error_resilient), AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX, VE, "er"}, { "default", "Improve resiliency against losses of whole frames", 0, AV_OPT_TYPE_CONST, {.i64 = AOM_ERROR_RESILIENT_DEFAULT}, 0, 0, VE, "er"}, -{ "partitions", "The frame partitions are independently decodable " - "by the bool decoder, meaning that partitions can be decoded even " - "though earlier partitions have been lost. Note that intra predicition" - " is still done over the partition boundary.", 0, AV_OPT_TYPE_CONST, {.i64 = AOM_ERROR_RESILIENT_PARTITIONS}, 0, 0, VE, "er"}, { "crf", "Select the quality for constant quality mode", offsetof(AOMContext, crf), AV_OPT_TYPE_INT, {.i64 = -1}, -1, 63, VE }, { "static-thresh","A change threshold on blocks below which they will be skipped by the encoder", OFFSET(static_thresh), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX, VE }, { "drop-threshold", "Frame drop threshold", offsetof(AOMContext, drop_threshold), AV_OPT_TYPE_INT, {.i64 = 0 }, INT_MIN, INT_MAX, VE }, ___ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog