Lines Matching refs:sbits
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()
299 assert(sbits); in expand()
300 if (sbits==1) { in expand()
303 if (dbits % sbits) { in expand()
304 v <<= (dbits-sbits); in expand()
305 dbits -= sbits; in expand()
307 v |= v>>sbits; in expand()
308 dbits -= sbits; in expand()
309 sbits *= 2; in expand()
312 dbits -= sbits; in expand()
314 v |= v<<sbits; in expand()
315 dbits -= sbits; in expand()
316 if (sbits*2 < dbits) { in expand()
317 sbits *= 2; in expand()
334 const int sbits = sh-sl; in downshift_component() local
337 assert(sbits>=dbits); in downshift_component()
340 if (sbits>dbits) { in downshift_component()
343 const int shift = (GGL_DITHER_BITS - (sbits-dbits)); in downshift_component()
366 if (cl || (sbits>dbits)) { in downshift_component()