Lines Matching refs:dbits
39 static uint32_t expand(uint32_t v, int sbits, int dbits);
254 uint32_t ggl_expand(uint32_t v, int sbits, int dbits) in ggl_expand() argument
256 return expand(v, sbits, dbits); in ggl_expand()
296 uint32_t expand(uint32_t v, int sbits, int dbits) in expand() argument
298 if (dbits > sbits) { in expand()
301 v = (v<<dbits) - v; in expand()
303 if (dbits % sbits) { in expand()
304 v <<= (dbits-sbits); in expand()
305 dbits -= sbits; in expand()
308 dbits -= sbits; in expand()
310 } while (dbits>0); in expand()
312 dbits -= sbits; in expand()
315 dbits -= sbits; in expand()
316 if (sbits*2 < dbits) { in expand()
319 } while (dbits > 0); in expand()
335 const int dbits = dh-dl; in downshift_component() local
337 assert(sbits>=dbits); in downshift_component()
340 if (sbits>dbits) { in downshift_component()
342 v -= (v>>dbits); // fix up in downshift_component()
343 const int shift = (GGL_DITHER_BITS - (sbits-dbits)); in downshift_component()
366 if (cl || (sbits>dbits)) { in downshift_component()
367 v >>= sh-dbits; in downshift_component()
369 sh = dbits; in downshift_component()