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

2017-07-19 Thread Christophe Fergeau
On Tue, Jul 18, 2017 at 01:29:24PM -0400, Frediano Ziglio wrote: > > On Mon, Jul 17, 2017 at 09:54:04AM +0100, Frediano Ziglio wrote: > > > +} > > > +break; > > > +case PNG_COLOR_TYPE_PALETTE: > > > +// should return 1, 2, 4 and 8, BMP does not support 2 > > > > Is the

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

2017-07-19 Thread Frediano Ziglio
> > > On 18 Jul 2017, at 17:54, Christophe Fergeau wrote: > > > > 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/im

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

2017-07-19 Thread Christophe de Dinechin
> On 18 Jul 2017, at 17:54, Christophe Fergeau wrote: > > 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] [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] [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] [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 v4 3/5] Write code to decode PNG format

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