Re: [FFmpeg-devel] [PATCH v8 1/1] avformat: Add IPFS protocol support.

2022-03-09 Thread Michael Niedermayer
On Wed, Mar 09, 2022 at 01:30:30AM +0100, Mark Gaiser wrote:
> On Wed, Mar 9, 2022 at 12:45 AM Michael Niedermayer 
> wrote:
> 
> > On Tue, Mar 08, 2022 at 01:49:22PM +0100, Mark Gaiser wrote:
> > > On Fri, Mar 4, 2022 at 7:09 PM Michael Niedermayer <
> > mich...@niedermayer.cc>
> > > wrote:
> > >
> > > > On Thu, Mar 03, 2022 at 03:58:53PM +0100, Mark Gaiser wrote:
> > > > > On Tue, Mar 1, 2022 at 11:01 PM Michael Niedermayer <
> > > > mich...@niedermayer.cc>
> > > > > wrote:
> > > > >
> > > > > > On Mon, Feb 28, 2022 at 02:09:15PM +0100, Tomas Härdin wrote:
> > > > > > > sön 2022-02-27 klockan 15:29 +0100 skrev Mark Gaiser:
> > > > > > > > Ping 2
> > > > > > > >
> > > > > > > > I'd really like to get this merged!
> > > > > > > > This kinda blocks me right now from proceeding with IPFS
> > > > integration
> > > > > > > > in
> > > > > > > > Kodi, MPV and VLC. Implementations in those (who rely on
> > ffmpeg)
> > > > are
> > > > > > > > significantly easier once this patch is finally landed in
> > ffmpeg.
> > > > > > >
> > > > > > > I'd like to hear at least one other dev chime in on this one
> > > > > >
> > > > > > what exactly are you not sure about ?
> > > > > > what exactly needs a 2nd look ?
> > > > > >
> > > > >
> > > > > My assumption.
> > > > > In general just a second look by someone other than Tomas.
> > > > > And, as he was skeptical about this patch at first, likely another
> > > > opinion
> > > > > if this makes sense to add in ffmpeg.
> > > > > To me it does very much but i'm biased :)
> > > >
> > > > ipfs support makes sense to be added to ffmpeg. ive seen ipfs urls and
> > ive
> > > > already been annoyed that some tools dont "just" work with them.
> > > > While if i compare this to many other formats which i have never seen
> > > > outside the context of FFmpeg. So from this biased single sample that i
> > > > am, ipfs seems more widespread and thats why iam in favor of its
> > support
> > > >
> > > > thx
> > > >
> > > > Great to have your support :)
> > > Reading that is quite motivating to work on it, no joke!
> > >
> > > Just to be clear here. Having this in ffmpeg won't make it "just work"
> > yet.
> > > For a minimal feeling of "hey, it works out of the box" you'd need:
> > > - The next or version after the next IPFS.
> > > - MPV support which relies on this patch to even be supported in mpv
> > > - Have a node running locally
> >
> > if theres no local node it should fallback to a public node
> > ATM
> > IPFS_GATEWAY=https://dweb.link ./ffplay ipfs://...
> > works
> > so such a fallback is all thats needed for it to just work
> >
> 
> Yes, the beauty of gateways.
> 
> Are you suggesting that I update the patch to add this default?

Iam not sure


> I would prefer not to add that even though it would give a feeling of "just
> works".

> I'm mostly concerned about the bandwidth usage it could cause on that site.

you could add more than one
you could point people to https://ipfs.io/ipns/ipnso.com/ to let them select
their own or maybe theres a better way


> But also about potential hacks. If this is a default and well used then it
> becomes quite appealing for hackers to take control of dweb.link and send
> back data that wasn't requested.

Thats a valid concern but not adding a default is not really solving this
Because what do most people do then ?
They google for a gateway and pick the first that works. 
Thats plausibly not going to give them the fastest nor the most secure nor 
even not the same as the last million people searching.

To setup a ipfs node on ones own machiene, first it would be needed that this
is VERY simple and clean
if i run "apt search ipfs", theres none, so that already fails here
but for the fun, i tried to search for ipfs node on the app store on my iphone
no, also nothing.

so i dont think "install an ipfs node" is really a viable solution for the
average joe.

we have a wide range of platforms, linux, windows, android, ios just to name
the major ones. This protocol should work on all of them.
I think a default gateway is the easy way to make that happen, asking the
user to set a gateway will already leave android and iphone users probably
wondering how to do that. Is there a way ?

So really iam not saying "add a default", iam really saying "make it work
for everyone", its ok if the user has to choose one or set some default but
it really has to work on all platforms and with all user apps using
libavformat. It should not be specific to mpv or windows/linux

you can also print a big nasty warning that a default is used and the user
should really setup their own node and why that is better.

thx

> 
> If you insist this would be really better to add then I'll need to go find
> the ones managing that site (paying for it) to ask permission if this would
> be allowed.

[...]
-- 
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Complexity theory is the science of finding the exact solution to an
approximation. Benchmarking OTOH is find

[FFmpeg-devel] [PATCH] avformat/flvdec: fix mismatch on timestamp wrap point

2022-03-09 Thread Zhao Zhili
Change the wrap point to 2^31 to match flvenc muxer. For other flv
muxers which treat timestamp as uint32_t, it should be handled by
wrap_timestamp(). For muxers which treat timestamp as int32_t and
create negative timestamp, they are broken before the patch.
---
 libavformat/flvdec.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavformat/flvdec.c b/libavformat/flvdec.c
