Lines Matching refs:FEC_BLOCKSIZE
70 } else if (size % FEC_BLOCKSIZE) { in calculate_rounds()
72 size, FEC_BLOCKSIZE); in calculate_rounds()
76 ctx->blocks = fec_div_round_up(ctx->inp_size, FEC_BLOCKSIZE); in calculate_rounds()
138 assert(ctx->pos % FEC_BLOCKSIZE == 0); in file_image_load()
197 ctx->fec_size = ctx->rounds * ctx->roots * FEC_BLOCKSIZE; in image_ecc_new()
221 if (lseek64(fd, -FEC_BLOCKSIZE, SEEK_END) < 0) { in image_ecc_load()
226 assert(sizeof(fec_header) <= FEC_BLOCKSIZE); in image_ecc_load()
228 uint8_t header[FEC_BLOCKSIZE]; in image_ecc_load()
254 if (p->fec_size % p->roots || p->fec_size % FEC_BLOCKSIZE) { in image_ecc_load()
294 assert(2 * sizeof(fec_header) <= FEC_BLOCKSIZE); in image_ecc_save()
296 uint8_t header[FEC_BLOCKSIZE] = {0}; in image_ecc_save()
328 uint8_t padding[FEC_BLOCKSIZE] = {0}; in image_ecc_save()
330 for (uint32_t i = 0; i < ctx->padding; i += FEC_BLOCKSIZE) { in image_ecc_save()
331 if (!android::base::WriteFully(fd, padding, FEC_BLOCKSIZE)) { in image_ecc_save()
383 uint64_t end = ctx->rounds * ctx->rs_n * FEC_BLOCKSIZE; in image_process()
385 fec_div_round_up(ctx->rounds * FEC_BLOCKSIZE, threads); in image_process()