[FFmpeg-devel] [PATCH v5 0/2] animated WebP support
Adds support for animated WebP v5: * added version bumps v4: * using av_packet_new_side_data instead of av_packet_add_side_data v3: * generalized alpha blending to a common method * added support for seeking * updated existing tests for fate suite for WebP v2: * multi-threading support in decoder * mark key frames * fixed blending with the background * use aligned frame buffers * color conversion using RGB_TO_*_CCIR macros * use ffio_ensure_seekback Josef ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v4 1/2] libavcodec/webp: add support for animated WebP decoding
On Thu, Sep 10, 2020 at 1:27 PM Moritz Barsnick wrote: > On Wed, Sep 09, 2020 at 09:57:24 +0200, Zlomek, Josef wrote: > > On Tue, Sep 8, 2020 at 3:19 PM Moritz Barsnick wrote: > > > Missing version bumps. > > There is a version bump for libavformat, as new demuxer was added. > > I didn't see that in v4. > You are right, the version bumps were missing. Probably they fell away while rebasing. I have sent a new version, with version bumps. > I did not know that version should be increased also when there is a > change > > in existing decoder in libavcodec. Should it or not? > > I guess not. Since you're expanding the feature set, you should at > least bump micro. > OK, I have increased micro for libavcodec Josef ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH v5 1/2] libavcodec/webp: add support for animated WebP decoding
Fixes: 4907 Adds support for decoding of animated WebP. The WebP parser now splits the input stream into packets containing one frame. The WebP decoder adds the animation related features according to the specs: https://developers.google.com/speed/webp/docs/riff_container#animation The frames of the animation may be smaller than the image canvas. Therefore, the frame is decoded to a temporary frame, then it is blended into the canvas, the canvas is copied to the output frame, and finally the frame is disposed from the canvas. The output to AV_PIX_FMT_YUVA420P/AV_PIX_FMT_YUV420P is still supported. The background color is specified only as BGRA in the WebP file so it is converted to YUVA if YUV formats are output. Signed-off-by: Josef Zlomek --- Changelog| 1 + libavcodec/codec_desc.c | 3 +- libavcodec/version.h | 2 +- libavcodec/webp.c| 710 +++ libavcodec/webp.h| 44 +++ libavcodec/webp_parser.c | 132 +--- 6 files changed, 785 insertions(+), 107 deletions(-) create mode 100644 libavcodec/webp.h diff --git a/Changelog b/Changelog index cd8be931ef..886f91c5c8 100644 --- a/Changelog +++ b/Changelog @@ -22,6 +22,7 @@ version : - MODS demuxer - PhotoCD decoder - MCA demuxer +- animated WebP parser/decoder version 4.3: diff --git a/libavcodec/codec_desc.c b/libavcodec/codec_desc.c index 9e73dcba27..4685169b05 100644 --- a/libavcodec/codec_desc.c +++ b/libavcodec/codec_desc.c @@ -1251,8 +1251,7 @@ static const AVCodecDescriptor codec_descriptors[] = { .type = AVMEDIA_TYPE_VIDEO, .name = "webp", .long_name = NULL_IF_CONFIG_SMALL("WebP"), -.props = AV_CODEC_PROP_INTRA_ONLY | AV_CODEC_PROP_LOSSY | - AV_CODEC_PROP_LOSSLESS, +.props = AV_CODEC_PROP_LOSSY | AV_CODEC_PROP_LOSSLESS, .mime_types= MT("image/webp"), }, { diff --git a/libavcodec/version.h b/libavcodec/version.h index 4b221f96ad..547adb93cc 100644 --- a/libavcodec/version.h +++ b/libavcodec/version.h @@ -29,7 +29,7 @@ #define LIBAVCODEC_VERSION_MAJOR 58 #define LIBAVCODEC_VERSION_MINOR 105 -#define LIBAVCODEC_VERSION_MICRO 100 +#define LIBAVCODEC_VERSION_MICRO 101 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ diff --git a/libavcodec/webp.c b/libavcodec/webp.c index c6d0206846..015d14e297 100644 --- a/libavcodec/webp.c +++ b/libavcodec/webp.c @@ -35,12 +35,15 @@ * Exif metadata * ICC profile * + * @author Josef Zlomek, Pexeso Inc. + * Animation + * * Unimplemented: - * - Animation * - XMP metadata */ #include "libavutil/imgutils.h" +#include "libavutil/colorspace.h" #define BITSTREAM_READER_LE #include "avcodec.h" @@ -50,12 +53,7 @@ #include "internal.h" #include "thread.h" #include "vp8.h" - -#define VP8X_FLAG_ANIMATION 0x02 -#define VP8X_FLAG_XMP_METADATA 0x04 -#define VP8X_FLAG_EXIF_METADATA 0x08 -#define VP8X_FLAG_ALPHA 0x10 -#define VP8X_FLAG_ICC 0x20 +#include "webp.h" #define MAX_PALETTE_SIZE256 #define MAX_CACHE_BITS 11 @@ -188,6 +186,8 @@ typedef struct ImageContext { typedef struct WebPContext { VP8Context v; /* VP8 Context used for lossy decoding */ GetBitContext gb; /* bitstream reader for main image chunk */ +ThreadFrame canvas_frame; /* ThreadFrame for canvas */ +AVFrame *frame; /* AVFrame for decoded frame */ AVFrame *alpha_frame; /* AVFrame for alpha data decompressed from VP8L */ AVCodecContext *avctx; /* parent AVCodecContext */ int initialized;/* set once the VP8 context is initialized */ @@ -198,9 +198,24 @@ typedef struct WebPContext { int alpha_data_size;/* alpha chunk data size */ int has_exif; /* set after an EXIF chunk has been processed */ int has_iccp; /* set after an ICCP chunk has been processed */ -int width; /* image width */ -int height; /* image height */ -int lossless; /* indicates lossless or lossy */ +int vp8x_flags; /* global flags from VP8X chunk */ +int canvas_width; /* canvas width */ +int canvas_height; /* canvas height */ +int anmf_flags; /* frame flags from ANMF chunk */ +int width; /* frame width */ +int height; /* frame height */ +int pos_x; /* frame position X */ +int pos_y; /* frame position Y */ +int prev_anmf_flags;/* previous frame flags from A
[FFmpeg-devel] [PATCH v5 2/2] libavformat/webp: add WebP demuxer
Adds the demuxer of animated WebP files. It supports non-animated, animated, truncated, and concatenated files. Reading from a pipe (and other non-seekable inputs) is also supported. The WebP demuxer splits the input stream into packets containing one frame. It also marks the key frames properly. The loop count is ignored by default (same behaviour as animated PNG and GIF), it may be enabled by the option '-ignore_loop 0'. The frame rate is set according to the frame delay in the ANMF chunk. If the delay is too low, or the image is not animated, the default frame rate is set to 10 fps, similarly to other WebP libraries and browsers. The fate suite was updated accordingly. Signed-off-by: Josef Zlomek --- Changelog | 1 + doc/demuxers.texi | 28 + libavformat/Makefile| 1 + libavformat/allformats.c| 1 + libavformat/version.h | 2 +- libavformat/webpdec.c | 733 tests/ref/fate/exif-image-webp | 8 +- tests/ref/fate/webp-rgb-lena-lossless | 2 +- tests/ref/fate/webp-rgb-lena-lossless-rgb24 | 2 +- tests/ref/fate/webp-rgb-lossless| 2 +- tests/ref/fate/webp-rgb-lossy-q80 | 2 +- tests/ref/fate/webp-rgba-lossless | 2 +- tests/ref/fate/webp-rgba-lossy-q80 | 2 +- 13 files changed, 775 insertions(+), 11 deletions(-) create mode 100644 libavformat/webpdec.c diff --git a/Changelog b/Changelog index 886f91c5c8..9c7a26a80b 100644 --- a/Changelog +++ b/Changelog @@ -23,6 +23,7 @@ version : - PhotoCD decoder - MCA demuxer - animated WebP parser/decoder +- animated WebP demuxer version 4.3: diff --git a/doc/demuxers.texi b/doc/demuxers.texi index 3c15ab9eee..f935c49b48 100644 --- a/doc/demuxers.texi +++ b/doc/demuxers.texi @@ -832,4 +832,32 @@ which in turn, acts as a ceiling for the size of scripts that can be read. Default is 1 MiB. @end table +@section webp + +Animated WebP demuxer. + +It accepts the following options: + +@table @option +@item -min_delay @var{int} +Set the minimum valid delay between frames in milliseconds. +Range is 0 to 6. Default value is 10. + +@item -max_webp_delay @var{int} +Set the maximum valid delay between frames in milliseconds. +Range is 0 to 16777215. Default value is 16777215 (over four hours), +the maximum value allowed by the specification. + +@item -default_delay @var{int} +Set the default delay between frames in milliseconds. +Range is 0 to 6. Default value is 100. + +@item -ignore_loop @var{bool} +WebP files can contain information to loop a certain number of times +(or infinitely). If @option{ignore_loop} is set to true, then the loop +setting from the input will be ignored and looping will not occur. +If set to false, then looping will occur and will cycle the number +of times according to the WebP. Default value is true. +@end table + @c man end DEMUXERS diff --git a/libavformat/Makefile b/libavformat/Makefile index a1a2a7e0e1..3cd9d21171 100644 --- a/libavformat/Makefile +++ b/libavformat/Makefile @@ -564,6 +564,7 @@ OBJS-$(CONFIG_WEBM_MUXER)+= matroskaenc.o matroska.o \ wv.o vorbiscomment.o OBJS-$(CONFIG_WEBM_DASH_MANIFEST_MUXER) += webmdashenc.o OBJS-$(CONFIG_WEBM_CHUNK_MUXER) += webm_chunk.o +OBJS-$(CONFIG_WEBP_DEMUXER) += webpdec.o OBJS-$(CONFIG_WEBP_MUXER)+= webpenc.o OBJS-$(CONFIG_WEBVTT_DEMUXER)+= webvttdec.o subtitles.o OBJS-$(CONFIG_WEBVTT_MUXER) += webvttenc.o diff --git a/libavformat/allformats.c b/libavformat/allformats.c index 97e9be4269..bcb8d46ae6 100644 --- a/libavformat/allformats.c +++ b/libavformat/allformats.c @@ -461,6 +461,7 @@ extern AVOutputFormat ff_webm_muxer; extern AVInputFormat ff_webm_dash_manifest_demuxer; extern AVOutputFormat ff_webm_dash_manifest_muxer; extern AVOutputFormat ff_webm_chunk_muxer; +extern AVInputFormat ff_webp_demuxer; extern AVOutputFormat ff_webp_muxer; extern AVInputFormat ff_webvtt_demuxer; extern AVOutputFormat ff_webvtt_muxer; diff --git a/libavformat/version.h b/libavformat/version.h index 7771a6abf2..ec3286e73a 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 54 +#define LIBAVFORMAT_VERSION_MINOR 55 #define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ diff --git a/libavformat/webpdec.c b/libavformat/webpdec.c new file mode 100644 index 00..244042f2db --- /dev/null +++ b/libavformat/webpdec.c @@ -0,0 +1,733 @@ +/* + * WebP demuxer + * Copyright (c) 2020 Pexeso Inc. + * + * T
Re: [FFmpeg-devel] [PATCH v2 0/7] HEVC native support for Screen content coding
Hi James, Your concerns about SCC PPS were addressed in the new version. http://ffmpeg.org/pipermail/ffmpeg-devel/2020-July/266037.html http://ffmpeg.org/pipermail/ffmpeg-devel/2020-July/266038.html Could you please take a look when you have time? Thanks Haihao > Resend Linjie's patchset with the updates. > > As a part of the support for VA-API HEVC SCC decoding (gen12, Tiger > Lake+). > > The full support could be accessed in: > https://github.com/intel-media-ci/ffmpeg/pull/231 > > The VAAPI part would be provided later once the implementations of > native parsing and reference management are all decent. > > Linjie Fu (7): > lavc/avcodec: Add FF_PROFILE_HEVC_SCC for screen content coding > lavc/hevc_ps: Add sps parse support for HEVC SCC extension syntax > lavc/hevc_ps: Add pps parse support for HEVC SCC extension > lavc/hevc_ps: Add slice parse support for HEVC SCC extension > lavc/hevcdec: Fix the parsing for use_integer_mv_flag > lavc/hevcdec: Set max_num_merge_cand to uint8_t > lavc/hevc: Update reference list for SCC > > libavcodec/avcodec.h | 1 + > libavcodec/hevc.h | 3 ++ > libavcodec/hevc_ps.c | 118 +++-- > libavcodec/hevc_ps.h | 32 +++ > libavcodec/hevc_refs.c | 27 +- > libavcodec/hevcdec.c | 17 +- > libavcodec/hevcdec.h | 7 ++- > libavcodec/profiles.c | 1 + > 8 files changed, 197 insertions(+), 9 deletions(-) > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avfilter: add http video filter.
Entirely outside of this filter being acceptable at all, pulling in libcurl is not an option without major safeguards for every single overlapping tls library both ffmpeg and curl support. If both are using the same library, there is a huge potential for libcurl being linked at all breaks ffmpegs ability to talk TLS. On top of that, ffmpeg already has code to talk to http servers, so pulling in a library to do it is even less acceptable. I also really fail to see the utility of this filter. What's stopping you from just making ffmpeg output raw frames and then sending them off via the curl cli tool or whatever else? ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avfilter: add http video filter.
Signed-off-by: alex_qt <3.1...@ukr.net> --- Changelog| 1 + configure| 4 + doc/filters.texi | 28 + libavfilter/Makefile | 1 + libavfilter/allfilters.c | 1 + libavfilter/version.h| 2 +- libavfilter/vf_http.c| 221 +++ 7 files changed, 257 insertions(+), 1 deletion(-) create mode 100644 libavfilter/vf_http.c diff --git a/Changelog b/Changelog index cd8be931ef..777cca679a 100644 --- a/Changelog +++ b/Changelog @@ -22,6 +22,7 @@ version : - MODS demuxer - PhotoCD decoder - MCA demuxer +- http video filter, send raw frames to remote url for postprocessing version 4.3: diff --git a/configure b/configure index ae8c6e61c8..f5131d4669 100755 --- a/configure +++ b/configure @@ -325,6 +325,7 @@ External library support: --enable-vulkan enable Vulkan code [no] --disable-xlib disable xlib [autodetect] --disable-zlib disable zlib [autodetect] + --enable-libcurl enable http filter that send raw frames to remote server The following libraries provide various hardware acceleration features: --disable-amfdisable AMF video encoding code [autodetect] @@ -1827,6 +1828,7 @@ EXTERNAL_LIBRARY_LIST=" opengl pocketsphinx vapoursynth +libcurl " HWACCEL_AUTODETECT_LIBRARY_LIST=" @@ -3650,6 +3652,7 @@ vpp_qsv_filter_select="qsvvpp" xfade_opencl_filter_deps="opencl" yadif_cuda_filter_deps="ffnvcodec" yadif_cuda_filter_deps_any="cuda_nvcc cuda_llvm" +http_filter_deps="libcurl" # examples avio_list_dir_deps="avformat avutil" @@ -6367,6 +6370,7 @@ enabled libmysofa && { check_pkg_config libmysofa libmysofa mysofa.h mys enabled libnpp&& { check_lib libnpp npp.h nppGetLibVersion -lnppig -lnppicc -lnppc -lnppidei || check_lib libnpp npp.h nppGetLibVersion -lnppi -lnppc -lnppidei || die "ERROR: libnpp not found"; } +enabled libcurl && require "libcurl >= 7.68.0" curl/curl.h curl_easy_init -lcurl enabled libopencore_amrnb && require libopencore_amrnb opencore-amrnb/interf_dec.h Decoder_Interface_init -lopencore-amrnb enabled libopencore_amrwb && require libopencore_amrwb opencore-amrwb/dec_if.h D_IF_init -lopencore-amrwb enabled libopencv && { check_headers opencv2/core/core_c.h && diff --git a/doc/filters.texi b/doc/filters.texi index cbb16f22b2..660ef8b4d9 100644 --- a/doc/filters.texi +++ b/doc/filters.texi @@ -12078,6 +12078,34 @@ For example, to horizontally flip the input video with @command{ffmpeg}: ffmpeg -i in.avi -vf "hflip" out.avi @end example +@anchor{http} +@section http + +Send raw frame data to the remote server for postprocessing and await response as new frame in same format and size. To enable filter configure ffmpeg with @code{./configure --enable-libcurl}. + +The filter accepts the following options: + +@table @option +@item url +Specify remote server url location. + +@item content_type +Specify content-type header in request header, default to "application/octet-stream". +@end table + +Simple demo http server for postprocessing frames can be found here: @url{https://github.com/devalexqt/simple_ffmpeg_http_filter_server} + +@subsection Examples +@itemize + +@item +Send raw frames to "http://localhost:3000/frame?param=abc"; + +@example +ffmpeg -i input.mp4 -vf format=rgb24,http=url="http\\\://localhost\\\:3000/frame?param=abc":content_type=application/octet-stream -t 10 out.mp4 +@end example +@end itemize + @section histeq This filter applies a global color histogram equalization on a per-frame basis. diff --git a/libavfilter/Makefile b/libavfilter/Makefile index e6d3c283da..38eb1f4204 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -467,6 +467,7 @@ OBJS-$(CONFIG_YAEPBLUR_FILTER) += vf_yaepblur.o OBJS-$(CONFIG_ZMQ_FILTER)+= f_zmq.o OBJS-$(CONFIG_ZOOMPAN_FILTER)+= vf_zoompan.o OBJS-$(CONFIG_ZSCALE_FILTER) += vf_zscale.o +OBJS-$(CONFIG_HTTP_FILTER) += vf_http.o OBJS-$(CONFIG_ALLRGB_FILTER) += vsrc_testsrc.o OBJS-$(CONFIG_ALLYUV_FILTER) += vsrc_testsrc.o diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index fa91e608e4..8626fbc331 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -445,6 +445,7 @@ extern AVFilter ff_vf_yaepblur; extern AVFilter ff_vf_zmq; extern AVFilter ff_vf_zoompan; extern AVFilter ff_vf_zscale; +extern AVFilter ff_vf_http; extern AVFilter ff_vsrc_allrgb; extern AVFilter ff_vsrc_allyuv; diff --git a/libavfilter/version.h b/libavfilter/version.h index 308fbe07c3..b8ba489da7 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 87 +#define LIBAVFILTER_VERSION_MINOR 88 #d
[FFmpeg-devel] [PATCH 3/3] avfilter/formats: Remove pointless checks
ff_formats_ref() takes a pointer to an AVFilterFormats and a pointer to a pointer to an AVFilterFormats as arguments and adds the latter as an owner to the list pointed to by the former; the latter is hereby always the address of a list contained in an AVFilterFormatsConfig and can therefore not be NULL. So remove the check for whether it is NULL; also do the same for ff_channel_layouts_ref(). Also do the same for the unref functions where argument is never NULL because it is always the address of an existing lvalue. Signed-off-by: Andreas Rheinhardt --- libavfilter/formats.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 98ff82a887..43c90b9a27 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -269,7 +269,7 @@ do {\ do { \ int idx = -1; \ \ -if (!ref || !*ref) \ +if (!*ref) \ return;\ \ FIND_REF_INDEX(ref, idx); \ @@ -495,7 +495,7 @@ AVFilterChannelLayouts *ff_all_channel_counts(void) #define FORMATS_REF(f, ref, unref_fn) \ void *tmp; \ \ -if (!f || !ref) \ +if (!f) \ return AVERROR(ENOMEM); \ \ tmp = av_realloc_array(f->refs, sizeof(*f->refs), f->refcount + 1); \ -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/3] avfilter/af_aformat, formats: Unify freeing AVFilterFormatsConfig
AVFilterFormats and AVFilterChannelLayouts always exist together, namely in the aformat filter as well as in AVFilterLinks. Now that they are grouped together in a single structure in AVFilterLinks, the same can be done in aformat and then this structure can be freed on its own, replacing the freeing functions for AVFilterFormats and AVFilterChannelLayouts structures (which still exist as static functions in formats.c). Signed-off-by: Andreas Rheinhardt --- Btw: There are several quite common combinations of functions like e.g. ff_make_format_list() and ff_formats_ref(). Should they be factored out in new functions or not? libavfilter/af_aformat.c| 26 - libavfilter/avfilter.c | 8 +-- libavfilter/avfiltergraph.c | 8 +-- libavfilter/formats.c | 105 +++- libavfilter/formats.h | 13 ++--- 5 files changed, 76 insertions(+), 84 deletions(-) diff --git a/libavfilter/af_aformat.c b/libavfilter/af_aformat.c index e669f2de83..a8dbdd8147 100644 --- a/libavfilter/af_aformat.c +++ b/libavfilter/af_aformat.c @@ -36,9 +36,7 @@ typedef struct AFormatContext { const AVClass *class; -AVFilterFormats *formats; -AVFilterFormats *sample_rates; -AVFilterChannelLayouts *channel_layouts; +AVFilterFormatsConfig config; char *formats_str; char *sample_rates_str; @@ -100,11 +98,11 @@ static av_cold int init(AVFilterContext *ctx) { AFormatContext *s = ctx->priv; -PARSE_FORMATS(s->formats_str, enum AVSampleFormat, s->formats, +PARSE_FORMATS(s->formats_str, enum AVSampleFormat, s->config.formats, ff_add_format, av_get_sample_fmt, AV_SAMPLE_FMT_NONE, "sample format"); -PARSE_FORMATS(s->sample_rates_str, int, s->sample_rates, ff_add_format, +PARSE_FORMATS(s->sample_rates_str, int, s->config.samplerates, ff_add_format, get_sample_rate, 0, "sample rate"); -PARSE_FORMATS(s->channel_layouts_str, uint64_t, s->channel_layouts, +PARSE_FORMATS(s->channel_layouts_str, uint64_t, s->config.channel_layouts, ff_add_channel_layout, av_get_channel_layout, 0, "channel layout"); @@ -115,9 +113,7 @@ static av_cold void uninit(AVFilterContext *ctx) { AFormatContext *s = ctx->priv; -ff_formats_unref(&s->formats); -ff_formats_unref(&s->sample_rates); -ff_channel_layouts_unref(&s->channel_layouts); +ff_filter_formats_config_unref(&s->config); } static int query_formats(AVFilterContext *ctx) @@ -125,19 +121,19 @@ static int query_formats(AVFilterContext *ctx) AFormatContext *s = ctx->priv; int ret; -ret = ff_set_common_formats(ctx, s->formats ? s->formats : +ret = ff_set_common_formats(ctx, s->config.formats ? s->config.formats : ff_all_formats(AVMEDIA_TYPE_AUDIO)); -s->formats = NULL; +s->config.formats = NULL; if (ret < 0) return ret; -ret = ff_set_common_samplerates(ctx, s->sample_rates ? s->sample_rates : +ret = ff_set_common_samplerates(ctx, s->config.samplerates ? s->config.samplerates : ff_all_samplerates()); -s->sample_rates = NULL; +s->config.samplerates = NULL; if (ret < 0) return ret; -ret = ff_set_common_channel_layouts(ctx, s->channel_layouts ? s->channel_layouts : +ret = ff_set_common_channel_layouts(ctx, s->config.channel_layouts ? s->config.channel_layouts : ff_all_channel_counts()); -s->channel_layouts = NULL; +s->config.channel_layouts = NULL; return ret; } diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 8ff22c71e3..06cf564270 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -746,12 +746,8 @@ static void free_link(AVFilterLink *link) av_buffer_unref(&link->hw_frames_ctx); -ff_formats_unref(&link->incfg.formats); -ff_formats_unref(&link->outcfg.formats); -ff_formats_unref(&link->incfg.samplerates); -ff_formats_unref(&link->outcfg.samplerates); -ff_channel_layouts_unref(&link->incfg.channel_layouts); -ff_channel_layouts_unref(&link->outcfg.channel_layouts); +ff_filter_formats_config_unref(&link->incfg); +ff_filter_formats_config_unref(&link->outcfg); avfilter_link_free(&link); } diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index f6b572b3de..831fc2b985 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -727,12 +727,8 @@ static int pick_format(AVFilterLink *link, AVFilterLink *ref) link->channels = av_get_channel_layout_nb_channels(link->channel_layout); } -ff_formats_unref(&link->incfg.formats); -ff_formats_unref(&link->outcfg.formats); -ff_formats_unref(&link->incfg.samplerates); -ff_formats_unref(&link->outcfg.samplerates); -ff_channel_layouts_unref(&link->inc
[FFmpeg-devel] [PATCH 1/3] avfilter/formats: Don't typedef structure a second time
Before commit 2f76476549a01ae2c4ec2a440e4b14c5aba64869, avfilter.h contained no typedef for AVFilterChannelLayouts; all references to it were done using its struct tag. formats.h meanwhile contained the definition of the struct and a typedef for it. Said commit now added a typedef in avfilter.h, too, bringing it in line with AVFilterFormats; yet this means that there are two typedefs for AVFilterChannelLayouts (in contrast to AVFilterFormats which is only typedef'ed in avfilter.h). The problem is that older versions of GCC don't like this and error out: http://fate.ffmpeg.org/history.cgi?slot=x86_64-openbsd5.6-gcc4.2-conf2 is one of the FATE boxes that now fail to compile. So just remove the typedef in formats.h. Signed-off-by: Andreas Rheinhardt --- libavfilter/formats.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/formats.h b/libavfilter/formats.h index 8378be4b9b..0520bf42a9 100644 --- a/libavfilter/formats.h +++ b/libavfilter/formats.h @@ -83,7 +83,7 @@ struct AVFilterFormats { * channel count with unknown disposition with the same number of channels * (e.g. AV_CH_LAYOUT_STEREO and FF_COUNT2LAYOUT(2). */ -typedef struct AVFilterChannelLayouts { +struct AVFilterChannelLayouts { uint64_t *channel_layouts; ///< list of channel layouts intnb_channel_layouts; ///< number of channel layouts char all_layouts; ///< accept any known channel layout @@ -91,7 +91,7 @@ typedef struct AVFilterChannelLayouts { unsigned refcount; ///< number of references to this list struct AVFilterChannelLayouts ***refs; ///< references to this list -} AVFilterChannelLayouts; +}; /** * Encode a channel count as a channel layout. -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avcodec/mobiclip: Check quantizer before table setup
Fixes: index -1 out of bounds for type 'const uint8_t [6][16]' Fixes: out of array read Fixes: shift exponent -21 is negative Fixes: 25422/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOBICLIP_fuzzer-5748258226569216 Fixes: shift exponent 8039082 is too large for 32-bit type 'int' Fixes: 25430/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_MOBICLIP_fuzzer-5698567770210304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/mobiclip.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c index d147eddbae..13f0edc89d 100644 --- a/libavcodec/mobiclip.c +++ b/libavcodec/mobiclip.c @@ -1323,6 +1323,10 @@ static int mobiclip_decode(AVCodecContext *avctx, void *data, } } else { MotionXY *motion = s->motion; +int quantizer = s->quantizer + get_se_golomb(gb); + +if (quantizer < 12 || quantizer > 161) +return AVERROR_INVALIDDATA; memset(motion, 0, s->motion_size); @@ -1330,7 +1334,7 @@ static int mobiclip_decode(AVCodecContext *avctx, void *data, frame->key_frame = 0; s->dct_tab_idx = 0; -setup_qtables(avctx, s->quantizer + get_se_golomb(gb)); +setup_qtables(avctx, quantizer); for (int y = 0; y < avctx->height; y += 16) { for (int x = 0; x < avctx->width; x += 16) { int idx; -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [FFmpeg-cvslog] fate: disable automatic conversions on many tests.
On 9/10/2020 3:47 PM, Michael Niedermayer wrote: > On Thu, Sep 10, 2020 at 07:35:12PM +0200, Nicolas George wrote: >> Michael Niedermayer (12020-09-10): >>> this breaks several tests on big endian as that needs converts at diffferent >>> places. >>> >>> heres a list of failures >> >> Thanks for pointing it. I do not see these archs on fate.ffmpeg.org. Is >> there a way to get the error output? > > the mips qemu fate box run out of diskspace, ive cleared it up so it > might reappear in the next day or 2, if not then it needs checking what else > is stuck > > Iam not sure why a out of diskspace resulted in the entry to disappear > entirely > off fate.ffmpeg.org. But that is something that probably should be looked > into and fixed too as it makes it very easy to miss that a box is broken Entries disappear after an specific amount of days without sending a new report, so the only thing i can think could have happened is that the runs on those boxes errored out at a point before they could even attempt to send a report back to fate, or failed while trying to do it. > > thx > > [...] > > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 5/9] avfilter/vf_subtitles: Fix leaks on failure
init_subtitles() sometimes returned directly upon error without cleaning up after itself. The easiest way to trigger this is by using picture-based subtitles; it is also possible to run into this in case of missing decoders or allocation failures. Furthermore, return the proper error code in case of missing decoder. Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_subtitles.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 1bd42391e0..2d3145bf2d 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -384,13 +384,15 @@ static av_cold int init_subtitles(AVFilterContext *ctx) if (!dec) { av_log(ctx, AV_LOG_ERROR, "Failed to find subtitle codec %s\n", avcodec_get_name(st->codecpar->codec_id)); -return AVERROR(EINVAL); +ret = AVERROR_DECODER_NOT_FOUND; +goto end; } dec_desc = avcodec_descriptor_get(st->codecpar->codec_id); if (dec_desc && !(dec_desc->props & AV_CODEC_PROP_TEXT_SUB)) { av_log(ctx, AV_LOG_ERROR, "Only text based subtitles are currently supported\n"); -return AVERROR_PATCHWELCOME; +ret = AVERROR_PATCHWELCOME; +goto end; } if (ass->charenc) av_dict_set(&codec_opts, "sub_charenc", ass->charenc, 0); @@ -398,8 +400,10 @@ static av_cold int init_subtitles(AVFilterContext *ctx) av_dict_set(&codec_opts, "sub_text_format", "ass", 0); dec_ctx = avcodec_alloc_context3(dec); -if (!dec_ctx) -return AVERROR(ENOMEM); +if (!dec_ctx) { +ret = AVERROR(ENOMEM); +goto end; +} ret = avcodec_parameters_to_context(dec_ctx, st->codecpar); if (ret < 0) -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 8/9] avfilter/vf_subtitles: Return early upon avformat_open_input() failure
There is nothing to free at this point. Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_subtitles.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 08b4d4efca..f9733c3935 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -322,7 +322,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx) ret = avformat_open_input(&fmt, ass->filename, NULL, NULL); if (ret < 0) { av_log(ctx, AV_LOG_ERROR, "Unable to open %s\n", ass->filename); -goto end; +return ret; } ret = avformat_find_stream_info(fmt, NULL); if (ret < 0) -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 6/9] avfilter/vf_subtitles: Remove unnecessary initialization of AVPacket
av_read_frame() can handle uninitialized packets. Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_subtitles.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index 2d3145bf2d..a045375b2d 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -449,9 +449,6 @@ static av_cold int init_subtitles(AVFilterContext *ctx) ass_process_codec_private(ass->track, dec_ctx->subtitle_header, dec_ctx->subtitle_header_size); -av_init_packet(&pkt); -pkt.data = NULL; -pkt.size = 0; while (av_read_frame(fmt, &pkt) >= 0) { int i, got_subtitle; AVSubtitle sub = {0}; -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 7/9] avfilter/vf_subtitles: Remove obsolete LIBAVCODEC_VERSION_INT checks
libavcodec major version is already 58. Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_subtitles.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/libavfilter/vf_subtitles.c b/libavfilter/vf_subtitles.c index a045375b2d..08b4d4efca 100644 --- a/libavfilter/vf_subtitles.c +++ b/libavfilter/vf_subtitles.c @@ -396,8 +396,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx) } if (ass->charenc) av_dict_set(&codec_opts, "sub_charenc", ass->charenc, 0); -if (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57,26,100)) -av_dict_set(&codec_opts, "sub_text_format", "ass", 0); +av_dict_set(&codec_opts, "sub_text_format", "ass", 0); dec_ctx = avcodec_alloc_context3(dec); if (!dec_ctx) { @@ -465,11 +464,8 @@ static av_cold int init_subtitles(AVFilterContext *ctx) char *ass_line = sub.rects[i]->ass; if (!ass_line) break; -if (LIBAVCODEC_VERSION_INT < AV_VERSION_INT(57,25,100)) -ass_process_data(ass->track, ass_line, strlen(ass_line)); -else -ass_process_chunk(ass->track, ass_line, strlen(ass_line), - start_time, duration); +ass_process_chunk(ass->track, ass_line, strlen(ass_line), + start_time, duration); } } } -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 4/9] avfilter/vf_uspp: Fix potential leak of dict on error
Signed-off-by: Andreas Rheinhardt --- libavfilter/vf_uspp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/vf_uspp.c b/libavfilter/vf_uspp.c index f6fb193433..72a0f562af 100644 --- a/libavfilter/vf_uspp.c +++ b/libavfilter/vf_uspp.c @@ -362,9 +362,9 @@ static int config_input(AVFilterLink *inlink) avctx_enc->global_quality = 123; av_dict_set(&opts, "no_bitstream", "1", 0); ret = avcodec_open2(avctx_enc, enc, &opts); +av_dict_free(&opts); if (ret < 0) return ret; -av_dict_free(&opts); av_assert0(avctx_enc->codec); } -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 9/9] fftools, libavcodec, libavfilter: Add const to some AVCodec *
The user has no business modifying the underlying AVCodec. Signed-off-by: Andreas Rheinhardt --- fftools/ffmpeg.h | 5 +++-- fftools/ffmpeg_filter.c| 5 +++-- libavcodec/avrndec.c | 2 +- libavcodec/utils.c | 4 ++-- libavfilter/lavfutils.c| 2 +- libavfilter/src_movie.c| 2 +- libavfilter/vf_mcdeint.c | 2 +- libavfilter/vf_subtitles.c | 2 +- libavfilter/vf_uspp.c | 2 +- 9 files changed, 14 insertions(+), 12 deletions(-) diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 908bc73fca..8665218dcf 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -638,8 +638,9 @@ void assert_avoptions(AVDictionary *m); int guess_input_channel_layout(InputStream *ist); -enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *avctx, AVCodec *codec, enum AVPixelFormat target); -void choose_sample_fmt(AVStream *st, AVCodec *codec); +enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *avctx, +const AVCodec *codec, enum AVPixelFormat target); +void choose_sample_fmt(AVStream *st, const AVCodec *codec); int configure_filtergraph(FilterGraph *fg); int configure_output_filter(FilterGraph *fg, OutputFilter *ofilter, AVFilterInOut *out); diff --git a/fftools/ffmpeg_filter.c b/fftools/ffmpeg_filter.c index 3c507f8c1d..e9e31e043e 100644 --- a/fftools/ffmpeg_filter.c +++ b/fftools/ffmpeg_filter.c @@ -60,7 +60,8 @@ static const enum AVPixelFormat *get_compliance_unofficial_pix_fmts(enum AVCodec } } -enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx, AVCodec *codec, enum AVPixelFormat target) +enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx, +const AVCodec *codec, enum AVPixelFormat target) { if (codec && codec->pix_fmts) { const enum AVPixelFormat *p = codec->pix_fmts; @@ -90,7 +91,7 @@ enum AVPixelFormat choose_pixel_fmt(AVStream *st, AVCodecContext *enc_ctx, AVCod return target; } -void choose_sample_fmt(AVStream *st, AVCodec *codec) +void choose_sample_fmt(AVStream *st, const AVCodec *codec) { if (codec && codec->sample_fmts) { const enum AVSampleFormat *p = codec->sample_fmts; diff --git a/libavcodec/avrndec.c b/libavcodec/avrndec.c index a7bdab280d..f4ec490de5 100644 --- a/libavcodec/avrndec.c +++ b/libavcodec/avrndec.c @@ -46,7 +46,7 @@ static av_cold int init(AVCodecContext *avctx) } if(a->is_mjpeg) { -AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_MJPEG); +const AVCodec *codec = avcodec_find_decoder(AV_CODEC_ID_MJPEG); AVDictionary *thread_opt = NULL; if (!codec) { av_log(avctx, AV_LOG_ERROR, "MJPEG codec not found\n"); diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 2e5185f364..d93a0953fa 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -695,7 +695,7 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code if ((avctx->codec->capabilities & AV_CODEC_CAP_EXPERIMENTAL) && avctx->strict_std_compliance > FF_COMPLIANCE_EXPERIMENTAL) { const char *codec_string = av_codec_is_encoder(codec) ? "encoder" : "decoder"; -AVCodec *codec2; +const AVCodec *codec2; av_log(avctx, AV_LOG_ERROR, "The %s '%s' is experimental but experimental codecs are not enabled, " "add '-strict %d' if you want to use it.\n", @@ -1193,7 +1193,7 @@ FF_ENABLE_DEPRECATION_WARNINGS const char *avcodec_get_name(enum AVCodecID id) { const AVCodecDescriptor *cd; -AVCodec *codec; +const AVCodec *codec; if (id == AV_CODEC_ID_NONE) return "none"; diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c index 57af5ebfdc..a2085ed5ef 100644 --- a/libavfilter/lavfutils.c +++ b/libavfilter/lavfutils.c @@ -27,7 +27,7 @@ int ff_load_image(uint8_t *data[4], int linesize[4], { AVInputFormat *iformat = NULL; AVFormatContext *format_ctx = NULL; -AVCodec *codec; +const AVCodec *codec; AVCodecContext *codec_ctx = NULL; AVCodecParameters *par; AVFrame *frame = NULL; diff --git a/libavfilter/src_movie.c b/libavfilter/src_movie.c index d83cb6d1e4..ab12c34f4a 100644 --- a/libavfilter/src_movie.c +++ b/libavfilter/src_movie.c @@ -155,7 +155,7 @@ static AVStream *find_stream(void *log, AVFormatContext *avf, const char *spec) static int open_stream(AVFilterContext *ctx, MovieStream *st) { -AVCodec *codec; +const AVCodec *codec; int ret; codec = avcodec_find_decoder(st->st->codecpar->codec_id); diff --git a/libavfilter/vf_mcdeint.c b/libavfilter/vf_mcdeint.c index 9cdec6308d..bc7b3230d3 100644 --- a/libavfilter/vf_mcdeint.c +++ b/libavfilter/vf_mcdeint.c @@ -102,7 +102,7 @@ static int config_props(AVFilterLink *inlink) { AVFilterContext *ctx = inlink->dst; MCDeintContext *mcdeint = ctx->priv; -AVCodec *enc; +const AVCodec *enc;
[FFmpeg-devel] [PATCH 3/9] avfilter/lavfutils: Avoid initializing packet
av_read_frame() can handle uninitialized packets. Signed-off-by: Andreas Rheinhardt --- libavfilter/lavfutils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c index d7de89f4b3..57af5ebfdc 100644 --- a/libavfilter/lavfutils.c +++ b/libavfilter/lavfutils.c @@ -35,8 +35,6 @@ int ff_load_image(uint8_t *data[4], int linesize[4], AVPacket pkt; AVDictionary *opt=NULL; -av_init_packet(&pkt); - iformat = av_find_input_format("image2pipe"); if ((ret = avformat_open_input(&format_ctx, filename, iformat, NULL)) < 0) { av_log(log_ctx, AV_LOG_ERROR, @@ -89,6 +87,7 @@ int ff_load_image(uint8_t *data[4], int linesize[4], } ret = avcodec_decode_video2(codec_ctx, frame, &frame_decoded, &pkt); +av_packet_unref(&pkt); if (ret < 0 || !frame_decoded) { av_log(log_ctx, AV_LOG_ERROR, "Failed to decode image from file\n"); if (ret >= 0) @@ -107,7 +106,6 @@ int ff_load_image(uint8_t *data[4], int linesize[4], av_image_copy(data, linesize, (const uint8_t **)frame->data, frame->linesize, *pix_fmt, *w, *h); end: -av_packet_unref(&pkt); avcodec_free_context(&codec_ctx); avformat_close_input(&format_ctx); av_frame_free(&frame); -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/9] avfilter/lavfutils: Fix memleak when avformat_find_stream_info() fails
Signed-off-by: Andreas Rheinhardt --- libavfilter/lavfutils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c index 84dd4c0704..d7de89f4b3 100644 --- a/libavfilter/lavfutils.c +++ b/libavfilter/lavfutils.c @@ -46,7 +46,7 @@ int ff_load_image(uint8_t *data[4], int linesize[4], if ((ret = avformat_find_stream_info(format_ctx, NULL)) < 0) { av_log(log_ctx, AV_LOG_ERROR, "Find stream info failed\n"); -return ret; +goto end; } par = format_ctx->streams[0]->codecpar; -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/9] avfilter/lavfutils: Don't use uninitialized pointers for freeing
Happened on several error conditions, e.g. if there is just no decoder for the format (like with svg images). Signed-off-by: Andreas Rheinhardt --- libavfilter/lavfutils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/lavfutils.c b/libavfilter/lavfutils.c index db4b69b9f3..84dd4c0704 100644 --- a/libavfilter/lavfutils.c +++ b/libavfilter/lavfutils.c @@ -28,9 +28,9 @@ int ff_load_image(uint8_t *data[4], int linesize[4], AVInputFormat *iformat = NULL; AVFormatContext *format_ctx = NULL; AVCodec *codec; -AVCodecContext *codec_ctx; +AVCodecContext *codec_ctx = NULL; AVCodecParameters *par; -AVFrame *frame; +AVFrame *frame = NULL; int frame_decoded, ret = 0; AVPacket pkt; AVDictionary *opt=NULL; -- 2.20.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] avformat/moflex: make seeking more useful
Paul B Mahol: > Signed-off-by: Paul B Mahol > --- > libavformat/moflex.c | 19 ++- > 1 file changed, 18 insertions(+), 1 deletion(-) > > diff --git a/libavformat/moflex.c b/libavformat/moflex.c > index 747e32f079..257408 100644 > --- a/libavformat/moflex.c > +++ b/libavformat/moflex.c > @@ -327,7 +327,13 @@ static int moflex_read_packet(AVFormatContext *s, > AVPacket *pkt) > av_packet_move_ref(pkt, packet); > pkt->pos = m->pos; > pkt->stream_index = stream_index; > -pkt->flags |= AV_PKT_FLAG_KEY; > +if (s->streams[stream_index]->codecpar->codec_type == > AVMEDIA_TYPE_VIDEO) { > +pkt->duration = 1; > +if (pkt->data[0] & 0x80) > +pkt->flags |= AV_PKT_FLAG_KEY; > +} else { > +pkt->flags |= AV_PKT_FLAG_KEY; > +} > return ret; > } > } > @@ -341,6 +347,16 @@ static int moflex_read_packet(AVFormatContext *s, > AVPacket *pkt) > return AVERROR_EOF; > } > > +static int moflex_read_seek(AVFormatContext *s, int stream_index, > +int64_t pts, int flags) > +{ > +MOFLEXDemuxContext *m = s->priv_data; > + > +m->in_block = 0; > + > +return -1; A seek that always fails? Why? > +} > + > static int moflex_read_close(AVFormatContext *s) > { > for (int i = 0; i < s->nb_streams; i++) { > @@ -360,6 +376,7 @@ AVInputFormat ff_moflex_demuxer = { > .read_probe = moflex_probe, > .read_header= moflex_read_header, > .read_packet= moflex_read_packet, > +.read_seek = moflex_read_seek, > .read_close = moflex_read_close, > .extensions = "moflex", > .flags = AVFMT_GENERIC_INDEX, > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/2] avcodec/mobiclip: add missing flush
Signed-off-by: Paul B Mahol --- libavcodec/mobiclip.c | 9 + 1 file changed, 9 insertions(+) diff --git a/libavcodec/mobiclip.c b/libavcodec/mobiclip.c index d147eddbae..c296ce3c78 100644 --- a/libavcodec/mobiclip.c +++ b/libavcodec/mobiclip.c @@ -1389,6 +1389,14 @@ static int mobiclip_decode(AVCodecContext *avctx, void *data, return 0; } +static void mobiclip_flush(AVCodecContext *avctx) +{ +MobiClipContext *s = avctx->priv_data; + +for (int i = 0; i < 6; i++) +av_frame_unref(s->pic[i]); +} + static av_cold int mobiclip_close(AVCodecContext *avctx) { MobiClipContext *s = avctx->priv_data; @@ -1421,6 +1429,7 @@ AVCodec ff_mobiclip_decoder = { .priv_data_size = sizeof(MobiClipContext), .init = mobiclip_init, .decode = mobiclip_decode, +.flush = mobiclip_flush, .close = mobiclip_close, .capabilities = AV_CODEC_CAP_DR1, }; -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 2/2] avformat/moflex: make seeking more useful
Signed-off-by: Paul B Mahol --- libavformat/moflex.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/libavformat/moflex.c b/libavformat/moflex.c index 747e32f079..257408 100644 --- a/libavformat/moflex.c +++ b/libavformat/moflex.c @@ -327,7 +327,13 @@ static int moflex_read_packet(AVFormatContext *s, AVPacket *pkt) av_packet_move_ref(pkt, packet); pkt->pos = m->pos; pkt->stream_index = stream_index; -pkt->flags |= AV_PKT_FLAG_KEY; +if (s->streams[stream_index]->codecpar->codec_type == AVMEDIA_TYPE_VIDEO) { +pkt->duration = 1; +if (pkt->data[0] & 0x80) +pkt->flags |= AV_PKT_FLAG_KEY; +} else { +pkt->flags |= AV_PKT_FLAG_KEY; +} return ret; } } @@ -341,6 +347,16 @@ static int moflex_read_packet(AVFormatContext *s, AVPacket *pkt) return AVERROR_EOF; } +static int moflex_read_seek(AVFormatContext *s, int stream_index, +int64_t pts, int flags) +{ +MOFLEXDemuxContext *m = s->priv_data; + +m->in_block = 0; + +return -1; +} + static int moflex_read_close(AVFormatContext *s) { for (int i = 0; i < s->nb_streams; i++) { @@ -360,6 +376,7 @@ AVInputFormat ff_moflex_demuxer = { .read_probe = moflex_probe, .read_header= moflex_read_header, .read_packet= moflex_read_packet, +.read_seek = moflex_read_seek, .read_close = moflex_read_close, .extensions = "moflex", .flags = AVFMT_GENERIC_INDEX, -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/3] avcodec/fastaudio: Remove redundant % 32
On Wed, Sep 09, 2020 at 03:01:41AM +0200, Paul B Mahol wrote: > On Tue, Sep 08, 2020 at 11:29:20PM +0200, Michael Niedermayer wrote: > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/fastaudio.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > ok will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Whats the most studid thing your enemy could do ? Blow himself up Whats the most studid thing you could do ? Give up your rights and freedom because your enemy blew himself up. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avcodec/agm: Fix off by 1 error in decode_inter_plane()
On Thu, Sep 10, 2020 at 09:15:22PM +0200, Paul B Mahol wrote: > On Thu, Sep 10, 2020 at 07:04:54PM +0200, Michael Niedermayer wrote: > > Fixes: Regression since 1f2096945709a32315da740691b5716da55893c3 > > Found-by: > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/agm.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > lgtm will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB "I am not trying to be anyone's saviour, I'm trying to think about the future and not be sad" - Elon Musk signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avcodec/agm: Fix off by 1 error in decode_inter_plane()
On Thu, Sep 10, 2020 at 07:04:54PM +0200, Michael Niedermayer wrote: > Fixes: Regression since 1f2096945709a32315da740691b5716da55893c3 > Found-by: > Signed-off-by: Michael Niedermayer > --- > libavcodec/agm.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > lgtm ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] avcodec/mips: [loongson] Fixed mmi optimization
On Thu, Sep 03, 2020 at 02:29:51PM +0800, Shiyou Yin wrote: > From: gxw > > Test case fate-checkasm-h264pred failed in latest community code. > This patch fixed the bug. will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB "I am not trying to be anyone's saviour, I'm trying to think about the future and not be sad" - Elon Musk signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] Fix msa can't be disabled when '--cpu=loongson3a' assigned.
On Thu, Sep 10, 2020 at 07:05:38PM +0800, Shiyou Yin wrote: > >-Original Message- > >From: ffmpeg-devel-boun...@ffmpeg.org > >[mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of > >Shiyou Yin > >Sent: Thursday, September 3, 2020 2:30 PM > >To: ffmpeg-devel@ffmpeg.org > >Subject: [FFmpeg-devel] [PATCH 2/2] Fix msa can't be disabled when > >'--cpu=loongson3a' assigned. > > > >There are compiler and runtime check for MSA and MMI. > >Remove the redundant setting of MSA and MMI for cores specified by "--cpu". > > > >Signed-off-by: Shiyou Yin > >--- > > configure | 9 - > > 1 file changed, 9 deletions(-) > > > >diff --git a/configure b/configure > >index 5640720..7f103fa 100755 > >--- a/configure > >+++ b/configure > >@@ -5025,8 +5025,6 @@ elif enabled mips; then > > disable loongson3 > > disable mipsdsp > > disable mipsdspr2 > >-disable msa > >-disable mmi > > > > cpuflags="-march=$cpu" > > > >@@ -5035,17 +5033,13 @@ elif enabled mips; then > > mips1|mips3) > > ;; > > mips32r2) > >-enable msa > > enable mips32r2 > > ;; > > mips32r5) > >-enable msa > > enable mips32r2 > > enable mips32r5 > > ;; > > mips64r2|mips64r5) > >-enable msa > >-enable mmi > > enable mips64r2 > > enable loongson3 > > ;; > >@@ -5062,7 +5056,6 @@ elif enabled mips; then > > enable mips32r2 > > ;; > > p5600) > >-enable msa > > enable mips32r2 > > enable mips32r5 > > check_cflags "-mtune=p5600" && check_cflags "-msched-weight > > -mload-store-pairs > >-funroll-loops" > >@@ -5077,7 +5070,6 @@ elif enabled mips; then > > ;; > > # Cores from Loongson > > loongson2e|loongson2f|loongson3*) > >-enable mmi > > enable local_aligned > > enable simd_align_16 > > enable fast_64bit > >@@ -5100,7 +5092,6 @@ elif enabled mips; then > > case $cpu in > > loongson3*) > > enable loongson3 > >-enable msa > > cpuflags="-march=loongson3a -mhard-float > > $expensive_optimization_flag" > > ;; > > loongson2e) > >-- > >2.1.0 > > > > Ping. will apply thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The educated differ from the uneducated as much as the living from the dead. -- Aristotle signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [FFmpeg-cvslog] fate: disable automatic conversions on many tests.
On Thu, Sep 10, 2020 at 07:35:12PM +0200, Nicolas George wrote: > Michael Niedermayer (12020-09-10): > > this breaks several tests on big endian as that needs converts at diffferent > > places. > > > > heres a list of failures > > Thanks for pointing it. I do not see these archs on fate.ffmpeg.org. Is > there a way to get the error output? the mips qemu fate box run out of diskspace, ive cleared it up so it might reappear in the next day or 2, if not then it needs checking what else is stuck Iam not sure why a out of diskspace resulted in the entry to disappear entirely off fate.ffmpeg.org. But that is something that probably should be looked into and fixed too as it makes it very easy to miss that a box is broken thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Never trust a computer, one day, it may think you are the virus. -- Compn signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [FFmpeg-cvslog] fate: disable automatic conversions on many tests.
Michael Niedermayer (12020-09-10): > this breaks several tests on big endian as that needs converts at diffferent > places. > > heres a list of failures Thanks for pointing it. I do not see these archs on fate.ffmpeg.org. Is there a way to get the error output? Anyway, I will try to find a big-endian arch and check. Regards, -- Nicolas George signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avcodec/agm: Fix off by 1 error in decode_inter_plane()
Fixes: Regression since 1f2096945709a32315da740691b5716da55893c3 Found-by: Signed-off-by: Michael Niedermayer --- libavcodec/agm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/agm.c b/libavcodec/agm.c index 19490c5456..f60cbf1a18 100644 --- a/libavcodec/agm.c +++ b/libavcodec/agm.c @@ -423,8 +423,8 @@ static int decode_inter_plane(AGMContext *s, GetBitContext *gb, int size, int map = s->map[x]; if (orig_mv_x >= -32) { -if (y * 8 + mv_y < 0 || y * 8 + mv_y + 8 >= h || -x * 8 + mv_x < 0 || x * 8 + mv_x + 8 >= w) +if (y * 8 + mv_y < 0 || y * 8 + mv_y + 8 > h || +x * 8 + mv_x < 0 || x * 8 + mv_x + 8 > w) return AVERROR_INVALIDDATA; copy_block8(frame->data[plane] + (s->blocks_h - 1 - y) * 8 * frame->linesize[plane] + x * 8, -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [FFmpeg-cvslog] fate: disable automatic conversions on many tests.
On Tue, Sep 08, 2020 at 12:20:25PM +, Nicolas George wrote: > ffmpeg | branch: master | Nicolas George | Fri Aug 14 > 18:58:27 2020 +0200| [f08e024ac7d249064648a43bab06ed545f8827c7] | committer: > Nicolas George > > fate: disable automatic conversions on many tests. > > Explicitly insert the scale or aresample filter where it would > have been inserted by the negotiation. > Re-enable conversions if it cannot be done easily. > > If a conversion is needed in a test, we want to know about it. > If the negotiation changes and makes new conversion necessary, > we want to know about it even more. > > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f08e024ac7d249064648a43bab06ed545f8827c7 > --- this breaks several tests on big endian as that needs converts at diffferent places. heres a list of failures make: *** [fate-filter-yuvtestsrc-yuv444p12] Error 1 make: *** [fate-filter-framerate-12bit-up] Error 1 make: *** [fate-filter-framerate-12bit-down] Error 1 make: *** [fate-bmp-16bit-mask] Error 1 make: *** [fate-bmp-15bit] Error 1 make: *** [fate-bmp-15bit-mask] Error 1 make: *** [fate-gif-color] Error 1 make: *** [fate-gif-disposal-background] Error 1 make: *** [fate-gif-disposal-restore] Error 1 make: *** [fate-gif-gray] Error 1 make: *** [fate-gif-deal] Error 1 make: *** [fate-h264-conformance-frext-hi422fr13_sony_b] Error 1 make: *** [fate-h264-conformance-frext-hi422fr6_sony_a] Error 1 make: *** [fate-h264-conformance-frext-pph10i1_panasonic_a] Error 1 make: *** [fate-h264-conformance-frext-pph10i3_panasonic_a] Error 1 make: *** [fate-h264-conformance-frext-pph422i1_panasonic_a] Error 1 make: *** [fate-h264-conformance-frext-pph10i2_panasonic_a] Error 1 make: *** [fate-h264-conformance-frext-pph422i3_panasonic_a] Error 1 make: *** [fate-h264-conformance-frext-pph10i4_panasonic_a] Error 1 make: *** [fate-h264-conformance-frext-pph10i6_panasonic_a] Error 1 make: *** [fate-h264-conformance-frext-pph422i2_panasonic_a] Error 1 make: *** [fate-h264-conformance-frext-pph422i4_panasonic_a] Error 1 make: *** [fate-h264-conformance-frext-pph10i5_panasonic_a] Error 1 make: *** [fate-h264-conformance-frext-pph10i7_panasonic_a] Error 1 make: *** [fate-h264-conformance-frext-pph422i6_panasonic_a] Error 1 make: *** [fate-h264-conformance-frext-pph422i5_panasonic_a] Error 1 make: *** [fate-h264-conformance-frext-pph422i7_panasonic_a] Error 1 make: *** [fate-h264-invalid-ref-mod] Error 1 make: *** [fate-hevc-conformance-DBLK_A_MAIN10_VIXS_3] Error 1 make: *** [fate-hevc-conformance-WP_A_MAIN10_Toshiba_3] Error 1 make: *** [fate-hevc-conformance-WP_MAIN10_B_Toshiba_3] Error 1 make: *** [fate-hevc-conformance-WPP_A_ericsson_MAIN10_2] Error 1 make: *** [fate-hevc-conformance-WPP_D_ericsson_MAIN10_2] Error 1 make: *** [fate-hevc-conformance-WPP_B_ericsson_MAIN10_2] Error 1 make: *** [fate-hevc-conformance-WPP_C_ericsson_MAIN10_2] Error 1 make: *** [fate-hevc-conformance-WPP_E_ericsson_MAIN10_2] Error 1 make: *** [fate-hevc-conformance-WPP_F_ericsson_MAIN10_2] Error 1 make: *** [fate-hevc-conformance-INITQP_B_Sony_1] Error 1 make: *** [fate-hevc-conformance-IPCM_A_RExt_NEC] Error 1 make: *** [fate-hevc-conformance-IPCM_B_RExt_NEC] Error 1 make: *** [fate-hevc-conformance-PERSIST_RPARAM_A_RExt_Sony_1] Error 1 make: *** [fate-hevc-conformance-PERSIST_RPARAM_A_RExt_Sony_3] Error 1 make: *** [fate-hevc-conformance-ADJUST_IPRED_ANGLE_A_RExt_Mitsubishi_1] Error 1 make: *** [fate-hevc-conformance-SAO_A_RExt_MediaTek_1] Error 1 make: *** [fate-hevc-conformance-Main_422_10_A_RExt_Sony_1] Error 1 make: *** [fate-hevc-conformance-Main_422_10_B_RExt_Sony_1] Error 1 make: *** [fate-dnxhr-444] Error 1 make: *** [fate-dnxhr-12bit] Error 1 make: *** [fate-mss2-rgb555] Error 1 make: *** [fate-mss2-rgb555s] Error 1 make: *** [fate-pixlet-rgb] Error 1 make: *** [fate-prores-422_hq] Error 1 make: *** [fate-prores-422] Error 1 make: *** [fate-prores-422_lt] Error 1 make: *** [fate-prores-422_proxy] Error 1 make: *** [fate-prores-alpha] Error 1 make: *** [fate-prores-alpha_skip] Error 1 make: *** [fate-prores-transparency] Error 1 make: *** [fate-prores-transparency_skip] Error 1 make: *** [fate-qtrle-32bit] Error 1 make: *** [fate-vp9p2-20-10bit-yuv420] Error 1 make: *** [fate-vp9p2-20-12bit-yuv420] Error 1 make: *** [fate-vp9p3-20-10bit-yuv422] Error 1 make: *** [fate-vp9p3-20-10bit-yuv444] Error 1 make: *** [fate-vp9p3-20-10bit-yuv440] Error 1 make: *** [fate-vp9p3-20-12bit-yuv422] Error 1 make: *** [fate-vp9p3-20-12bit-yuv440] Error 1 make: *** [fate-vp9p3-20-12bit-yuv444] Error 1 make: *** [fate-ts-demux] Error 1 make: *** [fate-filter-showpalette] Error 1 make: *** [fate-filter-palettegen-1] Error 1 make: *** [fate-filter-palettegen-2] Error 1 make: *** [fate-fitsdec-ext_data_min_max] Error 1 make: *** [fate-fitsdec-bitpix-32] Error 1 make: *** [fate-fitsdec-bitpix-64] Error 1 make: *** [fate-fitsdec-blank_bitpix32] Error 1 make: *** [fate-hls-fmp4_ac3] Error 127 make: *** [fate-jpg-12bpp] Error 1 make: *** [fate-binsub-m
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/videotoolboxenc: fix use after destroy
> 在 2020年9月10日,下午10:21,Richard Kern 写道: > > > >> On Sep 10, 2020, at 8:57 AM, zhilizhao wrote: >> >> >> On Aug 28, 2020, at 8:55 AM, Steven Liu wrote: >>> >>> 于2020年8月27日周四 下午5:39写道: From: Zhao Zhili The lock is used in clear_frame_queue(). --- libavcodec/videotoolboxenc.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c index 988782f10d..758db9641f 100644 --- a/libavcodec/videotoolboxenc.c +++ b/libavcodec/videotoolboxenc.c @@ -2496,14 +2496,17 @@ static av_cold int vtenc_close(AVCodecContext *avctx) { VTEncContext *vtctx = avctx->priv_data; -pthread_cond_destroy(&vtctx->cv_sample_sent); -pthread_mutex_destroy(&vtctx->lock); - -if(!vtctx->session) return 0; +if(!vtctx->session) { +pthread_cond_destroy(&vtctx->cv_sample_sent); +pthread_mutex_destroy(&vtctx->lock); +return 0; +} VTCompressionSessionCompleteFrames(vtctx->session, kCMTimeIndefinite); clear_frame_queue(vtctx); +pthread_cond_destroy(&vtctx->cv_sample_sent); +pthread_mutex_destroy(&vtctx->lock); CFRelease(vtctx->session); vtctx->session = NULL; -- 2.28.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". >>> >>> >>> This patch look better than >>> https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200827025327.28334-1...@chinaffmpeg.org/ >>> >> >> Ping for the patch set. > Can you provide steps to reproduce the deadlock issue? I can get it pushed > this weekend if so. I only try to fix a use after destroy issue as the commit message says. It may solved another issue unintentional. Liu, could you help by giving more information about the deadlock issue, please. >> >>> >>> Thanks >>> Steven >>> ___ >>> ffmpeg-devel mailing list >>> ffmpeg-devel@ffmpeg.org >>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >>> >>> To unsubscribe, visit link above, or email >>> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". >> >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> >> To unsubscribe, visit link above, or email >> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/videotoolboxenc: fix use after destroy
> On Sep 10, 2020, at 8:57 AM, zhilizhao wrote: > > > >> On Aug 28, 2020, at 8:55 AM, Steven Liu wrote: >> >> 于2020年8月27日周四 下午5:39写道: >>> >>> From: Zhao Zhili >>> >>> The lock is used in clear_frame_queue(). >>> --- >>> libavcodec/videotoolboxenc.c | 11 +++ >>> 1 file changed, 7 insertions(+), 4 deletions(-) >>> >>> diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c >>> index 988782f10d..758db9641f 100644 >>> --- a/libavcodec/videotoolboxenc.c >>> +++ b/libavcodec/videotoolboxenc.c >>> @@ -2496,14 +2496,17 @@ static av_cold int vtenc_close(AVCodecContext >>> *avctx) >>> { >>>VTEncContext *vtctx = avctx->priv_data; >>> >>> -pthread_cond_destroy(&vtctx->cv_sample_sent); >>> -pthread_mutex_destroy(&vtctx->lock); >>> - >>> -if(!vtctx->session) return 0; >>> +if(!vtctx->session) { >>> +pthread_cond_destroy(&vtctx->cv_sample_sent); >>> +pthread_mutex_destroy(&vtctx->lock); >>> +return 0; >>> +} >>> >>>VTCompressionSessionCompleteFrames(vtctx->session, >>> kCMTimeIndefinite); >>>clear_frame_queue(vtctx); >>> +pthread_cond_destroy(&vtctx->cv_sample_sent); >>> +pthread_mutex_destroy(&vtctx->lock); >>>CFRelease(vtctx->session); >>>vtctx->session = NULL; >>> >>> -- >>> 2.28.0 >>> >>> ___ >>> ffmpeg-devel mailing list >>> ffmpeg-devel@ffmpeg.org >>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >>> >>> To unsubscribe, visit link above, or email >>> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". >> >> >> This patch look better than >> https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200827025327.28334-1...@chinaffmpeg.org/ >> > > Ping for the patch set. Can you provide steps to reproduce the deadlock issue? I can get it pushed this weekend if so. > >> >> Thanks >> Steven >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> >> To unsubscribe, visit link above, or email >> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v4 1/1] avformat: add mca demuxer
On Thu, Sep 03, 2020 at 04:32:37PM -0600, liush...@aosc.io wrote: > From: Zixing Liu > > Signed-off-by: liushuyu > --- > Changelog| 1 + > doc/general.texi | 2 + > libavformat/Makefile | 1 + > libavformat/allformats.c | 1 + > libavformat/mca.c| 226 +++ > libavformat/version.h| 2 +- > 6 files changed, 232 insertions(+), 1 deletion(-) > create mode 100644 libavformat/mca.c > Gonna test and apply soon. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avcodec/utils: make the src paramater for ff_thread_ref_frame const
Signed-off-by: James Almer --- libavcodec/thread.h | 2 +- libavcodec/utils.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libavcodec/thread.h b/libavcodec/thread.h index 540135fbc9..87bf154da9 100644 --- a/libavcodec/thread.h +++ b/libavcodec/thread.h @@ -129,7 +129,7 @@ int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags); */ void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f); -int ff_thread_ref_frame(ThreadFrame *dst, ThreadFrame *src); +int ff_thread_ref_frame(ThreadFrame *dst, const ThreadFrame *src); int ff_thread_init(AVCodecContext *s); int ff_slice_thread_execute_with_mainfunc(AVCodecContext *avctx, diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 2e5185f364..f0a41c99b5 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -1852,7 +1852,7 @@ unsigned int avpriv_toupper4(unsigned int x) ((unsigned)av_toupper((x >> 24) & 0xFF) << 24); } -int ff_thread_ref_frame(ThreadFrame *dst, ThreadFrame *src) +int ff_thread_ref_frame(ThreadFrame *dst, const ThreadFrame *src) { int ret; -- 2.27.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] avcodec/videotoolboxenc: fix use after destroy
> On Aug 28, 2020, at 8:55 AM, Steven Liu wrote: > > 于2020年8月27日周四 下午5:39写道: >> >> From: Zhao Zhili >> >> The lock is used in clear_frame_queue(). >> --- >> libavcodec/videotoolboxenc.c | 11 +++ >> 1 file changed, 7 insertions(+), 4 deletions(-) >> >> diff --git a/libavcodec/videotoolboxenc.c b/libavcodec/videotoolboxenc.c >> index 988782f10d..758db9641f 100644 >> --- a/libavcodec/videotoolboxenc.c >> +++ b/libavcodec/videotoolboxenc.c >> @@ -2496,14 +2496,17 @@ static av_cold int vtenc_close(AVCodecContext *avctx) >> { >> VTEncContext *vtctx = avctx->priv_data; >> >> -pthread_cond_destroy(&vtctx->cv_sample_sent); >> -pthread_mutex_destroy(&vtctx->lock); >> - >> -if(!vtctx->session) return 0; >> +if(!vtctx->session) { >> +pthread_cond_destroy(&vtctx->cv_sample_sent); >> +pthread_mutex_destroy(&vtctx->lock); >> +return 0; >> +} >> >> VTCompressionSessionCompleteFrames(vtctx->session, >>kCMTimeIndefinite); >> clear_frame_queue(vtctx); >> +pthread_cond_destroy(&vtctx->cv_sample_sent); >> +pthread_mutex_destroy(&vtctx->lock); >> CFRelease(vtctx->session); >> vtctx->session = NULL; >> >> -- >> 2.28.0 >> >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> >> To unsubscribe, visit link above, or email >> ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". > > > This patch look better than > https://patchwork.ffmpeg.org/project/ffmpeg/patch/20200827025327.28334-1...@chinaffmpeg.org/ > Ping for the patch set. > > Thanks > Steven > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > To unsubscribe, visit link above, or email > ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] dnn/native: add native support for dense
Signed-off-by: Mingyu Yin --- libavfilter/dnn/Makefile | 1 + libavfilter/dnn/dnn_backend_native.h | 2 + .../dnn/dnn_backend_native_layer_conv2d.h | 1 - .../dnn/dnn_backend_native_layer_dense.c | 151 ++ .../dnn/dnn_backend_native_layer_dense.h | 37 + libavfilter/dnn/dnn_backend_native_layers.c | 2 + tests/dnn/dnn-layer-dense-test.c | 131 +++ tools/python/convert_from_tensorflow.py | 137 ++-- 8 files changed, 447 insertions(+), 15 deletions(-) create mode 100644 libavfilter/dnn/dnn_backend_native_layer_dense.c create mode 100644 libavfilter/dnn/dnn_backend_native_layer_dense.h create mode 100644 tests/dnn/dnn-layer-dense-test.c diff --git a/libavfilter/dnn/Makefile b/libavfilter/dnn/Makefile index e0957073ee..3681801892 100644 --- a/libavfilter/dnn/Makefile +++ b/libavfilter/dnn/Makefile @@ -2,6 +2,7 @@ OBJS-$(CONFIG_DNN) += dnn/dnn_interface.o OBJS-$(CONFIG_DNN) += dnn/dnn_backend_native.o OBJS-$(CONFIG_DNN) += dnn/dnn_backend_native_layers.o OBJS-$(CONFIG_DNN) += dnn/dnn_backend_native_layer_avgpool.o +OBJS-$(CONFIG_DNN) += dnn/dnn_backend_native_layer_dense.o OBJS-$(CONFIG_DNN) += dnn/dnn_backend_native_layer_pad.o OBJS-$(CONFIG_DNN) += dnn/dnn_backend_native_layer_conv2d.o OBJS-$(CONFIG_DNN) += dnn/dnn_backend_native_layer_depth2space.o diff --git a/libavfilter/dnn/dnn_backend_native.h b/libavfilter/dnn/dnn_backend_native.h index b1f8f3d6bf..0c98fd1a0c 100644 --- a/libavfilter/dnn/dnn_backend_native.h +++ b/libavfilter/dnn/dnn_backend_native.h @@ -45,11 +45,13 @@ typedef enum { DLT_MATH_BINARY = 5, DLT_MATH_UNARY = 6, DLT_AVG_POOL = 7, +DLT_DENSE = 8, DLT_COUNT } DNNLayerType; typedef enum {DOT_INPUT = 1, DOT_OUTPUT = 2, DOT_INTERMEDIATE = DOT_INPUT | DOT_OUTPUT} DNNOperandType; typedef enum {VALID, SAME, SAME_CLAMP_TO_EDGE} DNNPaddingParam; +typedef enum {RELU, TANH, SIGMOID, NONE, LEAKY_RELU} DNNActivationFunc; typedef struct Layer{ DNNLayerType type; diff --git a/libavfilter/dnn/dnn_backend_native_layer_conv2d.h b/libavfilter/dnn/dnn_backend_native_layer_conv2d.h index 72319f2ebe..1295028c46 100644 --- a/libavfilter/dnn/dnn_backend_native_layer_conv2d.h +++ b/libavfilter/dnn/dnn_backend_native_layer_conv2d.h @@ -23,7 +23,6 @@ #include "dnn_backend_native.h" -typedef enum {RELU, TANH, SIGMOID, NONE, LEAKY_RELU} DNNActivationFunc; typedef struct ConvolutionalParams{ int32_t input_num, output_num, kernel_size; diff --git a/libavfilter/dnn/dnn_backend_native_layer_dense.c b/libavfilter/dnn/dnn_backend_native_layer_dense.c new file mode 100644 index 00..694a170b65 --- /dev/null +++ b/libavfilter/dnn/dnn_backend_native_layer_dense.c @@ -0,0 +1,151 @@ +/* + * Copyright (c) 2018 Sergey Lavrushkin + * + * 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 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "libavutil/avassert.h" +#include "dnn_backend_native_layer_dense.h" + +int dnn_load_layer_dense(Layer *layer, AVIOContext *model_file_context, int file_size, int operands_num) +{ +DenseParams *dense_params; +int kernel_size; +int dnn_size = 0; +dense_params = av_malloc(sizeof(*dense_params)); +if (!dense_params) +return 0; + +dense_params->activation = (int32_t)avio_rl32(model_file_context); +dense_params->input_num = (int32_t)avio_rl32(model_file_context); +dense_params->output_num = (int32_t)avio_rl32(model_file_context); +dense_params->has_bias = (int32_t)avio_rl32(model_file_context); +dnn_size += 16; + +kernel_size = dense_params->input_num * dense_params->output_num; +dnn_size += kernel_size * 4; +if (dense_params->has_bias) +dnn_size += dense_params->output_num * 4; + +if (dnn_size > file_size || dense_params->input_num <= 0 || +dense_params->output_num <= 0){ +av_freep(&dense_params); +return 0; +} + +dense_params->kernel = av_malloc(kernel_size * sizeof(float)); +if (!dense_params->kernel) { +av_freep(&dense_pa
[FFmpeg-devel] [PATCH 2/2] avcodec/utils: Require a non zero channels unless AV_CODEC_CAP_CHANNEL_CONF is set
This avoids per codec checks for channels not being 0 Fixes: division by 0 Fixes: 25419/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FASTAUDIO_fuzzer-5632544761184256 Fixes: 25433/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FASTAUDIO_fuzzer-6215671900536832 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Suggested-by: Paul B Mahol See: [FFmpeg-devel] [PATCH 1/3] avcodec/fastaudio: Check channel Signed-off-by: Michael Niedermayer --- libavcodec/utils.c | 9 + 1 file changed, 9 insertions(+) diff --git a/libavcodec/utils.c b/libavcodec/utils.c index 2e5185f364..f78ec620c1 100644 --- a/libavcodec/utils.c +++ b/libavcodec/utils.c @@ -666,6 +666,15 @@ int attribute_align_arg avcodec_open2(AVCodecContext *avctx, const AVCodec *code ret = AVERROR(EINVAL); goto free_and_end; } +if (av_codec_is_decoder(codec) && +codec->type == AVMEDIA_TYPE_AUDIO && +!(codec->capabilities & AV_CODEC_CAP_CHANNEL_CONF) && +avctx->channels == 0) { +av_log(avctx, AV_LOG_ERROR, "Decoder requires channel count but channels not set\n"); +ret = AVERROR(EINVAL); +goto free_and_end; +} + if (avctx->sample_rate < 0) { av_log(avctx, AV_LOG_ERROR, "Invalid sample rate: %d\n", avctx->sample_rate); ret = AVERROR(EINVAL); -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH 1/2] avcodec: Set AV_CODEC_CAP_CHANNEL_CONF in more decoders
Suggested-by: Paul B Mahol See: [FFmpeg-devel] [PATCH 1/3] avcodec/fastaudio: Check channels Signed-off-by: Michael Niedermayer --- libavcodec/ac3dec_fixed.c | 3 ++- libavcodec/ac3dec_float.c | 6 -- libavcodec/adxdec.c | 3 ++- libavcodec/flacdec.c| 4 +++- libavcodec/mpegaudiodec_fixed.c | 15 ++- libavcodec/mpegaudiodec_float.c | 15 ++- libavcodec/pcm-dvd.c| 3 ++- libavcodec/ralf.c | 3 ++- libavcodec/s302m.c | 3 ++- libavcodec/shorten.c| 5 - 10 files changed, 41 insertions(+), 19 deletions(-) diff --git a/libavcodec/ac3dec_fixed.c b/libavcodec/ac3dec_fixed.c index 336a538cad..f36854cdc5 100644 --- a/libavcodec/ac3dec_fixed.c +++ b/libavcodec/ac3dec_fixed.c @@ -176,7 +176,8 @@ AVCodec ff_ac3_fixed_decoder = { .init = ac3_decode_init, .close = ac3_decode_end, .decode = ac3_decode_frame, -.capabilities = AV_CODEC_CAP_DR1, +.capabilities = AV_CODEC_CAP_CHANNEL_CONF | + AV_CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"), .sample_fmts= (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_NONE }, diff --git a/libavcodec/ac3dec_float.c b/libavcodec/ac3dec_float.c index b85a4ce336..57a626a181 100644 --- a/libavcodec/ac3dec_float.c +++ b/libavcodec/ac3dec_float.c @@ -61,7 +61,8 @@ AVCodec ff_ac3_decoder = { .init = ac3_decode_init, .close = ac3_decode_end, .decode = ac3_decode_frame, -.capabilities = AV_CODEC_CAP_DR1, +.capabilities = AV_CODEC_CAP_CHANNEL_CONF | + AV_CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52A (AC-3)"), .sample_fmts= (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, @@ -84,7 +85,8 @@ AVCodec ff_eac3_decoder = { .init = ac3_decode_init, .close = ac3_decode_end, .decode = ac3_decode_frame, -.capabilities = AV_CODEC_CAP_DR1, +.capabilities = AV_CODEC_CAP_CHANNEL_CONF | + AV_CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("ATSC A/52B (AC-3, E-AC-3)"), .sample_fmts= (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP, AV_SAMPLE_FMT_NONE }, diff --git a/libavcodec/adxdec.c b/libavcodec/adxdec.c index 40ed8e5ba7..69a391ee1f 100644 --- a/libavcodec/adxdec.c +++ b/libavcodec/adxdec.c @@ -183,7 +183,8 @@ AVCodec ff_adpcm_adx_decoder = { .init = adx_decode_init, .decode = adx_decode_frame, .flush = adx_decode_flush, -.capabilities = AV_CODEC_CAP_DR1, +.capabilities = AV_CODEC_CAP_CHANNEL_CONF | + AV_CODEC_CAP_DR1, .sample_fmts= (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_NONE }, }; diff --git a/libavcodec/flacdec.c b/libavcodec/flacdec.c index d1cf82b541..cf6128f897 100644 --- a/libavcodec/flacdec.c +++ b/libavcodec/flacdec.c @@ -669,7 +669,9 @@ AVCodec ff_flac_decoder = { .init = flac_decode_init, .close = flac_decode_close, .decode = flac_decode_frame, -.capabilities = AV_CODEC_CAP_DR1 | AV_CODEC_CAP_FRAME_THREADS, +.capabilities = AV_CODEC_CAP_CHANNEL_CONF | + AV_CODEC_CAP_DR1 | + AV_CODEC_CAP_FRAME_THREADS, .sample_fmts= (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16, AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S32, diff --git a/libavcodec/mpegaudiodec_fixed.c b/libavcodec/mpegaudiodec_fixed.c index ad7ceb20b6..68ba841efe 100644 --- a/libavcodec/mpegaudiodec_fixed.c +++ b/libavcodec/mpegaudiodec_fixed.c @@ -47,7 +47,8 @@ AVCodec ff_mp1_decoder = { .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, .decode = decode_frame, -.capabilities = AV_CODEC_CAP_DR1, +.capabilities = AV_CODEC_CAP_CHANNEL_CONF | + AV_CODEC_CAP_DR1, .flush = flush, .sample_fmts= (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P, AV_SAMPLE_FMT_S16, @@ -63,7 +64,8 @@ AVCodec ff_mp2_decoder = { .priv_data_size = sizeof(MPADecodeContext), .init = decode_init, .decode = decode_frame, -.capabilities = AV_CODEC_CAP_DR1, +.capabilities = AV_CODEC_CAP_CHANNEL_CONF | + AV_CODEC_CAP_DR1, .flush = flush, .sample_fmts= (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_S16P,
Re: [FFmpeg-devel] [PATCH 1/3] avcodec/fastaudio: Check channels
On Wed, Sep 09, 2020 at 03:00:51AM +0200, Paul B Mahol wrote: > On Tue, Sep 08, 2020 at 11:29:19PM +0200, Michael Niedermayer wrote: > > Fixes: division by 0 > > Fixes: > > 25419/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FASTAUDIO_fuzzer-5632544761184256 > > Fixes: > > 25433/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FASTAUDIO_fuzzer-6215671900536832 > > > > Found-by: continuous fuzzing process > > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/fastaudio.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > This should be in generic path somehow. There are decoders that does not need > this check > as they store number of channels in bitstream, but there are others that do > not, and thus adding > this check for each and every one of them is not nice. Posted a implementation using a different, generic approuch but such generic approuch requires all decoders to declare correctly if they store the channel configuration in some header. I suspect not all codecs have this correct yet after the patchset. maybe you can check if your decoders set the flag correctly fate and a bunch of files i have all pass but i do not have input files for all decoders ... Thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The worst form of inequality is to try to make unequal things equal. -- Aristotle signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/3] avfilter/src_movie: Remove unnecessary secondary AVPacket
Nicolas George: > Andreas Rheinhardt (12020-09-10): >> The movie and amovie filters currently use two packets. One of the two, >> pkt0, is the owner of the returned packet; it is also the destination >> packet for av_read_frame(). The other one pkt is initially (i.e. after >> av_read_frame()) a copy of pkt0; copy means that the contents of both >> are absolutely the same: They both point to the same AVBufferRef and the >> same side data. This violation of the refcounted packet API is only >> possible because pkt is not considered to own its data. Only pkt0 is >> ever unreferenced. >> The reason for pkt's existence seems to be historic: >> The API used for decoding audio (namely avcodec_decode_audio4()) could >> consume frames partially, i.e. it could return multiple frames for one >> packet and therefore it returned how much of the input buffer had been >> consumed. The caller was then supposed to update the packet's data and >> size pointer to reflect this and call avcodec_decode_audio4() again with >> the updated packet to get the next frame. >> But before the introduction of refcounted AVPackets where knowledge and >> responsibility about what to free lies with the underlying AVBuffer such >> a procedure required a spare packet (or one would need to record the >> original data and size fields separately to restore them before freeing >> the packet; notice that this code has been written when AVPackets still >> had a destruct field). But these times are long gone, so just remove the >> secondary AVPacket. >> >> Signed-off-by: Andreas Rheinhardt >> --- >> It seems that the avcodec_decode_audio4() lost the ability to output >> multiple frames per packet in 061a0c14bb5767bca72e3a7227ca400de439ba09. >> Am I right? > > I think I am ok with the change (and the two others), but I think it > would be much more useful update src_movie to use the new decoding API: > no need to keep a packet in the context, no need to distinguish between > audio and video. > > More work, but more useful. And it would allow to properly implement an > activate version. > > Regards, > I might implement the switch to the new decoding API later, but I wanted to fix the memleak first. - Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avformat/flic: add support for seeking to start
Signed-off-by: Paul B Mahol --- libavformat/flic.c | 38 +++--- 1 file changed, 35 insertions(+), 3 deletions(-) diff --git a/libavformat/flic.c b/libavformat/flic.c index e65c15..4552bff69c 100644 --- a/libavformat/flic.c +++ b/libavformat/flic.c @@ -202,6 +202,7 @@ static int flic_read_packet(AVFormatContext *s, int magic; int ret = 0; unsigned char preamble[FLIC_PREAMBLE_SIZE]; +int64_t pos = avio_tell(pb); while (!packet_read && !avio_feof(pb)) { @@ -219,15 +220,19 @@ static int flic_read_packet(AVFormatContext *s, return ret; pkt->stream_index = flic->video_stream_index; -pkt->pts = flic->frame_number++; -pkt->pos = avio_tell(pb); +pkt->pos = pos; memcpy(pkt->data, preamble, FLIC_PREAMBLE_SIZE); ret = avio_read(pb, pkt->data + FLIC_PREAMBLE_SIZE, size - FLIC_PREAMBLE_SIZE); if (ret != size - FLIC_PREAMBLE_SIZE) { ret = AVERROR(EIO); } +pkt->flags = flic->frame_number == 0 ? AV_PKT_FLAG_KEY : 0; +pkt->pts = flic->frame_number; +if (flic->frame_number == 0) +av_add_index_entry(s->streams[flic->video_stream_index], pkt->pos, pkt->pts, pkt->size, 0, AVINDEX_KEYFRAME); packet_read = 1; +flic->frame_number++; } else if (magic == FLIC_TFTD_CHUNK_AUDIO) { if ((ret = av_new_packet(pkt, size)) < 0) return ret; @@ -236,7 +241,8 @@ static int flic_read_packet(AVFormatContext *s, avio_skip(pb, 10); pkt->stream_index = flic->audio_stream_index; -pkt->pos = avio_tell(pb); +pkt->pos = pos; +pkt->flags = AV_PKT_FLAG_KEY; ret = avio_read(pb, pkt->data, size); if (ret != size) { @@ -254,6 +260,31 @@ static int flic_read_packet(AVFormatContext *s, return avio_feof(pb) ? AVERROR_EOF : ret; } +static int flic_read_seek(AVFormatContext *s, int stream_index, + int64_t pts, int flags) +{ +FlicDemuxContext *flic = s->priv_data; +AVStream *st = s->streams[stream_index]; +int64_t pos, ts; +int index; + +if (!st->index_entries || stream_index != flic->video_stream_index) +return -1; + +index = av_index_search_timestamp(st, pts, flags); + +if (index < 0) +index = av_index_search_timestamp(st, pts, flags ^ AVSEEK_FLAG_BACKWARD); +if (index < 0) +return -1; + +pos = st->index_entries[index].pos; +ts = st->index_entries[index].timestamp; +flic->frame_number = ts; +avio_seek(s->pb, pos, SEEK_SET); +return 0; +} + AVInputFormat ff_flic_demuxer = { .name = "flic", .long_name = NULL_IF_CONFIG_SMALL("FLI/FLC/FLX animation"), @@ -261,4 +292,5 @@ AVInputFormat ff_flic_demuxer = { .read_probe = flic_probe, .read_header= flic_read_header, .read_packet= flic_read_packet, +.read_seek = flic_read_seek, }; -- 2.17.1 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH v4 1/2] libavcodec/webp: add support for animated WebP decoding
On Wed, Sep 09, 2020 at 09:57:24 +0200, Zlomek, Josef wrote: > On Tue, Sep 8, 2020 at 3:19 PM Moritz Barsnick wrote: > > Missing version bumps. > There is a version bump for libavformat, as new demuxer was added. I didn't see that in v4. > I did not know that version should be increased also when there is a change > in existing decoder in libavcodec. Should it or not? I guess not. Since you're expanding the feature set, you should at least bump micro. > > And perhaps an explanation why fate changed. > > (Can be here, not in the commit message, if obvious. Was WebP > > previously set to 10 fps by default?) > > Previously, WebP used generic image demuxer, which uses 25 fps by default. > Usually, web browsers and webp libraries set default fps to 10 if frame > duration is too low. > So the logic in WebP demuxer was implemented similarly - if the frame > duration is not specified (single image) or is too low, the duration is set > to 100 ms resulting in 10 fps. > The fate tests were updated accordingly. Okay, thank you, I understand now. :-) Moritz ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/2] avcodec/mips: [loongson] Fixed mmi optimization
>-Original Message- >From: ffmpeg-devel-boun...@ffmpeg.org [mailto:ffmpeg-devel-boun...@ffmpeg.org] >On Behalf Of >Shiyou Yin >Sent: Thursday, September 3, 2020 2:30 PM >To: ffmpeg-devel@ffmpeg.org >Cc: gxw >Subject: [FFmpeg-devel] [PATCH 1/2] avcodec/mips: [loongson] Fixed mmi >optimization > >From: gxw > >Test case fate-checkasm-h264pred failed in latest community code. >This patch fixed the bug. > >Signed-off-by: Shiyou Yin >--- > libavcodec/mips/h264pred_mmi.c | 8 ++-- > 1 file changed, 6 insertions(+), 2 deletions(-) > >diff --git a/libavcodec/mips/h264pred_mmi.c b/libavcodec/mips/h264pred_mmi.c >index f4fe091..0209c2e 100644 >--- a/libavcodec/mips/h264pred_mmi.c >+++ b/libavcodec/mips/h264pred_mmi.c >@@ -178,7 +178,9 @@ void ff_pred8x8l_top_dc_8_mmi(uint8_t *src, int >has_topleft, > > "1: \n\t" > "bnez %[has_topright],2f \n\t" >-"pinsrh_3 %[ftmp2], %[ftmp2], %[ftmp4]\n\t" >+"dli%[tmp0],0xa4\n\t" >+"mtc1 %[tmp0],%[ftmp1]\n\t" >+"pshufh %[ftmp2], %[ftmp2], %[ftmp1]\n\t" > > "2: \n\t" > "dli%[tmp0],0x02\n\t" >@@ -370,7 +372,9 @@ void ff_pred8x8l_vertical_8_mmi(uint8_t *src, int >has_topleft, > > "1: \n\t" > "bnez %[has_topright],2f \n\t" >-"pinsrh_3 %[ftmp11], %[ftmp11], %[ftmp9]\n\t" >+"dli%[tmp0],0xa4\n\t" >+"mtc1 %[tmp0],%[ftmp1]\n\t" >+"pshufh %[ftmp11], %[ftmp11], %[ftmp1]\n\t" > > "2: \n\t" > "dli%[tmp0],0x02\n\t" >-- >2.1.0 > Ping. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/2] Fix msa can't be disabled when '--cpu=loongson3a' assigned.
>-Original Message- >From: ffmpeg-devel-boun...@ffmpeg.org [mailto:ffmpeg-devel-boun...@ffmpeg.org] >On Behalf Of >Shiyou Yin >Sent: Thursday, September 3, 2020 2:30 PM >To: ffmpeg-devel@ffmpeg.org >Subject: [FFmpeg-devel] [PATCH 2/2] Fix msa can't be disabled when >'--cpu=loongson3a' assigned. > >There are compiler and runtime check for MSA and MMI. >Remove the redundant setting of MSA and MMI for cores specified by "--cpu". > >Signed-off-by: Shiyou Yin >--- > configure | 9 - > 1 file changed, 9 deletions(-) > >diff --git a/configure b/configure >index 5640720..7f103fa 100755 >--- a/configure >+++ b/configure >@@ -5025,8 +5025,6 @@ elif enabled mips; then > disable loongson3 > disable mipsdsp > disable mipsdspr2 >-disable msa >-disable mmi > > cpuflags="-march=$cpu" > >@@ -5035,17 +5033,13 @@ elif enabled mips; then > mips1|mips3) > ;; > mips32r2) >-enable msa > enable mips32r2 > ;; > mips32r5) >-enable msa > enable mips32r2 > enable mips32r5 > ;; > mips64r2|mips64r5) >-enable msa >-enable mmi > enable mips64r2 > enable loongson3 > ;; >@@ -5062,7 +5056,6 @@ elif enabled mips; then > enable mips32r2 > ;; > p5600) >-enable msa > enable mips32r2 > enable mips32r5 > check_cflags "-mtune=p5600" && check_cflags "-msched-weight > -mload-store-pairs >-funroll-loops" >@@ -5077,7 +5070,6 @@ elif enabled mips; then > ;; > # Cores from Loongson > loongson2e|loongson2f|loongson3*) >-enable mmi > enable local_aligned > enable simd_align_16 > enable fast_64bit >@@ -5100,7 +5092,6 @@ elif enabled mips; then > case $cpu in > loongson3*) > enable loongson3 >-enable msa > cpuflags="-march=loongson3a -mhard-float > $expensive_optimization_flag" > ;; > loongson2e) >-- >2.1.0 > Ping. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] libavcodec/options_table: Add missing colorspace options
On 08-09-2020 08:31 pm, Harry Mallon wrote: On 8 Sep 2020, at 14:29, Gyan Doshi wrote: On 08-09-2020 06:23 pm, Harry Mallon wrote: On 8 Sep 2020, at 13:08, Gyan Doshi wrote: Hi Harry, On 06-09-2020 04:24 pm, Gyan Doshi wrote: On 06-09-2020 02:59 pm, Harry Mallon wrote: Is there anything I need to do to move this forwards? I think it is relatively uncontroversial? Agreed. Will push in 3 days if there are no objections. Can you link to some doc references for the entries you added? I'm not 100% sure what you mean, do you mean add some links to the doc/codecs.texi file, or just for the mailing list? ICtCp is definitely in ITU-R Rec 2100, I'm not sure about the others. It just seemed to me that they were missing from the command line arguments (and I needed to manually set ICtCp for something). For the ML, at present. Ideally, the canonical standard docs. Avoid Wikipedia, forum posts..etc Well ICtCp (which is the one I am interested in) is in ITU-R BT.2100 https://www.itu.int/dms_pubrec/itu-r/rec/bt/R-REC-BT.2100-2-201807-I!!PDF-E.pdf I am not sure where the chroma-derived ones come from. They are all already supported in ffmpeg (https://github.com/FFmpeg/FFmpeg/commit/f3571048669bf876681499f49e9df492f05f73c6), just they were missing from this specific command line option. Will push now and supplement details later. Thanks, Gyan ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avformat/utils: Avoid duplicating extradata from extract_extradata BSF
Andreas Rheinhardt: > Instead move the extradata contained in packet side-data to its > destination. This is possible because the side data already has zeroed > padding. > > Notice that the check for FF_MAX_EXTRADATA_SIZE has been dropped, > because said constant is from libavcodec/internal.h. If libavcodec > wanted to enforce this, it should do so in the extract_extradata BSF > instead. > > Signed-off-by: Andreas Rheinhardt > --- > libavformat/utils.c | 23 --- > 1 file changed, 8 insertions(+), 15 deletions(-) > > diff --git a/libavformat/utils.c b/libavformat/utils.c > index 807d9f10cb..63952e31a0 100644 > --- a/libavformat/utils.c > +++ b/libavformat/utils.c > @@ -3567,9 +3567,6 @@ static int extract_extradata(AVStream *st, const > AVPacket *pkt) > } > > while (ret >= 0 && !sti->avctx->extradata) { > -int extradata_size; > -uint8_t *extradata; > - > ret = av_bsf_receive_packet(sti->extract_extradata.bsf, pkt_ref); > if (ret < 0) { > if (ret != AVERROR(EAGAIN) && ret != AVERROR_EOF) > @@ -3577,19 +3574,15 @@ static int extract_extradata(AVStream *st, const > AVPacket *pkt) > continue; > } > > -extradata = av_packet_get_side_data(pkt_ref, > AV_PKT_DATA_NEW_EXTRADATA, > -&extradata_size); > - > -if (extradata) { > -av_assert0(!sti->avctx->extradata); > -if ((unsigned)extradata_size < FF_MAX_EXTRADATA_SIZE) > -sti->avctx->extradata = av_mallocz(extradata_size + > AV_INPUT_BUFFER_PADDING_SIZE); > -if (!sti->avctx->extradata) { > -av_packet_unref(pkt_ref); > -return AVERROR(ENOMEM); > +for (int i = 0; i < pkt_ref->side_data_elems; i++) { > +AVPacketSideData *side_data = &pkt_ref->side_data[i]; > +if (side_data->type == AV_PKT_DATA_NEW_EXTRADATA) { > +sti->avctx->extradata = side_data->data; > +sti->avctx->extradata_size = side_data->size; > +side_data->data = NULL; > +side_data->size = 0; > +break; > } > -memcpy(sti->avctx->extradata, extradata, extradata_size); > -sti->avctx->extradata_size = extradata_size; > } > av_packet_unref(pkt_ref); > } > Will apply tomorrow unless there are objections. - Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/3] avcodec/extract_extradata: Remove always-true check
Andreas Rheinhardt: > If a sequence header has already been found, it is certain that the next > startcode (being disjoint from the sequence header startcode) can begin > at index four at the earliest. > > Signed-off-by: Andreas Rheinhardt > --- > libavcodec/extract_extradata_bsf.c | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/libavcodec/extract_extradata_bsf.c > b/libavcodec/extract_extradata_bsf.c > index 6e80076522..38517bdcf3 100644 > --- a/libavcodec/extract_extradata_bsf.c > +++ b/libavcodec/extract_extradata_bsf.c > @@ -275,7 +275,6 @@ static int extract_extradata_mpeg12(AVBSFContext *ctx, > AVPacket *pkt, > if (state == 0x1B3) > found = 1; > else if (found && state != 0x1B5 && state < 0x200 && state >= 0x100) > { > -if (i > 3) { > *size = i - 3; > *data = av_malloc(*size + AV_INPUT_BUFFER_PADDING_SIZE); > if (!*data) > @@ -287,7 +286,6 @@ static int extract_extradata_mpeg12(AVBSFContext *ctx, > AVPacket *pkt, > pkt->data += *size; > pkt->size -= *size; > } > -} > break; > } > } > Will apply the last two patches of this patchset tomorrow unless there are objections. - Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 1/1] avfilter/vf_premultiply: add support for gbrapf32 format
On Wed, Sep 09, 2020 at 08:36:08PM -0700, mindm...@gmail.com wrote: > From: Mark Reid > > --- > libavfilter/vf_premultiply.c | 118 ++- > 1 file changed, 115 insertions(+), 3 deletions(-) > LGTM, applied. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH 2/3] avfilter/src_movie: Remove unnecessary secondary AVPacket
Andreas Rheinhardt (12020-09-10): > The movie and amovie filters currently use two packets. One of the two, > pkt0, is the owner of the returned packet; it is also the destination > packet for av_read_frame(). The other one pkt is initially (i.e. after > av_read_frame()) a copy of pkt0; copy means that the contents of both > are absolutely the same: They both point to the same AVBufferRef and the > same side data. This violation of the refcounted packet API is only > possible because pkt is not considered to own its data. Only pkt0 is > ever unreferenced. > The reason for pkt's existence seems to be historic: > The API used for decoding audio (namely avcodec_decode_audio4()) could > consume frames partially, i.e. it could return multiple frames for one > packet and therefore it returned how much of the input buffer had been > consumed. The caller was then supposed to update the packet's data and > size pointer to reflect this and call avcodec_decode_audio4() again with > the updated packet to get the next frame. > But before the introduction of refcounted AVPackets where knowledge and > responsibility about what to free lies with the underlying AVBuffer such > a procedure required a spare packet (or one would need to record the > original data and size fields separately to restore them before freeing > the packet; notice that this code has been written when AVPackets still > had a destruct field). But these times are long gone, so just remove the > secondary AVPacket. > > Signed-off-by: Andreas Rheinhardt > --- > It seems that the avcodec_decode_audio4() lost the ability to output > multiple frames per packet in 061a0c14bb5767bca72e3a7227ca400de439ba09. > Am I right? I think I am ok with the change (and the two others), but I think it would be much more useful update src_movie to use the new decoding API: no need to keep a packet in the context, no need to distinguish between audio and video. More work, but more useful. And it would allow to properly implement an activate version. Regards, -- Nicolas George signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".