index b9e36b3ff1..ff5e6eabb4 100644
--- a/libavformat/flvdec.c
+++ b/libavformat/flvdec.c
@@ -184,7 +184,7 @@ static AVStream *create_stream(AVFormatContext *s, int 
codec_type)
 }
 
 
-avpriv_set_pts_info(st, 32, 1, 1000); /* 32 bit pts in ms */
+avpriv_set_pts_info(st, 31, 1, 1000); /* 31 bit pts in ms */
 flv->last_keyframe_stream_index = s->nb_streams - 1;
 add_keyframes_index(s);
 return st;
@@ -1033,7 +1033,11 @@ retry:
 size = avio_rb24(s->pb);
 flv->sum_flv_tag_size += size + 11;
 dts  = avio_rb24(s->pb);
-dts |= (unsigned)avio_r8(s->pb) << 24;
+/* FLV timestamps are 32 bits signed, flvenc.c doesn't use the 32 msb, but
+ * other muxer may treat timestamp as uint32_t. We ignore the 32 bit and
+ * handle the wrap by avpriv_set_pts_info().
+ */
+dts |= ((unsigned)avio_r8(s->pb) & 0x7F) << 24;
 av_log(s, AV_LOG_TRACE, "type:%d, size:%d, last:%d, dts:%"PRId64" 
pos:%"PRId64"\n", type, size, last, dts, avio_tell(s->pb));
 if (avio_feof(s->pb))
 return AVERROR_EOF;
-- 
2.31.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] avfilter/vf_blend_vulkan: add addition blend mode

2022-03-09 Thread Wu Jianhua
Ping.

>From: Wu, Jianhua
>Sent: 2022年2月25日 21:11
>To: ffmpeg-devel@ffmpeg.org
>Subject: [FFmpeg-devel] [PATCH] avfilter/vf_blend_vulkan: add addition blend 
>mode
>
>[PATCH 01/10] avfilter/vf_blend_vulkan: add addition blend mode [PATCH 02/10] 
>avfilter/vf_blend_vulkan: >add average blend mode [PATCH 03/10] 
>avfilter/vf_blend_vulkan: add subtract >blend mode [PATCH 04/10] 
>avfilter/vf_blend_vulkan: add negation blend mode [PATCH 05/10] 
>>avfilter/vf_blend_vulkan: add extremity blend mode [PATCH 06/10] 
>avfilter/vf_blend_vulkan: add >difference blend mode [PATCH 07/10] 
>avfilter/vf_blend_vulkan: add darken blend mode [PATCH 08/10] 
>>avfilter/vf_blend_vulkan: add lighten blend mode [PATCH 09/10] 
>avfilter/vf_blend_vulkan: add >exclusion blend mode [PATCH 10/10] 
>avfilter/vf_blend_vulkan: add phoenix blend mode
>
> Patches attached.

___
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] aarch64: Only emit the PAC/BTI note section when targeting ELF

2022-03-09 Thread Martin Storsjö
This avoids build errors if such features are enabled while targeting
another binary format. (Using such features on other platforms
might require some other form of signaling/setup though, but
the ELF specific .note section isn't applicable at least.)

Signed-off-by: Martin Storsjö 
---
 libavutil/aarch64/asm.S | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/aarch64/asm.S b/libavutil/aarch64/asm.S
index b817eaab22..a7782415d7 100644
--- a/libavutil/aarch64/asm.S
+++ b/libavutil/aarch64/asm.S
@@ -141,7 +141,7 @@
 #endif
 
 
-#if (GNU_PROPERTY_AARCH64_BTI != 0 || GNU_PROPERTY_AARCH64_PAC != 0)
+#if (GNU_PROPERTY_AARCH64_BTI != 0 || GNU_PROPERTY_AARCH64_PAC != 0) && 
defined(__ELF__)
 .pushsection .note.gnu.property, "a"
 .balign 8
 .long 4
-- 
2.32.0 (Apple Git-132)

___
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] Allow to modify max qp configuration parameter in libvpx without reseting the encoder

2022-03-09 Thread Danil Chapovalov
Signed-off-by: Danil Chapovalov 
---
 libavcodec/libvpxenc.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 8f94ba15dc..45baeed435 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -1658,6 +1658,13 @@ static int vpx_encode(AVCodecContext *avctx,
AVPacket *pkt,
 flags |= strtoul(en->value, NULL, 10);
 }

+en = av_dict_get(frame->metadata, "max-quantizer", NULL, 0);
+if (en) {
+struct vpx_codec_enc_cfg cfg = *enccfg;
+cfg.rc_max_quantizer = strtoul(en->value, NULL, 10);
+vpx_codec_enc_config_set(&ctx->encoder, &cfg);
+}
+
 memset(&layer_id, 0, sizeof(layer_id));

 en = av_dict_get(frame->metadata, "temporal_id", NULL, 0);
-- 
2.35.1.616.g0bdcbb4464-goog
___
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] arm64: Add Armv8.3-A PAC support to assembly files

2022-03-09 Thread Martin Storsjö

On Tue, 22 Feb 2022, Martin Storsjö wrote:


On Mon, 14 Feb 2022, Andre Kempe wrote:


This patch adds optional support for Arm Pointer Authentication Codes.

PAC support is turned on or off at compile time using additional
compiler flags. Unless any of these is enabled explicitly, no additional
code will be emitted at all.

Signed-off-by: André Kempe 
---
libavcodec/aarch64/fft_neon.S  |   3 +-
libavcodec/aarch64/mdct_neon.S |  17 -
libavcodec/aarch64/synth_filter_neon.S |   2 +
libavutil/aarch64/asm.S| 102 +++--
4 files changed, 113 insertions(+), 11 deletions(-)


