Merge commit '16e502f1c50c8c0e10a5e014691e1c812a518c57' into libraw-snapshot-202502
Upgrade LibRaw to snapshot 202502.
This commit is contained in:
@@ -229,6 +229,7 @@ static inline void fuji_fill_buffer(fuji_compressed_block *info)
|
||||
{
|
||||
if (info->cur_pos >= info->cur_buf_size)
|
||||
{
|
||||
bool needthrow = false;
|
||||
info->cur_pos = 0;
|
||||
info->cur_buf_offset += info->cur_buf_size;
|
||||
#ifdef LIBRAW_USE_OPENMP
|
||||
@@ -252,10 +253,12 @@ static inline void fuji_fill_buffer(fuji_compressed_block *info)
|
||||
info->fillbytes -= ls;
|
||||
}
|
||||
else
|
||||
throw LIBRAW_EXCEPTION_IO_EOF;
|
||||
needthrow = true;
|
||||
}
|
||||
info->max_read_size -= info->cur_buf_size;
|
||||
}
|
||||
if (needthrow)
|
||||
throw LIBRAW_EXCEPTION_IO_EOF;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1151,13 +1154,30 @@ void LibRaw::fuji_decode_loop(fuji_compressed_params *common_info, int count, IN
|
||||
int cur_block;
|
||||
const int lineStep = (libraw_internal_data.unpacker_data.fuji_total_lines + 0xF) & ~0xF;
|
||||
#ifdef LIBRAW_USE_OPENMP
|
||||
#pragma omp parallel for private(cur_block)
|
||||
unsigned errcnt = 0;
|
||||
#pragma omp parallel for private(cur_block) shared(errcnt)
|
||||
#endif
|
||||
for (cur_block = 0; cur_block < count; cur_block++)
|
||||
{
|
||||
fuji_decode_strip(common_info, cur_block, raw_block_offsets[cur_block], block_sizes[cur_block],
|
||||
q_bases ? q_bases + cur_block * lineStep : 0);
|
||||
try
|
||||
{
|
||||
fuji_decode_strip(common_info, cur_block, raw_block_offsets[cur_block], block_sizes[cur_block],
|
||||
q_bases ? q_bases + cur_block * lineStep : 0);
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
#ifdef LIBRAW_USE_OPENMP
|
||||
#pragma omp atomic
|
||||
errcnt++;
|
||||
#else
|
||||
throw;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
#ifdef LIBRAW_USE_OPENMP
|
||||
if (errcnt)
|
||||
throw LIBRAW_EXCEPTION_IO_EOF;
|
||||
#endif
|
||||
}
|
||||
|
||||
void LibRaw::parse_fuji_compressed_header()
|
||||
|
Reference in New Issue
Block a user