[Spice-devel] [PATCH spice-common 4/5] quic: use 32 bit for bppmask
Frediano Ziglio
fziglio at redhat.com
Fri Aug 4 07:57:01 UTC 2017
In most occurrences bppmask is converted to 32 bit anyway.
In the left one a possible more bigger precision is not needed.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
common/quic.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/quic.c b/common/quic.c
index a4c46d3..7c069e4 100644
--- a/common/quic.c
+++ b/common/quic.c
@@ -168,7 +168,7 @@ struct Encoder {
};
/* bppmask[i] contains i ones as lsb-s */
-static const unsigned long int bppmask[33] = {
+static const unsigned int bppmask[33] = {
0x00000000, /* [0] */
0x00000001, 0x00000003, 0x00000007, 0x0000000f,
0x0000001f, 0x0000003f, 0x0000007f, 0x000000ff,
@@ -329,7 +329,7 @@ static void decorrelate_init(QuicFamily *family, int bpc)
static void correlate_init(QuicFamily *family, int bpc)
{
- const unsigned long int pixelbitmask = bppmask[bpc];
+ const unsigned int pixelbitmask = bppmask[bpc];
unsigned long int s;
//spice_assert(bpc <= 8);
--
2.13.3
More information about the Spice-devel
mailing list