diff options
author | Frediano Ziglio <fziglio@redhat.com> | 2018-07-10 11:02:08 +0200 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2018-07-10 10:33:28 +0100 |
commit | 946d3dda2276ca8bf1b9986142d8ed36b4e72753 (patch) | |
tree | a259e68e98cbd30f30ee85cd22158a0d811361c5 | |
parent | 6ea60433deffbf2ae9be7d536418b0c390673cc9 (diff) |
quic: Add UPDATE_MODEL_COMP macro to iterate over channels
Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
Signed-off-by: Christophe Fergeau <cfergeau@redhat.com>
-rw-r--r-- | common/quic_rgb_tmpl.c | 13 |
1 files 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 |