LGTM, this looks generally correct and consistent to me.


Pushed now.

// Martin
___
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/flvenc: fix pts_wrap_bits

2022-03-09 Thread Zhao Zhili
put_timestamp() only use 31 bits.
---
 libavformat/flvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/flvenc.c b/libavformat/flvenc.c
index 66c530a2ff..ef3d3cd60f 100644
--- a/libavformat/flvenc.c
+++ b/libavformat/flvenc.c
@@ -673,7 +673,7 @@ static int flv_init(struct AVFormatContext *s)
av_get_media_type_string(par->codec_type), i);
 return AVERROR(EINVAL);
 }
-avpriv_set_pts_info(s->streams[i], 32, 1, 1000); /* 32 bit pts in ms */
+avpriv_set_pts_info(s->streams[i], 31, 1, 1000); /* 31 bit pts in ms */
 
 sc = av_mallocz(sizeof(FLVStreamContext));
 if (!sc)
-- 
2.31.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] Attach quantizer parameter to an encoded frame in libvpx wrapper

2022-03-09 Thread Danil Chapovalov
Signed-off-by: Danil Chapovalov 
---
 libavcodec/libvpxenc.c | 9 -
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libavcodec/libvpxenc.c b/libavcodec/libvpxenc.c
index 8f94ba15dc..581282682c 100644
--- a/libavcodec/libvpxenc.c
+++ b/libavcodec/libvpxenc.c
@@ -1247,6 +1247,7 @@ static int storeframe(AVCodecContext *avctx,
struct FrameListData *cx_frame,
 int ret = ff_get_encode_buffer(avctx, pkt, cx_frame->sz, 0);
 uint8_t *side_data;
 int pict_type;
+int quality;

 if (ret < 0)
 return ret;
@@ -1261,7 +1262,13 @@ static int storeframe(AVCodecContext *avctx,
struct FrameListData *cx_frame,
 pict_type = AV_PICTURE_TYPE_P;
 }

-ff_side_data_set_encoder_stats(pkt, 0, cx_frame->sse + 1,
+ret = vpx_codec_control(&((VPxContext *)avctx->priv_data)->encoder,
+VP8E_GET_LAST_QUANTIZER_64, &quality);
+if (ret != VPX_CODEC_OK) {
+quality = 0;
+}
+
+ff_side_data_set_encoder_stats(pkt, quality, cx_frame->sse + 1,
cx_frame->have_sse ? 3 : 0, pict_type);

 if (cx_frame->have_sse) {
-- 
2.35.1.616.g0bdcbb4464-goog
___
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] avutil/hwcontext_vulkan: fix typo in undef

2022-03-09 Thread Zhao Zhili
---
 libavutil/hwcontext_vulkan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavutil/hwcontext_vulkan.c b/libavutil/hwcontext_vulkan.c
index 0c942fbc96..237caa4bc0 100644
--- a/libavutil/hwcontext_vulkan.c
+++ b/libavutil/hwcontext_vulkan.c
@@ -1054,7 +1054,7 @@ static int setup_queue_families(AVHWDeviceContext *ctx, 
VkDeviceCreateInfo *cd)
 SETUP_QUEUE(enc_index)
 SETUP_QUEUE(dec_index)
 
-#undef ADD_QUEUE
+#undef SETUP_QUEUE
 
 av_free(qf);
 
-- 
2.31.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] avfilter: add Audio Video Sync Test filter

2022-03-09 Thread Paul B Mahol
Signed-off-by: Paul B Mahol 
---
 libavfilter/Makefile |   1 +
 libavfilter/allfilters.c |   1 +
 libavfilter/src_avsynctest.c | 399 +++
 3 files changed, 401 insertions(+)
 create mode 100644 libavfilter/src_avsynctest.c

diff --git a/libavfilter/Makefile b/libavfilter/Makefile
index 35e7977741..0b66d54742 100644
--- a/libavfilter/Makefile
+++ b/libavfilter/Makefile
@@ -579,6 +579,7 @@ OBJS-$(CONFIG_SHOWWAVESPIC_FILTER)   += 
avf_showwaves.o
 OBJS-$(CONFIG_SPECTRUMSYNTH_FILTER)  += vaf_spectrumsynth.o
 
 # multimedia sources
+OBJS-$(CONFIG_AVSYNCTEST_FILTER) += src_avsynctest.o
 OBJS-$(CONFIG_AMOVIE_FILTER) += src_movie.o
 OBJS-$(CONFIG_MOVIE_FILTER)  += src_movie.o
 
diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c
index 73df2dc51a..1b4f3b5db8 100644
--- a/libavfilter/allfilters.c
+++ b/libavfilter/allfilters.c
@@ -551,6 +551,7 @@ extern const AVFilter ff_avf_showwavespic;
 extern const AVFilter ff_vaf_spectrumsynth;
 
 /* multimedia sources */
+extern const AVFilter ff_avsrc_avsynctest;
 extern const AVFilter ff_avsrc_amovie;
 extern const AVFilter ff_avsrc_movie;
 
diff --git a/libavfilter/src_avsynctest.c b/libavfilter/src_avsynctest.c
new file mode 100644
index 00..3d8b326181
--- /dev/null
+++ b/libavfilter/src_avsynctest.c
@@ -0,0 +1,399 @@
+/*
+ * Copyright (c) 2017-2022 Paul B Mahol
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#include "libavutil/avassert.h"
+#include "libavutil/common.h"
+#include "libavutil/channel_layout.h"
+#include "libavutil/ffmath.h"
+#include "libavutil/opt.h"
+#include "libavutil/imgutils.h"
+#include "libavutil/intreadwrite.h"
+#include "libavutil/parseutils.h"
+#include "libavutil/timestamp.h"
+#include "libavutil/xga_font_data.h"
+#include "avfilter.h"
+#include "drawutils.h"
+#include "filters.h"
+#include "formats.h"
+#include "internal.h"
+#include "audio.h"
+#include "video.h"
+
+typedef struct AVSyncTestContext {
+const AVClass *class;
+
+int w, h;
+AVRational frame_rate;
+int sample_rate;
+int64_t duration;
+int64_t apts, vpts;
+float amplitude;
+int period;
+int delay;
+int cycle;
+
+int beep;
+int beep_duration;
+int flash;
+int dir;
+AVRational vdelay, delay_max, delay_min;
+AVRational delay_range;
+int64_t prev_intpart;
+
+uint8_t rgba[3][4];
+FFDrawContext draw;
+FFDrawColor fg;
+FFDrawColor bg;
+FFDrawColor ag;
+} AVSyncTestContext;
+
+#define OFFSET(x) offsetof(AVSyncTestContext, x)
+#define A AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
+#define V AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
+
+static const AVOption avsynctest_options[] = {
+{"size",   "set frame size",  OFFSET(w),
AV_OPT_TYPE_IMAGE_SIZE, {.str="hd720"},   0,   0, V },
+{"s",  "set frame size",  OFFSET(w),
AV_OPT_TYPE_IMAGE_SIZE, {.str="hd720"},   0,   0, V },
+{"framerate",  "set frame rate",  OFFSET(frame_rate),   
AV_OPT_TYPE_VIDEO_RATE, {.str="30"},   0,INT_MAX, V },
+{"fr", "set frame rate",  OFFSET(frame_rate),   
AV_OPT_TYPE_VIDEO_RATE, {.str="30"},   0,INT_MAX, V },
+{"samplerate", "set sample rate", OFFSET(sample_rate),  AV_OPT_TYPE_INT,   
 {.i64=44100},8000,384000, A },
+{"sr", "set sample rate", OFFSET(sample_rate),  AV_OPT_TYPE_INT,   
 {.i64=44100},8000,384000, A },
+{"amplitude",  "set beep amplitude", OFFSET(amplitude), AV_OPT_TYPE_FLOAT, 
 {.dbl=.7},   0.,  1., A },
+{"a",  "set beep amplitude", OFFSET(amplitude), AV_OPT_TYPE_FLOAT, 
 {.dbl=.7},   0.,  1., A },
+{"period", "set beep period", OFFSET(period),   AV_OPT_TYPE_INT,   
 {.i64=3}, 1, 99., A },
+{"p",  "set beep period", OFFSET(period),   AV_OPT_TYPE_INT,   
 {.i64=3}, 1, 99., A },
+{"delay",  "set flash delay", OFFSET(delay),AV_OPT_TYPE_INT,   
 {.i64=0},   -30,  30, V },
+{"dl", "set flash delay", OFFSET(delay),AV_OPT_TYPE_INT,   
 {.i64=0},   -30,  30, V },
+{"cycle",  "set delay cycle", OFFSET(cycle),AV_OPT_TYPE_BOOL,  
 {.i6

Re: [FFmpeg-devel] [PATCH] avfilter: Added siti filter

2022-03-09 Thread Paul B Mahol
On 3/8/22, Thilo Borgmann  wrote:
> Am 07.03.22 um 20:06 schrieb Paul B Mahol:
>> On 3/7/22, Thilo Borgmann  wrote:
>>> Am 06.03.22 um 22:25 schrieb Paul B Mahol:
 On 3/6/22, Thilo Borgmann  wrote:
> Am 22.02.22 um 12:30 schrieb Thilo Borgmann:
>> Am 18.02.22 um 17:08 schrieb Paul B Mahol:
>>> On Sat, Feb 12, 2022 at 11:55 AM Thilo Borgmann
>>> 
>>> wrote:
>>>
 Am 31.01.22 um 12:55 schrieb James Almer:
>
>
> On 1/31/2022 8:53 AM, Anton Khirnov wrote:
>> Quoting Thilo Borgmann (2022-01-18 14:58:07)
> Violations of code style.
>>>
>>> Enhanced.
>>
>> Not enough. There are still many remaining, e.g.
>> * opening brace of a function definition should be on its own
>> line
>> * the context should generally be the first argument
>> * unsigned char* should be uint8_t*
>> * mixed declarations and code (the compiler should warn about
>> that)
>
> I think someone said that clang (or some versions) is apparently
> not
 warning about this, hence why so many of these end up being missed
 in
 reviews or even by the patch author.

 This and all of Anton's comments in v3. Also removed some more
 obviously
 useless doubles.

>>>
>>> Why it uses doubles in so many places?
>>> Is there any real benefit in that, except extra slowdown?
>>
>> I guess because it's originating in some c&p Matlab code.
>> I did %s#double#float#g for v4, loosing some precision we can ignore
>> IMHO.
>>
>>
>>
>> v3:
>>
>> Total frames: 2
>>
>> Spatial Information:
>> Average: 165.451985
>> Max: 165.817542
>> Min: 165.086427
>>
>> Temporal Information:
>> Average: 1.007263
>> Max: 2.014525
>> Min: 0.00
>>
>>
>>
>> v4:
>>
>> Total frames: 2
>>
>> Spatial Information:
>> Average: 164.385895
>> Max: 164.742325
>> Min: 164.029480
>>
>> Temporal Information:
>> Average: 1.007241
>> Max: 2.014483
>> Min: 0.00
>>
>
> Ping.

 Into wrong section of changelog added entry.

 Useless cast of allocation results.

 Does filter changes pixels? If not, add metadata flag to appropriate
 place.
>>>
>>> All addressed in v5, thx!
>>>
>>
>> Changelog entry is still in wrong, 5.0, section.
>
> Fixed in v6.
>
>>> Also added a FATE test for it.
>
>

Could use fminf/ float functions instead of double variants.

> -Thilo
>
___
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/vf_blend_vulkan: add addition blend mode

2022-03-09 Thread Lynne
9 Mar 2022, 12:57 by toq...@outlook.com:

> Ping.
>
> >From: Wu, Jianhua
> >Sent: 2022年2月25日 21:11
> >To: ffmpeg-devel@ffmpeg.org
> >Subject: [FFmpeg-devel] [PATCH] avfilter/vf_blend_vulkan: add addition blend 
> >mode
>
>>
>>
> >[PATCH 01/10] avfilter/vf_blend_vulkan: add addition blend mode [PATCH 
> >02/10] avfilter/vf_blend_vulkan: >add average blend mode [PATCH 03/10] 
> >avfilter/vf_blend_vulkan: add subtract >blend mode [PATCH 04/10] 
> >avfilter/vf_blend_vulkan: add negation blend mode [PATCH 05/10] 
> >>avfilter/vf_blend_vulkan: add extremity blend mode [PATCH 06/10] 
> >avfilter/vf_blend_vulkan: add >difference blend mode [PATCH 07/10] 
> >avfilter/vf_blend_vulkan: add darken blend mode [PATCH 08/10] 
> >>avfilter/vf_blend_vulkan: add lighten blend mode [PATCH 09/10] 
> >avfilter/vf_blend_vulkan: add >exclusion blend mode [PATCH 10/10] 
> >avfilter/vf_blend_vulkan: add phoenix blend mode
>

None of them apply. Could you rebase them onto current git master and squash 
them into 1 commit?
Thanks
___
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 v2] avcodec: Add dv marker bsf

2022-03-09 Thread Michael Niedermayer
Signed-off-by: Michael Niedermayer 
---
 doc/bitstream_filters.texi   |  30 
 libavcodec/Makefile  |   1 +
 libavcodec/bitstream_filters.c   |   1 +
 libavcodec/dv_error_marker_bsf.c | 127 +++
 4 files changed, 159 insertions(+)
 create mode 100644 libavcodec/dv_error_marker_bsf.c

diff --git a/doc/bitstream_filters.texi b/doc/bitstream_filters.texi
index a0092878c8..8c5d84dceb 100644
--- a/doc/bitstream_filters.texi
+++ b/doc/bitstream_filters.texi
@@ -132,6 +132,36 @@ the header stored in extradata to the key packets:
 ffmpeg -i INPUT -map 0 -flags:v +global_header -c:v libx264 -bsf:v dump_extra 
out.ts
 @end example
 
+@section dv_error_marker
+
+Blocks in DV which are marked as damaged are replaced by blocks of the 
specified color.
+
+@table @option
+@item color
+The color to replace damaged blocks by
+@item sta
+A 16 bit mask which specifies which of the 16 possible error status values are
+to be replaced by colored blocks. 0xFFFE is the default which replaces all non 0
+error status values.
+@table @samp
+@item ok
+No error, no concealment
+@item err
+Error, No concealment
+@item res
+Reserved
+@item notok
+Error or concealment
+@item notres
+Not reserved
+@item Aa, Ba, Ca, Ab, Bb, Cb, A, B, C, a, b, erri, erru
+The specific error status code
+@end table
+see page 44-46 or section 5.5 of
+@url{http://web.archive.org/web/20060927044735/http://www.smpte.org/smpte_store/standards/pdf/s314m.pdf}
+
+@end table
+
 @section eac3_core
 
 Extract the core from a E-AC-3 stream, dropping extra channels.
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index bfc31bacd4..c5ed46f121 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1161,6 +1161,7 @@ OBJS-$(CONFIG_AV1_FRAME_SPLIT_BSF)+= 
av1_frame_split_bsf.o
 OBJS-$(CONFIG_CHOMP_BSF)  += chomp_bsf.o
 OBJS-$(CONFIG_DUMP_EXTRADATA_BSF) += dump_extradata_bsf.o
 OBJS-$(CONFIG_DCA_CORE_BSF)   += dca_core_bsf.o
+OBJS-$(CONFIG_DV_ERROR_MARKER_BSF)+= dv_error_marker_bsf.o
 OBJS-$(CONFIG_EAC3_CORE_BSF)  += eac3_core_bsf.o
 OBJS-$(CONFIG_EXTRACT_EXTRADATA_BSF)  += extract_extradata_bsf.o\
  av1_parse.o h2645_parse.o
diff --git a/libavcodec/bitstream_filters.c b/libavcodec/bitstream_filters.c
index d565286397..ab27972a88 100644
--- a/libavcodec/bitstream_filters.c
+++ b/libavcodec/bitstream_filters.c
@@ -31,6 +31,7 @@ extern const AVBitStreamFilter ff_av1_metadata_bsf;
 extern const AVBitStreamFilter ff_chomp_bsf;
 extern const AVBitStreamFilter ff_dump_extradata_bsf;
 extern const AVBitStreamFilter ff_dca_core_bsf;
+extern const AVBitStreamFilter ff_dv_error_marker_bsf;
 extern const AVBitStreamFilter ff_eac3_core_bsf;
 extern const AVBitStreamFilter ff_extract_extradata_bsf;
 extern const AVBitStreamFilter ff_filter_units_bsf;
diff --git a/libavcodec/dv_error_marker_bsf.c b/libavcodec/dv_error_marker_bsf.c
new file mode 100644
index 00..c43bc01c6b
--- /dev/null
+++ b/libavcodec/dv_error_marker_bsf.c
@@ -0,0 +1,127 @@
+/*
+ * Copyright (c) 2022 Michael Niedermayer
+ *
+ * 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 "bsf.h"
+#include "bsf_internal.h"
+#include "libavutil/colorspace.h"
+#include "libavutil/intreadwrite.h"
+#include "libavutil/opt.h"
+
+typedef struct DVErrorMarkerContext {
+const AVClass *class;
+uint8_t color_rgba[4];
+int sta;
+uint8_t marked_block[76];
+} DVErrorMarkerContext;
+
+static int dv_error_marker_init(AVBSFContext *ctx)
+{
+DVErrorMarkerContext *s = ctx->priv_data;
+int i;
+
+memset(s->marked_block, -1, 76);
+for (i=0; i<4; i++) {
+s->marked_block[14*i  ] = RGB_TO_Y_JPEG(s->color_rgba[0], 
s->color_rgba[1],s->color_rgba[2]) + 128;
+s->marked_block[14*i+1] = 0x06;
+}
+s->marked_block[4*14 + 10*0  ] = RGB_TO_V_JPEG(s->color_rgba[0], 
s->color_rgba[1],s->color_rgba[2]) - 128;
+s->marked_block[4*14 + 10*0+1] = 0x16;
+s->marked_block[4*14 + 10*1  ] = RGB_TO_U_JPEG(s->color_rgba[0], 
s->color_rgba[1],s->color_rgba[2]) - 128;
+s->marked_block[4*14 + 10*1+1] = 0x16;
+
+return 0;
+}
+
+static int dv_error_marker_filter(AVBSFContext *ctx, AVPacket *pkt)
+{
+DVErro

Re: [FFmpeg-devel] [PATCH] avfilter/vf_blend_vulkan: add addition blend mode

2022-03-09 Thread Wu Jianhua
Lynne:
>Sent: 2022年3月10日 1:43
>To: FFmpeg development discussions and patches
>Subject: Re: [FFmpeg-devel] [PATCH] avfilter/vf_blend_vulkan: add addition 
>blend mode
>
>
>> Ping.
>>
>>>From: Wu, Jianhua
>> >Sent: 2022年2月25日 21:11
>>>To: ffmpeg-devel@ffmpeg.org
>>>Subject: [FFmpeg-devel] [PATCH] avfilter/vf_blend_vulkan: add addition blend 
>>>mode
>
>>
>>
> >
>
>None of them apply. Could you rebase them onto current git master
I didn't see any new commits to vf_ blend_vulkan.c. Is there any conflict?

> and squash them into 1 commit?
Nope. This didn't break the contribution rules. My intention is to keep the
commit message as clear as I can, which can help you test each mode quickly
for they are completed not the same things, or other people who want to use
the mode specified easily.

Best regards,
Jianhua

___
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 3/3] avformat/movenc: Add support for AVIF muxing

2022-03-09 Thread Vignesh Venkatasubramanian
On Fri, Mar 4, 2022 at 9:54 AM Vignesh Venkatasubramanian
 wrote:
>
> On Fri, Mar 4, 2022 at 3:24 AM James Almer  wrote:
> >
> > On 3/3/2022 4:16 PM, Vignesh Venkatasubramanian wrote:
> > > Add an AVIF muxer by re-using the existing the mov/mp4 muxer.
> > >
> > > AVIF Specifiation: https://aomediacodec.github.io/av1-avif
> > >
> > > Sample usage for still image:
> > > ffmpeg -i image.png -c:v libaom-av1 -avif-image 1 image.avif
> > >
> > > Sample usage for animated AVIF image:
> > > ffmpeg -i video.mp4 animated.avif
> > >
> > > We can re-use any of the AV1 encoding options that will make
> > > sense for image encoding (like bitrate, tiles, encoding speed,
> > > etc).
> > >
> > > The files generated by this muxer has been verified to be valid
> > > AVIF files by the following:
> > > 1) Displays on Chrome (both still and animated images).
> > > 2) Displays on Firefox (only still images, firefox does not support
> > > animated AVIF yet).
> > > 3) Verfied to be valid by Compliance Warden:
> > > https://github.com/gpac/ComplianceWarden
> > >
> > > Fixes the encoder/muxer part of Trac Ticket #7621
> > >
> > > Signed-off-by: Vignesh Venkatasubramanian 
> > > ---
> > >   configure|   1 +
> > >   libavformat/allformats.c |   1 +
> > >   libavformat/movenc.c | 323 ---
> > >   libavformat/movenc.h |   5 +
> > >   4 files changed, 305 insertions(+), 25 deletions(-)
> > >
> > > diff --git a/configure b/configure
> > > index 8c69ab0c86..6d7020e96b 100755
> > > --- a/configure
> > > +++ b/configure
> > > @@ -3390,6 +3390,7 @@ asf_stream_muxer_select="asf_muxer"
> > >   av1_demuxer_select="av1_frame_merge_bsf av1_parser"
> > >   avi_demuxer_select="riffdec exif"
> > >   avi_muxer_select="riffenc"
> > > +avif_muxer_select="mov_muxer"
> > >   caf_demuxer_select="iso_media"
> > >   caf_muxer_select="iso_media"
> > >   dash_muxer_select="mp4_muxer"
> > > diff --git a/libavformat/allformats.c b/libavformat/allformats.c
> > > index d066a7745b..400c17afbd 100644
> > > --- a/libavformat/allformats.c
> > > +++ b/libavformat/allformats.c
> > > @@ -81,6 +81,7 @@ extern const AVOutputFormat ff_au_muxer;
> > >   extern const AVInputFormat  ff_av1_demuxer;
> > >   extern const AVInputFormat  ff_avi_demuxer;
> > >   extern const AVOutputFormat ff_avi_muxer;
> > > +extern const AVOutputFormat ff_avif_muxer;
> > >   extern const AVInputFormat  ff_avisynth_demuxer;
> > >   extern const AVOutputFormat ff_avm2_muxer;
> > >   extern const AVInputFormat  ff_avr_demuxer;
> > > diff --git a/libavformat/movenc.c b/libavformat/movenc.c
> > > index 1a746a67fd..504403ab0b 100644
> > > --- a/libavformat/movenc.c
> > > +++ b/libavformat/movenc.c
> > > @@ -1303,7 +1303,7 @@ static int mov_write_av1c_tag(AVIOContext *pb, 
> > > MOVTrack *track)
> > >
> > >   avio_wb32(pb, 0);
> > >   ffio_wfourcc(pb, "av1C");
> > > -ff_isom_write_av1c(pb, track->vos_data, track->vos_len, 1);
> > > +ff_isom_write_av1c(pb, track->vos_data, track->vos_len, track->mode 
> > > != MODE_AVIF);
> > >   return update_size(pb, pos);
> > >   }
> > >
> > > @@ -2004,12 +2004,13 @@ static int mov_write_colr_tag(AVIOContext *pb, 
> > > MOVTrack *track, int prefer_icc)
> > >   }
> > >   }
> > >
> > > -/* We should only ever be called by MOV or MP4. */
> > > -av_assert0(track->mode == MODE_MOV || track->mode == MODE_MP4);
> > > +/* We should only ever be called for MOV, MP4 and AVIF. */
> > > +av_assert0(track->mode == MODE_MOV || track->mode == MODE_MP4 ||
> > > +   track->mode == MODE_AVIF);
> > >
> > >   avio_wb32(pb, 0); /* size */
> > >   ffio_wfourcc(pb, "colr");
> > > -if (track->mode == MODE_MP4)
> > > +if (track->mode == MODE_MP4 || track->mode == MODE_AVIF)
> > >   ffio_wfourcc(pb, "nclx");
> > >   else
> > >   ffio_wfourcc(pb, "nclc");
> > > @@ -2019,7 +2020,7 @@ static int mov_write_colr_tag(AVIOContext *pb, 
> > > MOVTrack *track, int prefer_icc)
> > >   avio_wb16(pb, track->par->color_primaries);
> > >   avio_wb16(pb, track->par->color_trc);
> > >   avio_wb16(pb, track->par->color_space);
> > > -if (track->mode == MODE_MP4) {
> > > +if (track->mode == MODE_MP4 || track->mode == MODE_AVIF) {
> > >   int full_range = track->par->color_range == AVCOL_RANGE_JPEG;
> > >   avio_w8(pb, full_range << 7);
> > >   }
> > > @@ -2085,7 +2086,7 @@ static void find_compressor(char * compressor_name, 
> > > int len, MOVTrack *track)
> > > || (track->par->width == 1440 && track->par->height 
> > > == 1080)
> > > || (track->par->width == 1920 && track->par->height 
> > > == 1080);
> > >
> > > -if (track->mode == MODE_MOV &&
> > > +if ((track->mode == MODE_AVIF || track->mode == MODE_MOV) &&
> > >   (encoder = av_dict_get(track->st->metadata, "encoder", NULL, 
> > > 0))) {
> > >   av_strlcpy(compressor_name, encoder->value, 32);

[FFmpeg-devel] [PATCH 1/2] avutil/hwcontext_videotoolbox: create real buffer pool

2022-03-09 Thread Zhao Zhili
vt_get_buffer shouldn't do buffer pool's job.
---
 libavutil/hwcontext_videotoolbox.c | 71 ++
 1 file changed, 34 insertions(+), 37 deletions(-)

diff --git a/libavutil/hwcontext_videotoolbox.c 
b/libavutil/hwcontext_videotoolbox.c
index 026127d412..e442a95007 100644
--- a/libavutil/hwcontext_videotoolbox.c
+++ b/libavutil/hwcontext_videotoolbox.c
@@ -210,9 +210,36 @@ static int vt_pool_alloc(AVHWFramesContext *ctx)
 return AVERROR_EXTERNAL;
 }
 
-static AVBufferRef *vt_dummy_pool_alloc(void *opaque, size_t size)
+static void videotoolbox_buffer_release(void *opaque, uint8_t *data)
+{
+CVPixelBufferRelease((CVPixelBufferRef)data);
+}
+
+static AVBufferRef *vt_pool_alloc_buffer(void *opaque, size_t size)
 {
-return NULL;
+CVPixelBufferRef pixbuf;
+AVBufferRef *buf;
+CVReturn err;
+AVHWFramesContext *ctx = opaque;
+VTFramesContext *fctx = ctx->internal->priv;
+
+err = CVPixelBufferPoolCreatePixelBuffer(
+NULL,
+fctx->pool,
+&pixbuf
+);
+if (err != kCVReturnSuccess) {
+av_log(ctx, AV_LOG_ERROR, "Failed to create pixel buffer from pool: 
%d\n", err);
+return NULL;
+}
+
+buf = av_buffer_create((uint8_t *)pixbuf, size,
+   videotoolbox_buffer_release, NULL, 0);
+if (!buf) {
+CVPixelBufferRelease(pixbuf);
+return NULL;
+}
+return buf;
 }
 
 static void vt_frames_uninit(AVHWFramesContext *ctx)
@@ -238,9 +265,9 @@ static int vt_frames_init(AVHWFramesContext *ctx)
 return AVERROR(ENOSYS);
 }
 
-// create a dummy pool so av_hwframe_get_buffer doesn't EINVAL
 if (!ctx->pool) {
-ctx->internal->pool_internal = av_buffer_pool_init2(0, ctx, 
vt_dummy_pool_alloc, NULL);
+ctx->internal->pool_internal = av_buffer_pool_init2(
+sizeof(CVPixelBufferRef), ctx, vt_pool_alloc_buffer, NULL);
 if (!ctx->internal->pool_internal)
 return AVERROR(ENOMEM);
 }
@@ -252,41 +279,11 @@ static int vt_frames_init(AVHWFramesContext *ctx)
 return 0;
 }
 
-static void videotoolbox_buffer_release(void *opaque, uint8_t *data)
-{
-CVPixelBufferRelease((CVPixelBufferRef)data);
-}
-
 static int vt_get_buffer(AVHWFramesContext *ctx, AVFrame *frame)
 {
-VTFramesContext *fctx = ctx->internal->priv;
-
-if (ctx->pool && ctx->pool->size != 0) {
-frame->buf[0] = av_buffer_pool_get(ctx->pool);
-if (!frame->buf[0])
-return AVERROR(ENOMEM);
-} else {
-CVPixelBufferRef pixbuf;
-AVBufferRef *buf = NULL;
-CVReturn err;
-
-err = CVPixelBufferPoolCreatePixelBuffer(
-NULL,
-fctx->pool,
-&pixbuf
-);
-if (err != kCVReturnSuccess) {
-av_log(ctx, AV_LOG_ERROR, "Failed to create pixel buffer from 
pool: %d\n", err);
-return AVERROR_EXTERNAL;
-}
-
-buf = av_buffer_create((uint8_t *)pixbuf, 1, 
videotoolbox_buffer_release, NULL, 0);
-if (!buf) {
-CVPixelBufferRelease(pixbuf);
-return AVERROR(ENOMEM);
-}
-frame->buf[0] = buf;
-}
+frame->buf[0] = av_buffer_pool_get(ctx->pool);
+if (!frame->buf[0])
+return AVERROR(ENOMEM);
 
 frame->data[3] = frame->buf[0]->data;
 frame->format  = AV_PIX_FMT_VIDEOTOOLBOX;
-- 
2.31.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] avutil/hwcontext_videotoolbox: fix declaration-after-statement

2022-03-09 Thread Zhao Zhili
---
 libavutil/hwcontext_videotoolbox.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavutil/hwcontext_videotoolbox.c 
b/libavutil/hwcontext_videotoolbox.c
index e442a95007..13f77a7692 100644
--- a/libavutil/hwcontext_videotoolbox.c
+++ b/libavutil/hwcontext_videotoolbox.c
@@ -161,11 +161,11 @@ uint32_t av_map_videotoolbox_format_from_pixfmt2(enum 
AVPixelFormat pix_fmt, boo
 
 static int vt_pool_alloc(AVHWFramesContext *ctx)
 {
-VTFramesContext *fctx = ctx->internal->priv;
 CVReturn err;
 CFNumberRef w, h, pixfmt;
 uint32_t cv_pixfmt;
 CFMutableDictionaryRef attributes, iosurface_properties;
+VTFramesContext *fctx = ctx->internal->priv;
 
 attributes = CFDictionaryCreateMutable(
 NULL,
@@ -589,13 +589,13 @@ int av_vt_pixbuf_set_attachments(void *log_ctx,
 static int vt_map_frame(AVHWFramesContext *ctx, AVFrame *dst, const AVFrame 
*src,
 int flags)
 {
-CVPixelBufferRef pixbuf = (CVPixelBufferRef)src->data[3];
-OSType pixel_format = CVPixelBufferGetPixelFormatType(pixbuf);
 CVReturn err;
-uint32_t map_flags = 0;
 int ret;
 int i;
 enum AVPixelFormat format;
+CVPixelBufferRef pixbuf = (CVPixelBufferRef)src->data[3];
+OSType pixel_format = CVPixelBufferGetPixelFormatType(pixbuf);
+uint32_t map_flags = 0;
 
 format = av_map_videotoolbox_format_to_pixfmt(pixel_format);
 if (dst->format != format) {
-- 
2.31.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] avfilter/video: fix shadowed variable

2022-03-09 Thread Zhao Zhili
---
 libavfilter/video.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/video.c b/libavfilter/video.c
index fa3d588044..b2f0cdf88a 100644
--- a/libavfilter/video.c
+++ b/libavfilter/video.c
@@ -50,7 +50,7 @@ AVFrame *ff_default_get_video_buffer(AVFilterLink *link, int 
w, int h)
 if (link->hw_frames_ctx &&
 ((AVHWFramesContext*)link->hw_frames_ctx->data)->format == 
link->format) {
 int ret;
-AVFrame *frame = av_frame_alloc();
+frame = av_frame_alloc();
 
 if (!frame)
 return NULL;
-- 
2.31.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".