Lines Matching defs:writer

1164 write_bits(struct bit_writer *writer, int n_bits, int value)
1167 if (n_bits + writer->pos >= 8) {
1168 *(writer->dst++) = writer->buf | (value << writer->pos);
1169 writer->buf = 0;
1170 value >>= (8 - writer->pos);
1171 n_bits -= (8 - writer->pos);
1172 writer->pos = 0;
1174 writer->buf |= value << writer->pos;
1175 writer->pos += n_bits;
1300 write_rgb_indices_unorm(struct bit_writer *writer,
1321 write_bits(writer, BLOCK_SIZE * BLOCK_SIZE * 2 - 1, 0);
1338 write_bits(writer, (x == 0 && y == 0) ? 1 : 2, index);
1345 write_bits(writer, 2 * (BLOCK_SIZE - src_width), 0);
1352 write_bits(writer, 2 * BLOCK_SIZE * (BLOCK_SIZE - src_height), 0);
1356 write_alpha_indices_unorm(struct bit_writer *writer,
1367 write_bits(writer, BLOCK_SIZE * BLOCK_SIZE * 3 - 1, 0);
1383 write_bits(writer, (x == 0 && y == 0) ? 2 : 3, index);
1390 write_bits(writer, 3 * (BLOCK_SIZE - src_width), 0);
1397 write_bits(writer, 3 * BLOCK_SIZE * (BLOCK_SIZE - src_height), 0);
1407 struct bit_writer writer;
1416 writer.dst = dst;
1417 writer.pos = 0;
1418 writer.buf = 0;
1420 write_bits(&writer, 5, 0x10); /* mode 4 */
1421 write_bits(&writer, 2, 0); /* rotation 0 */
1422 write_bits(&writer, 1, 0); /* index selection bit */
1427 write_bits(&writer, 5, endpoints[endpoint][component] >> 3);
1431 write_bits(&writer, 6, endpoints[endpoint][3] >> 2);
1433 write_rgb_indices_unorm(&writer,
1437 write_alpha_indices_unorm(&writer,
1583 write_rgb_indices_float(struct bit_writer *writer,
1604 write_bits(writer, BLOCK_SIZE * BLOCK_SIZE * 4 - 1, 0);
1621 write_bits(writer, (x == 0 && y == 0) ? 3 : 4, index);
1628 write_bits(writer, 4 * (BLOCK_SIZE - src_width), 0);
1635 write_bits(writer, 4 * BLOCK_SIZE * (BLOCK_SIZE - src_height), 0);
1676 struct bit_writer writer;
1685 writer.dst = dst;
1686 writer.pos = 0;
1687 writer.buf = 0;
1689 write_bits(&writer, 5, 3); /* mode 3 */
1696 write_bits(&writer, 10, endpoint_value);
1700 write_rgb_indices_float(&writer,