Re: [FFmpeg-devel] [RFC] Value analysis with Frama-C's Eva plugin (and an UB fix)

2024-05-16 Thread Tomas Härdin
ons 2024-05-15 klockan 23:29 +0200 skrev Michael Niedermayer: > On Wed, May 15, 2024 at 09:39:43PM +0200, Tomas Härdin wrote: > > Hi > > > > So as I said in the coverity thread it would be good if we could > > get at > > least part of the codebase covered using f

Re: [FFmpeg-devel] [RFC] Value analysis with Frama-C's Eva plugin (and an UB fix)

2024-05-16 Thread Tomas Härdin
tor 2024-05-16 klockan 13:12 +0100 skrev Andrew Sayers: > On Wed, May 15, 2024 at 09:39:43PM +0200, Tomas Härdin wrote: > > Hi > > > > So as I said in the coverity thread it would be good if we could > > get at > > least part of the codebase covered using f

[FFmpeg-devel] [PATCH 1/5] lavu/common.h: Fix UB in av_clipl_int32_c()

2024-05-29 Thread Tomas Härdin
The entire patchset passes FATE /Tomas From c000b8a5e90883f28ce6c58960227e5825ac20d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Wed, 15 May 2024 21:03:47 +0200 Subject: [PATCH 1/5] lavu/common.h: Fix UB in av_clipl_int32_c() Found by value analysis --- libavutil/common

[FFmpeg-devel] [PATCH 2/5] lavu/common.h: Fix UB in av_clip_intp2_c()

