Re: [Spice-devel] [vdagent-win PATCH v4 3/5] Write code to decode PNG format

2017-07-18 Thread Frediano Ziglio
> > On Mon, Jul 17, 2017 at 09:54:04AM +0100, Frediano Ziglio wrote: > > Signed-off-by: Frediano Ziglio > > --- > > Makefile.am | 6 +- > > configure.ac | 3 + > > vdagent/image.cpp| 8 +- > > vdagent/imagepng.cpp | 244 > >

Re: [Spice-devel] [spice-common 01/14] quic: Use #define rather than static const int

2017-07-18 Thread Frediano Ziglio
> > On Wed, Jul 05, 2017 at 06:59:46AM -0400, Frediano Ziglio wrote: > > In my stash pile I have these: > > > > > > diff --git a/common/quic.c b/common/quic.c > > index c188ed2..aa0d8ab 100644 > > --- a/common/quic.c > > +++ b/common/quic.c > > @@ -173,13 +173,13 @@ struct Encoder { > > }; > >

Re: [Spice-devel] [PATCH spice-gtk] gst-audio: Do not update mmtime without real audio channel

2017-07-18 Thread Christophe de Dinechin
> On 18 Jul 2017, at 17:59, Christophe de Dinechin wrote: > >> >> On 18 Jul 2017, at 17:54, Pavel Grunt wrote: >> >> On Tue, 2017-07-18 at 17:04 +0200, Christophe de Dinechin wrote: >>> On 14 Jul 2017, at 14:27, Christophe de Dinechin >>> wrote: This looks better than my fix. Can

Re: [Spice-devel] [vdagent-win PATCH v4 4/5] Support encoding PNG images

2017-07-18 Thread Christophe Fergeau
On Mon, Jul 17, 2017 at 09:54:05AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > vdagent/imagepng.cpp | 138 > --- > 1 file changed, 131 insertions(+), 7 deletions(-) > > diff --git a/vdagent/imagepng.cpp b/vdagent/imagepn

Re: [Spice-devel] [vdagent-win PATCH v4 3/5] Write code to decode PNG format

2017-07-18 Thread Christophe Fergeau
Sorry, forgot one comment, On Mon, Jul 17, 2017 at 09:54:04AM +0100, Frediano Ziglio wrote: > +static void line_fixup_rgb2bgr(uint8_t *line, unsigned width) > +{ > +for (; width; --width) { > +std::swap(line[0], line[2]); > +line += 3; > +} > +} > + > +size_t PngCoder::conv

Re: [Spice-devel] [PATCH spice-gtk] gst-audio: Do not update mmtime without real audio channel

2017-07-18 Thread Christophe de Dinechin
> On 18 Jul 2017, at 17:54, Pavel Grunt wrote: > > On Tue, 2017-07-18 at 17:04 +0200, Christophe de Dinechin wrote: >> On 14 Jul 2017, at 14:27, Christophe de Dinechin wrote: >>> >>> This looks better than my fix. Can’t ack right now (I did not build and test >>> it yet), but that looks like a

Re: [Spice-devel] [PATCH spice-gtk] gst-audio: Do not update mmtime without real audio channel

2017-07-18 Thread Pavel Grunt
On Tue, 2017-07-18 at 17:04 +0200, Christophe de Dinechin wrote: > On 14 Jul 2017, at 14:27, Christophe de Dinechin wrote: > > > > This looks better than my fix. Can’t ack right now (I did not build and test > > it yet), but that looks like a reasonable approach > > > > > On 14 Jul 2017, at 14:2

Re: [Spice-devel] [vdagent-win PATCH v4 3/5] Write code to decode PNG format

2017-07-18 Thread Christophe Fergeau
On Mon, Jul 17, 2017 at 09:54:04AM +0100, Frediano Ziglio wrote: > Signed-off-by: Frediano Ziglio > --- > Makefile.am | 6 +- > configure.ac | 3 + > vdagent/image.cpp| 8 +- > vdagent/imagepng.cpp | 244 > +++ > vdagent/

[Spice-devel] [vdagent-win PATCH v7 1/5] Move image handling to a separate file

2017-07-18 Thread Frediano Ziglio
This will make easier to change code that handle images. Signed-off-by: Frediano Ziglio Acked-by: Christophe Fergeau --- Makefile.am | 2 ++ vdagent/image.cpp | 88 + vdagent/image.h | 48 + vdagent/v

[Spice-devel] [vdagent-win PATCH v7 2/5] Initial rewrite of image conversion code

