[FFmpeg-devel] [PATCH 1/1] Add null check for the frame pointer
0001-Add-null-check-for-the-frame-pointer.patch Description: Binary data ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 1/1] Add null check for the frame pointer
Baozeng (2018-06-25): > The argument `frame` for avcodec_receive_frame function is user > controlled. If a null pointer is passed from the user, it will cause a > segmentation fault. Nack. Passing NULL there is a bug by the user, it needs to be fixed by the user. This patch would make it harder to detect. An assert would be acceptable. Also, please check how you sent this mail, it ended up in a non-standard format. And remember to add a context in git commit messages. Regards, -- Nicolas George signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi: add sobel, prewitt, roberts filters
On Mon, 25 Jun 2018, Danil Iashchenko wrote: Add opencl version of sobel, prewitt, roberts filters. --- configure | 3 + libavfilter/Makefile| 8 +- libavfilter/allfilters.c| 3 + libavfilter/opencl/convolution.cl | 82 ++ libavfilter/vf_convolution_opencl.c | 306 ++-- 5 files changed, 353 insertions(+), 49 deletions(-) Please add proper documentation as well. Thanks, Marton ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/1] Add null check for the frame pointer
Signed-off-by: Baozeng Ding The argument `frame` for avcodec_receive_frame function is user controlled. If a null pointer is passed from the user, it will cause a segmentation fault. --- libavcodec/decode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 6a3a4df1..689e90d 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -711,6 +711,7 @@ int attribute_align_arg avcodec_receive_frame(AVCodecContext *avctx, AVFrame *fr AVCodecInternal *avci = avctx->internal; int ret; +av_assert0(!frame); av_frame_unref(frame); if (!avcodec_is_open(avctx) || !av_codec_is_decoder(avctx->codec)) -- 2.7.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH 1/1] Add null check for the frame pointer
Signed-off-by: Baozeng Ding The argument `frame` for avcodec_receive_frame function is user controlled. If a null pointer is passed from the user, it will cause a segmentation fault. --- libavcodec/decode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/decode.c b/libavcodec/decode.c index 6a3a4df1..7df096c 100644 --- a/libavcodec/decode.c +++ b/libavcodec/decode.c @@ -711,6 +711,7 @@ int attribute_align_arg avcodec_receive_frame(AVCodecContext *avctx, AVFrame *fr AVCodecInternal *avci = avctx->internal; int ret; +av_assert0(frame != 0); av_frame_unref(frame); if (!avcodec_is_open(avctx) || !av_codec_is_decoder(avctx->codec)) -- 2.7.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 5/5] fate: Add test for namespace prefixes in libraries
On Sun, Jun 24, 2018 at 07:25:39PM +0100, Mark Thompson wrote: > Ensures that there are no external symbols in the built static libraries > which do not have suitable namespace prefixes. > --- > Not sure whether this will actually work on all platforms? (Only tested with > Linux/binutils.) fails on mingw64: TESTnamespace-avcodec 0160 T __wrap_avcodec_decode_audio4 0420 T __wrap_avcodec_decode_subtitle2 02c0 T __wrap_avcodec_decode_video2 0580 T __wrap_avcodec_encode_audio2 06e0 T __wrap_avcodec_encode_subtitle 0840 T __wrap_avcodec_encode_video2 T __wrap_avcodec_open2 0dc0 T __wrap_avcodec_receive_frame 0b00 T __wrap_avcodec_receive_packet 0c60 T __wrap_avcodec_send_frame 09a0 T __wrap_avcodec_send_packet Test namespace-avcodec failed. Look at tests/data/fate/namespace-avcodec.err for details. make: *** [fate-namespace-avcodec] Error 1 TESTnamespace-avdevice 14e0 T dshow_show_filter_properties 01e0 T dshow_try_setup_crossbar_options 0020 T libAVEnumMediaTypes_AddRef 01e0 T libAVEnumMediaTypes_Clone 04c0 T libAVEnumMediaTypes_Create 0780 T libAVEnumMediaTypes_Destroy 00e0 T libAVEnumMediaTypes_Next 0030 T libAVEnumMediaTypes_QueryInterface 0190 T libAVEnumMediaTypes_Release 0010 T libAVEnumMediaTypes_Reset T libAVEnumMediaTypes_Skip 0020 T libAVEnumPins_AddRef 01a0 T libAVEnumPins_Clone 03b0 T libAVEnumPins_Create 0580 T libAVEnumPins_Destroy 00e0 T libAVEnumPins_Next 0030 T libAVEnumPins_QueryInterface 0150 T libAVEnumPins_Release 0010 T libAVEnumPins_Reset T libAVEnumPins_Skip 0160 T libAVFilter_AddRef 0350 T libAVFilter_Create 0630 T libAVFilter_Destroy 0220 T libAVFilter_EnumPins 0260 T libAVFilter_FindPin T libAVFilter_GetClassID 0050 T libAVFilter_GetState 00c0 T libAVFilter_GetSyncSource 02d0 T libAVFilter_JoinFilterGraph 0020 T libAVFilter_Pause 0100 T libAVFilter_QueryFilterInfo 0170 T libAVFilter_QueryInterface 0150 T libAVFilter_QueryVendorInfo 0300 T libAVFilter_Release 0030 T libAVFilter_Run 0070 T libAVFilter_SetSyncSource 0010 T libAVFilter_Stop 0170 T libAVMemInputPin_AddRef 0d70 T libAVMemInputPin_Destroy 0120 T libAVMemInputPin_GetAllocator 0140 T libAVMemInputPin_GetAllocatorRequirements 0130 T libAVMemInputPin_NotifyAllocator 0660 T libAVMemInputPin_QueryInterface 0360 T libAVMemInputPin_Receive 0150 T libAVMemInputPin_ReceiveCanBlock 0750 T libAVMemInputPin_ReceiveMultiple 0610 T libAVMemInputPin_Release 0160 T libAVPin_AddRef 00f0 T libAVPin_BeginFlush T libAVPin_Connect 0060 T libAVPin_ConnectedTo 0270 T libAVPin_ConnectionMediaType 09b0 T libAVPin_Create 0d30 T libAVPin_Destroy 0010 T libAVPin_Disconnect 0100 T libAVPin_EndFlush 00e0 T libAVPin_EndOfStream 0320 T libAVPin_EnumMediaTypes 0110 T libAVPin_NewSegment 00c0 T libAVPin_QueryAccept 00a0 T libAVPin_QueryDirection 02f0 T libAVPin_QueryId 0180 T libAVPin_QueryInterface 00d0 T libAVPin_QueryInternalConnections 02a0 T libAVPin_QueryPinInfo 0520 T libAVPin_ReceiveConnection 05c0 T libAVPin_Release Test namespace-avdevice failed. Look at tests/data/fate/namespace-avdevice.err for details. make: *** [fate-namespace-avdevice] Error 1 TESTnamespace-avfilter TESTnamespace-avformat TESTnamespace-avutil TESTnamespace-postproc TESTnamespace-swresample T __wrap_swr_convert Test namespace-swresample failed. Look at tests/data/fate/namespace-swresample.err for details. make: *** [fate-namespace-swresample] Error 1 TESTnamespace-swscale T __wrap_sws_scale Test namespace-swscale failed. Look at tests/data/fate/namespace-swscale.err for details. make: *** [fate-namespace-swscale] Error 1 [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB It is dangerous to be right in matters on which the established authorities are wrong. -- Voltaire signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/5] lavf/mpjpegdec: Mark local variable static
On Sun, Jun 24, 2018 at 07:25:38PM +0100, Mark Thompson wrote: > --- > libavformat/mpjpegdec.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Old school: Use the lowest level language in which you can solve the problem conveniently. New school: Use the highest level language in which the latest supercomputer can solve the problem without the user falling asleep waiting. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 3/3] avformat/mov: Expose encryption info to the app.
Rebased and updated to handle multiple PSSH atoms. PTAL. On Tue, Jan 9, 2018 at 10:28 AM Jacob Trimble wrote: > On Mon, Jan 8, 2018 at 5:23 PM, Carl Eugen Hoyos > wrote: > > 2018-01-09 0:22 GMT+01:00 Jacob Trimble < > modmaker-at-google@ffmpeg.org>: > > > >> Updated with the new design for the side data and applied the realloc > >> fix to avoid large allocations. > > > >> +kid_count = avio_rb32(pb); > > > > Missing check here ... > > > >> +for (; i < kid_count && !pb->eof_reached; i++) { > >> +unsigned int min_kid_count = FFMIN(FFMAX(i, 1024), > kid_count); > >> +key_ids = av_fast_realloc(info->key_ids, &alloc_size, > > > >> + min_kid_count * > sizeof(*key_ids)); > > > > ... for an overflow here. > > Done > > > > > Thank you, Carl Eugen > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > From 2c2c6386432678ea485a84f90a02991f481324e1 Mon Sep 17 00:00:00 2001 From: Jacob Trimble Date: Wed, 6 Dec 2017 16:17:54 -0800 Subject: [PATCH] avformat/mov: Expose encryption info to the app. This exposes encryption info from the container to the app. This includes key ID, IV, and subsample byte ranges. The info is passed using the new side-data AV_PKT_DATA_ENCRYPTION_DATA and AV_PKT_DATA_ENCRYPTION_INIT_DATA. Signed-off-by: Jacob Trimble --- libavformat/mov.c | 120 +- 1 file changed, 119 insertions(+), 1 deletion(-) diff --git a/libavformat/mov.c b/libavformat/mov.c index 1011763641..1346ffe480 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -6198,6 +6198,114 @@ static int mov_read_saio(MOVContext *c, AVIOContext *pb, MOVAtom atom) return 0; } +static int mov_read_pssh(MOVContext *c, AVIOContext *pb, MOVAtom atom) +{ +AVEncryptionInitInfo *info, *old_init_info; +uint8_t **key_ids; +AVStream *st; +uint8_t *side_data, *extra_data, *old_side_data; +size_t side_data_size; +int ret = 0, old_side_data_size; +unsigned int version, kid_count, extra_data_size, alloc_size = 0; + +if (c->fc->nb_streams < 1) +return 0; +st = c->fc->streams[c->fc->nb_streams-1]; + +version = avio_r8(pb); /* version */ +avio_rb24(pb); /* flags */ + +info = av_encryption_init_info_alloc(/* system_id_size */ 16, /* num_key_ids */ 0, + /* key_id_size */ 16, /* data_size */ 0); +if (!info) +return AVERROR(ENOMEM); + +if (avio_read(pb, info->system_id, 16) != 16) { +av_log(c->fc, AV_LOG_ERROR, "Failed to read the system id\n"); +ret = AVERROR_INVALIDDATA; +goto finish; +} + +if (version > 0) { +kid_count = avio_rb32(pb); +if (kid_count >= INT_MAX / sizeof(*key_ids)) +return AVERROR(ENOMEM); + +for (unsigned int i = 0; i < kid_count && !pb->eof_reached; i++) { +unsigned int min_kid_count = FFMIN(FFMAX(i + 1, 1024), kid_count); +key_ids = av_fast_realloc(info->key_ids, &alloc_size, + min_kid_count * sizeof(*key_ids)); +if (!key_ids) { +ret = AVERROR(ENOMEM); +goto finish; +} +info->key_ids = key_ids; + +info->key_ids[i] = av_mallocz(16); +if (!info->key_ids[i]) { +ret = AVERROR(ENOMEM); +goto finish; +} +info->num_key_ids = i + 1; + +if (avio_read(pb, info->key_ids[i], 16) != 16) { +av_log(c->fc, AV_LOG_ERROR, "Failed to read the key id\n"); +ret = AVERROR_INVALIDDATA; +goto finish; +} +} + +if (pb->eof_reached) { +av_log(c->fc, AV_LOG_ERROR, "Hit EOF while reading pssh\n"); +ret = AVERROR_INVALIDDATA; +goto finish; +} +} + +extra_data_size = avio_rb32(pb); +ret = mov_try_read_block(pb, extra_data_size, &extra_data); +if (ret < 0) +goto finish; + +av_freep(&info->data); // malloc(0) may still allocate something. +info->data = extra_data; +info->data_size = extra_data_size; + +// If there is existing initialization data, append to the list. +old_side_data = av_stream_get_side_data(st, AV_PKT_DATA_ENCRYPTION_INIT_INFO, &old_side_data_size); +if (old_side_data) { +old_init_info = av_encryption_init_info_get_side_data(old_side_data, old_side_data_size); +if (old_init_info) { +// Append to the end of the list. +for (AVEncryptionInitInfo *cur = old_init_info;; cur = cur->next) { +if (!cur->next) { +cur->next = info; +break; +} +} +info = old_init_info; +} else { +// Assume existing side
Re: [FFmpeg-devel] [PATCH] libavutil/encryption_info: Add unit tests.
Now that the patches have been merged this doesn't depend on anything. On Fri, Jun 1, 2018 at 12:54 PM Jacob Trimble wrote: > On Fri, Jun 1, 2018 at 12:52 PM Jacob Trimble wrote: > > > > Signed-off-by: Jacob Trimble > > --- > > libavutil/Makefile| 1 + > > libavutil/encryption_info.h | 2 +- > > libavutil/tests/.gitignore| 2 + > > libavutil/tests/encryption_info.c | 176 ++ > > tests/fate/libavutil.mak | 4 + > > tests/ref/fate/encryption-info| 0 > > 6 files changed, 184 insertions(+), 1 deletion(-) > > create mode 100644 libavutil/tests/encryption_info.c > > create mode 100644 tests/ref/fate/encryption-info > > > > diff --git a/libavutil/Makefile b/libavutil/Makefile > > index d0632f16a6..9ed24cfc82 100644 > > --- a/libavutil/Makefile > > +++ b/libavutil/Makefile > > @@ -200,6 +200,7 @@ TESTPROGS = adler32 >\ > > des > \ > > dict > \ > > display > \ > > +encryption_info > \ > > error > \ > > eval > \ > > file > \ > > diff --git a/libavutil/encryption_info.h b/libavutil/encryption_info.h > > index 9140968fde..8fe7ebfe43 100644 > > --- a/libavutil/encryption_info.h > > +++ b/libavutil/encryption_info.h > > @@ -129,7 +129,7 @@ typedef struct AVEncryptionInitInfo { > > * > > * @param subsample_count The number of subsamples. > > * @param key_id_size The number of bytes in the key ID, should be 16. > > - * @param key_id_size The number of bytes in the IV, should be 16. > > + * @param iv_size The number of bytes in the IV, should be 16. > > * > > * @return The new AVEncryptionInfo structure, or NULL on error. > > */ > > diff --git a/libavutil/tests/.gitignore b/libavutil/tests/.gitignore > > index 71f75a8ee9..9d90827954 100644 > > --- a/libavutil/tests/.gitignore > > +++ b/libavutil/tests/.gitignore > > @@ -17,6 +17,7 @@ > > /dict > > /display > > /error > > +/encryption_info > > /eval > > /fifo > > /file > > @@ -24,6 +25,7 @@ > > /hmac > > /hwdevice > > /imgutils > > +/integer > > /lfg > > /lls > > /log > > diff --git a/libavutil/tests/encryption_info.c > b/libavutil/tests/encryption_info.c > > new file mode 100644 > > index 00..d489612b7d > > --- /dev/null > > +++ b/libavutil/tests/encryption_info.c > > @@ -0,0 +1,176 @@ > > +/* > > + * 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/encryption_info.h" > > + > > +#include > > +#include > > + > > +#include "libavutil/avassert.h" > > + > > +static const AVSubsampleEncryptionInfo test_subsamples[] = {{1, 2}, {3, > 4}, {5, 6}, {7, 8}}; > > +static const size_t test_subsample_count = sizeof(test_subsamples) / > sizeof(test_subsamples[0]); > > +static const uint8_t test_iv[] = {0x11, 0x12, 0x13, 0x14, 0x15, 0x16, > 0x17, 0x18}; > > +static const uint8_t test_key_id[] = {0x21, 0x22, 0x23, 0x24}; > > +static const uint8_t test_key_id_2[] = {0x31, 0x32, 0x33, 0x34}; > > +static const uint8_t test_system_id[] = {0x41, 0x42, 0x43}; > > +static const uint8_t test_data[] = {0x51, 0x52}; > > + > > +static int compare_encryption_info(const AVEncryptionInfo *a, const > AVEncryptionInfo *b) { > > +if (!a || !b || a->scheme != b->scheme || a->crypt_byte_block != > b->crypt_byte_block || > > +a->skip_byte_block != b->skip_byte_block || a->key_id_size != > b->key_id_size || > > +a->iv_size != b->iv_size || a->subsample_count != > b->subsample_count) > > +return 1; > > + > > +if (memcmp(a->key_id, b->key_id, a->key_id_size) != 0 || > > +memcmp(a->iv, b->iv, a->iv_size) != 0 || > > +memcmp(a->subsamples, b->subsamples, a->subsample_count * > sizeof(a->subsamples[0]))) > > +return 1; > > + > > +return 0; > > +} > > + > > +static int compare_encryption_init_info(const AVEncryptionInitInfo *a, > const AVEncryptionInitInfo *b) { > > +if (!a || !b || a->system_id_size != b->system_id_size || > > +a->num_key_ids != b->num_key_ids || a->key_id_size != > b->key_id_size || > > +a->data_size != b->data_size) > > +return 1; > > + > > +if (memcmp(a->system_id, b->sys
[FFmpeg-devel] [PATCH] lavd/dshow: Add namespace prefix to global functions
--- Not tested at all. libavdevice/dshow.c | 6 +++--- libavdevice/dshow_capture.h | 4 ++-- libavdevice/dshow_crossbar.c | 8 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/libavdevice/dshow.c b/libavdevice/dshow.c index de910c0994..6f613f31b0 100644 --- a/libavdevice/dshow.c +++ b/libavdevice/dshow.c @@ -509,7 +509,7 @@ end: * Pops up a user dialog allowing them to adjust properties for the given filter, if possible. */ void -dshow_show_filter_properties(IBaseFilter *device_filter, AVFormatContext *avctx) { +ff_dshow_show_filter_properties(IBaseFilter *device_filter, AVFormatContext *avctx) { ISpecifyPropertyPages *property_pages = NULL; IUnknown *device_filter_iunknown = NULL; HRESULT hr; @@ -581,7 +581,7 @@ dshow_cycle_pins(AVFormatContext *avctx, enum dshowDeviceType devtype, int should_show_properties = (devtype == VideoDevice) ? ctx->show_video_device_dialog : ctx->show_audio_device_dialog; if (should_show_properties) -dshow_show_filter_properties(device_filter, avctx); +ff_dshow_show_filter_properties(device_filter, avctx); r = IBaseFilter_EnumPins(device_filter, &pins); if (r != S_OK) { @@ -886,7 +886,7 @@ dshow_open_device(AVFormatContext *avctx, ICreateDevEnum *devenum, goto error; } -r = dshow_try_setup_crossbar_options(graph_builder2, device_filter, devtype, avctx); +r = ff_dshow_try_setup_crossbar_options(graph_builder2, device_filter, devtype, avctx); if (r != S_OK) { av_log(avctx, AV_LOG_ERROR, "Could not setup CrossBar\n"); diff --git a/libavdevice/dshow_capture.h b/libavdevice/dshow_capture.h index 475d62ba99..79c004a87f 100644 --- a/libavdevice/dshow_capture.h +++ b/libavdevice/dshow_capture.h @@ -346,9 +346,9 @@ struct dshow_ctx { /* * CrossBar / -HRESULT dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2, +HRESULT ff_dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2, IBaseFilter *device_filter, enum dshowDeviceType devtype, AVFormatContext *avctx); -void dshow_show_filter_properties(IBaseFilter *pFilter, AVFormatContext *avctx); +void ff_dshow_show_filter_properties(IBaseFilter *pFilter, AVFormatContext *avctx); #endif /* AVDEVICE_DSHOW_CAPTURE_H */ diff --git a/libavdevice/dshow_crossbar.c b/libavdevice/dshow_crossbar.c index 95fb466f4e..2438683cde 100644 --- a/libavdevice/dshow_crossbar.c +++ b/libavdevice/dshow_crossbar.c @@ -137,7 +137,7 @@ setup_crossbar_options(IAMCrossbar *cross_bar, enum dshowDeviceType devtype, AVF * Given a fully constructed graph, check if there is a cross bar filter, and configure its pins if so. */ HRESULT -dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2, +ff_dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2, IBaseFilter *device_filter, enum dshowDeviceType devtype, AVFormatContext *avctx) { struct dshow_ctx *ctx = avctx->priv_data; @@ -163,7 +163,7 @@ dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2, hr = IAMCrossbar_QueryInterface(cross_bar, &IID_IBaseFilter, (void **) &cross_bar_base_filter); if (hr != S_OK) goto end; -dshow_show_filter_properties(cross_bar_base_filter, avctx); +ff_dshow_show_filter_properties(cross_bar_base_filter, avctx); } if (devtype == VideoDevice && ctx->show_analog_tv_tuner_dialog) { @@ -173,7 +173,7 @@ dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2, hr = IAMCrossbar_QueryInterface(tv_tuner_filter, &IID_IBaseFilter, (void **) &tv_tuner_base_filter); if (hr != S_OK) goto end; -dshow_show_filter_properties(tv_tuner_base_filter, avctx); +ff_dshow_show_filter_properties(tv_tuner_base_filter, avctx); } else { av_log(avctx, AV_LOG_WARNING, "unable to find a tv tuner to display dialog for!"); } @@ -185,7 +185,7 @@ dshow_try_setup_crossbar_options(ICaptureGraphBuilder2 *graph_builder2, hr = IAMCrossbar_QueryInterface(tv_audio_filter, &IID_IBaseFilter, (void **) &tv_audio_base_filter); if (hr != S_OK) goto end; -dshow_show_filter_properties(tv_audio_base_filter, avctx); +ff_dshow_show_filter_properties(tv_audio_base_filter, avctx); } else { av_log(avctx, AV_LOG_WARNING, "unable to find a tv audio tuner to display dialog for!"); } -- 2.18.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 5/5] fate: Add test for namespace prefixes in libraries
On 25/06/18 18:41, Michael Niedermayer wrote: > On Sun, Jun 24, 2018 at 07:25:39PM +0100, Mark Thompson wrote: >> Ensures that there are no external symbols in the built static libraries >> which do not have suitable namespace prefixes. >> --- >> Not sure whether this will actually work on all platforms? (Only tested >> with Linux/binutils.) > > fails on mingw64: > TESTnamespace-avcodec > 0160 T __wrap_avcodec_decode_audio4 > 0420 T __wrap_avcodec_decode_subtitle2 > 02c0 T __wrap_avcodec_decode_video2 > 0580 T __wrap_avcodec_encode_audio2 > 06e0 T __wrap_avcodec_encode_subtitle > 0840 T __wrap_avcodec_encode_video2 > T __wrap_avcodec_open2 > 0dc0 T __wrap_avcodec_receive_frame > 0b00 T __wrap_avcodec_receive_packet > 0c60 T __wrap_avcodec_send_frame > 09a0 T __wrap_avcodec_send_packet Should these perhaps be renamed to (say) "ff_wrap_" so that they don't use reserved system namespace? I can just add __wrap to the set of allowed prefixes if people would prefer not to change. > Test namespace-avcodec failed. Look at tests/data/fate/namespace-avcodec.err > for details. > make: *** [fate-namespace-avcodec] Error 1 > TESTnamespace-avdevice > 14e0 T dshow_show_filter_properties > 01e0 T dshow_try_setup_crossbar_options Patch sent to fix these two. > 0020 T libAVEnumMediaTypes_AddRef > 01e0 T libAVEnumMediaTypes_Clone > 04c0 T libAVEnumMediaTypes_Create > 0780 T libAVEnumMediaTypes_Destroy > 00e0 T libAVEnumMediaTypes_Next > 0030 T libAVEnumMediaTypes_QueryInterface > 0190 T libAVEnumMediaTypes_Release > 0010 T libAVEnumMediaTypes_Reset > T libAVEnumMediaTypes_Skip > 0020 T libAVEnumPins_AddRef > 01a0 T libAVEnumPins_Clone > 03b0 T libAVEnumPins_Create > 0580 T libAVEnumPins_Destroy > 00e0 T libAVEnumPins_Next > 0030 T libAVEnumPins_QueryInterface > 0150 T libAVEnumPins_Release > 0010 T libAVEnumPins_Reset > T libAVEnumPins_Skip > 0160 T libAVFilter_AddRef > 0350 T libAVFilter_Create > 0630 T libAVFilter_Destroy > 0220 T libAVFilter_EnumPins > 0260 T libAVFilter_FindPin > T libAVFilter_GetClassID > 0050 T libAVFilter_GetState > 00c0 T libAVFilter_GetSyncSource > 02d0 T libAVFilter_JoinFilterGraph > 0020 T libAVFilter_Pause > 0100 T libAVFilter_QueryFilterInfo > 0170 T libAVFilter_QueryInterface > 0150 T libAVFilter_QueryVendorInfo > 0300 T libAVFilter_Release > 0030 T libAVFilter_Run > 0070 T libAVFilter_SetSyncSource > 0010 T libAVFilter_Stop > 0170 T libAVMemInputPin_AddRef > 0d70 T libAVMemInputPin_Destroy > 0120 T libAVMemInputPin_GetAllocator > 0140 T libAVMemInputPin_GetAllocatorRequirements > 0130 T libAVMemInputPin_NotifyAllocator > 0660 T libAVMemInputPin_QueryInterface > 0360 T libAVMemInputPin_Receive > 0150 T libAVMemInputPin_ReceiveCanBlock > 0750 T libAVMemInputPin_ReceiveMultiple > 0610 T libAVMemInputPin_Release > 0160 T libAVPin_AddRef > 00f0 T libAVPin_BeginFlush > T libAVPin_Connect > 0060 T libAVPin_ConnectedTo > 0270 T libAVPin_ConnectionMediaType > 09b0 T libAVPin_Create > 0d30 T libAVPin_Destroy > 0010 T libAVPin_Disconnect > 0100 T libAVPin_EndFlush > 00e0 T libAVPin_EndOfStream > 0320 T libAVPin_EnumMediaTypes > 0110 T libAVPin_NewSegment > 00c0 T libAVPin_QueryAccept > 00a0 T libAVPin_QueryDirection > 02f0 T libAVPin_QueryId > 0180 T libAVPin_QueryInterface > 00d0 T libAVPin_QueryInternalConnections > 02a0 T libAVPin_QueryPinInfo > 0520 T libAVPin_ReceiveConnection > 05c0 T libAVPin_Release From the vtable setup it looks like they should all be static (the pointers are assigned during setup), but I don't know if they are also needed for some other directshow magic. Does anyone know if there is some requirement for them to be external symbols? If they need to be external then I would add the prefix "libAV" to be allowed. > Test namespace-avdevice failed. Look at > tests/data/fate/namespace-avdevice.err for details. > make: *** [fate-namespace-avdevice] Error 1 > TESTnamespace-avfilter > TESTnamespace-avformat > TESTnamespace-avutil > TESTnamespace-postproc > TESTnamespace-swresample > 000
Re: [FFmpeg-devel] [PATCH] libavformat/yuv4mpeg: Add color range support for Y4M Add color_range support in Y4M. Also set pixel format and color_range for YUVJ pixel formats.
Friendly ping! Thx. On Fri, Jun 22, 2018 at 6:25 AM Carl Eugen Hoyos wrote: > 2018-06-22 9:29 GMT+02:00, Wang Cao : > >> > >> My question was which authority defined this metadata for > >> y4m? Or which (non-FFmpeg-based) other software > >> understands the metadata your patch adds to the files. > >> > > AFAIK, no other software and authority has defined this metadata > > for color range. According to https://linux.die.net/man/5/yuv4mpeg, > > we should be able to use X tag to support color range. > > No more comments from me. > > Carl Eugen > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 4/5] lavf/mpjpegdec: Mark local variable static
On 25/06/18 18:57, Michael Niedermayer wrote: > On Sun, Jun 24, 2018 at 07:25:38PM +0100, Mark Thompson wrote: >> --- >> libavformat/mpjpegdec.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > LGTM Applied. Thanks, - Mark ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/cscd: Check output buffer size for lzo.
On Fri, Jun 22, 2018 at 02:38:02AM +0200, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 8665/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CSCD_fuzzer-5768442610188288 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > --- > libavcodec/cscd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) will apply [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Into a blind darkness they enter who follow after the Ignorance, they as if into a greater darkness enter who devote themselves to the Knowledge alone. -- Isha Upanishad signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH 2/5] avcodec/ffv1dec: Check state transition table
On Fri, Jun 22, 2018 at 12:15:14AM +0200, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 8646/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_FFV1_fuzzer-5649968353247232 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/ffv1dec.c | 10 -- > 1 file changed, 8 insertions(+), 2 deletions(-) will apply [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are best at talking, realize last or never when they are wrong. signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] avcodec/escape124: Check buf_size against num_superblocks
On Mon, Jun 25, 2018 at 02:33:12AM +0200, Michael Niedermayer wrote: > Fixes: Timeout > Fixes: > 8722/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_ESCAPE124_fuzzer-4843268402577408 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/escape124.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) will apply [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Complexity theory is the science of finding the exact solution to an approximation. Benchmarking OTOH is finding an approximation of the exact signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] lavfi/colorspace: Add namespace prefix to global functions
--- On 25/06/18 02:34, Song, Ruiling wrote: >> -Original Message- >> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of >> Mark Thompson >> Sent: Monday, June 25, 2018 2:26 AM >> To: ffmpeg-devel@ffmpeg.org >> Subject: [FFmpeg-devel] [PATCH 1/5] lavfi/colorspace: Add namespace prefix to >> global functions >> >> --- >> libavfilter/colorspace.c| 13 +++-- >> libavfilter/colorspace.h| 10 ++ >> libavfilter/vf_colorspace.c | 22 +++--- >> libavfilter/vf_tonemap_opencl.c | 8 >> 4 files changed, 28 insertions(+), 25 deletions(-) >> >> ... >> --- a/libavfilter/colorspace.h >> +++ b/libavfilter/colorspace.h >> @@ -34,8 +34,10 @@ struct WhitepointCoefficients { >> double xw, yw; >> }; >> >> -void invert_matrix3x3(const double in[3][3], double out[3][3]); >> -void mul3x3(double dst[3][3], const double src1[3][3], const double >> src2[3][3]); >> -void fill_rgb2xyz_table(const struct PrimaryCoefficients *coeffs, >> -const struct WhitepointCoefficients *wp, double >> rgb2xyz[3][3]); >> +void ff_invert_matrix3x3(const double in[3][3], double out[3][3]); >> +void ff_mul3x3(double dst[3][3], >> + const double src1[3][3], const double src2[3][3]); >> +void ff_fill_rgb2xyz_table(const struct PrimaryCoefficients *coeffs, >> + const struct WhitepointCoefficients *wp, >> + double rgb2xyz[3][3]); > I am basically ok with the patch. But I am not sure whether below function > names would be more applicable as now they are under 'ff_' prefix. > ff_matrix_inverse_3x3() > ff_matrix_mul_3x3() Yeah, those names would probably be better. How about this? - Mark libavfilter/colorspace.c| 13 +++-- libavfilter/colorspace.h| 10 ++ libavfilter/vf_colorspace.c | 22 +++--- libavfilter/vf_tonemap_opencl.c | 8 4 files changed, 28 insertions(+), 25 deletions(-) diff --git a/libavfilter/colorspace.c b/libavfilter/colorspace.c index 7fd7bdf0d9..45da1dd124 100644 --- a/libavfilter/colorspace.c +++ b/libavfilter/colorspace.c @@ -20,7 +20,7 @@ #include "colorspace.h" -void invert_matrix3x3(const double in[3][3], double out[3][3]) +void ff_matrix_invert_3x3(const double in[3][3], double out[3][3]) { double m00 = in[0][0], m01 = in[0][1], m02 = in[0][2], m10 = in[1][0], m11 = in[1][1], m12 = in[1][2], @@ -47,7 +47,8 @@ void invert_matrix3x3(const double in[3][3], double out[3][3]) } } -void mul3x3(double dst[3][3], const double src1[3][3], const double src2[3][3]) +void ff_matrix_mul_3x3(double dst[3][3], + const double src1[3][3], const double src2[3][3]) { int m, n; @@ -60,9 +61,9 @@ void mul3x3(double dst[3][3], const double src1[3][3], const double src2[3][3]) /* * see e.g. http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html */ -void fill_rgb2xyz_table(const struct PrimaryCoefficients *coeffs, -const struct WhitepointCoefficients *wp, -double rgb2xyz[3][3]) +void ff_fill_rgb2xyz_table(const struct PrimaryCoefficients *coeffs, + const struct WhitepointCoefficients *wp, + double rgb2xyz[3][3]) { double i[3][3], sr, sg, sb, zw; @@ -73,7 +74,7 @@ void fill_rgb2xyz_table(const struct PrimaryCoefficients *coeffs, rgb2xyz[2][0] = (1.0 - coeffs->xr - coeffs->yr) / coeffs->yr; rgb2xyz[2][1] = (1.0 - coeffs->xg - coeffs->yg) / coeffs->yg; rgb2xyz[2][2] = (1.0 - coeffs->xb - coeffs->yb) / coeffs->yb; -invert_matrix3x3(rgb2xyz, i); +ff_matrix_invert_3x3(rgb2xyz, i); zw = 1.0 - wp->xw - wp->yw; sr = i[0][0] * wp->xw + i[0][1] * wp->yw + i[0][2] * zw; sg = i[1][0] * wp->xw + i[1][1] * wp->yw + i[1][2] * zw; diff --git a/libavfilter/colorspace.h b/libavfilter/colorspace.h index d330917bd3..9d45ee2366 100644 --- a/libavfilter/colorspace.h +++ b/libavfilter/colorspace.h @@ -34,8 +34,10 @@ struct WhitepointCoefficients { double xw, yw; }; -void invert_matrix3x3(const double in[3][3], double out[3][3]); -void mul3x3(double dst[3][3], const double src1[3][3], const double src2[3][3]); -void fill_rgb2xyz_table(const struct PrimaryCoefficients *coeffs, -const struct WhitepointCoefficients *wp, double rgb2xyz[3][3]); +void ff_matrix_invert_3x3(const double in[3][3], double out[3][3]); +void ff_matrix_mul_3x3(double dst[3][3], + const double src1[3][3], const double src2[3][3]); +void ff_fill_rgb2xyz_table(const struct PrimaryCoefficients *coeffs, + const struct WhitepointCoefficients *wp, + double rgb2xyz[3][3]); #endif diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c index b593215daa..56621d15e2 100644 --- a/libavfilter/vf_colorspace.c +++ b/libavfilter/vf_colorspace.c @@ -
Re: [FFmpeg-devel] [FFmpeg-cvslog] lavf/amr: Make the heuristic for auto-detection even stricter.
2018-06-23 14:43 GMT+02:00, Michael Niedermayer : > On Thu, Jun 21, 2018 at 10:09:14PM +, Carl Eugen Hoyos wrote: >> ffmpeg | branch: master | Carl Eugen Hoyos | Fri Jun >> 22 00:08:13 2018 +0200| [40b7e6071815fc416a4efc5dc1616f5460a3aacb] | >> committer: Carl Eugen Hoyos >> >> lavf/amr: Make the heuristic for auto-detection even stricter. >> >> Fixes ticket #7270. >> >> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40b7e6071815fc416a4efc5dc1616f5460a3aacb >> --- >> >> libavformat/amr.c | 6 +++--- >> 1 file changed, 3 insertions(+), 3 deletions(-) >> >> diff --git a/libavformat/amr.c b/libavformat/amr.c >> index f954803d46..6cc06bceac 100644 >> --- a/libavformat/amr.c >> +++ b/libavformat/amr.c >> @@ -201,7 +201,7 @@ static int amrnb_probe(AVProbeData *p) >> i++; >> } >> } >> -if (valid > 100 && valid > invalid) >> +if (valid > 100 && valid >> 4 > invalid) >> return AVPROBE_SCORE_EXTENSION / 2 + 1; >> return 0; >> } >> @@ -258,8 +258,8 @@ static int amrwb_probe(AVProbeData *p) >> i++; >> } >> } >> -if (valid > 100 && valid > invalid) >> -return AVPROBE_SCORE_EXTENSION / 2 - 1; >> +if (valid > 100 && valid >> 4 > invalid) >> +return AVPROBE_SCORE_EXTENSION / 2 + 1; > > This breaks detecting the h263 file: > > https://samples.ffmpeg.org/V-codecs/h263/h263-raw/messenger.h263 Attached patch fixes the existing heuristic to avoid detection of files like this one. Sorry, Carl Eugen From 3bfac3c9a525e8ce92c025ee2853a600d71e64d5 Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Mon, 25 Jun 2018 23:20:09 +0200 Subject: [PATCH] lavf/amr: Fix heuristic to avoid detection of repeated bytes. --- libavformat/amr.c |6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libavformat/amr.c b/libavformat/amr.c index 6cc06bc..de34705 100644 --- a/libavformat/amr.c +++ b/libavformat/amr.c @@ -184,12 +184,11 @@ static int amrnb_probe(AVProbeData *p) while (i < p->buf_size) { mode = b[i] >> 3 & 0x0F; if (mode < 9 && (b[i] & 0x4) == 0x4) { -int last = mode; +int last = b[i]; int size = amrnb_packed_size[mode]; while (size--) { if (b[++i] != last) break; -last = b[i]; } if (size > 0) { valid++; @@ -241,12 +240,11 @@ static int amrwb_probe(AVProbeData *p) while (i < p->buf_size) { mode = b[i] >> 3 & 0x0F; if (mode < 10 && (b[i] & 0x4) == 0x4) { -int last = mode; +int last = b[i]; int size = amrwb_packed_size[mode]; while (size--) { if (b[++i] != last) break; -last = b[i]; } if (size > 0) { valid++; -- 1.7.10.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH v2 16/36] vaapi_encode: Clean up rate control configuration
On 21/06/18 18:03, Michael Niedermayer wrote: > On Thu, Jun 21, 2018 at 12:10:04AM +0100, Mark Thompson wrote: >> On 20/06/18 10:44, Li, Zhong wrote: -Original Message- From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of Mark Thompson Sent: Sunday, June 17, 2018 9:51 PM To: ffmpeg-devel@ffmpeg.org Subject: Re: [FFmpeg-devel] [PATCH v2 16/36] vaapi_encode: Clean up rate control configuration On 14/06/18 08:22, Li, Zhong wrote: >> -Original Message- >> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf >> Of Xiang, Haihao >> Sent: Thursday, June 14, 2018 2:08 PM >> To: ffmpeg-devel@ffmpeg.org >> Subject: Re: [FFmpeg-devel] [PATCH v2 16/36] vaapi_encode: Clean up >> rate control configuration >> >> On Wed, 2018-06-13 at 23:42 +0100, Mark Thompson wrote: >>> On 13/06/18 08:03, Xiang, Haihao wrote: On Fri, 2018-06-08 at 00:43 +0100, Mark Thompson wrote: > Query which modes are supported and select between VBR and CBR > based on that - this removes all of the codec-specific rate > control mode selection code. > --- > doc/encoders.texi | 2 - > libavcodec/vaapi_encode.c | 173 >> --- > > - > libavcodec/vaapi_encode.h | 6 +- > libavcodec/vaapi_encode_h264.c | 18 + > libavcodec/vaapi_encode_h265.c | 14 +--- > libavcodec/vaapi_encode_mjpeg.c | 3 +- > libavcodec/vaapi_encode_mpeg2.c | 9 +-- > libavcodec/vaapi_encode_vp8.c | 13 +-- > libavcodec/vaapi_encode_vp9.c | 13 +-- > 9 files changed, 137 insertions(+), 114 deletions(-) > > ... > diff --git a/libavcodec/vaapi_encode.c b/libavcodec/vaapi_encode.c > index f4c063734c..5de5483454 100644 > --- a/libavcodec/vaapi_encode.c > +++ b/libavcodec/vaapi_encode.c > ... > +if (avctx->flags & AV_CODEC_FLAG_QSCALE || > +avctx->bit_rate <= 0) { This condition ^ > +if (rc_attr.value & VA_RC_CQP) { > +av_log(avctx, AV_LOG_VERBOSE, "Using >> constant-quality > mode.\n"); > +ctx->va_rc_mode = VA_RC_CQP; > +return 0; > +} else { > +av_log(avctx, AV_LOG_ERROR, "Driver does not >> support " > + "constant-quality mode (%#x).\n", >> rc_attr.value); > +return AVERROR(EINVAL); > +} > +} > ... > +} else if (avctx->rc_max_rate == avctx->bit_rate) { > +if (!(rc_attr.value & VA_RC_CBR)) { > +av_log(avctx, AV_LOG_WARNING, "Driver does not >> support " > + "CBR mode (%#x), using VBR mode >> instead.\n", > + rc_attr.value); > +ctx->va_rc_mode = VA_RC_VBR; > +} else { > +ctx->va_rc_mode = VA_RC_CBR; > +} > > -if (ctx->va_rc_mode == VA_RC_CBR) { > rc_bits_per_second = avctx->bit_rate; > rc_target_percentage = 100; > -rc_window_size = 1000; > + > } else { > -if (avctx->rc_max_rate < avctx->bit_rate) { > -// Max rate is unset or invalid, just use the normal >> bitrate. > +if (rc_attr.value & VA_RC_VBR) { > +ctx->va_rc_mode = VA_RC_VBR; Is it better to take it as CBR when avctx->rc_max_rate is 0 and CBR is supported by driver? >>> >>> I don't think so? VBR with the specified target is probably what >>> you want in most cases, and I think anyone with specific constraints >>> that want constant bitrate should expect to set maxrate to achieve that. >>> >> >> I agree VBR is probably what an user wants in most case, however >> target percent set to 50% is not suitable for most case. To get a >> specific target percent, user should set both target bitrate and max >> bitrate, so it is reasonable to ask user must set both target bitrate >> and max bitrate for VBR cases, and for CBR user may set target bitrate only. > > How about set the max_rate to be a very larger number such as INT_MAX if user hasn't set it? > User may don't set max_rate on purpose, expecting better quality with unlimited bitrate fluctuation (common requirement for local video files). > Double of target_bit_rate is too strict IMHO. And I haven't such a limitation in x264 ABR mode. This unconstrained setup you describe was my intent (as you say, it's usually what you want for local files),
Re: [FFmpeg-devel] [PATCH]lavc/libopenjpeg: Support GRAY10, GRAY12 and GRAY14
2018-06-22 15:34 GMT+02:00, Michael Bradshaw : > Hey, Carl Eugen! Thanks for the patch. > > On Thu, Jun 21, 2018 at 3:12 AM, Carl Eugen Hoyos > wrote: >> >> Attached patch allows to create (and read) gray1x samples with >> libopenjpeg. > > > Looks good to me. I have a few very small nits below. I won't block the > patch based on these small nits, so feel free to submit without fixing them > if you don't have the time/patience. > >> From 25c4a1ea0afae9fb3561fd928552133ddcf70d05 Mon Sep 17 00:00:00 2001 >> From: Carl Eugen Hoyos >> Date: Thu, 21 Jun 2018 12:05:40 +0200 >> Subject: [PATCH] lavc/libopenjpeg: Support GRAY10, GRAY12 and GRAY14. >> >> --- >> libavcodec/libopenjpegdec.c |1 + >> libavcodec/libopenjpegenc.c |7 +++ >> 2 files changed, 8 insertions(+) >> >> diff --git a/libavcodec/libopenjpegdec.c b/libavcodec/libopenjpegdec.c >> index 5e66cd9..344c5ba 100644 >> --- a/libavcodec/libopenjpegdec.c >> +++ b/libavcodec/libopenjpegdec.c >> @@ -45,6 +45,7 @@ >> AV_PIX_FMT_RGB48, AV_PIX_FMT_RGBA64 >> >> #define GRAY_PIXEL_FORMATS AV_PIX_FMT_GRAY8, AV_PIX_FMT_YA8, > \ >> + AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, > AV_PIX_FMT_GRAY14, \ >> AV_PIX_FMT_GRAY16, AV_PIX_FMT_YA16 >> >> #define YUV_PIXEL_FORMATS AV_PIX_FMT_YUV410P, AV_PIX_FMT_YUV411P, > AV_PIX_FMT_YUVA420P, \ >> diff --git a/libavcodec/libopenjpegenc.c b/libavcodec/libopenjpegenc.c >> index 7c7d0aa..8627d02 100644 >> --- a/libavcodec/libopenjpegenc.c >> +++ b/libavcodec/libopenjpegenc.c >> @@ -191,6 +191,9 @@ static opj_image_t *mj2_create_image(AVCodecContext > *avctx, opj_cparameters_t *p >> case AV_PIX_FMT_YA8: >> case AV_PIX_FMT_GRAY16: >> case AV_PIX_FMT_YA16: >> +case AV_PIX_FMT_GRAY10: >> +case AV_PIX_FMT_GRAY12: >> +case AV_PIX_FMT_GRAY14: > > nit: It would be nice if these new GRAY enums were grouped with the > previous GRAY16 case. Done. >> color_space = OPJ_CLRSPC_GRAY; >> break; >> case AV_PIX_FMT_RGB24: >> @@ -613,6 +616,9 @@ static int libopenjpeg_encode_frame(AVCodecContext > *avctx, AVPacket *pkt, >> cpyresult = libopenjpeg_copy_unpacked8(avctx, frame, image); >> break; >> case AV_PIX_FMT_GRAY16: >> +case AV_PIX_FMT_GRAY14: >> +case AV_PIX_FMT_GRAY12: >> +case AV_PIX_FMT_GRAY10: > > nit: I don't have a strong preference on ordering, but it would be nice if > it were consistent. Above you have 10 -> 12 -> 14 bit ordering, whereas > here you have 14 -> 12 -> 10. Done. >> case AV_PIX_FMT_YUV420P9: >> case AV_PIX_FMT_YUV422P9: >> case AV_PIX_FMT_YUV444P9: >> @@ -763,6 +769,7 @@ AVCodec ff_libopenjpeg_encoder = { >> AV_PIX_FMT_RGBA64, AV_PIX_FMT_GBR24P, >> AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, > AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, >> AV_PIX_FMT_GRAY8, AV_PIX_FMT_YA8, AV_PIX_FMT_GRAY16, > AV_PIX_FMT_YA16, >> +AV_PIX_FMT_GRAY10, AV_PIX_FMT_GRAY12, AV_PIX_FMT_GRAY14, > > nit: I know this slightly inflates the diff, but I think it would be nice > to group the 10, 12, and 14 bit GRAY enums together with GRAY16. I prefer the smaller diff, sorry... Patch applied, Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] avformat/avformat.h: Add av_stream_remove_side_data.
Signed-off-by: Jacob Trimble --- libavformat/avformat.h | 8 libavformat/utils.c| 11 +++ 2 files changed, 19 insertions(+) diff --git a/libavformat/avformat.h b/libavformat/avformat.h index fdaffa5bf4..434c88837e 100644 --- a/libavformat/avformat.h +++ b/libavformat/avformat.h @@ -2167,6 +2167,14 @@ AVStream *avformat_new_stream(AVFormatContext *s, const AVCodec *c); int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type, uint8_t *data, size_t size); +/** + * Removes any existing side data of the given type. + * + * @param st stream + * @param type side information type + */ +void av_stream_remove_side_data(AVStream *st, enum AVPacketSideDataType type); + /** * Allocate new information from stream. * diff --git a/libavformat/utils.c b/libavformat/utils.c index c9cdd2b470..4f7c408d93 100644 --- a/libavformat/utils.c +++ b/libavformat/utils.c @@ -5491,6 +5491,17 @@ int av_stream_add_side_data(AVStream *st, enum AVPacketSideDataType type, return 0; } +void av_stream_remove_side_data(AVStream *st, enum AVPacketSideDataType type) +{ + for (int i = 0; i < st->nb_side_data; i++) { + if (st->side_data[i].type == type) { + av_freep(&st->side_data[i].data); + st->side_data[i] = st->side_data[st->nb_side_data - 1]; + st->nb_side_data--; + } + } +} + uint8_t *av_stream_new_side_data(AVStream *st, enum AVPacketSideDataType type, int size) { -- 2.18.0.rc2.346.g013aa6912e-goog ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavformat/yuv4mpeg: Add color range support for Y4M Add color_range support in Y4M. Also set pixel format and color_range for YUVJ pixel formats.
On Thu, Jun 14, 2018 at 12:03:13AM +0800, Wang Cao wrote: > --- > libavformat/yuv4mpegdec.c | 8 > libavformat/yuv4mpegenc.c | 37 +++-- > 2 files changed, 43 insertions(+), 2 deletions(-) > > diff --git a/libavformat/yuv4mpegdec.c b/libavformat/yuv4mpegdec.c > index eff7fc518e..86e8673b2f 100644 > --- a/libavformat/yuv4mpegdec.c > +++ b/libavformat/yuv4mpegdec.c > @@ -41,6 +41,7 @@ static int yuv4_read_header(AVFormatContext *s) > enum AVPixelFormat pix_fmt = AV_PIX_FMT_NONE, alt_pix_fmt = > AV_PIX_FMT_NONE; > enum AVChromaLocation chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED; > enum AVFieldOrder field_order = AV_FIELD_UNKNOWN; > +enum AVColorRange color_range = AVCOL_RANGE_UNSPECIFIED; > AVStream *st; > > for (i = 0; i < MAX_YUV4_HEADER; i++) { > @@ -220,6 +221,12 @@ static int yuv4_read_header(AVFormatContext *s) > alt_pix_fmt = AV_PIX_FMT_YUV422P; > else if (strncmp("444", tokstart, 3) == 0) > alt_pix_fmt = AV_PIX_FMT_YUV444P; > +} else if (strncmp("COLORRANGE=", tokstart, 11) == 0) { > + tokstart += 11; > + if (strncmp("JPEG",tokstart, 4) == 0) > + color_range = AVCOL_RANGE_JPEG; > + else if (strncmp("MPEG", tokstart, 4) == 0) > + color_range = AVCOL_RANGE_MPEG; > } If this is a type we are choosing then it would be probably better to use something else than mpeg/jpeg as names these are 2 standard comittees and their standards support more than one color range. maybe "full" and "limited" or some other terms may be better thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Freedom in capitalist society always remains about the same as it was in ancient Greek republics: Freedom for slave owners. -- Vladimir Lenin signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [FFmpeg-cvslog] lavf/amr: Make the heuristic for auto-detection even stricter.
On Mon, Jun 25, 2018 at 11:22:31PM +0200, Carl Eugen Hoyos wrote: > 2018-06-23 14:43 GMT+02:00, Michael Niedermayer : > > On Thu, Jun 21, 2018 at 10:09:14PM +, Carl Eugen Hoyos wrote: > >> ffmpeg | branch: master | Carl Eugen Hoyos | Fri Jun > >> 22 00:08:13 2018 +0200| [40b7e6071815fc416a4efc5dc1616f5460a3aacb] | > >> committer: Carl Eugen Hoyos > >> > >> lavf/amr: Make the heuristic for auto-detection even stricter. > >> > >> Fixes ticket #7270. > >> > >> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=40b7e6071815fc416a4efc5dc1616f5460a3aacb > >> --- > >> > >> libavformat/amr.c | 6 +++--- > >> 1 file changed, 3 insertions(+), 3 deletions(-) > >> > >> diff --git a/libavformat/amr.c b/libavformat/amr.c > >> index f954803d46..6cc06bceac 100644 > >> --- a/libavformat/amr.c > >> +++ b/libavformat/amr.c > >> @@ -201,7 +201,7 @@ static int amrnb_probe(AVProbeData *p) > >> i++; > >> } > >> } > >> -if (valid > 100 && valid > invalid) > >> +if (valid > 100 && valid >> 4 > invalid) > >> return AVPROBE_SCORE_EXTENSION / 2 + 1; > >> return 0; > >> } > >> @@ -258,8 +258,8 @@ static int amrwb_probe(AVProbeData *p) > >> i++; > >> } > >> } > >> -if (valid > 100 && valid > invalid) > >> -return AVPROBE_SCORE_EXTENSION / 2 - 1; > >> +if (valid > 100 && valid >> 4 > invalid) > >> +return AVPROBE_SCORE_EXTENSION / 2 + 1; > > > > This breaks detecting the h263 file: > > > > https://samples.ffmpeg.org/V-codecs/h263/h263-raw/messenger.h263 > > Attached patch fixes the existing heuristic to avoid detection of files > like this one. > > Sorry, Carl Eugen > amr.c |6 ++ > 1 file changed, 2 insertions(+), 4 deletions(-) > 4b51c43bba3a8a286dc8d8239936d615ab733ec5 > 0001-lavf-amr-Fix-heuristic-to-avoid-detection-of-repeate.patch > From 3bfac3c9a525e8ce92c025ee2853a600d71e64d5 Mon Sep 17 00:00:00 2001 > From: Carl Eugen Hoyos > Date: Mon, 25 Jun 2018 23:20:09 +0200 > Subject: [PATCH] lavf/amr: Fix heuristic to avoid detection of repeated > bytes. LGTM thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The bravest are surely those who have the clearest vision of what is before them, glory and danger alike, and yet notwithstanding go out to meet it. -- Thucydides signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] libavutil/encryption_info: Add unit tests.
On Fri, Jun 01, 2018 at 12:51:48PM -0700, Jacob Trimble wrote: > Signed-off-by: Jacob Trimble > --- > libavutil/Makefile| 1 + > libavutil/encryption_info.h | 2 +- > libavutil/tests/.gitignore| 2 + > libavutil/tests/encryption_info.c | 176 ++ > tests/fate/libavutil.mak | 4 + > tests/ref/fate/encryption-info| 0 > 6 files changed, 184 insertions(+), 1 deletion(-) > create mode 100644 libavutil/tests/encryption_info.c > create mode 100644 tests/ref/fate/encryption-info > > diff --git a/libavutil/Makefile b/libavutil/Makefile > index d0632f16a6..9ed24cfc82 100644 > --- a/libavutil/Makefile > +++ b/libavutil/Makefile > @@ -200,6 +200,7 @@ TESTPROGS = adler32 > \ > des \ > dict\ > display \ > +encryption_info \ > error \ > eval\ > file\ > diff --git a/libavutil/encryption_info.h b/libavutil/encryption_info.h > index 9140968fde..8fe7ebfe43 100644 > --- a/libavutil/encryption_info.h > +++ b/libavutil/encryption_info.h > @@ -129,7 +129,7 @@ typedef struct AVEncryptionInitInfo { > * > * @param subsample_count The number of subsamples. > * @param key_id_size The number of bytes in the key ID, should be 16. > - * @param key_id_size The number of bytes in the IV, should be 16. > + * @param iv_size The number of bytes in the IV, should be 16. > * > * @return The new AVEncryptionInfo structure, or NULL on error. > */ How is this related to adding a test ? > diff --git a/libavutil/tests/.gitignore b/libavutil/tests/.gitignore > index 71f75a8ee9..9d90827954 100644 > --- a/libavutil/tests/.gitignore > +++ b/libavutil/tests/.gitignore > @@ -17,6 +17,7 @@ > /dict > /display > /error > +/encryption_info > /eval > /fifo > /file > @@ -24,6 +25,7 @@ > /hmac > /hwdevice > /imgutils > +/integer > /lfg > /lls > /log this also looks unrelated [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Opposition brings concord. Out of discord comes the fairest harmony. -- Heraclitus signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] lavfi/colorspace: Add namespace prefix to global functions
> -Original Message- > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of > Mark Thompson > Sent: Tuesday, June 26, 2018 5:02 AM > To: ffmpeg-devel@ffmpeg.org > Subject: [FFmpeg-devel] [PATCH] lavfi/colorspace: Add namespace prefix to > global functions > > --- > On 25/06/18 02:34, Song, Ruiling wrote: > >> -Original Message- > >> From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf > Of > >> Mark Thompson > >> Sent: Monday, June 25, 2018 2:26 AM > >> To: ffmpeg-devel@ffmpeg.org > >> Subject: [FFmpeg-devel] [PATCH 1/5] lavfi/colorspace: Add namespace prefix > to > >> global functions > >> > >> --- > >> libavfilter/colorspace.c| 13 +++-- > >> libavfilter/colorspace.h| 10 ++ > >> libavfilter/vf_colorspace.c | 22 +++--- > >> libavfilter/vf_tonemap_opencl.c | 8 > >> 4 files changed, 28 insertions(+), 25 deletions(-) > >> > >> ... > >> --- a/libavfilter/colorspace.h > >> +++ b/libavfilter/colorspace.h > >> @@ -34,8 +34,10 @@ struct WhitepointCoefficients { > >> double xw, yw; > >> }; > >> > >> -void invert_matrix3x3(const double in[3][3], double out[3][3]); > >> -void mul3x3(double dst[3][3], const double src1[3][3], const double > src2[3][3]); > >> -void fill_rgb2xyz_table(const struct PrimaryCoefficients *coeffs, > >> -const struct WhitepointCoefficients *wp, double > >> rgb2xyz[3][3]); > >> +void ff_invert_matrix3x3(const double in[3][3], double out[3][3]); > >> +void ff_mul3x3(double dst[3][3], > >> + const double src1[3][3], const double src2[3][3]); > >> +void ff_fill_rgb2xyz_table(const struct PrimaryCoefficients *coeffs, > >> + const struct WhitepointCoefficients *wp, > >> + double rgb2xyz[3][3]); > > I am basically ok with the patch. But I am not sure whether below function > names would be more applicable as now they are under 'ff_' prefix. > > ff_matrix_inverse_3x3() > > ff_matrix_mul_3x3() > > Yeah, those names would probably be better. > > How about this? This version LGTM! Ruiling > > - Mark > > > libavfilter/colorspace.c| 13 +++-- > libavfilter/colorspace.h| 10 ++ > libavfilter/vf_colorspace.c | 22 +++--- > libavfilter/vf_tonemap_opencl.c | 8 > 4 files changed, 28 insertions(+), 25 deletions(-) > > diff --git a/libavfilter/colorspace.c b/libavfilter/colorspace.c > index 7fd7bdf0d9..45da1dd124 100644 > --- a/libavfilter/colorspace.c > +++ b/libavfilter/colorspace.c > @@ -20,7 +20,7 @@ > #include "colorspace.h" > > > -void invert_matrix3x3(const double in[3][3], double out[3][3]) > +void ff_matrix_invert_3x3(const double in[3][3], double out[3][3]) > { > double m00 = in[0][0], m01 = in[0][1], m02 = in[0][2], > m10 = in[1][0], m11 = in[1][1], m12 = in[1][2], > @@ -47,7 +47,8 @@ void invert_matrix3x3(const double in[3][3], double > out[3][3]) > } > } > > -void mul3x3(double dst[3][3], const double src1[3][3], const double > src2[3][3]) > +void ff_matrix_mul_3x3(double dst[3][3], > + const double src1[3][3], const double src2[3][3]) > { > int m, n; > > @@ -60,9 +61,9 @@ void mul3x3(double dst[3][3], const double src1[3][3], > const double src2[3][3]) > /* > * see e.g. > http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html > */ > -void fill_rgb2xyz_table(const struct PrimaryCoefficients *coeffs, > -const struct WhitepointCoefficients *wp, > -double rgb2xyz[3][3]) > +void ff_fill_rgb2xyz_table(const struct PrimaryCoefficients *coeffs, > + const struct WhitepointCoefficients *wp, > + double rgb2xyz[3][3]) > { > double i[3][3], sr, sg, sb, zw; > > @@ -73,7 +74,7 @@ void fill_rgb2xyz_table(const struct PrimaryCoefficients > *coeffs, > rgb2xyz[2][0] = (1.0 - coeffs->xr - coeffs->yr) / coeffs->yr; > rgb2xyz[2][1] = (1.0 - coeffs->xg - coeffs->yg) / coeffs->yg; > rgb2xyz[2][2] = (1.0 - coeffs->xb - coeffs->yb) / coeffs->yb; > -invert_matrix3x3(rgb2xyz, i); > +ff_matrix_invert_3x3(rgb2xyz, i); > zw = 1.0 - wp->xw - wp->yw; > sr = i[0][0] * wp->xw + i[0][1] * wp->yw + i[0][2] * zw; > sg = i[1][0] * wp->xw + i[1][1] * wp->yw + i[1][2] * zw; > diff --git a/libavfilter/colorspace.h b/libavfilter/colorspace.h > index d330917bd3..9d45ee2366 100644 > --- a/libavfilter/colorspace.h > +++ b/libavfilter/colorspace.h > @@ -34,8 +34,10 @@ struct WhitepointCoefficients { > double xw, yw; > }; > > -void invert_matrix3x3(const double in[3][3], double out[3][3]); > -void mul3x3(double dst[3][3], const double src1[3][3], const double > src2[3][3]); > -void fill_rgb2xyz_table(const struct PrimaryCoefficients *coeffs, > -const struct WhitepointCoefficients *wp, double > rgb2xyz[3][3]); > +void ff_
Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg: check sseof value and clash with ss
On 25-06-2018 10:07 AM, Gyan Doshi wrote: Revised. Will push soon. Thanks, Gyan Pushed in a0ac49e38ee1d1011c394d7be67d0f08b2281526 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [FFmpeg-cvslog] lavfi: add opencl tonemap filter
> -Original Message- > From: ffmpeg-devel [mailto:ffmpeg-devel-boun...@ffmpeg.org] On Behalf Of > Michael Niedermayer > Sent: Friday, June 22, 2018 2:32 AM > To: ffmpeg-devel@ffmpeg.org > Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] lavfi: add opencl tonemap filter > > On Thu, Jun 21, 2018 at 12:23:26AM +, Ruiling Song wrote: > > ffmpeg | branch: master | Ruiling Song | Tue Jun 19 > 09:57:31 2018 +0800| [8b8b0e2cd26cf1f522c630859fcbcc62b6493fb9] | > committer: Mark Thompson > > > > lavfi: add opencl tonemap filter > > > > This filter does HDR(HDR10/HLG) to SDR conversion with tone-mapping. > > > > An example command to use this filter with vaapi codecs: > > FFMPEG -init_hw_device vaapi=va:/dev/dri/renderD128 -init_hw_device \ > > opencl=ocl@va -hwaccel vaapi -hwaccel_device va -hwaccel_output_format \ > > vaapi -i INPUT -filter_hw_device ocl -filter_complex \ > > '[0:v]hwmap,tonemap_opencl=t=bt2020:tonemap=linear:format=p010[x1]; \ > > [x1]hwmap=derive_device=vaapi:reverse=1' -c:v hevc_vaapi -profile 2 > OUTPUT > > > > Signed-off-by: Ruiling Song > > > > > > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=8b8b0e2cd26cf1f5 > 22c630859fcbcc62b6493fb9 > > --- > > > > configure | 1 + > > libavfilter/Makefile| 2 + > > libavfilter/allfilters.c| 1 + > > libavfilter/colorspace.c| 90 + > > libavfilter/colorspace.h| 41 +++ > > libavfilter/opencl/colorspace_common.cl | 220 +++ > > libavfilter/opencl/tonemap.cl | 272 ++ > > libavfilter/opencl_source.h | 2 + > > libavfilter/vf_tonemap_opencl.c | 624 > > > 9 files changed, 1253 insertions(+) > > > > diff --git a/configure b/configure > > index 8ca258691d..6ad5ce8eaf 100755 > > --- a/configure > > +++ b/configure > > @@ -3412,6 +3412,7 @@ tinterlace_filter_deps="gpl" > > tinterlace_merge_test_deps="tinterlace_filter" > > tinterlace_pad_test_deps="tinterlace_filter" > > tonemap_filter_deps="const_nan" > > +tonemap_opencl_filter_deps="opencl const_nan" > > unsharp_opencl_filter_deps="opencl" > > uspp_filter_deps="gpl avcodec" > > vaguedenoiser_filter_deps="gpl" > > diff --git a/libavfilter/Makefile b/libavfilter/Makefile > > index 552499558d..589682f353 100644 > > --- a/libavfilter/Makefile > > +++ b/libavfilter/Makefile > > @@ -358,6 +358,8 @@ OBJS-$(CONFIG_TINTERLACE_FILTER) += > vf_tinterlace.o > > OBJS-$(CONFIG_TLUT2_FILTER) += vf_lut2.o framesync.o > > OBJS-$(CONFIG_TMIX_FILTER) += vf_mix.o framesync.o > > OBJS-$(CONFIG_TONEMAP_FILTER)+= vf_tonemap.o > > +OBJS-$(CONFIG_TONEMAP_OPENCL_FILTER) += vf_tonemap_opencl.o > colorspace.o opencl.o \ > > +opencl/tonemap.o > > opencl/colorspace_common.o > > OBJS-$(CONFIG_TRANSPOSE_FILTER) += vf_transpose.o > > OBJS-$(CONFIG_TRIM_FILTER) += trim.o > > OBJS-$(CONFIG_UNPREMULTIPLY_FILTER) += vf_premultiply.o > framesync.o > > diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c > > index 2b44626028..e07fe67ec5 100644 > > --- a/libavfilter/allfilters.c > > +++ b/libavfilter/allfilters.c > > @@ -346,6 +346,7 @@ extern AVFilter ff_vf_tinterlace; > > extern AVFilter ff_vf_tlut2; > > extern AVFilter ff_vf_tmix; > > extern AVFilter ff_vf_tonemap; > > +extern AVFilter ff_vf_tonemap_opencl; > > extern AVFilter ff_vf_transpose; > > extern AVFilter ff_vf_trim; > > extern AVFilter ff_vf_unpremultiply; > > diff --git a/libavfilter/colorspace.c b/libavfilter/colorspace.c > > new file mode 100644 > > index 00..7fd7bdf0d9 > > --- /dev/null > > +++ b/libavfilter/colorspace.c > > @@ -0,0 +1,90 @@ > > +/* > > + * Copyright (c) 2016 Ronald S. Bultje > > + * 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 "colorspace.h" > > + > > + > > +void invert_matrix3x3(const double in[3][3], double out[3][3]) > > this (and others) need some (ff_) prefix to not pollute namespace Sounds reasonable. Mark already sent a patch to fix. > > [...] > > +/* >