Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-22 Thread Martin Vignali
> > But maybe to make tests simpler, we can use/add bit exact conversion > > for uint8 to float, we can generate a LUT without float calc > > and for uint16 to float, we can add a uint16 to float conversion without > > float calc, or maybe, generate a LUT in bit exact mode (probably faster, > if >

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-22 Thread Michael Niedermayer
On Wed, Aug 22, 2018 at 10:20:53AM +0200, Martin Vignali wrote: > > > > > So the only thing I can do is to disable these tests for > > > these formats. > > > Otherwise, I need to test other changes somehow. Here is the patch, that > > > skips > > > pixfmts tests for these formats. > > > > in absenc

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-22 Thread Reto Kromer
Martin Vignali wrote: >But maybe to make tests simpler, we can use/add bit exact >conversion for uint8 to float, we can generate a LUT without >float calc and for uint16 to float, we can add a uint16 to >float conversion without float calc, or maybe, generate a LUT >in bit exact mode (probably fas

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-22 Thread Martin Vignali
> > > So the only thing I can do is to disable these tests for > > these formats. > > Otherwise, I need to test other changes somehow. Here is the patch, that > > skips > > pixfmts tests for these formats. > > in absence of another solution this should be ok > > I'm not against, removing these test

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-21 Thread Michael Niedermayer
On Mon, Aug 20, 2018 at 11:27:05PM +0300, Sergey Lavrushkin wrote: > 2018-08-18 23:20 GMT+03:00 Michael Niedermayer : > > > On Sat, Aug 18, 2018 at 02:10:21PM +0300, Sergey Lavrushkin wrote: > > > 2018-08-17 23:28 GMT+03:00 Michael Niedermayer : > > > > > > > On Fri, Aug 17, 2018 at 12:46:52AM -03

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-20 Thread Martin Vignali
Hello, I am having trouble reproducing this error. These tests are fine for 32-bit > VMs on > my computers. So the only thing I can do is to disable these tests for > these formats. > Otherwise, I need to test other changes somehow. Here is the patch, that > skips > pixfmts tests for these formats

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-20 Thread Sergey Lavrushkin
2018-08-18 23:20 GMT+03:00 Michael Niedermayer : > On Sat, Aug 18, 2018 at 02:10:21PM +0300, Sergey Lavrushkin wrote: > > 2018-08-17 23:28 GMT+03:00 Michael Niedermayer : > > > > > On Fri, Aug 17, 2018 at 12:46:52AM -0300, James Almer wrote: > > > > On 8/14/2018 1:23 PM, Michael Niedermayer wrote:

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-18 Thread Michael Niedermayer
On Sat, Aug 18, 2018 at 02:10:21PM +0300, Sergey Lavrushkin wrote: > 2018-08-17 23:28 GMT+03:00 Michael Niedermayer : > > > On Fri, Aug 17, 2018 at 12:46:52AM -0300, James Almer wrote: > > > On 8/14/2018 1:23 PM, Michael Niedermayer wrote: > > > > On Mon, Aug 13, 2018 at 04:58:42PM +0300, Sergey L

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-18 Thread James Almer
On 8/17/2018 9:52 AM, Carl Eugen Hoyos wrote: > 2018-08-17 14:21 GMT+02:00, Sergey Lavrushkin : >> пт, 17 авг. 2018 г., 6:47 James Almer : >> >>> On 8/14/2018 1:23 PM, Michael Niedermayer wrote: On Mon, Aug 13, 2018 at 04:58:42PM +0300, Sergey Lavrushkin wrote: >> >> Just use av_clipf

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-18 Thread Sergey Lavrushkin
2018-08-17 23:28 GMT+03:00 Michael Niedermayer : > On Fri, Aug 17, 2018 at 12:46:52AM -0300, James Almer wrote: > > On 8/14/2018 1:23 PM, Michael Niedermayer wrote: > > > On Mon, Aug 13, 2018 at 04:58:42PM +0300, Sergey Lavrushkin wrote: > > >>> > > >>> Just use av_clipf instead of FFMIN/FFMAX. >

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-17 Thread Michael Niedermayer
On Fri, Aug 17, 2018 at 12:46:52AM -0300, James Almer wrote: > On 8/14/2018 1:23 PM, Michael Niedermayer wrote: > > On Mon, Aug 13, 2018 at 04:58:42PM +0300, Sergey Lavrushkin wrote: > >>> > >>> Just use av_clipf instead of FFMIN/FFMAX. > >> > >> > >> Changed FFMIN/FFMAX to av_clip_uint16 and av_cl

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-17 Thread Carl Eugen Hoyos
2018-08-17 14:21 GMT+02:00, Sergey Lavrushkin : > пт, 17 авг. 2018 г., 6:47 James Almer : > >> On 8/14/2018 1:23 PM, Michael Niedermayer wrote: >> > On Mon, Aug 13, 2018 at 04:58:42PM +0300, Sergey Lavrushkin wrote: >> >>> >> >>> Just use av_clipf instead of FFMIN/FFMAX. >> >> >> >> >> >> Changed F

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-17 Thread Sergey Lavrushkin
пт, 17 авг. 2018 г., 6:47 James Almer : > On 8/14/2018 1:23 PM, Michael Niedermayer wrote: > > On Mon, Aug 13, 2018 at 04:58:42PM +0300, Sergey Lavrushkin wrote: > >>> > >>> Just use av_clipf instead of FFMIN/FFMAX. > >> > >> > >> Changed FFMIN/FFMAX to av_clip_uint16 and av_clip_uint8. > > > > wi

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-16 Thread James Almer
On 8/14/2018 1:23 PM, Michael Niedermayer wrote: > On Mon, Aug 13, 2018 at 04:58:42PM +0300, Sergey Lavrushkin wrote: >>> >>> Just use av_clipf instead of FFMIN/FFMAX. >> >> >> Changed FFMIN/FFMAX to av_clip_uint16 and av_clip_uint8. > > will apply > > thanks This broke fate on some 32bit hosts.

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-14 Thread Michael Niedermayer
On Mon, Aug 13, 2018 at 04:58:42PM +0300, Sergey Lavrushkin wrote: > > > > Just use av_clipf instead of FFMIN/FFMAX. > > > Changed FFMIN/FFMAX to av_clip_uint16 and av_clip_uint8. will apply thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB "I am not try

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-13 Thread Sergey Lavrushkin
> > Just use av_clipf instead of FFMIN/FFMAX. Changed FFMIN/FFMAX to av_clip_uint16 and av_clip_uint8. From 210e497d76328947fdf424b169728fa728cc18f2 Mon Sep 17 00:00:00 2001 From: Sergey Lavrushkin Date: Fri, 3 Aug 2018 18:06:50 +0300 Subject: [PATCH 5/9] libswscale: Adds conversions from/to flo

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-11 Thread Rostislav Pehlivanov
On Sat, 11 Aug 2018 at 23:31, Sergey Lavrushkin wrote: > 2018-08-12 0:45 GMT+03:00 Michael Niedermayer : > > > On Sat, Aug 11, 2018 at 05:52:32PM +0300, Sergey Lavrushkin wrote: > > > 2018-08-10 20:24 GMT+03:00 Michael Niedermayer >: > > > > > > > On Thu, Aug 09, 2018 at 08:15:16PM +0300, Sergey

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-11 Thread Sergey Lavrushkin
2018-08-12 0:45 GMT+03:00 Michael Niedermayer : > On Sat, Aug 11, 2018 at 05:52:32PM +0300, Sergey Lavrushkin wrote: > > 2018-08-10 20:24 GMT+03:00 Michael Niedermayer : > > > > > On Thu, Aug 09, 2018 at 08:15:16PM +0300, Sergey Lavrushkin wrote: > > > > Here are updated patches with fixes. I upda

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-11 Thread Michael Niedermayer
On Sat, Aug 11, 2018 at 05:52:32PM +0300, Sergey Lavrushkin wrote: > 2018-08-10 20:24 GMT+03:00 Michael Niedermayer : > > > On Thu, Aug 09, 2018 at 08:15:16PM +0300, Sergey Lavrushkin wrote: > > > Here are updated patches with fixes. I updated conversion functions, so > > > they should > > > prope

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-11 Thread Sergey Lavrushkin
2018-08-10 20:24 GMT+03:00 Michael Niedermayer : > On Thu, Aug 09, 2018 at 08:15:16PM +0300, Sergey Lavrushkin wrote: > > Here are updated patches with fixes. I updated conversion functions, so > > they should > > properly work with format for different endianness. > [...] > > diff --git a/libswsc

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-10 Thread Michael Niedermayer
On Thu, Aug 09, 2018 at 08:15:16PM +0300, Sergey Lavrushkin wrote: > Here are updated patches with fixes. I updated conversion functions, so > they should > properly work with format for different endianness. > > 2018-08-08 1:47 GMT+03:00 Michael Niedermayer : > > > On Tue, Aug 07, 2018 at 12:17:

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-10 Thread Michael Niedermayer
On Thu, Aug 09, 2018 at 08:15:16PM +0300, Sergey Lavrushkin wrote: > Here are updated patches with fixes. I updated conversion functions, so > they should > properly work with format for different endianness. [...] > diff --git a/libswscale/input.c b/libswscale/input.c > index 3fd3a5d81e..0e016d387

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-09 Thread Sergey Lavrushkin
Here are updated patches with fixes. I updated conversion functions, so they should properly work with format for different endianness. 2018-08-08 1:47 GMT+03:00 Michael Niedermayer : > On Tue, Aug 07, 2018 at 12:17:58AM +0300, Sergey Lavrushkin wrote: > > I split patch to one for libavutil and a

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-07 Thread Michael Niedermayer
On Tue, Aug 07, 2018 at 12:17:58AM +0300, Sergey Lavrushkin wrote: > I split patch to one for libavutil and another for libswscale, > also added LUT for unscaled conversion, added > conversions for scaling and updated fate tests. > libavutil/pixdesc.c | 22 ++ >

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-07 Thread Michael Niedermayer
On Tue, Aug 07, 2018 at 12:17:58AM +0300, Sergey Lavrushkin wrote: > I split patch to one for libavutil and another for libswscale, > also added LUT for unscaled conversion, added > conversions for scaling and updated fate tests. > libavutil/pixdesc.c | 22 ++ >

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-06 Thread Sergey Lavrushkin
I split patch to one for libavutil and another for libswscale, also added LUT for unscaled conversion, added conversions for scaling and updated fate tests. From 8bcc10b49c41612b4d6549e64d90acf3f0b3fc6a Mon Sep 17 00:00:00 2001 From: Sergey Lavrushkin Date: Fri, 3 Aug 2018 18:02:49 +0300 Subject:

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-04 Thread Michael Niedermayer
Hi On Sat, Aug 04, 2018 at 01:17:53AM +0300, Sergey Lavrushkin wrote: > 2018-08-04 0:11 GMT+03:00 Michael Niedermayer : > > > On Fri, Aug 03, 2018 at 10:33:00PM +0300, Sergey Lavrushkin wrote: > > > 2018-08-03 16:07 GMT+03:00 Michael Niedermayer : > > > > > > > On Thu, Aug 02, 2018 at 09:52:45PM

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-03 Thread Reto Kromer
Sergey Lavrushkin wrote: >2018-08-03 16:07 GMT+03:00 Michael Niedermayer >: [...] >>division is slow. This should either be a multiplication with >>the inverse or a LUT with 8bit index changing to float. >> >>The faster of them should be used > >LUT seems to be faster. I am not surprised. In my

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-03 Thread Sergey Lavrushkin
2018-08-04 0:11 GMT+03:00 Michael Niedermayer : > On Fri, Aug 03, 2018 at 10:33:00PM +0300, Sergey Lavrushkin wrote: > > 2018-08-03 16:07 GMT+03:00 Michael Niedermayer : > > > > > On Thu, Aug 02, 2018 at 09:52:45PM +0300, Sergey Lavrushkin wrote: > > > > This patch adds two floating-point gray for

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-03 Thread Michael Niedermayer
On Fri, Aug 03, 2018 at 10:33:00PM +0300, Sergey Lavrushkin wrote: > 2018-08-03 16:07 GMT+03:00 Michael Niedermayer : > > > On Thu, Aug 02, 2018 at 09:52:45PM +0300, Sergey Lavrushkin wrote: > > > This patch adds two floating-point gray formats to use them in sr filter > > for > > > conversion wit

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-03 Thread Sergey Lavrushkin
2018-08-03 16:07 GMT+03:00 Michael Niedermayer : > On Thu, Aug 02, 2018 at 09:52:45PM +0300, Sergey Lavrushkin wrote: > > This patch adds two floating-point gray formats to use them in sr filter > for > > conversion with libswscale. I added conversion from uint gray to float > and > > backwards in

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-03 Thread Michael Niedermayer
On Thu, Aug 02, 2018 at 09:52:45PM +0300, Sergey Lavrushkin wrote: > This patch adds two floating-point gray formats to use them in sr filter for > conversion with libswscale. I added conversion from uint gray to float and > backwards in swscale_unscaled.c, that is enough for sr filter. But for >

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-02 Thread Carl Eugen Hoyos
2018-08-02 20:52 GMT+02:00, Sergey Lavrushkin : > This patch adds two floating-point gray formats to use them in sr filter for > conversion with libswscale. I added conversion from uint gray to float and > backwards in swscale_unscaled.c, that is enough for sr filter. But for > proper format additi

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-02 Thread James Almer
On 8/2/2018 4:22 PM, Martin Vignali wrote: >> >> +static int uint_y_to_float_y_wrapper(SwsContext *c, const uint8_t *src[], >> + int srcStride[], int srcSliceY, >> + int srcSliceH, uint8_t *dst[], int >> dstStride[]) >> +{ >> +

Re: [FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-02 Thread Martin Vignali
> > +static int uint_y_to_float_y_wrapper(SwsContext *c, const uint8_t *src[], > + int srcStride[], int srcSliceY, > + int srcSliceH, uint8_t *dst[], int > dstStride[]) > +{ > +int y, x; > +int dstStrideFloat = dstStrid

[FFmpeg-devel] [PATCH 4/7] Adds gray floating-point pixel formats.

2018-08-02 Thread Sergey Lavrushkin
This patch adds two floating-point gray formats to use them in sr filter for conversion with libswscale. I added conversion from uint gray to float and backwards in swscale_unscaled.c, that is enough for sr filter. But for proper format addition, should I add anything else? --- libavutil/pixdesc