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

Christophe Fergeau cfergeau at redhat.com
Thu Jul 6 11:14:58 UTC 2017


Hey,

On Wed, Jul 05, 2017 at 10:27:18AM -0400, Frediano Ziglio wrote:
> > The main difference is that the former implementation handles a single
> > channel,
> > while the rgb implementation handles each color component separately. Besides
> > that,
> > the implementation is the same, but this is not obvious at all by just
> > comparing the
> > 2 files. This patch series makes the 2 files closer, but not easily mergeable
> > yet ;)
> > 
> > The biggest pending difference is that quic_tmpl.c carries around a 'channel'
> > with the data it needs, while quic_rgb_tmpl.c iterates over Encoder::channels
> > when needed.
> > 
> > This imo does not justify duplicating that much code, but I don't want to
> > spend
> > too much time on quic either, so I'll stop there for now :)
> > 
> > I've only tested the RGB32 case, as I'm not sure how to trigger the 1 byte or
> > 4
> > byte code paths (I've tried win7 and fedora 25 guests so far).
> > 
> > Christophe
> 
> The problem of point 4) is that is worth but if we are not sure we are
> not breaking stuff is not that great. We should have a test that test only
> image compression/decompression.

I can take a look at how hard this would be, but I'd rather not spend a
lot more time on quic, I'm not even sure how often it's getting used...

For 4) (assuming you are thinking of most of the patches starting at
"quic: Factor common code"), the changes are not as invasive as they may
sound, most of them are simple code movement or renames with absolutely
no change in code flows, so I'd be confident enough that reviews would
catch any issues.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170706/dd3b380b/attachment.sig>


More information about the Spice-devel mailing list