Lines Matching refs:flt

543 static int run_delta_filter(struct rar5* rar, struct filter_info* flt) {
547 for(i = 0; i < flt->channels; i++) {
550 dest_pos < flt->block_length;
551 dest_pos += flt->channels)
556 (rar->cstate.solid_offset + flt->block_start +
568 static int run_e8e9_filter(struct rar5* rar, struct filter_info* flt,
576 rar->cstate.solid_offset + flt->block_start,
577 rar->cstate.solid_offset + flt->block_start + flt->block_length);
579 for(i = 0; i < flt->block_length - 4;) {
581 (rar->cstate.solid_offset + flt->block_start +
591 uint32_t offset = (i + flt->block_start) % file_size;
595 flt->block_start + i) & rar->cstate.window_mask);
617 static int run_arm_filter(struct rar5* rar, struct filter_info* flt) {
623 rar->cstate.solid_offset + flt->block_start,
624 rar->cstate.solid_offset + flt->block_start + flt->block_length);
626 for(i = 0; i < flt->block_length - 3; i += 4) {
629 flt->block_start + i + 3) & rar->cstate.window_mask];
634 (rar->cstate.solid_offset + flt->block_start + i) &
637 offset -= (uint32_t) ((i + flt->block_start) / 4);
646 static int run_filter(struct archive_read* a, struct filter_info* flt) {
652 rar->cstate.filtered_buf = malloc(flt->block_length);
659 switch(flt->type) {
661 ret = run_delta_filter(rar, flt);
667 ret = run_e8e9_filter(rar, flt,
668 flt->type == FILTER_E8E9);
672 ret = run_arm_filter(rar, flt);
678 "Unsupported filter type: 0x%x", flt->type);
688 flt->block_length, rar->cstate.last_write_ptr))
696 rar->cstate.last_write_ptr += flt->block_length;
755 struct filter_info* flt;
764 cdeque_filter_p(&flt))) {
767 if(rar->cstate.write_ptr > flt->block_start &&
768 rar->cstate.write_ptr >= flt->block_start +
769 flt->block_length) {
772 if(rar->cstate.last_write_ptr == flt->block_start) {
774 * `flt`. */
775 ret = run_filter(a, flt);
785 cdeque_filter_p(&flt));
787 free(flt);
793 flt->block_start);
3641 struct filter_info* flt;
3645 cdeque_filter_p(&flt)))
3653 max_end_pos = rar5_min(flt->block_start,