diff options
author | Campbell Barton <campbell@blender.org> | 2022-03-16 03:58:22 +0300 |
---|---|---|
committer | Campbell Barton <campbell@blender.org> | 2022-03-16 03:58:22 +0300 |
commit | be7855591e3b47e5e72c09555946f75975a8c028 (patch) | |
tree | eb11ff27360e2285cddfe24609bc293b103e9ac0 /source/blender/imbuf/intern/radiance_hdr.c | |
parent | 379bd6d50ce37e07cbc4fb1e1c47c814f6a7530e (diff) |
Cleanup: rename cnt to count
Follow naming from T85728.
Diffstat (limited to 'source/blender/imbuf/intern/radiance_hdr.c')
-rw-r--r-- | source/blender/imbuf/intern/radiance_hdr.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/imbuf/intern/radiance_hdr.c b/source/blender/imbuf/intern/radiance_hdr.c index 3786f1c5754..aa07edf5c3a 100644 --- a/source/blender/imbuf/intern/radiance_hdr.c +++ b/source/blender/imbuf/intern/radiance_hdr.c @@ -308,7 +308,7 @@ struct ImBuf *imb_loadhdr(const unsigned char *mem, static int fwritecolrs( FILE *file, int width, int channels, const unsigned char *ibufscan, const float *fpscan) { - int beg, c2, cnt = 0; + int beg, c2, count = 0; fCOLOR fcol; RGBE rgbe, *rgbe_scan; @@ -347,14 +347,14 @@ static int fwritecolrs( putc((unsigned char)(width & 255), file); /* put components separately */ for (size_t i = 0; i < 4; i++) { - for (size_t j = 0; j < width; j += cnt) { /* find next run */ - for (beg = j; beg < width; beg += cnt) { - for (cnt = 1; (cnt < 127) && ((beg + cnt) < width) && - (rgbe_scan[beg + cnt][i] == rgbe_scan[beg][i]); - cnt++) { + for (size_t j = 0; j < width; j += count) { /* find next run */ + for (beg = j; beg < width; beg += count) { + for (count = 1; (count < 127) && ((beg + count) < width) && + (rgbe_scan[beg + count][i] == rgbe_scan[beg][i]); + count++) { /* pass */ } - if (cnt >= MINRUN) { + if (count >= MINRUN) { break; /* long enough */ } } @@ -378,12 +378,12 @@ static int fwritecolrs( putc(rgbe_scan[j++][i], file); } } - if (cnt >= MINRUN) { /* write out run */ - putc((unsigned char)(128 + cnt), file); + if (count >= MINRUN) { /* write out run */ + putc((unsigned char)(128 + count), file); putc(rgbe_scan[beg][i], file); } else { - cnt = 0; + count = 0; } } } |