Skip to content

Commit

Permalink
added support for 10-12bit uncompressed dual iso MLVs, restricted los…
Browse files Browse the repository at this point in the history
…sless 8-12bits are not supported
  • Loading branch information
bouncyball-git committed Mar 19, 2018
1 parent 84f1b25 commit e0ffd06
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/mlv/llrawproc/dualiso.c
Expand Up @@ -1779,6 +1779,20 @@ int diso_get_full20bit(struct raw_info raw_info, uint16_t * image_data, int inte
int h = raw_info.height;

if (w <= 0 || h <= 0) return 0;

if (raw_info.bits_per_pixel < 14)
{
int pixel_count = w * h;
int shift_bits = 14 - raw_info.bits_per_pixel;

raw_info.black_level <<= shift_bits;
raw_info.white_level <<= shift_bits;

for(int i = 0; i < pixel_count; ++i)
{
image_data[i] <<= shift_bits;
}
}

/* RGGB or GBRG? */
int rggb = identify_rggb_or_gbrg(raw_info, image_data);
Expand Down

0 comments on commit e0ffd06

Please sign in to comment.