From: Frediano Ziglio <[email protected]>
Signed-off-by: Frediano Ziglio <[email protected]>
Signed-off-by: Christophe Fergeau <[email protected]>
---
common/quic_rgb_tmpl.c | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/common/quic_rgb_tmpl.c b/common/quic_rgb_tmpl.c
index e0a05ca..2e76645 100644
--- a/common/quic_rgb_tmpl.c
+++ b/common/quic_rgb_tmpl.c
@@ -140,13 +140,13 @@
golomb_coding(encoder, correlate_row_##channel[index],
find_bucket(channel_##channel, \
correlate_row_##channel[index -1])->bestcode)
+#define UPDATE_MODEL_COMP(channel, index)
\
+ update_model(state, find_bucket(channel_##channel,
correlate_row_##channel[index - 1]), \
+ correlate_row_##channel[index])
#define UPDATE_MODEL(index)
\
- update_model(state, find_bucket(channel_r, correlate_row_r[index - 1]),
\
- correlate_row_r[index]);
\
- update_model(state, find_bucket(channel_g, correlate_row_g[index - 1]),
\
- correlate_row_g[index]);
\
- update_model(state, find_bucket(channel_b, correlate_row_b[index - 1]),
\
- correlate_row_b[index]);
+ UPDATE_MODEL_COMP(r, index); \
+ UPDATE_MODEL_COMP(g, index); \
+ UPDATE_MODEL_COMP(b, index)
#define RLE_PRED_IMP
\
@@ -670,3 +670,4 @@ static void FNAME(uncompress_row)(Encoder *encoder,
#undef SET_b
#undef GET_b
#undef UNCOMPRESS_PIX_START
+#undef UPDATE_MODEL_COMP
--
2.17.1
_______________________________________________
Spice-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/spice-devel