2024-05-29 Thread Tomas Härdin
From 7b18f24c0bedfeebcdfb23ea837cea8d4c35cf30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Thu, 16 May 2024 16:33:44 +0200 Subject: [PATCH 2/5] lavu/common.h: Fix UB in av_clip_intp2_c() Found by value analysis --- libavutil/common.h | 2 +- 1 file changed, 1 insertion(+

[FFmpeg-devel] [PATCH 3/5] lavu/common.h: Fix UB in av_clip_uintp2_c()

2024-05-29 Thread Tomas Härdin
From f81730f8facc54ef23df79ac8d33075403b4f76f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Thu, 16 May 2024 16:37:58 +0200 Subject: [PATCH 3/5] lavu/common.h: Fix UB in av_clip_uintp2_c() Found by value analysis --- libavutil/common.h | 4 ++-- 1 file changed, 2 insertio

[FFmpeg-devel] [PATCH 4/5] lavu/intmath.h: Fix UB in ff_ctz_c() and ff_ctzll_c()

2024-05-29 Thread Tomas Härdin
From f9a12089bc98dde0ccc2487d1442ec6ddb7705f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Thu, 16 May 2024 18:10:58 +0200 Subject: [PATCH 4/5] lavu/intmath.h: Fix UB in ff_ctz_c() and ff_ctzll_c() Found by value analysis --- libavutil/intmath.h | 4 ++-- 1 file changed,

[FFmpeg-devel] [PATCH 5/5] lavu/mathematics: Return early if either a or b is zero

2024-05-29 Thread Tomas Härdin
This doesn't really fix anything, it just makes the value analysis easier. I don't feel strongly about it. /Tomas From cf9c56d7d4d7325d51ba6d99259431be7fca1f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tomas=20H=C3=A4rdin?= Date: Mon, 20 May 2024 14:46:01 +0200 Subject: [PATCH 5/5] lavu/mathematic

Re: [FFmpeg-devel] [PATCH 2/5] lavu/common.h: Fix UB in av_clip_intp2_c()

2024-05-29 Thread Tomas Härdin
tor 2024-05-30 klockan 00:24 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > >  static av_always_inline av_const int av_clip_intp2_c(int a, int p) > >  { > > -    if (((unsigned)a + (1 << p)) & ~((2 << p) - 1)) > > +    if (((unsigned)a + (1U <&l

Re: [FFmpeg-devel] [PATCH 1/5] lavu/common.h: Fix UB in av_clipl_int32_c()

2024-05-30 Thread Tomas Härdin
tor 2024-05-30 klockan 09:41 +0300 skrev Rémi Denis-Courmont: > Hi, > > Le 30 mai 2024 01:13:14 GMT+03:00, "Tomas Härdin" a > écrit : > > The entire patchset passes FATE > > Is the version in riscv/intmath.h safe? It looks to me that the GCC > codegen for no

Re: [FFmpeg-devel] [PATCH 1/5] lavu/common.h: Fix UB in av_clipl_int32_c()

2024-05-30 Thread Tomas Härdin
tor 2024-05-30 klockan 00:31 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > >   */ > >  static av_always_inline av_const int32_t av_clipl_int32_c(int64_t > > a) > >  { > > -    if ((a+0x8000u) & ~UINT64_C(0x)) return > > (in

Re: [FFmpeg-devel] [PATCH 4/5] lavu/intmath.h: Fix UB in ff_ctz_c() and ff_ctzll_c()

2024-05-30 Thread Tomas Härdin
tor 2024-05-30 klockan 10:54 +0300 skrev Rémi Denis-Courmont: > Can't we just use the compiler built-ins here? AFAIK, they (GCC, > LLVM) use the same algorithm if the CPU doesn't support native CTZ. > And they will pick the right instruction if CPU does have CTZ. > > I get it that maybe it wasn't

Re: [FFmpeg-devel] [PATCH 4/5] lavu/intmath.h: Fix UB in ff_ctz_c() and ff_ctzll_c()

2024-05-30 Thread Tomas Härdin
tor 2024-05-30 klockan 16:06 +0300 skrev Rémi Denis-Courmont: > > > Le 30 mai 2024 12:50:05 GMT+03:00, "Tomas Härdin" a > écrit : > > tor 2024-05-30 klockan 10:54 +0300 skrev Rémi Denis-Courmont: > > > Can't we just use the compiler built-ins here?

Re: [FFmpeg-devel] [PATCH 1/5] lavu/common.h: Fix UB in av_clipl_int32_c()

2024-05-30 Thread Tomas Härdin
tor 2024-05-30 klockan 14:50 +0300 skrev Rémi Denis-Courmont: > > > Le 30 mai 2024 12:40:20 GMT+03:00, "Tomas Härdin" a > écrit : > > tor 2024-05-30 klockan 09:41 +0300 skrev Rémi Denis-Courmont: > > > Hi, > > > > > > Le 30 mai 2024

Re: [FFmpeg-devel] [PATCH 1/2] lavc/speedhqdec: Add AV_CODEC_CAP_SLICE_THREADS

2024-05-30 Thread Tomas Härdin
Ping Will push in a couple of days /Tomas ___ 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] lavc/speedhqenc: Require width to be a multiple of 16

2024-05-30 Thread Tomas Härdin
Ping This stops us from producing broken output /Tomas ___ 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 "unsub

Re: [FFmpeg-devel] [PATCH 1/5] lavu/common.h: Fix UB in av_clipl_int32_c()

2024-05-30 Thread Tomas Härdin
tor 2024-05-30 klockan 17:28 +0300 skrev Rémi Denis-Courmont: > > > Le 30 mai 2024 17:07:21 GMT+03:00, "Tomas Härdin" a > écrit : > > > We should depend on punning as long as it conforms to the > > > standard. > > > > My mistake,

Re: [FFmpeg-devel] [PATCH 1/5] lavu/common.h: Fix UB in av_clipl_int32_c()

2024-05-30 Thread Tomas Härdin
tor 2024-05-30 klockan 12:42 -0300 skrev James Almer: > On 5/30/2024 12:32 PM, Tomas Härdin wrote: > > tor 2024-05-30 klockan 17:28 +0300 skrev Rémi Denis-Courmont: > > > > > > > > > Le 30 mai 2024 17:07:21 GMT+03:00, "Tomas Härdin" > > > a

Re: [FFmpeg-devel] [PATCH 5/5] lavu/mathematics: Return early if either a or b is zero

2024-05-31 Thread Tomas Härdin
fre 2024-05-31 klockan 02:22 +0200 skrev Michael Niedermayer: > On Thu, May 30, 2024 at 12:15:27AM +0200, Tomas Härdin wrote: > > This doesn't really fix anything, it just makes the value analysis > > easier. I don't feel strongly about it. > > if it doesnt fix

Re: [FFmpeg-devel] [PATCH 1/5] lavu/common.h: Fix UB in av_clipl_int32_c()

2024-05-31 Thread Tomas Härdin
tor 2024-05-30 klockan 20:49 +0300 skrev Rémi Denis-Courmont: > Le torstaina 30. toukokuuta 2024, 19.48.13 EEST Tomas Härdin a écrit > > It is not a "theoretical" UB - that's not how UB works. > > It is a *theoretical* UB if you can not prove that it leads to >

Re: [FFmpeg-devel] [PATCH] avcodec/hevc_ps: Fix UB 1 << 31

2024-06-01 Thread Tomas Härdin
lör 2024-06-01 klockan 15:13 +0200 skrev Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- >  libavcodec/hevc_ps.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/hevc_ps.c b/libavcodec/hevc_ps.c > index 7b486ce0af..1a459ad054 100644 > --- a/libavco

Re: [FFmpeg-devel] [RFC] STF 2025

2024-06-01 Thread Tomas Härdin
fre 2024-05-17 klockan 15:49 +0200 skrev Michael Niedermayer: > * Paul to work on FFmpeg full time. My idea here is that he can work > on whatever >   he likes in FFmpeg (so its not full time employment for specific > work but >   simply full time employment for him to work on whatever he likes in

Re: [FFmpeg-devel] [RFC] STF 2025

2024-06-02 Thread Tomas Härdin
sön 2024-06-02 klockan 20:01 +0200 skrev Michael Niedermayer: > Hi > > > On Sat, Jun 01, 2024 at 05:19:26PM +0200, Tomas Härdin wrote: > > [...] > > > > * Fund professional real live presence on multimedia / FOSS / > > > buisness related > > >

Re: [FFmpeg-devel] [PATCH v2] avcodec: add farbfeld encoder

2024-06-03 Thread Tomas Härdin
This format seems to reproduce some of the same issues as QOI: > The RGB-data should be sRGB for best interoperability and not alpha- > premultiplied. This seems to imply it could be something other than sRGB since it says SHOULD rather than MUST. This probably isn't a huge issue, but it should

Re: [FFmpeg-devel] [PATCH v2] avcodec: add farbfeld encoder

2024-06-03 Thread Tomas Härdin
> Check the return value of av_image_get_buffer_size() before adding > HEADER_SIZE to it. There will be a signed overflow (UB) for images of > size 16385x16385 (and many others). Sorry, I missed the multiplication by h+128 in av_image_check_size2(). So this isn't a problem in this specific case.

Re: [FFmpeg-devel] [PATCH] lavc/speedhqenc: Require width to be a multiple of 16

2024-06-03 Thread Tomas Härdin
tor 2024-05-30 klockan 16:23 +0200 skrev Tomas Härdin: > Ping > > This stops us from producing broken output Pushed /Tomass ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscri

Re: [FFmpeg-devel] [PATCH 1/2] lavc/speedhqdec: Add AV_CODEC_CAP_SLICE_THREADS

2024-06-03 Thread Tomas Härdin
tor 2024-05-30 klockan 16:23 +0200 skrev Tomas Härdin: > Ping > > Will push in a couple of days Passes FATE -> pushed /Tomas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubs

Re: [FFmpeg-devel] [RFC] STF 2025

2024-06-03 Thread Tomas Härdin
mån 2024-06-03 klockan 08:50 +0200 skrev Thilo Borgmann via ffmpeg- devel: > Am 02.06.24 um 22:14 schrieb Tomas Härdin: > > sön 2024-06-02 klockan 20:01 +0200 skrev Michael Niedermayer: > > > Hi > > > > > > > > > On Sat, Jun 01,

Re: [FFmpeg-devel] [PATCH] avcodec/libx265: Don't copy A53 closed captions by default

2024-06-11 Thread Tomas Härdin
tis 2024-06-11 klockan 09:42 +0200 skrev Andreas Rheinhardt: > The SEI handling of libx265 is buggy and can easily lead > to memory corruption: It reuses certain buffers, but when > reusing them it presumes that it is enough for these buffers > to exist and does not check whether they are actually

Re: [FFmpeg-devel] [PATCH] avcodec/libx265: Don't copy A53 closed captions by default

2024-06-11 Thread Tomas Härdin
tis 2024-06-11 klockan 10:05 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > > tis 2024-06-11 klockan 09:42 +0200 skrev Andreas Rheinhardt: > > > The SEI handling of libx265 is buggy and can easily lead > > > to memory corruption: It reuses certain buffers, but

Re: [FFmpeg-devel] [PATCH] avcodec/libx265: Don't copy A53 closed captions by default

2024-06-11 Thread Tomas Härdin
tis 2024-06-11 klockan 10:16 +0200 skrev Andreas Rheinhardt: > Tomas Härdin: > > tis 2024-06-11 klockan 10:05 +0200 skrev Andreas Rheinhardt: > > > Tomas Härdin: > > > > tis 2024-06-11 klockan 09:42 +0200 skrev Andreas Rheinhardt: > > > > > The SEI han

Re: [FFmpeg-devel] [PATCH 1/2] lavu/bswap: remove some inline assembler

2024-06-11 Thread Tomas Härdin
tis 2024-06-11 klockan 12:38 -0300 skrev James Almer: > On 6/11/2024 10:15 AM, Michael Niedermayer wrote: > > On Fri, Jun 07, 2024 at 09:19:46PM +0300, Rémi Denis-Courmont > > wrote: > > > C code or compiler built-ins are preferable over inline assembler > > > for > > > byte-swaps as it allows for

Re: [FFmpeg-devel] [PATCH 1/2] lavu/bswap: remove some inline assembler

2024-06-11 Thread Tomas Härdin
tis 2024-06-11 klockan 18:10 +0200 skrev Michael Niedermayer: > On Tue, Jun 11, 2024 at 05:50:35PM +0200, Tomas Härdin wrote: > [...] > > Perhaps we should demand platforms for which we have asm also have > > FATE > > instances? > > qemu based fate we have for s

Re: [FFmpeg-devel] [PATCH 1/5] lavu/common.h: Fix UB in av_clipl_int32_c()

2024-06-14 Thread Tomas Härdin
Pushed patches 1-4 /Tomas ___ 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] avr32: remove explicit support

2024-06-14 Thread Tomas Härdin
sön 2024-06-09 klockan 14:55 +0300 skrev Rémi Denis-Courmont: > The vendor has long since switched to Arm, wit the last product > reaching > their official end-of-life over 11 years ago. Linux support for the > ISA > was dropped 7 years ago. More importantly, this architecture was > never > support

Re: [FFmpeg-devel] [PATCH] fate/lavf-container: add a hevc in ISOBMFF remux test

2024-06-18 Thread Tomas Härdin
mån 2024-06-17 klockan 11:41 -0300 skrev James Almer: > Signed-off-by: James Almer > --- >  tests/fate/lavf-container.mak | 2 ++ >  tests/ref/lavf-fate/hevc.mp4  | 3 +++ >  2 files changed, 5 insertions(+) >  create mode 100644 tests/ref/lavf-fate/hevc.mp4 Looks OK /Tomas ___

Re: [FFmpeg-devel] [PATCH v2] avcodec/jpeg2000dec: Add support for placeholder passes, CAP, and CPF markers

2024-06-18 Thread Tomas Härdin
It seems this patch combines a lot of things that might be better to split into separate patches for easier review > @@ -382,6 +391,9 @@ static int get_siz(Jpeg2000DecoderContext *s) > } else if (ncomponents == 1 && s->precision == 8) { > s->avctx->pix_fmt = AV_PIX_FMT_GRAY8

Re: [FFmpeg-devel] [PATCH] fate/jpeg2000dec: add support for p0_10.j2k

2024-06-18 Thread Tomas Härdin
lör 2024-06-15 klockan 21:47 -0700 skrev p...@sandflow.com: > From: Pierre-Anthony Lemieux > > p0_10.j2k is one of the reference codestreams included in Rec. ITU-T > T.803 | ISO/IEC 15444-4. > --- >  tests/fate/jpeg2000.mak  | 3 +++ >  tests/ref/fate/jpeg2000dec-p0_10 | 6 ++ >  2 file

Re: [FFmpeg-devel] [PATCH 3/5] avformat/mxfdec: Check container_ul->desc before use

2024-06-18 Thread Tomas Härdin
fre 2024-06-07 klockan 02:32 +0200 skrev Michael Niedermayer: > Fixes: CID1592939 Dereference after null check > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- >  libavformat/mxfdec.c | 1 + >  1 file changed, 1 insertion(+) > > diff --git a/libavformat/mxfdec.c b/

Re: [FFmpeg-devel] [PATCH 4/5] avformat/mxfenc: Remove dead code

2024-06-18 Thread Tomas Härdin
fre 2024-06-07 klockan 02:32 +0200 skrev Michael Niedermayer: > Fixes: CID1524681 Logically dead code > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- >  libavformat/mxfenc.c | 3 --- >  1 file changed, 3 deletions(-) > > diff --git a/libavformat/mxfenc.c b/libavfo

Re: [FFmpeg-devel] [RFC] STF 2025

2024-06-18 Thread Tomas Härdin
mån 2024-06-03 klockan 08:50 +0200 skrev Thilo Borgmann via ffmpeg- devel: > Am 02.06.24 um 22:14 schrieb Tomas Härdin: > > sön 2024-06-02 klockan 20:01 +0200 skrev Michael Niedermayer: > > > Hi > > > > > > > > > On Sat, Jun 01,

Re: [FFmpeg-devel] [PATCH v2] avcodec: add farbfeld encoder

2024-06-18 Thread Tomas Härdin
mån 2024-06-03 klockan 19:16 + skrev marcus: > > > > > > > Check the return value of av_image_get_buffer_size() before > > > adding > > > > > HEADER_SIZE to it. There will be a signed overflow (UB) for > > > images of > > > size 16385x16385 (and many others). > > > > > > Sorry, I missed th

Re: [FFmpeg-devel] [PATCH v2] avcodec/jpeg2000dec: Add support for placeholder passes, CAP, and CPF markers

2024-06-19 Thread Tomas Härdin
ons 2024-06-19 klockan 05:51 + skrev WATANABE Osamu: > First of all, I appreciate your kind review. > I'm writing to discuss the changes and would like to hear your > feedback on these. > > > > On Jun 18, 2024, at 23:20, Tomas Hardin wrote: > > > > > > It seems this patch combines a lot of

Re: [FFmpeg-devel] [PATCH] fate/jpeg2000dec: add support for p0_10.j2k

2024-06-19 Thread Tomas Härdin
tis 2024-06-18 klockan 07:59 -0700 skrev Pierre-Anthony Lemieux: > On Tue, Jun 18, 2024 at 7:25 AM Tomas Härdin wrote: > > > > lör 2024-06-15 klockan 21:47 -0700 skrev p...@sandflow.com: > > > From: Pierre-Anthony Lemieux > > > > > > p0_10.j2k is on

Re: [FFmpeg-devel] [PATCH 3/3] avformat/mxfdec: don't use sizeof(AVMasteringDisplayMetadata)

2024-06-20 Thread Tomas Härdin
ons 2024-06-19 klockan 15:24 -0300 skrev James Almer: > It's not part of the libavutil ABI. > > Signed-off-by: James Almer > --- >  libavformat/mxfdec.c | 5 +++-- >  1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c > index 852fb7e056..a

Re: [FFmpeg-devel] [PATCH] ffmpeg: Carry streamid as metadata key 'id'

2024-07-01 Thread Tomas Härdin
mån 2024-07-01 klockan 16:51 +0200 skrev Anton Khirnov: > Quoting Tomas Härdin (2024-04-16 16:12:13) > > tis 2024-04-16 klockan 09:52 -0300 skrev James Almer: > > > On Tue, Apr 16, 2024 at 9:38 AM Anton Khirnov > > > wrote: > > > > > > > Quoting T

Re: [FFmpeg-devel] [PATCH 2/9] avcodec/zmbvenc: Remove redundant pixel format check

2021-09-29 Thread Tomas Härdin
tis 2021-09-28 klockan 16:41 +0200 skrev Andreas Rheinhardt: > ff_encode_preinit() already checked the pixel format via > AVCodec.pix_fmts. > > Signed-off-by: Andreas Rheinhardt > --- >  libavcodec/zmbvenc.c | 3 --- >  1 file changed, 3 deletions(-) > > diff --git a/libavcodec/zmbvenc.c b/libavc

Re: [FFmpeg-devel] [PATCH] avformat/mxf: support MCA audio information

2021-10-12 Thread Tomas Härdin
mån 2021-10-11 klockan 18:32 +0200 skrev Marc-Antoine Arnaud: > --- >  libavformat/mxf.h    |   1 + >  libavformat/mxfdec.c | 276 > ++- >  2 files changed, 271 insertions(+), 6 deletions(-) Did we reach a consensus on this? While I think signalling ffmpeg to

Re: [FFmpeg-devel] [PATCH] avformat/mxf: support MCA audio information

2021-10-20 Thread Tomas Härdin
mån 2021-10-18 klockan 17:06 +0200 skrev Marc-Antoine Arnaud: > > +static int mxf_audio_remapping(int* channel_ordering, uint8_t* data, > int size, int sample_size, int channels) > +{ > +    int sample_offset = channels * sample_size; > +    int number_of_samples = size / sample_offset; > +    uin

Re: [FFmpeg-devel] [PATCH] avformat/mxf: support MCA audio information

2021-10-28 Thread Tomas Härdin
ons 2021-10-27 klockan 15:50 +0200 skrev Marc-Antoine Arnaud: > +if(channel_ordering_ptr->service_type != > AV_AUDIO_SERVICE_TYPE_NB) { > +ast = (enum > AVAudioServiceType*)av_stream_new_side_data(st, > AV_PKT_DATA_AUDIO_SERVICE_TYPE, siz

Re: [FFmpeg-devel] [PATCH] mfxenc add jpeg2000 frame field interlacing support

2021-10-28 Thread Tomas Härdin
Looks like you messed up the subject. You need two newlines between the title of the patch and the description. This patch also mixes a lot of different changes. Please split it up. The bigger a patch is the more rounds of review it tends to have to go through. > +    { 0x840B, > {0x06,0x0e,0x2b,

Re: [FFmpeg-devel] [PATCH] avfilter: add wpsnr video filter

2021-10-29 Thread Tomas Härdin
tor 2021-10-28 klockan 21:09 +0200 skrev Paul B Mahol: > > +FRAMESYNC_DEFINE_CLASS(wpsnr, WPSNRContext, fs); > + > +#define COMPUTE_HX(type, stype, depth)   \ > +static void compute_hx##depth(const uint8_t *ssrc,   \ > +  int linesize,  \ > +

Re: [FFmpeg-devel] [PATCH] avfilter: add wpsnr video filter

2021-10-29 Thread Tomas Härdin
fre 2021-10-29 klockan 15:33 +0200 skrev Paul B Mahol: > On Fri, Oct 29, 2021 at 3:12 PM Tomas Härdin > wrote: > > > > > +static double get_hx(const uint8_t *src, int linesize, int w, > > > int h) > > > +{ > > > +    int64_t sum

Re: [FFmpeg-devel] [PATCH] avfilter: add wpsnr video filter

2021-10-29 Thread Tomas Härdin
fre 2021-10-29 klockan 17:00 +0200 skrev Paul B Mahol: > On Fri, Oct 29, 2021 at 4:46 PM Tomas Härdin > wrote: > > > fre 2021-10-29 klockan 15:33 +0200 skrev Paul B Mahol: > > > On Fri, Oct 29, 2021 at 3:12 PM Tomas Härdin > > > wrote: > > > > >

Re: [FFmpeg-devel] [PATCH] avfilter: add wpsnr video filter

2021-10-29 Thread Tomas Härdin
fre 2021-10-29 klockan 19:17 +0200 skrev Paul B Mahol: > On Fri, Oct 29, 2021 at 6:59 PM Tomas Härdin > wrote: > > > fre 2021-10-29 klockan 17:00 +0200 skrev Paul B Mahol: > > > On Fri, Oct 29, 2021 at 4:46 PM Tomas Härdin > > > wrote: > > > > &

Re: [FFmpeg-devel] [PATCH] avfilter: add wpsnr video filter

2021-10-29 Thread Tomas Härdin
fre 2021-10-29 klockan 19:43 +0200 skrev Paul B Mahol: > On Fri, Oct 29, 2021 at 7:26 PM Tomas Härdin > wrote: > > > fre 2021-10-29 klockan 19:17 +0200 skrev Paul B Mahol: > > > On Fri, Oct 29, 2021 at 6:59 PM Tomas Härdin > > > wrote: > > > > &

Re: [FFmpeg-devel] [PATCH] avfilter: add wpsnr video filter

2021-10-30 Thread Tomas Härdin
fre 2021-10-29 klockan 21:17 -0400 skrev Ronald S. Bultje: > Hi Thomas, > > On Fri, Oct 29, 2021 at 9:12 AM Tomas Härdin > wrote: > > > tor 2021-10-28 klockan 21:09 +0200 skrev Paul B Mahol: > > > +    const uint16_t *src = (const uint16_t *)ssrc; > > &g

Re: [FFmpeg-devel] [PATCH] avfilter: add wpsnr video filter

2021-10-30 Thread Tomas Härdin
lör 2021-10-30 klockan 10:28 -0400 skrev Ronald S. Bultje: > Hi, > > On Sat, Oct 30, 2021 at 4:57 AM Tomas Härdin > wrote: > > > Maybe we should upgrade to C11 then? This gives us access to more > > useful language features. Type-generic expressions look

Re: [FFmpeg-devel] [PATCH] avformat/mxf: support MCA audio information

2021-11-05 Thread Tomas Härdin
> +    if(channel_ordering_ptr->service_type != > AV_AUDIO_SERVICE_TYPE_NB) { > +    ast = (enum > AVAudioServiceType*)av_stream_new_side_data(st, > AV_PKT_DATA_AUDIO_SERVICE_TYPE, sizeof(*ast)); ast == NULL still needs handling here I don't see

Re: [FFmpeg-devel] [PATCH] avformat/mxf: support MCA audio information

2021-11-09 Thread Tomas Härdin
sön 2021-11-07 klockan 12:32 +0100 skrev Marton Balint: > > > + > > +    while (channel_ordering_ptr->uid[0]) { > > +    if (IS_KLV_KEY(channel_ordering_ptr->uid, > > mca_sub_descriptor->mca_label_dictionary_id)) { > > You should check if current_channel < desc

Re: [FFmpeg-devel] [PATCH 01/17] avformat/mxfenc: Auto-insert h264_mp4toannexb BSF if needed

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 18:34 +0100 skrev Andreas Rheinhardt: > The mxf and mxf_opatom muxer expect H.264 in Annex B format. > > Signed-off-by: Andreas Rheinhardt > --- > The check here is taken from mpegtsenc. You didn't think to make both muxers share code instead of copy- pasting? /Tomas ___

Re: [FFmpeg-devel] [PATCH 02/17] fate/mxf: Add ProRes remux test

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt: > Also covers writing mastering display metadata. So you're merging the D-10 user comments test and ProRes remuxing? What about remuxing D-10? /Tomas ___ ffmpeg-devel mailing list ffmpeg-deve

Re: [FFmpeg-devel] [PATCH 04/17] avformat/mxfenc: Use smaller types to make struct smaller

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- >  libavformat/mxfenc.c | 4 ++-- >  1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c > index d1c4d43a50..3b6604d0d6 100644 > --- a/lib

Re: [FFmpeg-devel] [PATCH 05/17] avformat/mxfenc: Remove redundant check

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt: > None of the muxers here has the AVFMT_NOSTREAMS flag set, > so it is checked generically that there are streams. Didn't know about AVFMT_NOSTREAMS > > Signed-off-by: Andreas Rheinhardt > --- >  libavformat/mxfenc.c | 3 --- >  1 file

Re: [FFmpeg-devel] [PATCH 06/17] avformat/mxfenc: Make init function out of write_header

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt: > The MXF muxers only write the header after they have received > a packet; the actual write_header function does not write anything. > So make an init function out of it. New API being put to good use. Patch looks OK We could write *so

Re: [FFmpeg-devel] [PATCH 07/17] avformat/mxfenc: Error out when receiving invalid data

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt: > (Unless the packet has a size of zero, the packet will run afoul > of the cbr_index check a few lines below.) > > Signed-off-by: Andreas Rheinhardt > --- >  libavformat/mxfenc.c | 2 +- >  1 file changed, 1 insertion(+), 1 deletion(-)

Re: [FFmpeg-devel] [PATCH 08/17] avformat/mxfenc: Improve returned error codes

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- >  libavformat/mxfenc.c | 16 >  1 file changed, 8 insertions(+), 8 deletions(-) Aha, this one does exactly what I just suggested with return values. D'oh! Looks OK of course /

Re: [FFmpeg-devel] [PATCH 09/17] avformat/mxfenc: Avoid allocation for timecode track

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- >  libavformat/mxfenc.c | 10 +++--- >  1 file changed, 3 insertions(+), 7 deletions(-) > > diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c > index cf63340313..aa9857fcff 100644 > --

Re: [FFmpeg-devel] [PATCH 10/17] avformat/mxfdec: Simplify data->hex string conversion

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt: > Signed-off-by: Andreas Rheinhardt > --- >  libavformat/mxfdec.c | 13 +++-- >  1 file changed, 3 insertions(+), 10 deletions(-) > > diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c > index af9d33f796..4191e82474 100644

Re: [FFmpeg-devel] [PATCH 11/17] avformat/mxfenc: Store locally whether DNXHD profile is interlaced

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt: > It is just a flag per supported CID. So there is no reason to use > an avpriv function for this purpose. This is data duplication. Honestly these ULs should probably live in dnxhddata.c. > > Signed-off-by: Andreas Rheinhardt > --- >

Re: [FFmpeg-devel] [PATCH 11/17] avformat/mxfenc: Store locally whether DNXHD profile is interlaced

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 22:48 +0100 skrev Andreas Rheinhardt: > Tomas Härdin: > > tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt: > > > It is just a flag per supported CID. So there is no reason to use > > > an avpriv function for this purpose. > &

Re: [FFmpeg-devel] [PATCH 01/17] avformat/mxfenc: Auto-insert h264_mp4toannexb BSF if needed

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 22:07 +0100 skrev Andreas Rheinhardt: > Tomas Härdin: > > tis 2021-11-09 klockan 18:34 +0100 skrev Andreas Rheinhardt: > > > The mxf and mxf_opatom muxer expect H.264 in Annex B format. > > > > > > Signed-off-by: Andreas Rheinhardt >

Re: [FFmpeg-devel] [PATCH 13/17] avformat/mxfenc: Remove redundant DNXHD frame size checks

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt: > The actual frame_size is no longer used since commit > 3d38e45eb85c7a2420cb48a9cd45625c28644b2e; and the check for > "< 0" is equivalent to the CID being valid. But this is already > ensured by mxf_dnxhd_codec_uls containing this CID. >

Re: [FFmpeg-devel] [PATCH 03/17] fate/mxf: Add tests for H.264 remuxing

2021-11-09 Thread Tomas Härdin
tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt: > These tests exhibit two bugs: Instead of using the in-band extradata > the demuxer makes up some extradata designed for AVC intra tracks > that lack in-band extradata; these files are nevertheless decodable > because of the in-band extr

Re: [FFmpeg-devel] [PATCH 01/17] avformat/mxfenc: Auto-insert h264_mp4toannexb BSF if needed

2021-11-10 Thread Tomas Härdin
ons 2021-11-10 klockan 14:21 +0100 skrev Andreas Rheinhardt: > Tomas Härdin: > > tis 2021-11-09 klockan 22:07 +0100 skrev Andreas Rheinhardt: > > > Tomas Härdin: > > > > tis 2021-11-09 klockan 18:34 +0100 skrev Andreas Rheinhardt: > > > > > The mxf

Re: [FFmpeg-devel] [PATCH 03/17] fate/mxf: Add tests for H.264 remuxing

2021-11-10 Thread Tomas Härdin
ons 2021-11-10 klockan 14:52 +0100 skrev Andreas Rheinhardt: > Tomas Härdin: > > tis 2021-11-09 klockan 19:01 +0100 skrev Andreas Rheinhardt: > > > These tests exhibit two bugs: Instead of using the in-band > > > extradata > > > the demuxer makes up some ext

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: fix DNxHD GC ULs

2021-12-01 Thread Tomas Härdin
tis 2021-11-30 klockan 10:22 +0100 skrev Nicolas Gaullier: Fix GC container ul. Fix GC element type both for the generic case and for OPAtom. Thanks to Philip de Nier for checking the values, especially for OPAtom. ---  libavformat/mxfenc.c  | 8 ++--  tests/ref/lavf/mxf_opatom | 2 +-  2 f

Re: [FFmpeg-devel] [PATCH] avformat/mxfenc: fix static building

2023-10-17 Thread Tomas Härdin
tis 2023-09-19 klockan 17:12 +0200 skrev Michael Riedl: > MXF muxer requires rangecoder otherwise static linking fails. > > Signed-off-by: Michael Riedl Pushed /Tomas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/lis

Re: [FFmpeg-devel] [PATCH 1/2] avformat/mxfdec: Check klv offset

2023-10-18 Thread Tomas Härdin
ons 2023-10-18 klockan 02:49 +0200 skrev Michael Niedermayer: > Fixes: Assertion klv_offset >= mxf->run_in failed at > libavformat/mxfdec.c:736 > Fixes: 62936/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer- > 5778404366221312.fuzz > > Found-by: continuous fuzzing process > https://github.com

Re: [FFmpeg-devel] [PATCH] avcodec/mlp*: improvements

2023-10-25 Thread Tomas Härdin
> if (c) { > e[0] = 1 << 14; > e[1] = 0 << 14; > e[2] = v[1]; > e[3] = v[0]; > } else { > e[0] = v[0]; > e[1] = v[1]; > e[2] = 0 << 14; > e[3] =

Re: [FFmpeg-devel] [PATCH] avcodec/mlp*: improvements

2023-10-25 Thread Tomas Härdin
On Wed, 2023-10-25 at 21:00 +0200, Paul B Mahol wrote: > On Wed, Oct 25, 2023 at 8:39 PM Tomas Härdin wrote: > > > > > >     if (c) { > > >     e[0] = 1 << 14; > > >     e[1] = 0 << 14; > > >  

Re: [FFmpeg-devel] [PATCH 1/4] avcodec/jpeg2000dec: Check image offset

2023-10-25 Thread Tomas Härdin
On Thu, 2023-10-05 at 00:59 +0200, Michael Niedermayer wrote: > Fixes: left shift of negative value -538967841 > Fixes: 62447/clusterfuzz-testcase-minimized- > ffmpeg_AV_CODEC_ID_JPEG2000_fuzzer-6427134337613824 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/mas

Re: [FFmpeg-devel] [PATCH v2] avformat: introduce AVStreamGroup

2023-10-25 Thread Tomas Härdin
>   > +enum AVStreamGroupParamsType { > +    AV_STREAM_GROUP_PARAMS_NONE, Maybe AV_STREAM_GROUP_PARAMS_NUM on the end? /Tomas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit l

Re: [FFmpeg-devel] [PATCH 1/3] lavc/jpeg2000dsp: make coefficients extern

2023-10-30 Thread Tomas Härdin
lör 2023-10-28 klockan 22:04 +0300 skrev Rémi Denis-Courmont: > This is so that they can be loaded from assembler, rather than > duplicated. Is loading these constants via immediates slower than the indirect load that the patchset does? /Tomas ___ ffmpe

Re: [FFmpeg-devel] [PATCH] avcodec/mlp*: improvements

2023-10-30 Thread Tomas Härdin
ons 2023-10-25 klockan 21:59 +0200 skrev Paul B Mahol: > On Wed, Oct 25, 2023 at 9:03 PM Tomas Härdin wrote: > > > On Wed, 2023-10-25 at 21:00 +0200, Paul B Mahol wrote: > > > On Wed, Oct 25, 2023 at 8:39 PM Tomas Härdin > > > wrote: > > >

Re: [FFmpeg-devel] [PATCH v2] avformat: introduce AVStreamGroup

2023-10-30 Thread Tomas Härdin
ons 2023-10-25 klockan 16:40 -0300 skrev James Almer: > On 10/25/2023 4:25 PM, Tomas Härdin wrote: > > >   > > > +enum AVStreamGroupParamsType { > > > +    AV_STREAM_GROUP_PARAMS_NONE, > > > > Maybe AV_STREAM_GROUP_PARAMS_NUM on the end? > > For

Re: [FFmpeg-devel] [PATCH] MAINTAINERS: add myself as a mediacodec and videotoolbox maintainer

2023-11-08 Thread Tomas Härdin
tis 2023-11-07 klockan 11:19 +0800 skrev Zhao Zhili: > From: Zhao Zhili > > Signed-off-by: Zhao Zhili > --- >  MAINTAINERS | 4 ++-- >  1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index b66c3d09a6..3430e1722b 100644 > --- a/MAINTAINERS > +++ b/MAI

Re: [FFmpeg-devel] [ANNOUNCE] Repeat vote: GA voters list updates

2023-11-14 Thread Tomas Härdin
lör 2023-11-11 klockan 10:42 +0100 skrev Jean-Baptiste Kempf: > > You have been told, now, several times, that a list of email is a > collection of Private Information,  according to a GDPR and that you > are a process of this PI, and therefore liable to the law. Everyone with a copy of the git r

Re: [FFmpeg-devel] [PATCH v2 0/6] WebRTC sub-second live streaming support

2023-11-14 Thread Tomas Härdin
This patchset is missing tests. I know that we for some reason don't really have tests for protocols, but I feel the issue is worthwhile to bring up. I've worked a bit with WebRTC recently and it's fiddly, so it'd be nice to have some automated thing that keeps track of which WebRTC implementations

Re: [FFmpeg-devel] [PATCH v2 0/6] WebRTC sub-second live streaming support

2023-11-14 Thread Tomas Härdin
tis 2023-11-14 klockan 13:59 +0100 skrev Michael Riedl: > Another option is an external project for WebRTC testing, but the > challenge is > keeping it maintained and compatible with changes in implementations. Perhaps there are funds to raise for such an effort? I can imagine Google et al have an

Re: [FFmpeg-devel] [PATCH v2 2/6] libavformat/sdp: remove whitespaces in fmtp

2023-11-14 Thread Tomas Härdin
tis 2023-11-07 klockan 15:12 +0100 skrev Michael Riedl: > Whitespaces after semicolon breaks some servers Which servers? If the spec allows whitespace then the onus is on them to fix their implementations. /Tomas ___ ffmpeg-devel mailing list ffmpeg-dev

Re: [FFmpeg-devel] [ANNOUNCE] Repeat vote: GA voters list updates

2023-11-14 Thread Tomas Härdin
tis 2023-11-14 klockan 13:49 +0100 skrev Thilo Borgmann via ffmpeg- devel: > Am 14.11.23 um 10:28 schrieb Tomas Härdin: > > lör 2023-11-11 klockan 10:42 +0100 skrev Jean-Baptiste Kempf: > > > > > > You have been told, now, several times, that a list of email is a

Re: [FFmpeg-devel] [PATCH v2 2/6] libavformat/sdp: remove whitespaces in fmtp

2023-11-14 Thread Tomas Härdin
tis 2023-11-14 klockan 18:51 +0200 skrev Rémi Denis-Courmont: > Le tiistaina 14. marraskuuta 2023, 17.47.07 EET Tomas Härdin a écrit > : > > tis 2023-11-07 klockan 15:12 +0100 skrev Michael Riedl: > > > Whitespaces after semicolon breaks some servers > > > >

Re: [FFmpeg-devel] [PATCH v2 2/6] libavformat/sdp: remove whitespaces in fmtp

2023-11-14 Thread Tomas Härdin
tis 2023-11-14 klockan 17:14 +0100 skrev Kieran Kunhya: > On Tue, 14 Nov 2023 at 16:47, Tomas Härdin wrote: > > > tis 2023-11-07 klockan 15:12 +0100 skrev Michael Riedl: > > > Whitespaces after semicolon breaks some servers > > > > Which servers? If the spec a

Re: [FFmpeg-devel] [ANNOUNCE] Repeat vote: GA voters list updates

2023-11-14 Thread Tomas Härdin
tis 2023-11-14 klockan 18:46 +0200 skrev Rémi Denis-Courmont: > Le tiistaina 14. marraskuuta 2023, 17.56.24 EET Tomas Härdin a écrit > : > > Ballots should be public IMO, secret voting is cowardice. > > The French (XIXth century) Empire used notoriously public ballots, > an

Re: [FFmpeg-devel] [POC][PATCHSET] Add qrencodesrc source

2023-11-30 Thread Tomas Härdin
tor 2023-11-30 klockan 01:49 +0100 skrev Stefano Sabatini: > This is meant to introduce functionality to handle QR codes. Why? /Tomas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe,

Re: [FFmpeg-devel] [POC][PATCHSET] Add qrencodesrc source

2023-12-01 Thread Tomas Härdin
tor 2023-11-30 klockan 15:39 + skrev Cosmin Stejerean via ffmpeg- devel: > > > On Nov 30, 2023, at 03:07, Tomas Härdin wrote: > > > > tor 2023-11-30 klockan 01:49 +0100 skrev Stefano Sabatini: > > > This is meant to introduce functionality to handle QR code

Re: [FFmpeg-devel] [PATCH] News: Removal of libndi

2019-03-26 Thread Tomas Härdin
tis 2019-03-26 klockan 09:45 +0100 skrev Tobias Rapp: > On 25.03.2019 18:02, Jean-Baptiste Kempf wrote: > > On Mon, 25 Mar 2019, at 08:32, Tobias Rapp wrote: > > > > Most of those hardware libraries are glorified ioctls around > > > > the driver and shipped with the drivers. > > > > And I see this

Re: [FFmpeg-devel] [PATCH]lavc/bmp: Avoid a heap buffer overwrite for 1bpp

2019-03-27 Thread Tomas Härdin
tis 2019-03-26 klockan 13:38 +0100 skrev Carl Eugen Hoyos: > Hi! > > Attached patch intends to fix a buffer overwrite reported today. Funny, I was looking at this code a few weeks ago as a good candidate for some static analysis/formal verification > ptr[avctx->width - (avctx->width & 7) + j] =

Re: [FFmpeg-devel] [PATCH 1/2] libavcodec/zmbv: change 24-bit decoder channel order, from RGB24 to BGR24

2019-03-27 Thread Tomas Härdin
tis 2019-03-26 klockan 22:13 + skrev Matthew Fearnley: > This brings the channel order in line with that used in 32-bit mode (BGR0). > > 24-bit decoding is disabled by default (#ifdef ZMBV_ENABLE_24BPP), and no > prior encoders or sample videos are known to exist for this bit depth, so > I con

Re: [FFmpeg-devel] [PATCH 2/2] libavcodec/zmbvenc: add support for 24-bit encoding, using pix_fmt BGR24.

2019-03-27 Thread Tomas Härdin
tis 2019-03-26 klockan 22:13 + skrev Matthew Fearnley: > Support is #ifdef'd out at this stage, using ZMBV_ENABLE_24BPP (like in > the zmbv.c decoder) > --- >  libavcodec/zmbvenc.c | 9 + >  1 file changed, 9 insertions(+) > > diff --git a/libavcodec/zmbvenc.c b/libavcodec/zmbvenc.c > i

  1   2   3   4   5   6   7   8   9   10   >