for(j = 0; j < bh; ++j) {
for(i = 0; i < bw; ++i) {
uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*comps;
- util_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1);
- dst[1] = 0;
- dst[2] = 0;
- dst[3] = 255;
- }
- }
- src += block_size;
+ util_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 1);
+ dst[1] = 0;
+ dst[2] = 0;
+ dst[3] = 255;
+ }
+ }
+ src += block_size;
}
src_row += src_stride;
}
uint8_t tmp[4][4]; /* [bh][bw][comps] */
for(j = 0; j < bh; ++j) {
for(i = 0; i < bw; ++i) {
- tmp[j][i] = src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4];
+ tmp[j][i] = src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4];
}
}
util_format_unsigned_encode_rgtc_ubyte(dst, tmp, 4, 4);
uint8_t tmp[4][4]; /* [bh][bw][comps] */
for(j = 0; j < bh; ++j) {
for(i = 0; i < bw; ++i) {
- tmp[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
+ tmp[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
}
}
util_format_unsigned_encode_rgtc_ubyte(dst, tmp, 4, 4);
int8_t tmp[4][4]; /* [bh][bw][comps] */
for(j = 0; j < bh; ++j) {
for(i = 0; i < bw; ++i) {
- tmp[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
+ tmp[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
}
}
util_format_signed_encode_rgtc_ubyte(dst, tmp, 4, 4);
for(j = 0; j < bh; ++j) {
for(i = 0; i < bw; ++i) {
uint8_t *dst = dst_row + (y + j)*dst_stride/sizeof(*dst_row) + (x + i)*comps;
- util_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2);
- util_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2);
- dst[2] = 0;
- dst[3] = 255;
- }
- }
- src += block_size;
+ util_format_unsigned_fetch_texel_rgtc(0, src, i, j, dst, 2);
+ util_format_unsigned_fetch_texel_rgtc(0, src + 8, i, j, dst + 1, 2);
+ dst[2] = 0;
+ dst[3] = 255;
+ }
+ }
+ src += block_size;
}
src_row += src_stride;
}
uint8_t tmp_g[4][4]; /* [bh][bw] */
for(j = 0; j < bh; ++j) {
for(i = 0; i < bw; ++i) {
- tmp_r[j][i] = src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4];
- tmp_g[j][i] = src_row[((y + j)*src_stride/sizeof(*src_row) + (x + i)*4) + 1];
+ tmp_r[j][i] = src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4];
+ tmp_g[j][i] = src_row[((y + j)*src_stride/sizeof(*src_row) + (x + i)*4) + 1];
}
}
util_format_unsigned_encode_rgtc_ubyte(dst, tmp_r, 4, 4);
uint8_t tmp_g[4][4]; /* [bh][bw][comps] */
for(j = 0; j < bh; ++j) {
for(i = 0; i < bw; ++i) {
- tmp_r[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
+ tmp_r[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
tmp_g[j][i] = float_to_ubyte(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4 + chan2off]);
}
}
int8_t tmp_g[4][4]; /* [bh][bw][comps] */
for(j = 0; j < bh; ++j) {
for(i = 0; i < bw; ++i) {
- tmp_r[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
+ tmp_r[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4]);
tmp_g[j][i] = float_to_byte_tex(src_row[(y + j)*src_stride/sizeof(*src_row) + (x + i)*4 + chan2off]);
}
}