[FFmpeg-cvslog] avformat/avio: add avio_protocol_get_class
ffmpeg | branch: master | Steven Liu | Thu Jan 30 17:03:48 2020 +0800| [27529eeb27cf0d7f574ae60d5cef22baa0e8a850] | committer: Steven Liu avformat/avio: add avio_protocol_get_class Reviewed-by: Michael Niedermayer Suggested-by: Hendrik Leppkes Suggested-by: Nicolas George Signed-off-by: Steven Liu > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=27529eeb27cf0d7f574ae60d5cef22baa0e8a850 --- doc/APIchanges | 3 +++ libavformat/avio.h | 7 +++ libavformat/protocols.c | 10 ++ libavformat/version.h | 2 +- 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/doc/APIchanges b/doc/APIchanges index 2977b00b60..2494a3901b 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2017-10-21 API changes, most recent first: +2020-01-30 - xx - lavf 58.37.100 - avio.h + Add avio_protocol_get_class(). + 2020-01-15 - xx - lavc 58.66.100 - avcodec.h Add AV_PKT_DATA_PRFT and AVProducerReferenceTime. diff --git a/libavformat/avio.h b/libavformat/avio.h index 9141642e75..d022820a6e 100644 --- a/libavformat/avio.h +++ b/libavformat/avio.h @@ -807,6 +807,13 @@ int avio_close_dyn_buf(AVIOContext *s, uint8_t **pbuffer); */ const char *avio_enum_protocols(void **opaque, int output); +/** + * Get AVClass by names of available protocols. + * + * @return A AVClass of input protocol name or NULL + */ +const AVClass *avio_protocol_get_class(const char *name); + /** * Pause and resume playing - only meaningful if using a network streaming * protocol (e.g. MMS). diff --git a/libavformat/protocols.c b/libavformat/protocols.c index face5b29b5..29fb99e7fa 100644 --- a/libavformat/protocols.c +++ b/libavformat/protocols.c @@ -107,6 +107,16 @@ const char *avio_enum_protocols(void **opaque, int output) return avio_enum_protocols(opaque, output); } +const AVClass *avio_protocol_get_class(const char *name) +{ +int i = 0; +for (i = 0; url_protocols[i]; i++) { +if (!strcmp(url_protocols[i]->name, name)) +return url_protocols[i]->priv_data_class; +} +return NULL; +} + const URLProtocol **ffurl_get_protocols(const char *whitelist, const char *blacklist) { diff --git a/libavformat/version.h b/libavformat/version.h index f72fb9478a..15fdb73e3e 100644 --- a/libavformat/version.h +++ b/libavformat/version.h @@ -32,7 +32,7 @@ // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 58 -#define LIBAVFORMAT_VERSION_MINOR 36 +#define LIBAVFORMAT_VERSION_MINOR 37 #define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ ___ 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] cmdutils: add show_help_protocol for get protocol options
ffmpeg | branch: master | Steven Liu | Wed Nov 27 13:57:02 2019 +0800| [6087692a60699a5eac5b061dd458e5a856e0662f] | committer: Steven Liu cmdutils: add show_help_protocol for get protocol options Reviewed-by: Michael Niedermayer Signed-off-by: Steven Liu > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6087692a60699a5eac5b061dd458e5a856e0662f --- fftools/cmdutils.c | 14 ++ fftools/ffmpeg_opt.c | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 7954f23430..22846317c1 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -1870,6 +1870,18 @@ static void show_help_demuxer(const char *name) show_help_children(fmt->priv_class, AV_OPT_FLAG_DECODING_PARAM); } +static void show_help_protocol(const char *name) +{ +const AVClass *proto_class = avio_protocol_get_class(name); + +if (!proto_class) { +av_log(NULL, AV_LOG_ERROR, "Unknown protocol '%s'.\n", name); +return; +} + +show_help_children(proto_class, AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_ENCODING_PARAM); +} + static void show_help_muxer(const char *name) { const AVCodecDescriptor *desc; @@ -2000,6 +2012,8 @@ int show_help(void *optctx, const char *opt, const char *arg) show_help_demuxer(par); } else if (!strcmp(topic, "muxer")) { show_help_muxer(par); +} else if (!strcmp(topic, "protocol")) { +show_help_protocol(par); #if CONFIG_AVFILTER } else if (!strcmp(topic, "filter")) { show_help_filter(par); diff --git a/fftools/ffmpeg_opt.c b/fftools/ffmpeg_opt.c index 1510e026ea..12d44886ee 100644 --- a/fftools/ffmpeg_opt.c +++ b/fftools/ffmpeg_opt.c @@ -3194,7 +3194,7 @@ void show_help_default(const char *opt, const char *arg) "-h -- print basic options\n" "-h long -- print more options\n" "-h full -- print all options (including all format and codec specific options, very long)\n" - "-h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf\n" + "-h type=name -- print all options for the named decoder/encoder/demuxer/muxer/filter/bsf/protocol\n" "See man %s for detailed description of the options.\n" "\n", program_name); ___ 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: add xfade filter
ffmpeg | branch: master | Paul B Mahol | Wed Oct 23 20:43:26 2019 +0200| [863accbefa2b433adbdfe189438adb11abc276c6] | committer: Paul B Mahol avfilter: add xfade filter > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=863accbefa2b433adbdfe189438adb11abc276c6 --- Changelog| 1 + doc/filters.texi | 80 libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/version.h| 2 +- libavfilter/vf_xfade.c | 935 +++ 6 files changed, 1019 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index 65ef01c77d..a4d20a9431 100644 --- a/Changelog +++ b/Changelog @@ -32,6 +32,7 @@ version : - freezeframes filter - Argonaut Games ADPCM decoder - Argonaut Games ASF demuxer +- xfade video filter version 4.2: diff --git a/doc/filters.texi b/doc/filters.texi index 3f40af8439..412894f1be 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -20033,6 +20033,86 @@ If number of inputs is even number, than result will be mean value between two m Set which planes to filter. Default value is @code{15}, by which all planes are processed. @end table +@section xfade + +Apply cross fade from one input video stream to another input video stream. +The cross fade is applied for specified duration. + +The filter accepts the following options: + +@table @option +@item transition +Set one of available transition effects: + +@table @samp +@item custom +@item fade +@item wipeleft +@item wiperight +@item wipeup +@item wipedown +@item slideleft +@item slideright +@item slideup +@item slidedown +@item circlecrop +@item rectcrop +@item distance +@item fadeblack +@item fadewhite +@end table +Default transition effect is fade. + +@item duration +Set cross fade duration in seconds. +Default duration is 1 second. + +@item offset +Set cross fade start relative to first input stream. +Default offset it 0. + +@item expr +Set expression for custom transition effect. + +The expressions can use the following variables and functions: + +@table @option +@item X +@item Y +The coordinates of the current sample. + +@item W +@item H +The width and height of the image. + +@item P +Progress of transition effect. + +@item PLANE +Currently processed plane. + +@item A +Return value of first input at current location and plane. + +@item B +Return value of second input at current location and plane. + +@item a0(x, y) +@item a1(x, y) +@item a2(x, y) +@item a3(x, y) +Return the value of the pixel at location (@var{x},@var{y}) of the +first/second/third/fourth component of first input. + +@item b0(x, y) +@item b1(x, y) +@item b2(x, y) +@item b3(x, y) +Return the value of the pixel at location (@var{x},@var{y}) of the +first/second/third/fourth component of second input. +@end table +@end table + @section xstack Stack video inputs into custom layout. diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 58b3077dec..72804323d5 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -441,6 +441,7 @@ OBJS-$(CONFIG_W3FDIF_FILTER) += vf_w3fdif.o OBJS-$(CONFIG_WAVEFORM_FILTER) += vf_waveform.o OBJS-$(CONFIG_WEAVE_FILTER) += vf_weave.o OBJS-$(CONFIG_XBR_FILTER)+= vf_xbr.o +OBJS-$(CONFIG_XFADE_FILTER) += vf_xfade.o OBJS-$(CONFIG_XMEDIAN_FILTER)+= vf_xmedian.o framesync.o OBJS-$(CONFIG_XSTACK_FILTER) += vf_stack.o framesync.o OBJS-$(CONFIG_YADIF_FILTER) += vf_yadif.o yadif_common.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index 6270c18ae2..f7ab2def92 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -420,6 +420,7 @@ extern AVFilter ff_vf_w3fdif; extern AVFilter ff_vf_waveform; extern AVFilter ff_vf_weave; extern AVFilter ff_vf_xbr; +extern AVFilter ff_vf_xfade; extern AVFilter ff_vf_xmedian; extern AVFilter ff_vf_xstack; extern AVFilter ff_vf_yadif; diff --git a/libavfilter/version.h b/libavfilter/version.h index 03b6ce650a..8882d6aad2 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 71 +#define LIBAVFILTER_VERSION_MINOR 72 #define LIBAVFILTER_VERSION_MICRO 100 diff --git a/libavfilter/vf_xfade.c b/libavfilter/vf_xfade.c new file mode 100644 index 00..d48ee58342 --- /dev/null +++ b/libavfilter/vf_xfade.c @@ -0,0 +1,935 @@ +/* + * Copyright (c) 2020 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 wa
[FFmpeg-cvslog] cmdutils: fix crash if no name for "ffmpeg -h protocol"
ffmpeg | branch: master | Jun Zhao | Thu Jan 30 22:03:17 2020 +0800| [b99ed6e4287ccc4dcaf3c5133e9ec62d4ddb5bc6] | committer: James Almer cmdutils: fix crash if no name for "ffmpeg -h protocol" fix crash when used the command like: - ffmpeg -h protocol - ffmpeg -h protocol= Signed-off-by: Jun Zhao Reviewed-by: Paul B Mahol Signed-off-by: James Almer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b99ed6e4287ccc4dcaf3c5133e9ec62d4ddb5bc6 --- fftools/cmdutils.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 22846317c1..f0f2b4fde4 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -1872,8 +1872,14 @@ static void show_help_demuxer(const char *name) static void show_help_protocol(const char *name) { -const AVClass *proto_class = avio_protocol_get_class(name); +const AVClass *proto_class; +if (!name) { +av_log(NULL, AV_LOG_ERROR, "No protocol name specified.\n"); +return; +} + +proto_class = avio_protocol_get_class(name); if (!proto_class) { av_log(NULL, AV_LOG_ERROR, "Unknown protocol '%s'.\n", name); return; ___ 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_xfade: add radial transition
ffmpeg | branch: master | Paul B Mahol | Thu Jan 30 17:20:31 2020 +0100| [0a275fec623f85d5f08bd65ed5ce89aa8be4f38d] | committer: Paul B Mahol avfilter/vf_xfade: add radial transition > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0a275fec623f85d5f08bd65ed5ce89aa8be4f38d --- doc/filters.texi | 1 + libavfilter/vf_xfade.c | 31 +++ 2 files changed, 32 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 412894f1be..95f31b9592 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -20060,6 +20060,7 @@ Set one of available transition effects: @item distance @item fadeblack @item fadewhite +@item radial @end table Default transition effect is fade. diff --git a/libavfilter/vf_xfade.c b/libavfilter/vf_xfade.c index d48ee58342..7b8420c3f5 100644 --- a/libavfilter/vf_xfade.c +++ b/libavfilter/vf_xfade.c @@ -45,6 +45,7 @@ enum XFadeTransitions { DISTANCE, FADEBLACK, FADEWHITE, +RADIAL, NB_TRANSITIONS, }; @@ -141,6 +142,7 @@ static const AVOption xfade_options[] = { { "distance", "distance transition",0, AV_OPT_TYPE_CONST, {.i64=DISTANCE}, 0, 0, FLAGS, "transition" }, { "fadeblack", "fadeblack transition", 0, AV_OPT_TYPE_CONST, {.i64=FADEBLACK}, 0, 0, FLAGS, "transition" }, { "fadewhite", "fadewhite transition", 0, AV_OPT_TYPE_CONST, {.i64=FADEWHITE}, 0, 0, FLAGS, "transition" }, +{ "radial", "radial transition", 0, AV_OPT_TYPE_CONST, {.i64=RADIAL}, 0, 0, FLAGS, "transition" }, { "duration", "set cross fade duration", OFFSET(duration), AV_OPT_TYPE_DURATION, {.i64=100}, 0, 6000, FLAGS }, { "offset", "set cross fade start relative to first input stream", OFFSET(offset), AV_OPT_TYPE_DURATION, {.i64=0}, INT64_MIN, INT64_MAX, FLAGS }, { "expr", "set expression for custom transition", OFFSET(custom_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, FLAGS }, @@ -649,6 +651,34 @@ static void fadewhite##name##_transition(AVFilterContext *ctx, FADEWHITE_TRANSITION(8, uint8_t, 1) FADEWHITE_TRANSITION(16, uint16_t, 2) +#define RADIAL_TRANSITION(name, type, div) \ +static void radial##name##_transition(AVFilterContext *ctx, \ +const AVFrame *a, const AVFrame *b, AVFrame *out, \ +float progress, \ +int slice_start, int slice_end, int jobnr) \ +{ \ +XFadeContext *s = ctx->priv; \ +const int width = out->width; \ +const int height = out->height; \ + \ +for (int y = slice_start; y < slice_end; y++) { \ +for (int x = 0; x < width; x++) { \ +const float smooth = atan2f(x - width / 2, y - height / 2) - \ + (progress - 0.5f) * (M_PI * 2.5f); \ +for (int p = 0; p < s->nb_planes; p++) { \ +const type *xf0 = (const type *)(a->data[p] + y * a->linesize[p]); \ +const type *xf1 = (const type *)(b->data[p] + y * b->linesize[p]); \ +type *dst = (type *)(out->data[p] + y * out->linesize[p]); \ + \ +dst[x] = mix(xf1[x], xf0[x], smoothstep(0.f, 1.f, smooth)); \ +} \ +} \ +} \ +} + +RADIAL_TRANSITION(8, uint8_t, 1) +RADIAL_TRANSITION(16, uint16_t, 2) + static inline double getpix(void *priv, double x, double y, int plane, int nb) { XFadeContext *s = priv; @@ -754,6 +784,7 @@ static int config_output(AVFilterLink *outlink) case DISTANCE: s->transitionf = s->depth <= 8 ? distance8_transition : distance16_transition; break; case FADEBLACK: s->transitionf = s->depth <= 8 ? fadeblack8_transition : fadeblack16_transition; break; case FADEWHITE: s->transitionf = s->depth <= 8 ? fadewhite8_transition : fadewhite16_transition; break; +case RADIAL: s->transitionf = s->depth <= 8 ? radial8_transition : radial16_transition; break; } if (s->transition == CUSTOM) { ___ ffmpeg-cvslog mailing li
[FFmpeg-cvslog] avformat/aviobuf: Remove AVIOInternal and one level of indirection
ffmpeg | branch: master | Andreas Rheinhardt | Mon Jan 6 15:51:48 2020 +0100| [6e8e8431e15a58aa44cfdd8c11f9ea096837c0fa] | committer: Michael Niedermayer avformat/aviobuf: Remove AVIOInternal and one level of indirection In the Libav commit cae448cf, the opaque of every AVIOContext opened by ffio_fdopen() (which is used internally by avio_open() and avio_open2()) changed: It was a simple pointer to an URLContext before, but now it was a structure (namely AVIOInternal) containing a pointer to an URLContext as its only member. The next commits (namely 8c0ceafb and ec4c4839) added members to AVIOInternal to allow white-/blacklisting of protocols. But these two commits were never merged into FFmpeg (they were only merged as no-ops in 510046c2 and 063b26d3), because FFmpeg chose a different way to implement this (in 93629735); and so our AVIOInternal still has exactly one member. This of course means that it is unnecessary to use AVIOInternal as opaque as it is just adding a level of indirection (not only pointer dereference, but also wrapper functions). Therefore this commit removes AVIOInternal entirely and essentially reverts cae448cf. Signed-off-by: Andreas Rheinhardt Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6e8e8431e15a58aa44cfdd8c11f9ea096837c0fa --- libavformat/aviobuf.c | 86 +-- 1 file changed, 15 insertions(+), 71 deletions(-) diff --git a/libavformat/aviobuf.c b/libavformat/aviobuf.c index 384c3a4cb6..cc22beff28 100644 --- a/libavformat/aviobuf.c +++ b/libavformat/aviobuf.c @@ -42,15 +42,10 @@ */ #define SHORT_SEEK_THRESHOLD 4096 -typedef struct AVIOInternal { -URLContext *h; -} AVIOInternal; - static void *ff_avio_child_next(void *obj, void *prev) { AVIOContext *s = obj; -AVIOInternal *internal = s->opaque; -return prev ? NULL : internal->h; +return prev ? NULL : s->opaque; } static const AVClass *ff_avio_child_class_next(const AVClass *prev) @@ -940,49 +935,8 @@ uint64_t ffio_read_varlen(AVIOContext *bc){ return val; } -static int io_read_packet(void *opaque, uint8_t *buf, int buf_size) -{ -AVIOInternal *internal = opaque; -return ffurl_read(internal->h, buf, buf_size); -} - -static int io_write_packet(void *opaque, uint8_t *buf, int buf_size) -{ -AVIOInternal *internal = opaque; -return ffurl_write(internal->h, buf, buf_size); -} - -static int64_t io_seek(void *opaque, int64_t offset, int whence) -{ -AVIOInternal *internal = opaque; -return ffurl_seek(internal->h, offset, whence); -} - -static int io_short_seek(void *opaque) -{ -AVIOInternal *internal = opaque; -return ffurl_get_short_seek(internal->h); -} - -static int io_read_pause(void *opaque, int pause) -{ -AVIOInternal *internal = opaque; -if (!internal->h->prot->url_read_pause) -return AVERROR(ENOSYS); -return internal->h->prot->url_read_pause(internal->h, pause); -} - -static int64_t io_read_seek(void *opaque, int stream_index, int64_t timestamp, int flags) -{ -AVIOInternal *internal = opaque; -if (!internal->h->prot->url_read_seek) -return AVERROR(ENOSYS); -return internal->h->prot->url_read_seek(internal->h, stream_index, timestamp, flags); -} - int ffio_fdopen(AVIOContext **s, URLContext *h) { -AVIOInternal *internal = NULL; uint8_t *buffer = NULL; int buffer_size, max_packet_size; @@ -996,14 +950,10 @@ int ffio_fdopen(AVIOContext **s, URLContext *h) if (!buffer) return AVERROR(ENOMEM); -internal = av_mallocz(sizeof(*internal)); -if (!internal) -goto fail; - -internal->h = h; - -*s = avio_alloc_context(buffer, buffer_size, h->flags & AVIO_FLAG_WRITE, -internal, io_read_packet, io_write_packet, io_seek); +*s = avio_alloc_context(buffer, buffer_size, h->flags & AVIO_FLAG_WRITE, h, +(int (*)(void *, uint8_t *, int)) ffurl_read, +(int (*)(void *, uint8_t *, int)) ffurl_write, +(int64_t (*)(void *, int64_t, int))ffurl_seek); if (!*s) goto fail; @@ -1023,30 +973,28 @@ int ffio_fdopen(AVIOContext **s, URLContext *h) (*s)->max_packet_size = max_packet_size; (*s)->min_packet_size = h->min_packet_size; if(h->prot) { -(*s)->read_pause = io_read_pause; -(*s)->read_seek = io_read_seek; +(*s)->read_pause = (int (*)(void *, int))h->prot->url_read_pause; +(*s)->read_seek = +(int64_t (*)(void *, int, int64_t, int))h->prot->url_read_seek; if (h->prot->url_read_seek) (*s)->seekable |= AVIO_SEEKABLE_TIME; } -(*s)->short_seek_get = io_short_seek; +(*s)->short_seek_get = (int (*)(void *))ffurl_get_short_seek; (*s)->av_class = &ff_avio_class; return 0; fail: -av_freep(&internal); av_freep(&buffer);
[FFmpeg-cvslog] avcodec/screenpresso: Optimize sum_delta_flipped()
ffmpeg | branch: master | Michael Niedermayer | Wed Jan 29 19:20:29 2020 +0100| [20916f9bc4534678a87684994377c181d8aa16bc] | committer: Michael Niedermayer avcodec/screenpresso: Optimize sum_delta_flipped() 553 -> 332 sec Testcase: 20280/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SCREENPRESSO_fuzzer-6238663432470528 Reviewed-by: Paul B Mahol Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=20916f9bc4534678a87684994377c181d8aa16bc --- libavcodec/screenpresso.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/screenpresso.c b/libavcodec/screenpresso.c index 5fac100897..d73c24df83 100644 --- a/libavcodec/screenpresso.c +++ b/libavcodec/screenpresso.c @@ -94,8 +94,9 @@ static void sum_delta_flipped(uint8_t *dst, int dst_linesize, { int i; for (; height > 0; height--) { +const uint8_t *src1 = &src[(height - 1) * src_linesize]; for (i = 0; i < bytewidth; i++) -dst[i] += src[(height - 1) * src_linesize + i]; +dst[i] += src1[i]; dst += dst_linesize; } } ___ 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/x86/diracdsp: Fix incorrect src addressing in dequant_subband_32()
ffmpeg | branch: master | Michael Niedermayer | Wed Jan 29 22:11:45 2020 +0100| [0694b60b7b4892eac1d6e2aca64de9e0cb096486] | committer: Michael Niedermayer avcodec/x86/diracdsp: Fix incorrect src addressing in dequant_subband_32() Fixes: Segfault (not reproducable with asm, which made this hard to debug) Fixes: decoding errors Fixes: 19854/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5729372837511168 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=0694b60b7b4892eac1d6e2aca64de9e0cb096486 --- libavcodec/x86/diracdsp.asm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavcodec/x86/diracdsp.asm b/libavcodec/x86/diracdsp.asm index cc8a26fca5..a18bda113e 100644 --- a/libavcodec/x86/diracdsp.asm +++ b/libavcodec/x86/diracdsp.asm @@ -294,8 +294,9 @@ cglobal dequant_subband_32, 7, 7, 4, src, dst, stride, qf, qs, tot_v, tot_h addsrcq, mmsize adddstq, mmsize -subtot_hd, 4 +subtot_hq, 4 jg .loop_h +leasrcq, [srcq + 4*tot_hq] addr3, strideq dectot_vd ___ 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] remove tests/ref/lavf/fits
ffmpeg | branch: master | Michael Niedermayer | Mon Jan 6 13:38:33 2020 +0100| [07754f3f8fdac85f4a73f463b3b68f0214dcabda] | committer: Michael Niedermayer remove tests/ref/lavf/fits This appears to be forgotten in ac4b5d86222006fa71ffe5922e1a34f1422507d8 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=07754f3f8fdac85f4a73f463b3b68f0214dcabda --- tests/ref/lavf/fits | 18 -- 1 file changed, 18 deletions(-) diff --git a/tests/ref/lavf/fits b/tests/ref/lavf/fits deleted file mode 100644 index 489542b32b..00 --- a/tests/ref/lavf/fits +++ /dev/null @@ -1,18 +0,0 @@ -ed9fd697d0d782df6201f6a2db184552 *./tests/data/lavf/graylavf.fits -5328000 ./tests/data/lavf/graylavf.fits -./tests/data/lavf/graylavf.fits CRC=0xbacf446c -48e6caf6a59e32f9a8a39979c9183a7f *./tests/data/lavf/gray16belavf.fits -10368000 ./tests/data/lavf/gray16belavf.fits -./tests/data/lavf/gray16belavf.fits CRC=0xae2b58d4 -be2f7112fd193c9a909304c81e662769 *./tests/data/lavf/gbrplavf.fits -15408000 ./tests/data/lavf/gbrplavf.fits -./tests/data/lavf/gbrplavf.fits CRC=0x04ed3828 -c89a72185cfad363aa9cc42e84fed301 *./tests/data/lavf/gbraplavf.fits -20448000 ./tests/data/lavf/gbraplavf.fits -./tests/data/lavf/gbraplavf.fits CRC=0x032a6409 -d539b9e02f5ab8fb85717c8adb60b6cc *./tests/data/lavf/gbrp16belavf.fits -30672000 ./tests/data/lavf/gbrp16belavf.fits -./tests/data/lavf/gbrp16belavf.fits CRC=0x81897ff7 -3dc3622fb09a338b406d8a12a30f2545 *./tests/data/lavf/gbrap16belavf.fits -40752000 ./tests/data/lavf/gbrap16belavf.fits -./tests/data/lavf/gbrap16belavf.fits CRC=0x247dd7b9 ___ 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/iff: Over-allocate ham_palbuf for HAM6 IFF-PBM
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 3 23:24:15 2020 +0100| [8652f4e7a15e56fadf9697188c1ed42c9981db82] | committer: Michael Niedermayer avcodec/iff: Over-allocate ham_palbuf for HAM6 IFF-PBM IFF-PBM-HAM6 can read out of array without this overallocation Fixes: Out of array read Fixes: 19752/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_IFF_ILBM_fuzzer-5675331403120640 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8652f4e7a15e56fadf9697188c1ed42c9981db82 --- libavcodec/iff.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/iff.c b/libavcodec/iff.c index d826e78089..acd6519b06 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -332,13 +332,17 @@ static int extract_header(AVCodecContext *const avctx, int i, count = FFMIN(palette_size / 3, 1 << s->ham); int ham_count; const uint8_t *const palette = avctx->extradata + AV_RB16(avctx->extradata); +int extra_space = 1; + +if (avctx->codec_tag == MKTAG('P', 'B', 'M', ' ') && s->ham == 4) +extra_space = 4; s->ham_buf = av_malloc((s->planesize * 8) + AV_INPUT_BUFFER_PADDING_SIZE); if (!s->ham_buf) return AVERROR(ENOMEM); ham_count = 8 * (1 << s->ham); -s->ham_palbuf = av_malloc((ham_count << !!(s->masking == MASK_HAS_MASK)) * sizeof (uint32_t) + AV_INPUT_BUFFER_PADDING_SIZE); +s->ham_palbuf = av_malloc(extra_space * (ham_count << !!(s->masking == MASK_HAS_MASK)) * sizeof (uint32_t) + AV_INPUT_BUFFER_PADDING_SIZE); if (!s->ham_palbuf) { av_freep(&s->ham_buf); return AVERROR(ENOMEM); ___ 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/rawdec: Use linesize in b64a
ffmpeg | branch: master | Michael Niedermayer | Wed Jan 1 22:32:04 2020 +0100| [2b5b9d5dac9a3525d7330662724c0e9045078bfb] | committer: Michael Niedermayer avcodec/rawdec: Use linesize in b64a Fixes: out of array access Fixes: 19750/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RAWVIDEO_fuzzer-5074834119983104 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=2b5b9d5dac9a3525d7330662724c0e9045078bfb --- libavcodec/rawdec.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c index 0b2d8708e6..a110a690f5 100644 --- a/libavcodec/rawdec.c +++ b/libavcodec/rawdec.c @@ -467,10 +467,13 @@ static int raw_decode(AVCodecContext *avctx, void *data, int *got_frame, avctx->pix_fmt == AV_PIX_FMT_RGBA64BE) { uint8_t *dst = frame->data[0]; uint64_t v; -int x; -for (x = 0; x >> 3 < avctx->width * avctx->height; x += 8) { -v = AV_RB64(&dst[x]); -AV_WB64(&dst[x], v << 16 | v >> 48); +int x, y; +for (y = 0; y < avctx->height; y++) { +for (x = 0; x >> 3 < avctx->width; x += 8) { +v = AV_RB64(&dst[x]); +AV_WB64(&dst[x], v << 16 | v >> 48); +} +dst += frame->linesize[0]; } } ___ 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/apedec: Fix undefined integer overflow in decode_array_0000()
ffmpeg | branch: master | Michael Niedermayer | Sat Dec 7 20:55:16 2019 +0100| [a3655bb02c21e70573335e9396632f64b2589536] | committer: Michael Niedermayer avcodec/apedec: Fix undefined integer overflow in decode_array_() Fixes: signed integer overflow: -2143289344 - 6246400 cannot be represented in type 'int' Fixes: 19239/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5173755680915456 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a3655bb02c21e70573335e9396632f64b2589536 --- libavcodec/apedec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/apedec.c b/libavcodec/apedec.c index 1b23e54153..3e39a8e62e 100644 --- a/libavcodec/apedec.c +++ b/libavcodec/apedec.c @@ -615,7 +615,7 @@ static void decode_array_(APEContext *ctx, GetBitContext *gb, return ; } out[i] = get_rice_ook(&ctx->gb, rice->k); -rice->ksum += out[i] - out[i - 64]; +rice->ksum += out[i] - (unsigned)out[i - 64]; while (rice->ksum < ksummin) { rice->k--; ksummin = rice->k ? ksummin >> 1 : 0; ___ 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/wmalosslessdec: Fix multiple integer overflows
ffmpeg | branch: master | Michael Niedermayer | Thu Jan 9 02:06:36 2020 +0100| [422202516cfb6239abb4e20db9f628f3899a76e2] | committer: Michael Niedermayer avcodec/wmalosslessdec: Fix multiple integer overflows Fixes: left shift of 3329 by 20 places cannot be represented in type 'int' Fixes: signed integer overflow: -199378355 + -1948950833 cannot be represented in type 'int' Fixes: 19837/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5752565837070336 Fixes: 19839/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_WMALOSSLESS_fuzzer-5767483265122304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=422202516cfb6239abb4e20db9f628f3899a76e2 --- libavcodec/wmalosslessdec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libavcodec/wmalosslessdec.c b/libavcodec/wmalosslessdec.c index b15f812d81..738ddc9195 100644 --- a/libavcodec/wmalosslessdec.c +++ b/libavcodec/wmalosslessdec.c @@ -532,7 +532,8 @@ static int decode_channel_residues(WmallDecodeCtx *s, int ch, int tile_size) i++; } for (; i < tile_size; i++) { -int quo = 0, rem, rem_bits, residue; +int rem, rem_bits; +unsigned quo = 0, residue; while(get_bits1(&s->gb)) { quo++; if (get_bits_left(&s->gb) <= 0) @@ -771,7 +772,7 @@ static void revert_cdlms ## bits (WmallDecodeCtx *s, int ch, \ s->cdlms[ch][ilms].recent, \ FFALIGN(s->cdlms[ch][ilms].order, ROUND), \ WMASIGN(residue)); \ -input = residue + (pred >> s->cdlms[ch][ilms].scaling); \ +input = residue + (unsigned)(pred >> s->cdlms[ch][ilms].scaling); \ lms_update ## bits(s, ch, ilms, input); \ s->channel_residues[ch][icoef] = input; \ } \ ___ 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] avformat/mov: Check STCO location
ffmpeg | branch: master | Michael Niedermayer | Sat Jan 11 12:09:08 2020 +0100| [1cd41840208bce7e690a4ccc48077567418a0aa8] | committer: Michael Niedermayer avformat/mov: Check STCO location Fixes: bypassing of checks and assertion failure Fixes: asan_1003879.mp4 Found-by: Clusterfuzz + asan Reported-by: Thomas Guilbert Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1cd41840208bce7e690a4ccc48077567418a0aa8 --- libavformat/mov.c | 4 1 file changed, 4 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 3a183ed015..bbaf266a4b 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1978,6 +1978,10 @@ static int mov_read_stco(MOVContext *c, AVIOContext *pb, MOVAtom atom) MOVStreamContext *sc; unsigned int i, entries; +if (c->trak_index < 0) { +av_log(c->fc, AV_LOG_WARNING, "STCO outside TRAK\n"); +return 0; +} if (c->fc->nb_streams < 1) return 0; st = c->fc->streams[c->fc->nb_streams-1]; ___ 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] doc/filters: Document geq *sum functions
ffmpeg | branch: master | Michael Niedermayer | Sat Dec 28 11:26:10 2019 +0100| [d4b05f31d895a4ed13e969348265e5031de1dfdb] | committer: Michael Niedermayer doc/filters: Document geq *sum functions Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d4b05f31d895a4ed13e969348265e5031de1dfdb --- doc/filters.texi | 4 1 file changed, 4 insertions(+) diff --git a/doc/filters.texi b/doc/filters.texi index 95f31b9592..13403fd96c 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -11452,6 +11452,10 @@ red/green/blue component. Return 0 if there is no such component. Return the value of the pixel at location (@var{x},@var{y}) of the alpha plane. Return 0 if there is no such plane. +@item psum(x,y), lumsum(x, y), cbsum(x,y), crsum(x,y), rsum(x,y), gsum(x,y), bsum(x,y), alphasum(x,y) +Sum of sample values in the rectangle from (0,0) to (x,y), this allows obtaining +sums of samples within a rectangle. See the functions without the sum postfix. + @item interpolation Set one of interpolation methods: @table @option ___ 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/smacker: Check space before decoding type
ffmpeg | branch: master | Michael Niedermayer | Wed Jan 1 20:43:05 2020 +0100| [6f5c18da5977a3214e1ea30e6b0c0d9d858ce83d] | committer: Michael Niedermayer avcodec/smacker: Check space before decoding type Fixes: Timeout (232sec -> 280ms) Fixes: 19682/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SMACKER_fuzzer-5654129649385472 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6f5c18da5977a3214e1ea30e6b0c0d9d858ce83d --- libavcodec/smacker.c | 4 1 file changed, 4 insertions(+) diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 4c20831155..b4c463b4b9 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -398,6 +398,8 @@ static av_always_inline int smk_get_code(GetBitContext *gb, int *recode, int *la int v; while(*table & SMK_NODE) { +if (get_bits_left(gb) < 1) +return AVERROR_INVALIDDATA; if(get_bits1(gb)) table += (*table) & (~SMK_NODE); table++; @@ -462,6 +464,8 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, uint16_t pix; type = smk_get_code(&gb, smk->type_tbl, smk->type_last); +if (type < 0) +return type; run = block_runs[(type >> 2) & 0x3F]; switch(type & 3){ case SMK_BLK_MONO: ___ 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] tools/target_dec_fuzzer: Add threshold for ALS
ffmpeg | branch: master | Michael Niedermayer | Sat Jan 25 19:53:49 2020 +0100| [48b694782186f011b6f5f1e3568552dcfd102bb2] | committer: Michael Niedermayer tools/target_dec_fuzzer: Add threshold for ALS Fixes: Timeout (253sec -> 16sec) Fixes: 18668/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ALS_fuzzer-6227155369590784 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=48b694782186f011b6f5f1e3568552dcfd102bb2 --- 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 edfc33e18c..752df43a64 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -150,6 +150,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { case AV_CODEC_ID_INDEO4: maxpixels /= 128; break; case AV_CODEC_ID_LSCR:maxpixels /= 16;break; case AV_CODEC_ID_MOTIONPIXELS:maxpixels /= 256; break; +case AV_CODEC_ID_MP4ALS: maxsamples /= 65536; break; case AV_CODEC_ID_MSRLE: maxpixels /= 16;break; case AV_CODEC_ID_MSS2:maxpixels /= 16384; break; case AV_CODEC_ID_MSZH:maxpixels /= 128; break; ___ 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] tools/target_dec_fuzzer: limit per frame samples for APE
ffmpeg | branch: master | Michael Niedermayer | Fri Jan 10 22:39:47 2020 +0100| [32522b530779e155001b1a45e764d8185aa189e1] | committer: Michael Niedermayer tools/target_dec_fuzzer: limit per frame samples for APE APE in its highest compression mode is really slow so even one frame of millions of samples takes a long time Fixes: Timeout (too long -> 3sec) Fixes: 19937/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_APE_fuzzer-5751668818051072 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=32522b530779e155001b1a45e764d8185aa189e1 --- tools/target_dec_fuzzer.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/target_dec_fuzzer.c b/tools/target_dec_fuzzer.c index 752df43a64..2487b6ca94 100644 --- a/tools/target_dec_fuzzer.c +++ b/tools/target_dec_fuzzer.c @@ -93,7 +93,7 @@ const uint32_t maxiteration = 8096; const uint64_t maxpixels_per_frame = 4096 * 4096; uint64_t maxpixels; -const uint64_t maxsamples_per_frame = 256*1024*32; +uint64_t maxsamples_per_frame = 256*1024*32; uint64_t maxsamples; static const uint64_t FUZZ_TAG = 0x4741542D5A5A5546ULL; @@ -133,6 +133,9 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { case AVMEDIA_TYPE_VIDEO : decode_handler = avcodec_decode_video2; break; case AVMEDIA_TYPE_SUBTITLE: decode_handler = subtitle_handler ; break; } +switch (c->id) { +case AV_CODEC_ID_APE: maxsamples_per_frame /= 256; break; +} maxpixels = maxpixels_per_frame * maxiteration; maxsamples = maxsamples_per_frame * maxiteration; switch (c->id) { ___ 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/ralf: Fix overflows of biased values
ffmpeg | branch: master | Michael Niedermayer | Fri Dec 27 00:11:59 2019 +0100| [a71794e8c262a374dc6def8448319241cc504b3c] | committer: Michael Niedermayer avcodec/ralf: Fix overflows of biased values Fixes: signed integer overflow: 2003010644 * 2 cannot be represented in type 'int' Fixes: 19593/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_RALF_fuzzer-5660628006207488 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a71794e8c262a374dc6def8448319241cc504b3c --- libavcodec/ralf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/ralf.c b/libavcodec/ralf.c index d8f1803086..5d88b4c943 100644 --- a/libavcodec/ralf.c +++ b/libavcodec/ralf.c @@ -60,7 +60,7 @@ typedef struct RALFContext { int filter_bits; ///< filter precision for the current channel data int32_t filter[64]; -int bias[2]; ///< a constant value added to channel data after filtering +unsigned bias[2];///< a constant value added to channel data after filtering int num_blocks; ///< number of blocks inside the frame int sample_offset; ___ 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] tests/fate/lavf-video.mak: fix fate-lavf-gif dependencies
ffmpeg | branch: master | Michael Niedermayer | Mon Jan 6 13:43:10 2020 +0100| [24a5e873b3dce4eaa19159183bc3a029b9dd953d] | committer: Michael Niedermayer tests/fate/lavf-video.mak: fix fate-lavf-gif dependencies The gif test should depend on gif not fits Regression since: ac4b5d86222006fa71ffe5922e1a34f1422507d8 Signed-off-by: Michael Niedermayer > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=24a5e873b3dce4eaa19159183bc3a029b9dd953d --- tests/fate/lavf-video.mak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fate/lavf-video.mak b/tests/fate/lavf-video.mak index 7a70ac90ce..f6e98246c4 100644 --- a/tests/fate/lavf-video.mak +++ b/tests/fate/lavf-video.mak @@ -6,7 +6,7 @@ FATE_LAVF_VIDEO-$(call ENCDEC, FITS, FITS) += gbrp.fits FATE_LAVF_VIDEO-$(call ENCDEC, FITS, FITS) += gbrap.fits FATE_LAVF_VIDEO-$(call ENCDEC, FITS, FITS) += gbrp16be.fits FATE_LAVF_VIDEO-$(call ENCDEC, FITS, FITS) += gbrap16be.fits -FATE_LAVF_VIDEO-$(call ENCDEC, GIF,FITS) += gif +FATE_LAVF_VIDEO-$(call ENCDEC, GIF, GIF) += gif FATE_LAVF_VIDEO-$(CONFIG_YUV4MPEGPIPE_MUXER)+= y4m FATE_LAVF_VIDEO = $(FATE_LAVF_VIDEO-yes:%=fate-lavf-%) ___ 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/x86/diracdsp: Fix high bits on Windows x86_64
ffmpeg | branch: master | Michael Niedermayer | Thu Jan 30 22:04:06 2020 +0100| [24af459d1e568fd134476f305f4fba23bf2c386a] | committer: Michael Niedermayer avcodec/x86/diracdsp: Fix high bits on Windows x86_64 Found-by: james > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=24af459d1e568fd134476f305f4fba23bf2c386a --- libavcodec/x86/diracdsp.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/x86/diracdsp.asm b/libavcodec/x86/diracdsp.asm index a18bda113e..17145baf87 100644 --- a/libavcodec/x86/diracdsp.asm +++ b/libavcodec/x86/diracdsp.asm @@ -274,7 +274,7 @@ cglobal dequant_subband_32, 7, 7, 4, src, dst, stride, qf, qs, tot_v, tot_h movd m3, qsd SPLATD m2 SPLATD m3 -movr4, tot_hq +movr4d, tot_hd movr3, dstq .loop_v: ___ 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] avutil/common: add parenthesis around GET_16BIT in GET_UTF16
ffmpeg | branch: master | Marton Balint | Wed Jan 29 22:41:50 2020 +0100| [1466bb0badc0b719c08e51391831c32007e3ad96] | committer: Marton Balint avutil/common: add parenthesis around GET_16BIT in GET_UTF16 Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=1466bb0badc0b719c08e51391831c32007e3ad96 --- libavutil/common.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavutil/common.h b/libavutil/common.h index 5568754bb9..02671190a6 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -408,11 +408,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v) * typically a goto statement. */ #define GET_UTF16(val, GET_16BIT, ERROR)\ -val = GET_16BIT;\ +val = (GET_16BIT);\ {\ unsigned int hi = val - 0xD800;\ if (hi < 0x800) {\ -val = GET_16BIT - 0xDC00;\ +val = (GET_16BIT) - 0xDC00;\ if (val > 0x3FFU || hi > 0x3FFU)\ ERROR\ val += (hi<<10) + 0x1;\ ___ 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_drawtext: use replacement chars for invalid UTF8 sequences
ffmpeg | branch: master | Marton Balint | Wed Jan 29 23:29:04 2020 +0100| [5ac8389cfa09e9fd42d076c714be30365a2a8557] | committer: Marton Balint avfilter/vf_drawtext: use replacement chars for invalid UTF8 sequences continue is explicitly disallowed for GET_UTF8, so let's fix that as well. Fixes crash with invalid UTF8 sequences. Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5ac8389cfa09e9fd42d076c714be30365a2a8557 --- libavfilter/vf_drawtext.c | 9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index aea17b6793..ed10175af0 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1225,7 +1225,8 @@ static int draw_glyphs(DrawTextContext *s, AVFrame *frame, for (i = 0, p = text; *p; i++) { FT_Bitmap bitmap; Glyph dummy = { 0 }; -GET_UTF8(code, *p++, continue;); +GET_UTF8(code, *p++, code = 0xfffd; goto continue_on_invalid;); +continue_on_invalid: /* skip new line chars, just go to new line */ if (code == '\n' || code == '\r' || code == '\t') @@ -1363,7 +1364,8 @@ static int draw_text(AVFilterContext *ctx, AVFrame *frame, /* load and cache glyphs */ for (i = 0, p = text; *p; i++) { -GET_UTF8(code, *p++, continue;); +GET_UTF8(code, *p++, code = 0xfffd; goto continue_on_invalid;); +continue_on_invalid: /* get glyph */ dummy.code = code; @@ -1386,7 +1388,8 @@ static int draw_text(AVFilterContext *ctx, AVFrame *frame, /* compute and save position for each glyph */ glyph = NULL; for (i = 0, p = text; *p; i++) { -GET_UTF8(code, *p++, continue;); +GET_UTF8(code, *p++, code = 0xfffd; goto continue_on_invalid2;); +continue_on_invalid2: /* skip the \n in the sequence \r\n */ if (prev_code == '\r' && code == '\n') ___ 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_drawtext: do not overread text if the last UTF8 sequence is invalid
ffmpeg | branch: master | Marton Balint | Wed Jan 29 23:55:25 2020 +0100| [62d92a878d89e35695e839f40065f2e936032f89] | committer: Marton Balint avfilter/vf_drawtext: do not overread text if the last UTF8 sequence is invalid Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=62d92a878d89e35695e839f40065f2e936032f89 --- libavfilter/vf_drawtext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavfilter/vf_drawtext.c b/libavfilter/vf_drawtext.c index ed10175af0..b58556e0f1 100644 --- a/libavfilter/vf_drawtext.c +++ b/libavfilter/vf_drawtext.c @@ -1225,7 +1225,7 @@ static int draw_glyphs(DrawTextContext *s, AVFrame *frame, for (i = 0, p = text; *p; i++) { FT_Bitmap bitmap; Glyph dummy = { 0 }; -GET_UTF8(code, *p++, code = 0xfffd; goto continue_on_invalid;); +GET_UTF8(code, *p ? *p++ : 0, code = 0xfffd; goto continue_on_invalid;); continue_on_invalid: /* skip new line chars, just go to new line */ @@ -1364,7 +1364,7 @@ static int draw_text(AVFilterContext *ctx, AVFrame *frame, /* load and cache glyphs */ for (i = 0, p = text; *p; i++) { -GET_UTF8(code, *p++, code = 0xfffd; goto continue_on_invalid;); +GET_UTF8(code, *p ? *p++ : 0, code = 0xfffd; goto continue_on_invalid;); continue_on_invalid: /* get glyph */ @@ -1388,7 +1388,7 @@ continue_on_invalid: /* compute and save position for each glyph */ glyph = NULL; for (i = 0, p = text; *p; i++) { -GET_UTF8(code, *p++, code = 0xfffd; goto continue_on_invalid2;); +GET_UTF8(code, *p ? *p++ : 0, code = 0xfffd; goto continue_on_invalid2;); continue_on_invalid2: /* skip the \n in the sequence \r\n */ ___ 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] avutil/common: put ERROR statements into separate code blocks in GET_UTF8/16
ffmpeg | branch: master | Marton Balint | Wed Jan 29 23:42:21 2020 +0100| [d9f5fe4ed707d2d55680c8fd2eaf651a478af4c8] | committer: Marton Balint avutil/common: put ERROR statements into separate code blocks in GET_UTF8/16 To be able to safely use more than one statement in ERROR. Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d9f5fe4ed707d2d55680c8fd2eaf651a478af4c8 --- libavutil/common.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libavutil/common.h b/libavutil/common.h index 02671190a6..e6f076a13c 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -387,11 +387,11 @@ static av_always_inline av_const int av_parity_c(uint32_t v) {\ uint32_t top = (val & 128) >> 1;\ if ((val & 0xc0) == 0x80 || val >= 0xFE)\ -ERROR\ +{ERROR}\ while (val & top) {\ unsigned int tmp = (GET_BYTE) - 128;\ if(tmp>>6)\ -ERROR\ +{ERROR}\ val= (val<<6) + tmp;\ top <<= 5;\ }\ @@ -414,7 +414,7 @@ static av_always_inline av_const int av_parity_c(uint32_t v) if (hi < 0x800) {\ val = (GET_16BIT) - 0xDC00;\ if (val > 0x3FFU || hi > 0x3FFU)\ -ERROR\ +{ERROR}\ val += (hi<<10) + 0x1;\ }\ }\ ___ 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] avutil/common: use unsigned int in GET_UTF8
ffmpeg | branch: master | Marton Balint | Wed Jan 29 22:40:42 2020 +0100| [5df1c1ad9adb8ebc8795c756edcbd2923b09a225] | committer: Marton Balint avutil/common: use unsigned int in GET_UTF8 Right shift of signed value is implementation defined. Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5df1c1ad9adb8ebc8795c756edcbd2923b09a225 --- libavutil/common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/common.h b/libavutil/common.h index f09f0b486b..5568754bb9 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -389,7 +389,7 @@ static av_always_inline av_const int av_parity_c(uint32_t v) if ((val & 0xc0) == 0x80 || val >= 0xFE)\ ERROR\ while (val & top) {\ -int tmp= (GET_BYTE) - 128;\ +unsigned int tmp = (GET_BYTE) - 128;\ if(tmp>>6)\ ERROR\ val= (val<<6) + tmp;\ ___ 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] avutil/common: warn about possible move of the data pointer after the last 0 byte in GET_UTF8
ffmpeg | branch: master | Marton Balint | Wed Jan 29 23:56:07 2020 +0100| [6026384047ab8e895d416aab4e2531bd87c0c01d] | committer: Marton Balint avutil/common: warn about possible move of the data pointer after the last 0 byte in GET_UTF8 Signed-off-by: Marton Balint > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6026384047ab8e895d416aab4e2531bd87c0c01d --- libavutil/common.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libavutil/common.h b/libavutil/common.h index e6f076a13c..142ff9abe7 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -373,7 +373,9 @@ static av_always_inline av_const int av_parity_c(uint32_t v) * @param GET_BYTE Expression reading one byte from the input. * Evaluated up to 7 times (4 for the currently * assigned Unicode range). With a memory buffer - * input, this could be *ptr++. + * input, this could be *ptr++, or if you want to make sure + * that *ptr stops at the end of a NULL terminated string then + * *ptr ? *ptr++ : 0 * @param ERRORExpression to be evaluated on invalid input, * typically a goto statement. * ___ 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".