2017-07-18 Thread Frediano Ziglio
Remove CxImage linking. Support Windows BMP format. Signed-off-by: Frediano Ziglio --- Makefile.am | 4 +- configure.ac| 4 +- mingw-spice-vdagent.spec.in | 10 +-- vdagent/image.cpp | 172 +--- vdagent/image.

Re: [Spice-devel] [vdagent-win PATCH v6 2/5] Initial rewrite of image conversion code

2017-07-18 Thread Christophe Fergeau
On Mon, Jul 17, 2017 at 11:01:22AM +0100, Frediano Ziglio wrote: > Remove CxImage linking. > Support Windows BMP format. Too bad there is no small/maintained library which would do that for us :-/ From a quick glance, looks ok. > > +static inline size_t compute_dib_stride(unsigned width, unsign

[Spice-devel] [vdagent-win PATCH v7 5/5] Add test for PNG files

2017-07-18 Thread Frediano Ziglio
Test various image and formats. The idea is to decode and encode again an image and check for differences. ImageMagick is used to create some test image and compare results. Wine is used to execute a test helper. Signed-off-by: Frediano Ziglio --- Makefile.am | 20 + test-p

[Spice-devel] [vdagent-win PATCH v7 4/5] Support encoding PNG images

2017-07-18 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- vdagent/imagepng.cpp | 134 --- 1 file changed, 127 insertions(+), 7 deletions(-) diff --git a/vdagent/imagepng.cpp b/vdagent/imagepng.cpp index ede22f4..2d0f13e 100644 --- a/vdagent/imagepng.cpp +++ b/vdagent/ima

[Spice-devel] [vdagent-win PATCH v7 3/5] Write code to decode PNG format

2017-07-18 Thread Frediano Ziglio
Signed-off-by: Frediano Ziglio --- Makefile.am | 6 +- configure.ac | 3 + vdagent/image.cpp| 8 +- vdagent/imagepng.cpp | 241 +++ vdagent/imagepng.h | 25 ++ 5 files changed, 274 insertions(+), 9 deletions(-) cre

[Spice-devel] [vdagent-win PATCH v7 0/5] Rewrite image support

2017-07-18 Thread Frediano Ziglio
CxImage is used for image conversion for clipboard support. CxImage have currently some issue: - library is old and unsupported; - required an old libpng library. Currently the MingW binary we distribute due to some issue have PNG disabled (so no clipboard image support). Note that currently we sup

Re: [Spice-devel] [PATCH spice-gtk] gst-audio: Do not update mmtime without real audio channel

2017-07-18 Thread Christophe de Dinechin
> On 18 Jul 2017, at 17:12, Uri Lublin wrote: > > Hi Pavel, > > Some typos below. > > On 07/14/2017 02:19 PM, Pavel Grunt wrote: >> The fake channel has been introduced to get the audio volume by starting >> the gstreamer's audio pipeline and querring its volume info (see commit > > querring -

Re: [Spice-devel] [PATCH spice-gtk] gst-audio: Do not update mmtime without real audio channel

2017-07-18 Thread Uri Lublin
Hi Pavel, Some typos below. On 07/14/2017 02:19 PM, Pavel Grunt wrote: The fake channel has been introduced to get the audio volume by starting the gstreamer's audio pipeline and querring its volume info (see commit querring -> querying aa8d044417bbf60685f59163b874ecb4f157c3c9). Hovewer st

Re: [Spice-devel] [PATCH spice-gtk] gst-audio: Do not update mmtime without real audio channel

2017-07-18 Thread Christophe de Dinechin
On 14 Jul 2017, at 14:27, Christophe de Dinechin wrote: > > This looks better than my fix. Can’t ack right now (I did not build and test > it yet), but that looks like a reasonable approach > >> On 14 Jul 2017, at 14:24, Pavel Grunt wrote: >> >> This also fixes the huge memore leak reported b

Re: [Spice-devel] [PATCH spice-gtk v2] spice-gtk: Use time comparisons that still work after wraparound

2017-07-18 Thread Christophe Fergeau
On Tue, Jul 18, 2017 at 04:50:23PM +0200, Christophe de Dinechin wrote: > > > On 18 Jul 2017, at 16:48, Christophe Fergeau wrote: > > > > Hey, > > > > On Tue, Jul 18, 2017 at 04:37:29PM +0200, Christophe de Dinechin wrote: > >> OK. Since you seem to feel more strongly about this than me, I chan

Re: [Spice-devel] [PATCH spice-gtk v2] spice-gtk: Use time comparisons that still work after wraparound

2017-07-18 Thread Christophe de Dinechin
> On 18 Jul 2017, at 16:48, Christophe Fergeau wrote: > > Hey, > > On Tue, Jul 18, 2017 at 04:37:29PM +0200, Christophe de Dinechin wrote: >> OK. Since you seem to feel more strongly about this than me, I changed it. >> Pushed to freedesktop.org. Since this is the first time I push myself to >

Re: [Spice-devel] [PATCH spice-gtk v2] spice-gtk: Use time comparisons that still work after wraparound

2017-07-18 Thread Christophe Fergeau
Hey, On Tue, Jul 18, 2017 at 04:37:29PM +0200, Christophe de Dinechin wrote: > OK. Since you seem to feel more strongly about this than me, I changed it. > Pushed to freedesktop.org. Since this is the first time I push myself to this > repo, > would you please be kind enough to check that what I

Re: [Spice-devel] [PATCH spice-gtk v2] spice-gtk: Use time comparisons that still work after wraparound

2017-07-18 Thread Christophe de Dinechin
> > On 17 Jul 2017, at 14:20, Christophe Fergeau wrote: > > On Mon, Jul 17, 2017 at 02:00:01PM +0200, Christophe de Dinechin wrote: >> >>> On 17 Jul 2017, at 13:49, Christophe Fergeau >> > wrote: >>> >>> On Mon, Jul 17, 2017 at 11:44:04AM +0200, Christophe de Dinech

Re: [Spice-devel] [vdagent-win PATCH v4 1/5] Move image handling to a separate file

2017-07-18 Thread Christophe Fergeau
On Tue, Jul 18, 2017 at 02:22:50PM +0200, Christophe Fergeau wrote: > On Mon, Jul 17, 2017 at 09:54:02AM +0100, Frediano Ziglio wrote: > > This will make easier to change code that handle images. > > > > Signed-off-by: Frediano Ziglio > > --- > > Makefile.am | 2 ++ > > vdagent/image.cp

Re: [Spice-devel] [vdagent-win PATCH v4 1/5] Move image handling to a separate file

2017-07-18 Thread Christophe Fergeau
On Mon, Jul 17, 2017 at 09:54:02AM +0100, Frediano Ziglio wrote: > This will make easier to change code that handle images. > > Signed-off-by: Frediano Ziglio > --- > Makefile.am | 2 ++ > vdagent/image.cpp | 88 > + > vdagent/image

Re: [Spice-devel] [spice-common] Some steps toward quic_tmpl.c and quic_rgb_tmpl.c 'unification'

2017-07-18 Thread Christophe Fergeau
Hey, On Tue, Jul 18, 2017 at 07:21:25AM -0400, Frediano Ziglio wrote: > > > > Any more thoughts/reviews on this series? > > > > Christophe > > > > I asked to have a test and you said is not worth. > I asked to split the series in different ones and you said is not worth. > For me a single "is

Re: [Spice-devel] [spice-common] Some steps toward quic_tmpl.c and quic_rgb_tmpl.c 'unification'

2017-07-18 Thread Frediano Ziglio
> > Any more thoughts/reviews on this series? > > Christophe > I asked to have a test and you said is not worth. I asked to split the series in different ones and you said is not worth. For me a single "is not worth" is a self nack. So... why are you asking for though? Frediano > On Wed, Jul

Re: [Spice-devel] [spice-common] Some steps toward quic_tmpl.c and quic_rgb_tmpl.c 'unification'

2017-07-18 Thread Christophe Fergeau
Any more thoughts/reviews on this series? Christophe On Wed, Jul 05, 2017 at 10:27:18AM -0400, Frediano Ziglio wrote: > > > > Hey, > > > > This is a v2 of the initial 2 patches, but looking a bit closer at the quic > > code led me down a rabbit hole ;) We currently have 2 different quic > > imp

Re: [Spice-devel] [spice-common 01/14] quic: Use #define rather than static const int

2017-07-18 Thread Christophe Fergeau
On Wed, Jul 05, 2017 at 06:59:46AM -0400, Frediano Ziglio wrote: > In my stash pile I have these: > > > diff --git a/common/quic.c b/common/quic.c > index c188ed2..aa0d8ab 100644 > --- a/common/quic.c > +++ b/common/quic.c > @@ -173,13 +173,13 @@ struct Encoder { > }; > > /* target wait mask