Lines Matching refs:dbits
37 static uint32_t expand(uint32_t v, int sbits, int dbits);
252 uint32_t ggl_expand(uint32_t v, int sbits, int dbits) in ggl_expand() argument
254 return expand(v, sbits, dbits); in ggl_expand()
291 uint32_t expand(uint32_t v, int sbits, int dbits) in expand() argument
293 if (dbits > sbits) { in expand()
296 v = (v<<dbits) - v; in expand()
298 if (dbits % sbits) { in expand()
299 v <<= (dbits-sbits); in expand()
300 dbits -= sbits; in expand()
303 dbits -= sbits; in expand()
305 } while (dbits>0); in expand()
307 dbits -= sbits; in expand()
310 dbits -= sbits; in expand()
311 if (sbits*2 < dbits) { in expand()
314 } while (dbits > 0); in expand()
330 const int dbits = dh-dl; in downshift_component() local
332 assert(sbits>=dbits); in downshift_component()
335 if (sbits>dbits) { in downshift_component()
337 v -= (v>>dbits); // fix up in downshift_component()
338 const int shift = (GGL_DITHER_BITS - (sbits-dbits)); in downshift_component()
361 if (cl || (sbits>dbits)) { in downshift_component()
362 v >>= sh-dbits; in downshift_component()
364 sh = dbits; in downshift_component()