google / brunsli

Practical JPEG Repacker
MIT License
730 stars 51 forks source link

core dumped when turn on Multithreading switch #109

Open chuanflow opened 3 years ago

chuanflow commented 3 years ago

I add

#define BRUNSLI_EXPERIMENTAL_GROUPS 1

in c/tools/cbrunsli.cc

then try to compress a jpg, but a core dumped. The jpg picture is in the attachment.

c/enc/write_bits.cc:26 (~Storage)
Aborted (core dumped)

data

chuanflow commented 3 years ago

it seems that DC part_size is not enough when components equal 1. serialize kBrunsliDCDataTag

size_t part_size = 128 * (128 + 16) * jpg.components.size();
part.resize(part_size);
eustas commented 2 years ago

Will take a look soon.