head	1.40;
access;
symbols
	pkgsrc-2026Q1:1.39.0.8
	pkgsrc-2026Q1-base:1.39
	pkgsrc-2025Q4:1.39.0.6
	pkgsrc-2025Q4-base:1.39
	pkgsrc-2025Q3:1.39.0.4
	pkgsrc-2025Q3-base:1.39
	pkgsrc-2025Q2:1.39.0.2
	pkgsrc-2025Q2-base:1.39
	pkgsrc-2025Q1:1.38.0.16
	pkgsrc-2025Q1-base:1.38
	pkgsrc-2024Q4:1.38.0.14
	pkgsrc-2024Q4-base:1.38
	pkgsrc-2024Q3:1.38.0.12
	pkgsrc-2024Q3-base:1.38
	pkgsrc-2024Q2:1.38.0.10
	pkgsrc-2024Q2-base:1.38
	pkgsrc-2024Q1:1.38.0.8
	pkgsrc-2024Q1-base:1.38
	pkgsrc-2023Q4:1.38.0.6
	pkgsrc-2023Q4-base:1.38
	pkgsrc-2023Q3:1.38.0.4
	pkgsrc-2023Q3-base:1.38
	pkgsrc-2023Q2:1.38.0.2
	pkgsrc-2023Q2-base:1.38
	pkgsrc-2023Q1:1.37.0.2
	pkgsrc-2023Q1-base:1.37
	pkgsrc-2022Q4:1.36.0.10
	pkgsrc-2022Q4-base:1.36
	pkgsrc-2022Q3:1.36.0.8
	pkgsrc-2022Q3-base:1.36
	pkgsrc-2022Q2:1.36.0.6
	pkgsrc-2022Q2-base:1.36
	pkgsrc-2022Q1:1.36.0.4
	pkgsrc-2022Q1-base:1.36
	pkgsrc-2021Q4:1.36.0.2
	pkgsrc-2021Q4-base:1.36
	pkgsrc-2021Q3:1.35.0.2
	pkgsrc-2021Q3-base:1.35
	pkgsrc-2021Q2:1.34.0.10
	pkgsrc-2021Q2-base:1.34
	pkgsrc-2021Q1:1.34.0.8
	pkgsrc-2021Q1-base:1.34
	pkgsrc-2020Q4:1.34.0.6
	pkgsrc-2020Q4-base:1.34
	pkgsrc-2020Q3:1.34.0.4
	pkgsrc-2020Q3-base:1.34
	pkgsrc-2020Q2:1.34.0.2
	pkgsrc-2020Q2-base:1.34
	pkgsrc-2020Q1:1.32.0.4
	pkgsrc-2020Q1-base:1.32
	pkgsrc-2019Q4:1.32.0.6
	pkgsrc-2019Q4-base:1.32
	pkgsrc-2019Q3:1.32.0.2
	pkgsrc-2019Q3-base:1.32
	pkgsrc-2019Q2:1.28.0.10
	pkgsrc-2019Q2-base:1.28
	pkgsrc-2019Q1:1.28.0.8
	pkgsrc-2019Q1-base:1.28
	pkgsrc-2018Q4:1.28.0.6
	pkgsrc-2018Q4-base:1.28
	pkgsrc-2018Q3:1.28.0.4
	pkgsrc-2018Q3-base:1.28
	pkgsrc-2018Q2:1.28.0.2
	pkgsrc-2018Q2-base:1.28
	pkgsrc-2018Q1:1.27.0.2
	pkgsrc-2018Q1-base:1.27
	pkgsrc-2017Q4:1.26.0.6
	pkgsrc-2017Q4-base:1.26
	pkgsrc-2017Q3:1.26.0.4
	pkgsrc-2017Q3-base:1.26
	pkgsrc-2017Q2:1.25.0.6
	pkgsrc-2017Q2-base:1.25
	pkgsrc-2017Q1:1.25.0.4
	pkgsrc-2017Q1-base:1.25
	pkgsrc-2016Q4:1.25.0.2
	pkgsrc-2016Q4-base:1.25
	pkgsrc-2016Q3:1.24.0.4
	pkgsrc-2016Q3-base:1.24
	pkgsrc-2016Q2:1.24.0.2
	pkgsrc-2016Q2-base:1.24
	pkgsrc-2016Q1:1.23.0.6
	pkgsrc-2016Q1-base:1.23
	pkgsrc-2015Q4:1.23.0.4
	pkgsrc-2015Q4-base:1.23
	pkgsrc-2015Q3:1.23.0.2
	pkgsrc-2015Q3-base:1.23
	pkgsrc-2015Q2:1.22.0.6
	pkgsrc-2015Q2-base:1.22
	pkgsrc-2015Q1:1.22.0.4
	pkgsrc-2015Q1-base:1.22
	pkgsrc-2014Q4:1.22.0.2
	pkgsrc-2014Q4-base:1.22
	pkgsrc-2014Q3:1.21.0.12
	pkgsrc-2014Q3-base:1.21
	pkgsrc-2014Q2:1.21.0.10
	pkgsrc-2014Q2-base:1.21
	pkgsrc-2014Q1:1.21.0.8
	pkgsrc-2014Q1-base:1.21
	pkgsrc-2013Q4:1.21.0.6
	pkgsrc-2013Q4-base:1.21
	pkgsrc-2013Q3:1.21.0.4
	pkgsrc-2013Q3-base:1.21
	pkgsrc-2013Q2:1.21.0.2
	pkgsrc-2013Q2-base:1.21
	pkgsrc-2013Q1:1.20.0.4
	pkgsrc-2013Q1-base:1.20
	pkgsrc-2012Q4:1.20.0.2
	pkgsrc-2012Q4-base:1.20
	pkgsrc-2012Q3:1.18.0.2
	pkgsrc-2012Q3-base:1.18
	pkgsrc-2012Q2:1.17.0.6
	pkgsrc-2012Q2-base:1.17
	pkgsrc-2012Q1:1.17.0.4
	pkgsrc-2012Q1-base:1.17
	pkgsrc-2011Q4:1.17.0.2
	pkgsrc-2011Q4-base:1.17
	pkgsrc-2011Q3:1.15.0.2
	pkgsrc-2011Q3-base:1.15
	pkgsrc-2011Q2:1.12.0.2
	pkgsrc-2011Q2-base:1.12
	pkgsrc-2011Q1:1.10.0.2
	pkgsrc-2011Q1-base:1.10
	pkgsrc-2010Q4:1.6.0.2
	pkgsrc-2010Q4-base:1.6
	pkgsrc-base:1.1.1.1
	TNF:1.1.1;
locks; strict;
comment	@# @;


1.40
date	2026.04.11.17.08.22;	author wiz;	state Exp;
branches;
next	1.39;
commitid	z7WWk5RCeF2y0zBG;

1.39
date	2025.04.24.14.14.30;	author wiz;	state Exp;
branches;
next	1.38;
commitid	A3VBjL8Zdd4LljSF;

1.38
date	2023.04.11.06.10.54;	author adam;	state Exp;
branches;
next	1.37;
commitid	66tNzTCdfDZnBEkE;

1.37
date	2023.03.16.08.38.51;	author wiz;	state Exp;
branches;
next	1.36;
commitid	9ok6koCtciIWfkhE;

1.36
date	2021.09.28.09.59.24;	author nia;	state Exp;
branches;
next	1.35;
commitid	j4Tbu3clMs4BRHaD;

1.35
date	2021.09.19.18.46.50;	author nia;	state Exp;
branches;
next	1.34;
commitid	yIh2qMB1rmNA4B9D;

1.34
date	2020.05.20.06.09.06;	author rillig;	state Exp;
branches;
next	1.33;
commitid	YzMn9nHhuSomwW8C;

1.33
date	2020.04.26.06.38.17;	author rillig;	state Exp;
branches;
next	1.32;
commitid	6R0UKoUVMvVXsR5C;

1.32
date	2019.08.31.14.20.05;	author nia;	state Exp;
branches;
next	1.31;
commitid	RZn2swTWx9eMHbBB;

1.31
date	2019.08.08.20.38.57;	author nia;	state Exp;
branches;
next	1.30;
commitid	OMUlL8db0s1sxgyB;

1.30
date	2019.07.16.15.45.03;	author nia;	state Exp;
branches;
next	1.29;
commitid	bfkLG02xcB5xEhvB;

1.29
date	2019.07.10.20.27.59;	author nia;	state Exp;
branches;
next	1.28;
commitid	zsIkdnJnZ1gspxuB;

1.28
date	2018.04.14.03.45.56;	author markd;	state Exp;
branches;
next	1.27;
commitid	3ArmA02Otn14mmyA;

1.27
date	2018.02.01.10.27.38;	author jperkin;	state Exp;
branches;
next	1.26;
commitid	4bS2zXB800YYV8pA;

1.26
date	2017.08.16.20.21.09;	author wiz;	state Exp;
branches;
next	1.25;
commitid	rqudPoPPU2GmEt3A;

1.25
date	2016.12.17.14.23.55;	author joerg;	state Exp;
branches;
next	1.24;
commitid	SgM7MCtgC2Q6slyz;

1.24
date	2016.06.19.05.04.57;	author markd;	state Exp;
branches;
next	1.23;
commitid	POCMSs7H4frW82bz;

1.23
date	2015.07.18.10.40.20;	author adam;	state Exp;
branches;
next	1.22;
commitid	ziy9MnHLtdnHRKty;

1.22
date	2014.11.17.19.04.25;	author joerg;	state Exp;
branches;
next	1.21;
commitid	wfz1Z5lYXx0SszYx;

1.21
date	2013.05.26.09.07.34;	author adam;	state Exp;
branches;
next	1.20;
commitid	E2j3eImgkYilw7Rw;

1.20
date	2012.10.10.13.06.14;	author drochner;	state Exp;
branches;
next	1.19;

1.19
date	2012.10.06.14.11.05;	author asau;	state Exp;
branches;
next	1.18;

1.18
date	2012.08.04.14.36.42;	author drochner;	state Exp;
branches;
next	1.17;

1.17
date	2011.10.24.17.14.05;	author gls;	state Exp;
branches;
next	1.16;

1.16
date	2011.10.22.13.44.12;	author gls;	state Exp;
branches;
next	1.15;

1.15
date	2011.09.12.18.06.22;	author drochner;	state Exp;
branches;
next	1.14;

1.14
date	2011.07.31.17.33.54;	author gls;	state Exp;
branches;
next	1.13;

1.13
date	2011.07.12.18.57.37;	author drochner;	state Exp;
branches;
next	1.12;

1.12
date	2011.05.29.17.55.58;	author gls;	state Exp;
branches;
next	1.11;

1.11
date	2011.04.05.18.08.46;	author drochner;	state Exp;
branches;
next	1.10;

1.10
date	2011.03.09.17.19.19;	author drochner;	state Exp;
branches;
next	1.9;

1.9
date	2011.02.16.22.17.36;	author gls;	state Exp;
branches;
next	1.8;

1.8
date	2011.02.03.21.38.07;	author gls;	state Exp;
branches;
next	1.7;

1.7
date	2011.01.11.19.50.17;	author gls;	state Exp;
branches;
next	1.6;

1.6
date	2010.12.22.16.02.18;	author gls;	state Exp;
branches;
next	1.5;

1.5
date	2010.12.18.23.50.58;	author wiz;	state Exp;
branches;
next	1.4;

1.4
date	2010.12.13.20.32.30;	author gls;	state Exp;
branches;
next	1.3;

1.3
date	2010.12.02.15.35.56;	author wiz;	state Exp;
branches;
next	1.2;

1.2
date	2010.11.15.19.52.55;	author drochner;	state Exp;
branches;
next	1.1;

1.1
date	2010.11.15.18.59.38;	author gls;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2010.11.15.18.59.38;	author gls;	state Exp;
branches;
next	;


desc
@@


1.40
log
@libraw: update to 0.22.1.

Remove jasper option, since jasper support is gone.
Not sure when, it's not mentioned in the changelog.

  LibRaw 0.22.1 Release

  This is bugfix-only release with these commits included:

  * Limit strcat space in hassy model manipulation
  * Version increment; shlib increment: internal ABI has changed
  * check panasonic enc8 tile width against image width
  * CR3 parser: zero all buffers before fread
  * skip memory allocation checks for OWN_ALLOC decoders
  * DNG SDK glue: check for memory limits
  * raw2image()/dcraw_process() - check for int16 source data present
  * Check for correct bayer pattern, pass incorect ones to vng_interpolate
  * parse_rollei: zero input string before fgets
  * Nikon padded/12bit: no need to calculate padded row size before final raw_width adjustment
  * TALOS-2026-2364: Fix for data size calculation integer overflow in float/deflated DNG loader; Check for read results
  * Fix for TALOS-2026-2363: avoid integer overflow in allocation size calculation. Also: check for EOF in read loop
  * X3F decoder: implemented hard single allocation limit via LIBRAW_X3F_ALLOC_LIMIT_MB define;
    allocation size calculation converted to 64 bit arithm; fix for TALOS-2026-2359
  * Fix for TALOS-2026-2358
  * Fix for TALOS-2026-2331
  * Fix for TALOS-2026-2330
  * Sony YCC decoder: check tile size; add +3 bytes to input buffer to avoid possible overrun in huffman decoder
  * FP DNG data limit: perform calculations in 64 bit
  * Add extra huff_coeff item to handle huff_index==17 with known (zero) value, not externally provided tag value
  * use %lld format for timestamp parse/print where appropriate
  * nikon coolscan loader: check for EOF
  * Initialize olympus lensID bits
  * CR3 parser: all file offsets are unsigned/64bit; check current offset against file size
  * Add Canon EOS Kiss M2 to camera list
  * Check real color count against filters; do not pass really 4-color images to fbdd or advanced demosaic
  * Use LIBRAW_EXCEPTION instead of own internal in losslessjpeg.h
  * zero input string to avoid compare random stack garbage with tag names
  * Check for eof in Pentax tag search loop
  * Fuji decoder: initialize allocated buffers

  LibRaw 0.22 Release

 == Raw format support ==

  * Panasonic encoding 8

  * Sony YCC (Medium/Small compression) pseudo-RAW support:
    - normal processing (3-channel RGB output)

    - or YCbCr output if LIBRAW_RAWSPECIAL_SRAW_NO_RGB bit is set
      in imgdata.rawparams.specials (one may specify the
      LIBRAW_RAWSPECIAL_SRAW_NO_INTERPOLATE flag too avoid Cb/Cr interpolation)
      Note: if YCbCr is selected, Cb/Cr neutral points are adjusted to 8192
      (to fit histogram/range area of the Y channel)

    - RAW (pseudo-RAW) data is already white balanced, so
         imgdata.color.as_shot_wb_applied is set to
         LIBRAW_ASWB_APPLIED | LIBRAW_ASWB_SONY

  * DNG 1.7 (including JPEG-XL compression) support via Adobe DNG SDK 1.7.x integration

  * Canon CRN files: embedded RAW extracted

  * New implementation for Samsung V3 decoder (NX1, NX500, etc)

  * OM System 14-bit high-resolution files.
    Note: the new decoder supports old (12-bit) Olympus/OM-System files
    too and slightly faster (about 5%), so the old one is removed.

  * Nikon NEFX (4/8/16/32 shots in PixelShift mode merged via Nikon software)

== Camera support ==

  * Canon EOS R1, EOS R5 Mark II, EOS R5 C, EOS R6 Mark II, EOS R8, EOS R50, EOS R100, EOS Ra
  * Fujifilm X-T50, GFX 100S II, GFX100-II, X-T5, X-S20, X-H2
       X-H2S: support of files with wrong metadata (pre 1.03 fw)
  * GoPro HERO11, HERO12 (via GoPro SDK)
  * Hasselblad  CFV-50c, CFV-100c, X2D-100c
  * Leica Q3 43, D-Lux8, SL3, Q3, M11 Monochrom
  * Nikon (standard compression only): Z6-III, Z f, Z30, Z8
  * Olympus/OM System OM-1 Mark II, TG-7, OM-5
  * Panasonic GH7, S9, DC-G9 II, DC-ZS200D / ZS220D, DC-TZ200D / TZ202D / TZ220D, DC-S5-II, DC-GH6
  * Pentax KF, K III Monochrome
  * Sony ZV-E10M2, UMC-R10C, A9-III, ILX-LR1, A7C-II, A7CR, ILCE-6700,  ZV-1M2, ZV-E1, ILCE-7RM5 (A7R-V), ILME-FX30
       A1: support for files damaged by exiftool
  * Multiple DJI and Skydio drones
  * Tested with multiple smartphones with DNG format recorded.
  * As planned in LibRaw snapshot 202101 release notes, OLD_VIDEOCAMS
    support is dropped.
    These cameras are no longer supported:
     - old RED Cine cameras
     - Canon C500
     - ARRI video/digital cinema cameras
 * Total supported camera count: 1284 (if compiled with all features)

  == Preview format support ==

  * JPEG-XL previews (DNG 1.7) support:
    - new bit for imgdata.rawparams.options:
         LIBRAW_RAWOPTIONS_ALLOW_JPEGXL_PREVIEWS (not set by default)
    - if the bit is set, LibRaw will perceive such previews in the same way as JPEG ones
         (largest preview is selected by default, etc).
    - tformat field for such preview is set to LIBRAW_THUMBNAIL_JPEGXL
    - image metadata (width/height/channels count) is not parsed for JPEG-XL previews
  * H265 (Canon) and JPEG-XL thumbnail support for dcraw_make_mem_thumb
       Note: libraw_processed_image_t.type is set to LIBRAW_IMAGE_H265 or
       LIBRAW_IMAGE_JPEGXL respectively

  * Jpeg XL preview file writer

  * Jpeg XL preview support in simple_dcraw -E/-e

  == API/ABI changes ==
  * New rawoptions/processing flag for DNG processing if compiled
    with Adobe DNG SDK:
	  LIBRAW_RAWOPTIONS_DNG_STAGE23_IFPRESENT_JPGJXL
   Similar to  LIBRAW_RAWOPTIONS_DNG_STAGE2_IFPRESENT,LIBRAW_RAWOPTIONS_DNG_STAGE3_IFPRESENT
   flags but applied to JPEG/JPEG-XL compressed images only:
   If  OpcodeList2/OpcodeList3 tags are present in the input DNG file, these tags will be
   processed via Adobe DNG SDK, producing corrected (de-bayered) image.

  * DNG OpcodeList1/2/3: opcode list(s) are read (as is) into
    imgdata.color.dng_levels.rawopcodes[3]

  * Exif callback is called from CR3 parser before calling parse_makernotes()
    parameters are the same as usual, except tag parameter value.
    tag values:
      (0x70000 | 0x927c) - if called from  CMT3 tag
      (__type << 20) | 0x80000 | 0x927c - if called from CTMD record with type __type

  * Exif callback is called for Sony SR2 tag with tag parameter set to 0x60000 | tagID

  * Makernotes callback implemented for TIFF-like (IFD structure makernotes)
    Callback is very similar to exif_callback.
    To set callback use LibRaw::set_makernotes_handler(exif_parser_callback cb, void *data)
    Callback is called (if set) with tag value set to  (uptag << 16)|makernotes_tag
    where uptag is
     EXIF tag: if called from EXIF makernotes parser
     0: if called from CR3 metadata parser
     tag-ID if parse_makernotes() is called from some specific tag context (see parse_makernotes calls in source code).

  * New metadata field makernotes.pentax.DynamicRangeExpansion[4]
    if DynamicRangeExpansion[1] is non-zero, DynamicRangeExpansion[0] should be added
    to BaselineExposure

  * New API call (static) int LibRaw::simplify_make_model(unsigned * mkindex, char *mkbuf, unsigned mkbuf_size, char *modelbuf, unsigned modelbuf_size):
    This call can be used to simplify/standardize vendor name/model received
    from external source (e.g. EXIF block in JPEG file).
      mkindex: pointer to received maker index (LibRaw_CAMERAMAKER_...)
      mkbuf, mkbuf_size: buffer with make string, buffer size
      modelbuf, modelbuf_size: buffer with model string.
    simplify_make_model(..) simplifies/re-writes vendor name/model in place, in provided buffers.
    return values:
     0 - mkindex is set (if non-null pointer provided), data simplified;
     1 - mkindex is not set, while some data processing is done;
    -1 - incorrect parameters;

  * All file offsets are 64-bit now;
    Note: data callback signature has changed

  * New LibRaw_abstract_datastream (and derived classes) methods:
    bool is_buffered() - returns current buffering mode (if implemented);
    void buffering_on() - turns buffering on.
    These methods complement the (existing) buffering_off() method.

  * New bits in imgdata.process_warnings:
      LIBRAW_WARN_DNG_NOT_PROCESSED - RAW file was passed to DNG SDK, but not processed.
      LIBRAW_WARN_DNG_NOT_PARSED - DNG parse error or non-valid DNG at valid_for_dngsdk() stage

  * New compile-time define: LIBRAW_MAX_CR3_RAW_FILE_SIZE
    Default: value of LIBRAW_MAX_NONDNG_RAW_FILE_SIZE
    CR3 file size is limited by 4GB (max MP4 container size), so it may be needed
    to set the limit above non-DNG 2GB file size limit.

  * New imgdata.params.use_p1_correction parameter
    If set to non-zero (default): PhaseOne compressed files will be corrected (linearization; defect mapping)
    based on metadata contained in file.

  * New possible bit in imgdata.process_warnings: LIBRAW_WARN_VENDOR_CROP_SUGGESTED
    If set: unknown/untested RAW image frame size passed to LibRaw, cropping may be incorrect.
    It is suggested to use LibRaw::adjust_to_raw_inset_crop(1) for vendor specified crop.

 * LibRaw::adjust_to_raw_inset_crop exposed via C-API call:
   libraw_adjust_to_raw_inset_crop(libraw_data_t *lr, unsigned mask, float maxcrop);
   Note: default maxcrop value for C++ API is 0.55f

  * Added imgdata.makernotes.sony.AspectRatio field
    - if parsed: contains aspect ratio (width to height)
    - if not parsed: initialized to -999.f

  * Canon AutoRotate mode detection for several cameras.
    If LIBRAW_RAWOPTIONS_CANON_CHECK_CAMERA_AUTO_ROTATION_MODE bit
    is set in imgdata.rawparams: for shots with AutoRotate is Off
    TIFF::Orientation tag wil be used for imgdata.sizes.flip
    (and Makernotes rotation tag for other AutoRotate modes).
    Note: AutoRotate is detected for limited set of Canon cameras,
    namely: EOS 6D, 5D Mark IV, 5DS, 5DS R
    To extend this list: we need specially shot samples to detect
    AutoRotate field location in metadata. Contact us for details
    if you need to add your camera to list and have such camera on hands

  * Most small buffer allocations: malloc changed to calloc to prevent
    uninitialized heap data leaks

  * Large buffer allocation (RAW backing store, thumbnails store):
    If LIBRAW_CALLOC_RAWSTORE is defined on build: large buffers will be
    allocated via calloc

  == Minor Improvements ==

  * Fixed issue 712: mistype in MIN/MAX that loosens camera WB preset checks

  * Updated libraw_types.h to fix calling C++ files in external C -- main
    includes cannot be in extern C for the library to correctly compile
    under Swift Modules. This small change lets the compiler
    finish when compiling the library inside a module.

  * Read known parts of the X3F 4.X (Quattro) header

  * Rollei loader: more realistic limits

  * Additional metadata checks in PhaseOne files processing

  * Minor fixes to improve stability and special crafted files handling

  * Multiple minor fixes to better handling of specially crafted files

  * Fixed regression in Fujufilm S6000/S6500 support

  * Improved damaged/incorrect files handling

  * Support for 4-color lossy-compressed DNG files

  * Improved damaged/incorrect/modified CR3 files handling

  * Colordata updated for several Fujifilm cameras

  * Improved byte order detection for PowerPC

  * Minor fix: NOMINMAX defined before #include winsock2.h in
    LibRaw public header to not provide min/max macros to the
    code that includes libraw.h

  * RawSpeed1/3: do not pass files larger then 2GB

  * DNG 1.7 JpegXL DNG/GoPro DNG: do not refuse files at open_file() if LibRaw is not built with DNG SDK/GoPro SDK
    Note: LibRaw::get_decoder_info() will return decoder flag bit set to LIBRAW_DECODER_UNSUPPORTED_FORMAT if
    LibRaw is not built with corresponding SDK.

  * All implicit type conversion *excluding INT64<=>int/uint* conversions are made explicit
    to remove C++ compiler type conversion warnings.

   * Sony DSC-HX95: improved metadata parsing

   * Better support for cropped images from latest Fujifilm cameras
     (X-H2, X-H2S, X-T5)

  * New patch for RawSpeed3:  05.no-phase-one-correction.patch
    this patch disables RawSpeed's  PhaseOne flat field correction (not needed because
    LibRaw uses own P1-metadata based correction)

  * RawSpeed3/PhaseOne compressed files: scale unpacked data to match camer black level data.

  * Better handling of DNG RAW Previews with Stage2 opcodes

  * Nikon Z8/HLG mode: do not add 10 bit/unknown format thumbnails to the thumb_list

  * Canon CR2 16-bit bitmap previes: do not convert from Kodak colorspace

  * New compile-defined limit LIBRAW_MAX_PROFILE_SIZE_MB:
       limits allocation/read size for embedded color profile (default: 256Mb)

  * Embedded color profile allocation/read size: limited by input file size.

  * Check against corrupted LJPEG header in Canon sRAW decoder

  * Better support for Sony metadata

  * Better handling of memory allocation errors in unpack_thumb()

  * Support for 8bit/Monochrome DNG Previews

  * Placeholder for DNG/YCC preview decoding: such previews are recorded
    by Samsung S21 Ultra smartfone, while all present samples contains
    broken data; Right now 'no preview' returned for such files.

  * Support for BW bitmap previews in LibRaw::dcraw_thumb_writer

  * Phase One: explicitly switch to monochrome mode if firmware string
    contains 'Achromatic' word

  * tiff parser: check for IFD offset before parsing it

  * LibRaw::thumbOK(): return 0 for YCbCr thumbnails (because
    unpack_thumb() will always return error: no correct thumbnails
    with this format found in the image samples yet)

  * Improved Sigma X3F files model recognition

 == Bug/problem fixes ==
  * Fix for PanasonicV8 decoder compile with OpenMP
  * Fix for incorrect 32-bit shift in Pana8 decoder generated by gcc11+
  * DNG SDK Integration: clear imdata.color.linear_max[] if Stage3 opcodes are applied.
  * Fixed possible buffer overrun in LibRaw::remove_trailing_spaces call
  * CR3 decoder: workaround for possible incorrect generation of 64-bit code
  * Improved Sony metadata processing
  * fixed possible static table read overrun (if specially crafted image
    data passed to LibRaw)
  * Fix for monochrome DNG files compressed as 2-color component LJPEG
  * Fixed integer overflow in largest DNG frame selection code
  * Additional out-of range checks to better handle specially crafted files
  * Prevent out-of-buffer access in phase_one_correct()
  * Prevent one-off read in Fuji WB table parsing
  * Prevent one-off read in phase_one_correct()
  * Do not apply Canon metadata crop values to DNG files
  * Adjust profile_length to allocated data size.
  * libraw_dng_stream: underlying LibRaw_abstract_datastream buffering restored in
     destructor call.
  * Fixed possible buffer overrun in old panasonic decoder
@
text
@# $NetBSD: Makefile,v 1.39 2025/04/24 14:14:30 wiz Exp $

DISTNAME=	LibRaw-0.22.1
PKGNAME=	${DISTNAME:tl}
CATEGORIES=	graphics
MASTER_SITES=	https://www.libraw.org/data/

MAINTAINER=	pkgsrc-users@@NetBSD.org
HOMEPAGE=	https://www.libraw.org/
COMMENT=	Raw decoding/processing library
LICENSE=	gnu-lgpl-v2.1 OR cddl-1.0

USE_LANGUAGES=		c c++
USE_LIBTOOL=		yes
USE_TOOLS+=		pkg-config gmake
GNU_CONFIGURE=		yes
CONFIGURE_ARGS+=	--disable-examples

PKGCONFIG_OVERRIDE+=	libraw.pc.in
PKGCONFIG_OVERRIDE+=	libraw_r.pc.in

.include "../../graphics/lcms2/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../mk/jpeg.buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
@


1.39
log
@*: recursive bump for jpeg -> libjpeg-turbo switch
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.38 2023/04/11 06:10:54 adam Exp $
d3 1
a3 1
DISTNAME=	LibRaw-0.21.1
a4 1
PKGREVISION=	2
a21 1
.include "options.mk"
d23 1
@


1.38
log
@revbump for jasper 4.0.0
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.37 2023/03/16 08:38:51 wiz Exp $
d5 1
a5 1
PKGREVISION=	1
@


1.37
log
@libraw: update to 0.21.1.

 LibRaw 0.21.1-Release
 * fixed typo in panasonic metadata parser

 LibRaw 0.21-Release

 * Multiple fixes inspired by oss-fuzz project

 LibRaw 0.21-Beta1

 == Camera format support ==
 * Phase One/Leaf IIQ-S v2 support
 * Canon CR3 filmrolls
 * Canon CRM (movie) files
 * Tiled bit-packed (and 16-bit unpacked) DNGs
 * (non-standard) Deflate-compressed integer DNG files are allowed

== Camera support ==

 * Canon EOS R3, R7 and R10
 * Fujifilm X-H2S, X-T30 II
 * OM System OM-1
 * Leica M11
 * Sony A7-IV (ILCE-7M4)
 * DJI Mavic 3
 * Nikon Z9: standard compression formats only

 == Multiple (resolution) thumbnails support ==

 * New imgdata.thumbs_list data item with data fields:

   int thumbcount: thumbnail count
   libraw_thumbnail_item_t thumblist[LIBRAW_THUMBNAIL_MAXCOUNT]: list  of thumbnails

   libraw_thumbnail_item_t fields:

     enum LibRaw_internal_thumbnail_formats tformat: internal thumbnail format
        (this is not PPM/JPEG, but internal type related to thumbnail reading/unpacking method)

     ushort twidth, theight: thumbnail image size.

     ushort tflip: image rotation (see notes below)

     unsigned tlength: on-disk data size (not uncompressed for compressed formats)

     unsigned tmisc: bit depth and channel count:  (color << 5) | bitsperpixel

     INT64 toffset: Thumbnail data offset in file

  Notes:
    -  Only TIFF-based and CR3 files are parsed for thumbnail list, other formats will have
       thumbcount = 1 (or 0 if no thumbnail found in file).

    -  Thumbnail image size may be unknown (not recorded in metadata), in this case twidth and theight are zero.
       Usually small(er) thumbnails will always have twidth/theight filled, while largest one may have these fields set to zero.

    -  Thumbnail rotation (tflip) is filled only for TIFF-based RAWs (if Orientation tag is not present in IFD, default zero value is used)
       For non-tiff images, tflip is initialized to 0xffff (not known...)

    - There is no code to select thumbnail based on some criteria (e.g. minimal resolution), it is left to user to implement such a criteria, if needed
      (see unpack_thumb_ex() call below)

    - If you want to get largest possible thumbnail: just use old unpack_thumb() call to get it.

  * new API call:  LibRaw::unpack_thumb_ex(int i):
    Unpacks i-th thumbnail if it exists into imgdata.thumbnail structure
    i should be non-zero and less then imgdata.thumbs_list.thumbcount.

  * samples/simple_dcraw.cpp: new -E command line switch to extract all thumbnails from input file(s)

 == (Experimental) RawSpeed "version 3" (develop branch) support. ==

   Build with -DUSE_RAWSPEED3, see details in RawSpeed3/README.md

   LibRaw::capabilities will set bit LIBRAW_CAPS_RAWSPEED3 if compiled w/
   RawSpeed-v3 support

   If file was processed (or tried to process) via RawSpeed-v3, these bits
   are raised in imgdata.process_warnings:
    LIBRAW_WARN_RAWSPEED3_PROCESSED - processed via RawSpeed v3
    LIBRAW_WARN_RAWSPEED3_PROBLEM - not processed (due to exception in RawSpeed library)
    LIBRAW_WARN_RAWSPEED3_UNSUPPORTED - unsupported file
    LIBRAW_WARN_RAWSPEED3_NOTLISTED - file not listed in cameras.xml data

  RawSpeed-v3 support is controlled via libraw_decoder_info.t->flags
  (LIBRAW_DECODER_TRYRAWSPEED3 bit).
  The bit is set for:
    - lossless jpeg decoder
    - Canon sRAW decoder
    - lossless compressed and packed-compressed DNG decoders
    - Pentax decoder
    - Nikon (compressed) decoder
    - Phase One Compressed and Hasselblad/Compressed decoders
    - bitpacked decoder
    - Panasonic (old 12-bit compression) decoder
    - Olympus decoder
    - Sony ARW (v1 and v2) decoders
    - Samsung (version 1) decoder

 * (Experimental) Fine control of RawSpeed version selection/use.
   To enable, build LibRaw with -DUSE_RAWSPEED_BITS
   LibRaw::capabilities will set bit LIBRAW_CAPS_RAWSPEED_BITS if compiled
   with this flag.
   If enabled:
     imgdata.rawparams.use_rawspeed becomes bit-field (instead of 0/1 off/on)
     with bits:
        LIBRAW_RAWSPEEDV1_USE - use RawSpeed Version 1 (if compiled  with)
        LIBRAW_RAWSPEEDV1_FAILONUNKNOWN - do not process unknown files
             (not listed in RawSpeed v1 camera definitions file)
        LIBRAW_RAWSPEEDV1_IGNOREERRORS - ignore mirror decoding errors (out of range data,etc)

        LIBRAW_RAWSPEEDV3_USE - Use RawSpeed Version 3 (if compiled with)
        LIBRAW_RAWSPEEDV3_FAILONUNKNOWN - do not process unknown files
        LIBRAW_RAWSPEEDV3_IGNOREERRORS - ignore minor decoding errors

 == Misc changes/improvements ==
 * New compile time define LIBRAW_OWN_SWAB
   to use on platforms without swab() in C/C++ runtime

 * New imgdata.rawparams.options bit: LIBRAW_RAWOPTIONS_CANON_IGNORE_MAKERNOTES_ROTATION
   If set: image orientation is set based on TIFF/IFD0:Orientation tag,
   makernotes orientation data is ignored

 * Nikon makernotes: read NEFCompression tag for HE/HE* files

 * Nikon orientation tag: more fixed offsets for known cameras

 * Adobe DNG SDK 1.6 support (meaning, just an additional patch for GPR SDK)

 * removed LibRaw::memerr(),  memory allocation failures are already handled
   in LibRaw_memmgr::*alloc w/ exception thrown

 * removed memory error callback, out-of-memory error should be handled via
   returned error code check, all related parameters (e.g. LibRaw constructor
   option to not set such callback) is also removed

 * imgdata.params.adjust_maximum_thr is settable via C-API libraw_set_adjust_maximum_thr(..)

 * New rawoptions/processing flags for DNG processing if compiled
   with Adobe DNG SDK:
   LIBRAW_RAWOPTIONS_DNG_STAGE2_IFPRESENT,LIBRAW_RAWOPTIONS_DNG_STAGE3_IFPRESENT
   If these flag(s) are set: Stage2/Stage3 processing will be performed
   only if OpcodeList2/OpcodeList3 tags are present in the input DNG file
   Old (hard) flags (LIBRAW_RAWOPTIONS_DNG_STAGE2 and
   LIBRAW_RAWOPTIONS_DNG_STAGE3) are not removed and will force Stage2/3
   processing if set (regardless of input file tags)

 * New imgdata.rawparams.options bit: LIBRAW_RAWOPTIONS_DNG_ADD_MASKS
   If set: DNG Transparency Masks will be extracted (if selected via shot_select)

 * New decoder flag: LIBRAW_DECODER_UNSUPPORTED_FORMAT

 == Bugs fixed ==

 * Fixed possible out-of-buffer read in Nikon orientation tag parser

 * Windows datastream: fixed logic errors (not showing up in real life)

 * Out-of-range read-only array access in postprocessing if output_color is set to 0 (raw color)

 * Minolta Z2 was not recognized correctly on 32-bit systems

 * Fixed possible buffer overflow in Kodak C330 decoder

 * dcraw_process(): check for buffer allocation results to avoid NULL deref
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.36 2021/09/28 09:59:24 nia Exp $
d5 1
@


1.36
log
@libraw: Update to 0.20.2

2020-10-14 Alex Tutubalin <lexa@@lexa.ru>

 * LibRaw 0.20.2
 Reverted 0.20.1 change:
   - const buffer for open_buffer() and open_bayer() calls
 Because of 0.20.0 ABI break

2020-10-14 Alex Tutubalin <lexa@@lexa.ru>

 * LibRaw 0.20.1
 * Improvements:
   - exif callback is called on EXIF GPS and EXIF Interop IFDs
   - open_bayer call documented
   - Canon (ColorDatsSubver==32): parse Specular White instead of hardcoded value
 * Fixes for normal files processing:
   - Olympus XZ-1: do not provide linear_max (it is wrong in metadata)
   - Nikon Z cameras: added space in camera list
   - raw-identify: fixed wb-preset print
   - Pentax Optio 33WR: maker index was incorrect
   - dcraw_emu: corrected help line for -6 option.
   - raw-identify: corrected range check for color matrices print
   - use_camera_matrix option: fixed a bug introduced when making
     compiler more happy.

 * Fixes for damaged/special crafted files processing:
   - Fix for truncated CR3 files parsing
   - DNG metadata merger: all color loops are limited to MIN(4,colors)
   - Check for marings: should be less than raw image size
   - Check for xmpdata present in Samsung Lens ID assignment
   - Check for column range in leaf_hdr decoder
   - Additional checks in Hasselblad model parser
   - Fuji rotate: better limits check
   - DNG files: limit tiff_samples

 * Not fixes, but makes ASAN/compilers/etc happy:
   - corrected GPS EXIF output
   - const buffer for open_buffer() and open_bayer() calls


2020-07-23 Alex Tutubalin <lexa@@lexa.ru>

 * LibRaw 0.20

== Camera Format support ==
  Canon CR3
  GoPro (via GPR SDK)
  Panasonic 14-bit
  Fujifilm compressed/16bit
  Rapsberry Pi RAW+JPEG format (if USE_6BY9RPI defined)
  Foveon X3F support changed: it is supported only if USE_X3FTOOLS defined
  at build (see below for 'Imported code policy changed')

== Camera support (+59, 1131 total) ==
  Canon: PowerShot G5 X Mark II, G7 X Mark III, SX70 HS,
         EOS R, EOS RP, EOS 90D, EOS 250D,  EOS M6 Mark II, EOS M50, EOS M200
         EOS 1DX Mark III (lossless files only)
  DJI Mavic Air, Osmo Action
  FujiFilm GFX 100, X-A7, X-Pro3, X100V, X-T4 (uncompressed/lossless compressed only), X-T200
  GoPro Fusion, HERO5, HERO6, HERO7, HERO8
  Hasselblad L1D-20c, X1D II 50C
  Leica D-LUX7, Q-P, Q2, V-LUX5, C-Lux / CAM-DC25, SL2, M10 Monochrom
  Nikon D780, Z50, P950
  Olympus TG-6, E-M5 Mark III, E-PL10, E-M1 Mark III,
  Panasonic DC-FZ1000 II, DC-G90, DC-S1, DC-S1R, DC-S1H, DC-TZ95
  PhaseOne IQ4 150MP
  Ricoh GR III
  Sony A7R IV, A9 II, ILCE-6100, ILCE-6600, RX0 II, RX100 VII
  Zenit M

also multiple smartphones (the tested ones are listed in LibRaw::cameraList)

== Source code re-arranged ==
 * dcraw.c is not used in the generation and build processes
 * dcraw_common.cpp and libraw_cxx.cpp are split into multiple code chunks
   placed in separate subfolders (decoders/ for raw data decoders,
   metadata/ for metadata parsers, etc)
 * dcraw_common.cpp and libraw_cxx.cpp remain to preserve existing
   build environments (these files are now just a bunch of #include directives).
 * It is possible to build LibRaw
    a)without postprocessing functions (dcraw_process() and  called function)
    b)without postprocessing and LibRaw::raw2image() call (and called function).
   It may be useful to reduce library memory/code footprint.
   See Makefile.devel.nopp and Makefile.devel.noppr2i for the list of source
   files needed to build reduced/stripped library.

== Normalized make/model ==

There is a huge number of identical cameras sold under different names,
depending on the market (e.g. multiple Panasonic or Canon models)
and even some identical cameras sold under different brands
(Panasonic -> Leica, Sony -> Hasselblad).

To reduce clutter, a normalization mechanism has been implemented in LibRaw:

In imgdata.idata:
    char normalized_make[64]; - primary vendor name (e.g. Panasonic for
    Leica re-branded cameras)
    char normalized_model[64]; - primary camera model name
    unsigned maker_index; - primary vendor name in indexed form (enum
       LibRaw_cameramaker_index, LIBRAW_CAMERAMAKER_* constant).
These fields are always filled upon LibRaw::open_file()/open_buffer() calls.

const char* LibRaw::cameramakeridx2maker(int index): converts maker_index
to normalized_make.

We recommend that you use these normalized names in a variety of data tables
(color profiles, etc.) to reduce the number of duplicate entries.

New vendor index values will be added strictly to the end of the
LibRaw_cameramaker_index table, ensuring that the numbers assigned to
vendors that are already known to LibRaw will not change.

== DNG frame selection  ==

 DNG frames selection code re-worked:
  - by default all frames w/ the NewSubfileType tag equal to 0
  (high-res image) are added to the list of available images (selection
  performed via imgdata.params.shot_select field, as usual)
  - the special case for Fuju SuperCCD (SamplesPerPixel == 2) works as
  before: shot_select=1 will extract second sub-image.
  - Additional flags to imgdata.params.raw_processing_options:
     LIBRAW_PROCESSING_DNG_ADD_ENHANCED - will add Enhanced DNG frame
     (NewSubfileType == 16) to the list of available frames
     LIBRAW_PROCESSING_DNG_ADD_PREVIEWS - will add previews
     (NewSubfileType == 1) to the list.

  - By default, DNG frames are not reordered and are available in same order
  as in DNG (LibRaw traverses IFD/Sub-IFD trees in deep-first order).
  To prioritize the largest image, set LIBRAW_PROCESSING_DNG_PREFER_LARGEST_IMAGE
  bit in imgdata.params.raw_processing_options.

 - DNG Stage2/Stage3 processing via DNG SDK (request via flags in
 raw_processing_options)

== Imported code policy disclaimer ==

  We've changed the policy regarding 3rd party code imported into LibRaw.

  We (like other authors of open-source RAW parsers) gladly import support
  code for various RAW formats from other projects (if the license allows it).
  This is done to expand camera support.
  Unfortunately, not all imported code can tolerate truncated or otherwise
  damaged raw files, as well as arbitrary conditions or arbitrary data;
  not all authors handle rejecting unexpected input well.

  LibRaw is now widely used in various projects, including ImageMagick, which,
  in turn, is often used on web sites to process any input images, including
  arbitrary data from unknown users.
  This opens up wide possibilities for exploiting the various vulnerabilities
  present in the code borrowed from other projects into LibRaw. In order to
  avoid such security risks, - the borrowed code will no longer compile
  by default.
  We are not able to support it in general case, and the authors refuse
  to add code to reject unexpected input.

  Thus, if you use some kind of camera for which the support is disabled
  by default, you need to recompile LibRaw for your specific case.

  Formats currently affected:
   X3F (Foveon) file format.
    Code is imported from Kalpanika X3F tools: https://github.com/Kalpanika/x3f
    To turn the support on, define USE_X3FTOOLS

   Rapsberry Pi RAW+JPEG format.
     Code is imported from https://github.com/6by9/dcraw/,
     To turn the support on, define USE_6BY9RPI
  Format support is indicated via LibRaw::capabilities() call with flags:
    LIBRAW_CAPS_X3FTOOLS - Foveon support
    LIBRAW_CAPS_RPI6BY9 - RPi RAW+JPEG support

== GoPro .gpr format support ==
 GoPro  format supported via open-source GPR SDK
 See README.GoPro.txt for details.

== Windows support/Windows unicode (wchar_t*) filenames support ==

* (old) LibRaw's WIN32 external define split into 3 defines to fine tune
  compiler/api compatibility:
  LIBRAW_WIN32_DLLDEFS - use to compile DLLs (__dllimport/__dllexport attributes)
  LIBRAW_WIN32_UNICODEPATHS - indicates that runtime has calls/datatypes for wchar_t filenames
  LIBRAW_WIN32_CALLS - use Win32 calls where appropriative (binary mode for files, LibRaw_windows_datastream, _snprintf instead of snprintf, etc).

  If the (old) WIN32 macro is defined at compile time, all three new defines are defined in libraw.h
  If not, these defines are defined based on compiler version/libc++ defines

* LibRaw::open_file(wchar_t*) is always compiled in under Windows, but
  if LIBRAW_WIN32_UNICODEPATHS (see above) is not defined, this call will
  return LIBRAW_NOT_IMPLEMENTED.
  Use (LibRaw::capabilities() & LIBRAW_CAPS_UNICODEPATHS) on runtime
  to check that this call was really implemented (or check for #ifdef LIBRAW_WIN32_UNICODEPATHS after #include <libraw.h>)

== LibRaw*datastream simplified ==

  * tempbuffer_open, subfile_open are not used, so removed from
  LibRaw_abstract_datastream and derived classes.

  * jpeg_src() call implemented using ->read() call and own buffering
  (16k buffer).
  * buffering_off() call added. It should be used in derived classes
    to switch from buffered reads to unbuffered.

== minor/unsorted changes ==
   * new flag LIBRAW_WARN_DNGSDK_PROCESSED to indicate decoder used
   *  LibRaw::open() call, max_buf_size special meaning:
       == 1 => open using bigfile_datastream
       == 2 => open using file_datastream
   * Add support for zlib during configure
   * Fixed multiple problems found by OSS-Fuzz
   * Lots of changes in imgdata.makernotes (hope someone will document it)
   * DNG SDK could be used (if enabled) to unpack multi-image DNG files.
   * DNG whitelevel calculated via BitsPerSample if not set via tags.
   * DNG: support for LinearDNG w/ BlackLevelRepeat.. pattern
   * Generic Arri camera format replaced w/ list of specific camera models in supported cameras list.
   * new samples/rawtextdump sample: allows one to dump (small selection) of RAW data in text format.
   * samples/raw-identify:
     * +M/-M params (same as in dcraw_emu)
     * -L <file-w-filelist> parameter to get file list from a file
     * -m paramerer to use mmap'ed IO.
     * -t parameter for timing
   * samples/dcraw_emu: fixed +M handling
   * better support for Nikon Coolscan 16-bit NEF files.
   * Visual Studio project files: re-generated to .vcxproj (Visual Studio 2019), different
     intermediate folders for different sub-projects to allow 1-step rebuild.
   * imgdata.makernotes...cameraspecific: removed the vendor name prefix from variables.
   * Bayer images: ensure that even margins have the same COLOR() for both the active sensor area and the full sensor area.
   * raw processing flag bit LIBRAW_PROCESSING_CHECK_DNG_ILLUMINANT inverted and renamed to
     LIBRAW_PROCESSING_DONT_CHECK_DNG_ILLUMINANT. If not set, DNG illuminant will be checked.
   * New libraw_decoder_t flags:
      LIBRAW_DECODER_FLATDATA - in-file data could be used as is (if byte order matches), e.g. via mmap()
      LIBRAW_DECODER_FLAT_BG2_SWAPPED - special flag for Sony ARQ: indicates R-G-G2-B channel
                                        order in 4-color data
   * Camera-recorded image crop data is parsed into imgdata.sizes.raw_inset_crop structure:
	ctop,cleft,cwidth,cheight - crop size.
	aspect - LibRawImageAspects enum (3to2, 4to3, etc)
   * New define LIBRAW_NO_WINSOCK2 to not include winsock2.h on compile

   * New processing flag LIBRAW_PROCESSING_PROVIDE_NONSTANDARD_WB
   If set (default is not), and when applicable, color.cam_mul[] and
   color.WB_Coeffs/WBCT_Coeffs will contain WB settings for a non-standard
   workflow.
   Right now only Sony DSC-F828 is affected: camera-recorded white balance
   can't be directly applied to raw data because WB is for RGB, while raw
   data is RGBE.

   * New processing flag: LIBRAW_PROCESSING_CAMERAWB_FALLBACK_TO_DAYLIGHT
   If set (default is not), LibRaw::dcraw_process() will fallback to
   daylight WB (excluding some very specific cases like Canon D30).
   This is how LibRaw 0.19 (and older) works.
   If not set: LibRaw::dcraw_process() will fallback to calculated auto WB if
   camera WB is requested, but appropriate white balance was not found in
   metadata.

  * Google changes cherry-picked (thanks to Jamie Pinheiro)
  * speedup: ppg interpolate: const loop invariant

  * Bugs fixed
   -Fixed several UBs found by OSS Fuzz
   -Fixed several problems found by other fuzzers.
   - Thumbnail size range check (CVE-2020-15503)
    Thanks to Jennifer Gehrke of Recurity Labs GmbH for problem report.
   - fixed possible overflows in canon and sigma makernotes parsers
   - fixed possible buffer overrun in crx (cr3) decoder
   - fixed memory leak in crx decoder (if compiled with LIBRAW_NO_CR3_MEMPOOL)
   - fixed possible overrun in Sony SRF and SR2 metadata parsers

  * Fixed typo in longitude (member of parsed GPS structure), update required for code that uses it.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.35 2021/09/19 18:46:50 nia Exp $
d3 1
a3 1
DISTNAME=	LibRaw-0.20.2
@


1.35
log
@libraw: apply patch for CVE-2020-15503
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.34 2020/05/20 06:09:06 rillig Exp $
d3 1
a3 1
DISTNAME=	LibRaw-0.19.5
a4 1
PKGREVISION=	1
d13 1
a13 1
USE_LANGUAGES=		c c++03
a21 6
# internal/dcraw_common.cpp: In member function 'void LibRaw::xtrans_interpolate(int)':
# internal/dcraw_common.cpp:5885:27: error: array subscript has type 'char' [-Werror=char-subscripts]
#        cstat[fcol(row, col)]++;
# Maybe fix this later.
BUILDLINK_TRANSFORM+=	rm:-Werror=char-subscripts

@


1.34
log
@mark packages that fail with -Werror=char-subscripts

These packages are susceptible to bugs when confronted with non-ASCII
characters.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94182.

It takes some time to analyze and fix these individually, therefore they
are only marked as "needs work".
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.33 2020/04/26 06:38:17 rillig Exp $
d5 1
@


1.33
log
@graphics/libraw: remove unknown configure options

The text "mosa" doesn't appear in the configure script anymore.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.32 2019/08/31 14:20:05 nia Exp $
d22 6
@


1.32
log
@libraw: Update to 0.19.5

Changes:
    WB coefficients check was too strong, weakened
    Fixed possible buffer underrun in modern Samsung loader
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.31 2019/08/08 20:38:57 nia Exp $
a17 2
CONFIGURE_ARGS+=	--disable-demosaic-pack-gpl2
CONFIGURE_ARGS+=	--disable-demosaic-pack-gpl3
@


1.31
log
@libraw: Update to 0.19.4

Changes:

* CRW/metadata loop prevention code is rolled back due to ABI incompatibility. To enable, use -DLIBRAW_METADATA_LOOP_PREVENTION=1 compile flag for LibRaw and ALL APPS.
* Fixed possible buffer underflow
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.30 2019/07/16 15:45:03 nia Exp $
d3 1
a3 1
DISTNAME=	LibRaw-0.19.4
@


1.30
log
@opencv: Disable jp2 support by default

Re-enable it with the 'jasper' option.

Part of the process of trying to minimize the potential impact of a
vulnerable jasper.

Bump PKGREVISION.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.29 2019/07/10 20:27:59 nia Exp $
d3 1
a3 1
DISTNAME=	LibRaw-0.19.3
a4 1
PKGREVISION=	1
@


1.29
log
@libraw: Update to 0.19.3

2019-07-02  Alex Tutubalin <lexa@@lexa.ru>
 * Several fixes inspired by OSS-Fuzz
 * LibRaw 0.19.3
 * Note: ABI slightly changed, new variable added at end of class LibRaw
   Generally, all old code should run w/o recompile, but you're warned...

2018-12-24  Alex Tutubalin <lexa@@lexa.ru>
 * Fixed possible buffer overrun at Fuji makernotes parser
 * Fixed possible write to NULL pointer at raw2image/raw2image_ex calls.
   Details:
    a) Three different CVE numbers was assigned for single problem:
      CVE-2018-20363, CVE-2018-20364, CVE-2018-20365
    b) The POCs exploits inconsistency in Sinar-4Shot files handling.
     LibRaw 0.19 does not support this files format, so it is not
     subject of exactly same problem
    c) However, additional checks for bayer raw data presence are
     backported from LibRaw-master (development) branch.

 * LibRaw 0.19.2

2018-11-22  Alex Tutubalin <lexa@@lexa.ru>
 * Finally: got Sinar 4shot sample, works fine now
 * OpenMP critical sections for malloc/free; extra #ifdefs removed; bin/dcraw_dist could be built again using Makefile.devel
 * additional checks in parse_phase_one()
 * more checks on file offsets/tag len in parse_minolta
 * more checks in parse_ciff
 * Mempool check reworked
 * Old Leaf (16bit/3color/TIFF) support
 * Fix cameraWB->autoWB fallback
 * Polaroid x530 channel swap; get metadata pointer for Foveon files
 * Fixed Secunia Advisory SA86384
   - possible infinite loop in unpacked_load_raw()
   - possible infinite loop in parse_rollei()
   - possible infinite loop in parse_sinar_ia()
  Credits: Laurent Delosieres, Secunia Research at Flexera

 * LibRaw 0.19.1-Release

2018-06-28  Alex Tutubalin <lexa@@lexa.ru>
 * changed wrong fix for Canon D30 white balance
 * fixed possible stack overrun while reading zero-sized strings
 * fixed possible integer overflow
 * LibRaw 0.19.0-Release

2018-06-11  Alex Tutubalin <lexa@@lexa.ru>
 * Sony uncompressed/untiled DNGs: do not set bits-per-sample to 14 bit
 * Do not change tiff_bps for DNG files
 * Another possible stack overflow in kodak radc reader
 * Secunia Advisory SA83507, credits Kasper Leigh Haabb,
   Secunia Research at Flexera"
   - parse_qt: possible integer overflow
   - reject broken/crafted NOKIARAW files
 * LibRaw 0.19-Beta6

2018-05-10  Alex Tutubalin <lexa@@lexa.ru>
 * Put rogue printf's behind #ifdef DCRAW_VERBOSE
 * Exceptions was not caught in x3f_new_from_file resulting in x3f handle leak
 * packed_load_raw(): EOF check on each row
 * define LIBRAW_USE_CALLOC_INSTEAD_OF_MALLOC to use ::calloc instead of
   ::malloc in LibRaw_mem_mgr malloc calls;
   Note: realloc is not changed, so only partial fix
 * Fixed possible div by zero in EOS D30 WB data parse
 * U-suffix for filter-var manipulation consts
 * restored static specifier for utf2char() lost in previous bugfix
 * Fixed stack overrun in kodak_radc_load_raw
 * Secunia Advisory SA83050: possible infinite loop in parse_minolta()
 * LibRaw 0.19-Beta5

2018-05-03  Alex Tutubalin <lexa@@lexa.ru>
 * CVE-2018-10529 fixed: out of bounds read in X3F parser
 * CVE-2018-10528 fixed: possible stack overrun in X3F parser
 * LibRaw 0.19-Beta4

2018-04-24 Alex Tutubalin <lexa@@lexa.ru>
 * LibRaw 0.19-Beta3
 * fixed lot of bugs reported by ImageMagic/oss-fuzz
 * fixed several bugs reported by Secunia team (adv 81800,
   Credit: Laurent Delosieres, Secunia Research at Flexera)

2018-03-22 Alex Tutubalin <lexa@@lexa.ru>
 * LibRaw 0.19-Beta2
 * Better handling of broken JPEG thumbnails
 * Panasonic GH5S/G9-hires decoder, thanks to Alexey Danilchenko
   Note: ABI has changed due to this patch, so shlib version increased
 * Fujifilm X-A5/A20 metadata parsing fix
 * New error code LIBRAW_TOO_BIG: image data size excess LIBRAW_MAX_ALLOC_MB
 * winsock2 included before windows.h to make MinGW happy

2018-02-23 Alex Tutubalin <lexa@@lexa.ru>

 * LibRaw 0.19-Beta1

 * 84 cameras added compared to 0.18 (1014 total):
    Apple
	iPhone 8(*), iPhone 8 plus, iPhone X
    BlackMagic
	URSA Mini 4k, URSA Mini 4.6k, URSA Mini Pro 4.6k
    Canon CHDK hack
	 PowerShot A410, A540, D10, ELPH 130 IS, ELPH 160 IS, SD750,
	    SX100 IS,SX130 IS, SX160 IS, SX510 HS, SX10 IS, IXUS 900Ti
    Canon
	PowerShot G1 X Mark III, G9 X Mark II, EOS 6D Mark II, EOS 77D,
 	EOS 200D, EOS 800D, EOS M6, EOS M100
    Casio EX-ZR4100/5100
    DJI
	Phantom4 Pro/Pro+, Zenmuse X5, Zenmuse X5R
    FujiFilm
	S6500fd, GFX 50S, X100f, X-A3, X-A5, X-A10, X-A20, X-E3, X-H1, X-T20
    GITUP GIT2P
    Hasselblad
	H6D-100c, A6D-100c
    Huawei
	P9 (EVA-L09/AL00), Honor6a, Honor9, Mate10 (BLA-L29)
    Leica
	CL, M10, TL2
    LG
	V20 (F800K), VS995,
    Nikon
	D850, D5600, D7500, Coolpix B700
    Olympus
	E-PL9, E-M10 Mark III, TG-5
    OnePlus
	One, A3303, A5000
    Panasonic
	DMC-FZ45, DMC-FZ72, DC-FZ80/82, DC-G9 (std. res mode only), DC-GF10/GF90,
  	DC-GH5, DC-GX9, DC-GX800/850/GF9, DMC-LX1, DC-ZS70 (DC-TZ90/91/92, DC-T93),
	DC-TZ100/101/ZS100, DC-TZ200/ZS200
    PARROT
	Bebop 2, Bebop Drone
    Pentax KP
    PhaseOne IQ3 100MP Trichromatic
    Samsung
	Galaxy Nexus, Galaxy S3, S6 (SM-G920F), S7, S7 Edge, S8 (SM-G950U),
    Sony
	A7R III, A9, DSC-RX0, DSC-RX10IV
    Yi M1
    YUNEEC
	CGO3, CGO3P
    Xiaoyi YIAC3 (YI 4k)

  Note(*): for mobile phones with DNG format recording, only really tested cameras
  are added to supported camera list. Really LibRaw should support any correct DNG.

 * No more built-in support for LibRaw demosaic packs (GPL2/GPL3).
   We're unable to support this (very old code), so we'll be happy to transfer this
   code to some maintainer who wish to work with it.

   In LibRaw 0.19 we provide extension API: user-settable callbacks to be called in
   code points where demosaic pack code was called.

   -  int callbacks.pre_identify_cb(void *) => to be called in LibRaw::open_datastream
       before call to (standard) identify() function. If this call returns 1, this means
       that RAW file is identified and all metadata fields are set, so no need to run
       standard identify code.
   - void callbacks.post_identify_cb(void*) => called just after identify(), but before
       any cleanup code;
   - dcraw_process() callbacks are called before dcraw_process phases (name speaks for itself):
       	pre_subtractblack_cb, pre_scalecolors_cb, pre_preinterpolate_cb, pre_interpolate_cb,
	interpolate_bayer_cb, interpolate_xtrans_cb, post_interpolate_cb, pre_converttorgb_cb,
	post_converttorgb_cb

   All these new callbacks are called with (this) as the only arg.
   To continue LibRaw-demosaic-pack-GPLx support one need to subclass LibRaw, set needed
   callbacks in (e.g.) constructor code, than these callbacks to be called

 * Better DNG parser:
    - support for DefaultCrop Origin/Size tags (add LIBRAW_PROCESSING_USE_DNG_DEFAULT_CROP to raw_processing_options to enable)
    - better parsing for nested DNG tags (use tag from RAW IFD, fallback to IFD0 if no tag in current IFD)
    - DNG PreviewColorspace extracted into dng_levels.preview_colorspace

 * Metadata extraction:
  - Better extraction of camera measured balance (LIBRAW_WBI_Auto and WBI_Measured),
    this not the same as 'as shot' if some preset/manual tune is used.
  - Extraction of camera custom balances (LIBRAW_WBI_CustomN)
  - Nikon data compression tag extracted into  makernotes.nikon.NEFCompression
  - Hasselblad BaseISO and Gain extracted into makernotes.hasselblad
  - Canon multishot params extracted into makernotes.canon.multishot
  - lot of other vendor-specific makernotes data (see data structures definitions for details).

 * New LibRaw::open_bayer call allows to pass sensor dump w/o metadata directly to LibRaw:
     virtual int open_bayer(unsigned char *data, unsigned datalen,
	  ushort _raw_width, ushort _raw_height, ushort _left_margin, ushort _top_margin,
	  ushort _right_margin, ushort _bottom_margin,
	  unsigned char procflags, unsigned char bayer_pattern, unsigned unused_bits, unsigned otherflags,
	  unsigned black_level);
    Parameters:
     data, datalen - buffer passed
     width/height/margins - speaks for itself
     procflags:
     for 10-bit format:
      1: "4 pixels in 5 bytes" packing is used
      0: "6 pixels in 8 bytes" packing is used
     for 16-bit format:
      1: Big-endian data
    bayer_pattern: one of LIBRAW_OPENBAYER_RGGB,LIBRAW_OPENBAYER_BGGR,
                          LIBRAW_OPENBAYER_GRBG,LIBRAW_OPENBAYER_GBRG
    unused_bits: count of upper zero bits
    otherflags:
      Bit 1 - filter (average neighbors) for pixels with values of zero
      Bits 2-4 - the orientation of the image (0=do not rotate, 3=180, 5=90CCW, 6=90CW)
    black_level: file black level (it also may be specified via imgdata.params)

    see samples/openbayer_sample.cpp for usage sample (note, this sample is 'sample only', suited for
    Kodak KAI-0340 sensor, you'll need change open_bayer() params for your data).

 * Color data added/updated/fixed for many cameras

 * Correct data maximum for Fuji X-* cameras

 * Thumbnail processing:
   - JPEG thumbnails: if compiled with libjpeg, color count is extracted into imgdata.thumbnail.tcolors
   - PPM (bitmap) thumbnails: color count is set according to thumbnail IFD tag
   - PPM16 thumbnails: if LIBRAW_PROCESSING_USE_PPM16_THUMBS set in raw_processing_options, than thumbnail will be extracted
     as is, not converted to 8 bit. thumbnail.tformat is set to LIBRAW_THUMBNAIL_BITMAP16 in this case.
     Untested, because it is hard to find RAWs with 16-bit bitmaps.

== Compatibility fixes

 * struct tiff_tag renamed to libraw_tiff_tag
 * pow64f renamed to libraw_pow64f

== Bugs fixed:

 * COLOR(r,c) works correctly on X-Trans files

== Security fixes:
Secunia #81000:
Credit: Laurent Delosieres, Secunia Research at Flexera
 * leaf_hdr_load_raw: check for image pointer for demosaiced raw
 * NOKIARAW parser: check image dimensions readed from file
 * quicktake_100_load_raw: check width/height limits

Secunia #79000:
Credit: Laurent Delosieres, Secunia Research at Flexera
 * All legacy (RGB raw) image loaders checks for imgdata.image is not NULL
 * kodak_radc_load_raw: check image size before processing
 * legacy memory allocator: allocate max(widh,raw_width)*max(height,raw_height)

Secunia #76000:
 * Fixed fuji_width handling if file is neither fuji nor DNG
 * Fixed xtrans interpolate for broken xtrans pattern
 * Fixed panasonic decoder
 * LibRaw 0.18.6

Other fixes:
 * Checks for width+left_margin/height+top_margin not larger than 64k
 * LIBRAW_MAX_ALLOC_MB define limits maximum image/raw_image allocation
   (default is 2048 so 2Gb per array)
 * LibRaw::read_shorts item count is now unsigned
 * Fixed possible out of bound access in Kodak 65000 loader
 * CVE-2017-14348: Fix for possible heap overrun in Canon makernotes parser
   Credit: Henri Salo from Nixu Corporation
 * Fix for CVE-2017-13735
 * CVE-2017-14265: Additional check for X-Trans CFA pattern data
 * Fixed several errors (Secunia advisory SA75000)
 * ACES colorspace output option included in dcraw_emu help page
 * Avoided possible 32-bit overflows in Sony metadata parser
 * Phase One flat field code called even for half-size
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.28 2018/04/14 03:45:56 markd Exp $
d5 1
d25 1
a25 4
# jasper uses SIZE_MAX and friends in its headers.
CPPFLAGS+=	-D__STDC_LIMIT_MACROS

.include "../../graphics/jasper/buildlink3.mk"
@


1.28
log
@libraw: update to 0.18.8

2018-02-23  Alex Tutubalin <lexa@@lexa.ru>
Secunia #81000:
Credit: Laurent Delosieres, Secunia Research at Flexera
 * leaf_hdr_load_raw: check for image pointer for demosaiced raw
 * NOKIARAW parser: check image dimensions readed from file
 * quicktake_100_load_raw: check width/height limits
 * LibRaw 0.18.8

2018-01-29  Alex Tutubalin <lexa@@lexa.ru>
 * Checks for width+left_margin/height+top_margin not larger than 64k
 * LIBRAW_MAX_ALLOC_MB define limits maximum image/raw_image allocation
   (default is 2048 so 2Gb per array)
 * LibRaw::read_shorts item count is now unsigned

2018-01-19  Alex Tutubalin <lexa@@lexa.ru>
Secunia #79000:
Credit: Laurent Delosieres, Secunia Research at Flexera
 * All legacy (RGB raw) image loaders checks for imgdata.image is not NULL
 * kodak_radc_load_raw: check image size before processing
 * legacy memory allocator: allocate max(widh,raw_width)*max(height,raw_height)
 * LibRaw 0.18.7

2017-12-06  Alex Tutubalin <lexa@@lexa.ru>
Secunia #76000:
 * Fixed fuji_width handling if file is neither fuji nor DNG
 * Fixed xtrans interpolate for broken xtrans pattern
 * Fixed panasonic decoder
 * LibRaw 0.18.6

2017-09-22  Alex Tutubalin <lexa@@lexa.ru>
 * Fixed possible out of bound access in Kodak 6500 loader
 * LibRaw 0.18.5

2017-09-12  Alex Tutubalin <lexa@@lexa.ru>
 * CVE-2017-14348: Fix for possible heap overrun in Canon makernotes parser
   Credit: Henri Salo from Nixu Corporation
 * LibRaw 0.18.4

2017-09-09  Alex Tutubalin <lexa@@lexa.ru>
 * Fix for CVE-2017-13735
 * CVE-2017-14265: Additional check for X-Trans CFA pattern data
 * LibRaw 0.18.3

2017-03-08  Alex Tutubalin <lexa@@lexa.ru>
 * Fixed several errors (Secunia advisory SA75000)
 * ACES colorspace output option included in dcraw_emu help page
 * Avoided possible 32-bit overflows in Sony metadata parser
 * Phase One flat field code called even for half-s
 * LibRaw 0.18.2


2017-02-12  Alex Tutubalin <lexa@@lexa.ru>
 * Camera Support: Sigma Quatto H
 * Fixed bug in FujiExpoMidPointShift parser
 * Fixed wrong black level in Sony A350
 * Added standard integer types for VisualStudio 2008 and earlier
 * LibRaw 0.18.1

2016-12-27  Alex Tutubalin <lexa@@lexa.ru>
 * Licensing changes:
    - there is no 'LibRaw Software License 27032010' licensing anymore (and all signed
      agreements have expired)
    - LibRaw is now dual-licensed: LGPL 2.1 or CDDL 1.0

 * Camera support (+87):
     Apple: iPad Pro, iPhone SE, iPhone 6s, iPhone 6 plus, iPhone 7, iPhone 7 plus
     BlackMagic Micro Cinema Camera, URSA, URSA Mini
     Canon PowerShot G5 X, PowerShot G7 X Mark II, PowerShot G9 X,
       IXUS 160 (CHDK hack), EOS 5D Mark IV, EOS 80D, EOS 1300D, EOS M10, EOS M5,
       EOS-1D X Mark II
     Casio EX-ZR4000/5000
     DXO One,
     FujiFilm X-Pro2, X70, X-E2S, X-T2
     Gione E7
     GITUP GIT2
     Google Pixel,Pixel XL
     Hasselblad X1D, True Zoom
     HTC MyTouch 4G, One (A9), One (M9), 10
     Huawei P9
     Leica M (Typ 262), M-D (Typ 262), S (Typ 007), SL (Typ 601), X-U (Typ 113), TL
     LG G3, G4
     Meizy MX4
     Nikon D5, D500, D3400
     Olympus E-PL8, E-M10 Mark II, Pen F, SH-3, E-M1-II
     Panasonic DMC-G8/80/81/85, DMC-GX80/85, DMC-TZ80/81/85/ZS60,
       DMC-TZ100/101/ZS100,DMC-LX9/10/15, FZ2000/FZ2500
     Pentax K-1, K-3 II, K-70
     PhaseOne IQ3 100MP
     RaspberryPi Camera, Camera V2
     Ricoh GR II
     Samsung Galaxy S7, S7 Edge
     Sigma sd Quattro
     Sony A7S II, ILCA-68 (A68),ILCE-6300,DSC-RX1R II,DSC-RX10III, DSC-RX100V,
          ILCA-99M2 (A99-II), a6500
          IMX214, IMX219, IMX230, IMX298-mipi 16mp, IMX219-mipi 8mp, Xperia L
     PtGrey GRAS-50S5C
     YUNEEC CGO4
     Xiaomi MI3, RedMi Note3 Pro

 * Floating point DNG support:
    - new data fields:
      imgdata.rawdata.float_image - bayer float data
      imgdata.rawdata.float3_image - 3-component float data
      imgdata.rawdata.float4_image - 4-component float data
      imgdata.color.fmaximum - float data maximum (calculated from real data,
          rounded to 1.0 if below 1.0)
   - new raw processing flag
      LIBRAW_PROCESSING_CONVERTFLOAT_TO_INT - converts float data to 16-bit
        integer immediately after decoding with default parameters
   - new API Calls:
      int LibRaw::is_floating_point() returns non-zero if RAW file contains
          floating point data
      int LibRaw::have_fpdata() returns non-zero if rawdata.float*_image is not
        null
      LibRaw::convertFloatToInt(float dmin=4096.f, float dmax=32767.f,
           float dtarget = 16383.f)
        converts float/float3/float4_image to raw_image/color3/color4_image
        with or without scaling:

 * New API calls
    unsigned LibRaw::capabilities and C-API libraw_capabilities()
    allows developers to determine LibRaw compile flags at runtime.
    Returns ORed bit fields:
    LIBRAW_CAPS_RAWSPEED - LibRaw was compiled with RawSpeed Support
    LIBRAW_CAPS_DNGSDK - LibRaw was compiled with Adobe DNG SDK
    LIBRAW_CAPS_DEMOSAICSGPL2, LIBRAW_CAPS_DEMOSAICSGPL3 - LibRaw was compiled with
      demosaic packs (GPL2/GPL3)

 * More metadata parsed:
    - White balance coefficients stored in the raw file are extracted into:
     int imgdata.color.WBCoeffs[256][4] - array indexed by EXIF lightsource type
        for example, WBCoeffs[21][..] contains coefficients for D65 lightsource
     float imgdata.color.WBCT_Coeffs[64][5] contains white balance data specified
       for given color temperature: WBCT_Coeffs[i][0] contains temperature value,
       and [1]..[4] are WB coefficients.
    - DNG analog balance, per-channel black/white level, and forward matrix
    - vendor specific metadata stored in vendor-specific data structures

 * new C-API calls:
    void libraw_set_user_mul(libraw_data_t *lr,int index, float val);
    void libraw_set_ca_correction(libraw_data_t *lr,int ca_correc,
           float ca_red, float ca_blue);
    void libraw_set_cfalinenoise(libraw_data_t *lr,int cfaline, float linenoise);
    void libraw_set_wf_debanding(libraw_data_t *lr, int wf_debanding,
           float wfd0, float wfd1, float wfd2, float wfd3);
    void libraw_set_interpolation_passes(libraw_data_t *lr,int passes);
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.27 2018/02/01 10:27:38 jperkin Exp $
d3 1
a3 1
DISTNAME=	LibRaw-0.18.8
@


1.27
log
@libraw: Specify C++03, not C++11 clean.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.26 2017/08/16 20:21:09 wiz Exp $
d3 1
a3 1
DISTNAME=	LibRaw-0.17.2
@


1.26
log
@Follow some http redirects.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.25 2016/12/17 14:23:55 joerg Exp $
d13 1
a13 1
USE_LANGUAGES=		c c++
@


1.25
log
@Deal with Jasper's dependency on the limit macros.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.24 2016/06/19 05:04:57 markd Exp $
d6 1
a6 1
MASTER_SITES=	http://www.libraw.org/data/
d9 1
a9 1
HOMEPAGE=	http://www.libraw.org/
@


1.24
log
@Update libraw to 0.17.2

plus gcc6 fix to dcraw_common.cpp

LibRaw 0.17.2
* strncpy usage was not compatible with glibc bounds check
LibRaw 0.17.1
* fixed two errors found by AlphaFuzzer
* phase_one_correct always returns value; handle P1 return codes in
  postprocessing
LibRaw 0.17.0
* Fixed dcraw.c ljpeg_start possibly buffer overrun
* fixed several bugs detected by using American Fuzzy Lop
* C-API extension to support 3DLut Creator
* More metadata parsing/extraction:
  XMP packet extracted (if exists)
  DNG Color information parsed
  GPS data (partially) parsed
  EXIF/Makernotes parsed for used optics (for both RAW files and DNG
  converted by Adobe convertor).
* Exif/Makernotes parser callback (called for each processed tag)
* Sony ARW2.3 decoder:
  params.sony_arw2_hack removed, decoded data are always in 0...17k range
   (note the difference with dcraw!)
  Additional processing options for Sony lossy compression techincal
   analysis.
* Dcraw 9.26 imported (but some changes not approved because Libraw do it
  better) with some exceptions:
  no Pentax K3-II frame selection code
  no built-in JPEG decompressor
* Many improvements in data decoding/processing:
  Correct decoding of black level values from metadata for many formats,
  LibRaw do not rely on hardcoded black levels.
* 224 camera models added to supported camera list. Some of them are new
  (released since LibRaw 0.16 come out), some was supported before, but
  missed from the list.
* Fujifilm F700/S20Pro second frame support
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.23 2015/07/18 10:40:20 adam Exp $
d24 3
@


1.23
log
@Changes 0.16.2:
Fixed several bugs detected by running American Fuzzy Lop
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.22 2014/11/17 19:04:25 joerg Exp $
d3 1
a3 1
DISTNAME=	LibRaw-0.16.2
@


1.22
log
@Don't force linking against libstdc++, it might not exist. Bump
revision.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.21 2013/05/26 09:07:34 adam Exp $
d3 1
a3 1
DISTNAME=	LibRaw-0.15.1
a4 1
PKGREVISION=	1
a16 2
#MAKE_JOBS_SAFE=		no

d24 1
d26 1
@


1.21
log
@Changes 0.15.1:
Incorrect data maximum calculations for Panasonic files were fixed. A possible buffer overrun in exposure correction code is now checked.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.20 2012/10/10 13:06:14 drochner Exp $
d5 1
@


1.20
log
@switch to lcms2, bump PKGREV
@
text
@d1 1
a1 2
# $NetBSD: Makefile,v 1.19 2012/10/06 14:11:05 asau Exp $
#
d3 3
a5 4
DISTNAME=		LibRaw-0.14.7
PKGNAME=		${DISTNAME:tl}
PKGREVISION=		1
CATEGORIES=		graphics
d13 2
a14 2
USE_LANGUAGES=	c c++
GNU_CONFIGURE=	yes
d16 2
a17 2
USE_LIBTOOL=	yes
MAKE_JOBS_SAFE=	no
@


1.19
log
@Drop superfluous PKG_DESTDIR_SUPPORT, "user-destdir" is default these days.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.18 2012/08/04 14:36:42 drochner Exp $
d6 1
d28 1
a28 1
.include "../../graphics/lcms/buildlink3.mk"
@


1.18
log
@update to 0.14.7
This switches to the new major release.
The most significant change of this version is multiple rendering
of same RAW data without re-opening RAW file.
So, it is possible to implement near-realtime preview of entire image in
half-resolution mode and realtime preview of selected area (e.g. around
mouse pointer position) in full-resolution mode.
+Support for more cameras
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.17 2011/10/24 17:14:05 gls Exp $
a13 2
PKG_DESTDIR_SUPPORT=	user-destdir

@


1.17
log
@Revert previous to unbreak graphics/shotwell.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.15 2011/09/12 18:06:22 drochner Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.13.8
@


1.16
log
@Upgrade graphics/libraw to 0.14.2

Upstream changes:

LibRaw 0.14.2 (19-10-2011)

        Fixed bug in Canon 1D and 1Ds files decoding.
        New decoder information bit DECODER_HASRAWCURVE

LibRaw 0.14.1 (11-10-2011)

        Imported dcraw 9.11/1.445:
            Support for new cameras added: Fujifilm
	     F600EXR, Nikon P7100, Olympus E-PL3 and
	     E-PM1, Panasonic DMC-FZ150, Sony NEX-5N,
	      A65 and A77.
            Updated color data for: Olympus E-P3,
	     Panasonic G3 and GF3, PhaseOne H25, P40
	     and P65, Sony NEX-C3, NEX-5, NEX-3, A35 and A55.
            Support for dark frame extraction on Sony cameras.
        DCB demosaicing: reserving 6 pixels instead of 3 to suppress colored
	 image frame.

LibRaw 0.14.0 (21-09-2011)

        Multiple rendering (LibRaw::dcraw_process() calls) allowed without
 	 re-opening RAW file thrfough the sequence of open()/unpack() calls.
        You should be able to change any processing parameters (except
	 shot_select parameter) between dcraw_process() calls.
            New sample in samples/multirender_test.cpp: renders data 4 times:
	     in half and full modes with different white balance settings.
            Unprocessed RAW data is stored in separate data buffer: (2 bytes
	     per pixel for all Bayer-pattern images, 8 bytes per pixel for
	     Foveon, sRAW, and other full-color raw formats), so now LibRaw
	     uses 25% more memory for full processing of most common Bayer
	     images; while for just unpack memory is reduced 4 times.
	    New call LibRaw::raw2image() fills imgdata.image array with
	     fresh copy of data. There is no need to call raw2image()
	     separately if you use dcraw_process() or dcraw_document_mode_processing()
	     calls.
	    New call LibRaw::get_decoder_info() to determine raw data storage
	     layout. See samples/unprocessed_raw.cpp for an example of how to
	     use it.
    	    New call LibRaw::free_image(), deallocates imgdata.image buffer.
	     Use this call if current postprocessing results are not needed,
	     but it is to early to call recycle() because dcraw_process()
	     may be called later.
    	    New C-API calls libraw_raw2image() - C API for LibRaw::raw2image()
	     libraw_free_image() - C API for LibRaw::free_image()
	     libraw_get_decoder_info() - C API for LibRaw::get_decoder_info()

If your code uses usual open()/unpack()/dcraw_process() call sequence, then
 NOTHING CHANGED: your program should produce same results. For interactive
 programs you may skip open()/unpack() calls after adjusting processing parameters,
 so user should see image refreshed much faster.

If your code uses raw data (open+unpack calls), you need to call
 LibRaw::raw2image(), and imgdata.image will contain same bitmap as in LibRaw 0.13.x

If you code uses access to masked borders data, you need to rewrite it. See
 samples/unprocessed_raw.cpp as a sample.

Other changes:

    No separate imgdata.masked_pixels buffers, Bayer raw formats are read to
     buffer with borders. So, no ugly add_masked_border_to_bitmap() call.
    No filtering_mode parameter. Raw tone curve is applied at unpack() stage;
     zero pixels removed on postprocesing stage.
    unprocessed_raw and 4colors samples are adjusted to use new RAW data
     storage layout.
    OpenMP speedup of postprocessing steps (up to 50% for half mode and
     4-core machine)
    Most of LibRaw_datastream function bodies are moved to separate source file
    LibRaw_windows_datastream is merged to main source tree
    Imported dcraw 9.10 (1.444), support for new cameras added: ARRIRAW format,
     Canon SX30 IS, Leica D-LUX 5 and V-LUX2, Olympus E-P3, Panasonic G3 and GF3,
     Sony NEX-C3 and SLT-A35
    Support for RedOne digital movie cameras (R3D format). To enable this
     support you need to:
        install libjasper JPEG2000 support library
        compile LibRaw with -DUSE_JASPER compiler switch
         (./configure will do it for you)
        If you use own LibRaw_datastream implementation, you should implement
         make_jas_stream() call for your datastream. See bottom of
         src/libraw_cxx.cpp for implementations in datafile and mem-buffer LibRaw
         streams.

Bugfix: green matching is turned off if output image is shrinked due to wavelet
 filtering or aberration correction.
Removed imgdata.sizes.bottom_margin and right_margin data fields use
 imgdata.sizes.raw_width - width - left_margin to get right one, the same
 with bottom_margin.
Minor ./configure cleanup
Qmake files and Visual Studio Project files are updated.
New version check macroses.
Documentation changed to reflect 0.14 changes.
Removed LibRaw::rotate_fuji_raw() call and corresponding C-API call.
The LibRaw::adjust_sizes_info_only() call may be called repeated and mixed
 with dcraw_process() calls.
Postprocessing speedup and optimization, especially if cropping set.
Cropping works for FujiCCD raws. For the technical reasons, the position of
 top-left corner of crop area will be rounded to the nearest multiple of 4
 (the corner is shifted top-left).
New sample samples/postprocessing_benchmark.cpp This sample measures
 postprocessing speed. All demosaic methods, averaged white balance,
 median filtering, wavelet filtration, highlight recovery, and cropping
 are supported.

all client code should be recompiled due to internals change.
@
text
@d4 1
a4 1
DISTNAME=		LibRaw-0.14.2
@


1.15
log
@update to 0.13.8
changes:
-Imported dcraw 9.10 (1.444)
-Bugfix: green matching is turned off if output image is shrinked due to
 wavelet filtering or aberration correction
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.14 2011/07/31 17:33:54 gls Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.13.8
@


1.14
log
@Update graphics/libraw to 0.13.7.

Upstream changes:
* Changes in cropping code:
  o cropping is now works for Fuji files (instead of crash)
  o bad pixels map and dark frame subtraction is turned off if cropping enable
  o for technical reasons, coordinates of top-left corner of crop box are
rounded to multiple of 4 for Fuji files.
* ./configure stuff fixes:
  o install static libraries only when --enable-static is set
  o compiled samples are dynamically linked if shared library not disabled.
* OpenMP enabled for Visual Studio 2008 SP1+, but not for RTM
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.13 2011/07/12 18:57:37 drochner Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.13.7
@


1.13
log
@update to 0.13.6
changes: several minor and cosmetic changes
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.12 2011/05/29 17:55:58 gls Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.13.6
@


1.12
log
@Update graphics/libraw to 0.13.5

LibRaw 0.13.5 add supports for several new cameras.

Changelog:

    * Imported new dcraw 9.08/1.443:
          o New color data for Canon 600D and 1100D, Fuji S200EXR
          o New cameras supported: Fuji HS20EXR and F550EXR, Kodak Z990, Nikon
D5100, Olympus E-PL1s and XZ-1, Samsung NX11, Sony A230 and 290.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.11 2011/04/05 18:08:46 drochner Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.13.5
@


1.11
log
@update to 0.13.4
changes:
-imported dcraw 9.07/1.442, support for more cameras
-bugfixes
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.10 2011/03/09 17:19:19 drochner Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.13.4
@


1.10
log
@update to 0.13.2
changes:
-shared library support
-Sony A390 support
-Fixes for Leica D-LUX 4 and some Sony cameras

approved by Guillaume Lasmayous
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.9 2011/02/16 22:17:36 gls Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.13.2
@


1.9
log
@Updated graphics/libraw to 0.13.1

Upstream changes:

LibRaw 0.13.1 (2011-02-08)
* dcraw_emu documentation updated
* ./configure stuff changed for correct linking on some systems
* FBDD denoising is disabled for full-color images and 4-color bayer data
(including forced 4-color via four_color_rgb option)

LibRaw 0.13.0 (since 0.12.x) (2011-02-06)
* New low-level buffering code for Huffman decompression. Canon CR2 files are
opened about 1.5x times faster than on LibRaw 0.12, other huffman-comressed
files unpacks in 1.2-1.3 times faster.
* New exposure correction code based on linear-cubic root combination.
Correction range is from 0.25 (-2 stops) to 8 (+3 stops)
* All 0.12.x features, including new cameras support and half-size/green-matching
fixes.
* Changes and additions in demosaic-pack-GPL3 (all imported from RawTherapee):
 o Banding suppression code.
 o High-frequency noise suppression.
 o Green channels local averaging to suppress maze artifacts.
 o OpenMP speed-up in median filters (demosaic pack GPL2)
 o OpenMP speed-up in green equilibration (demosaic pack GPL3)
* Bug fixes and improvements:
 o Better parsing of unknown command-line params in dcraw_emu sample
 o Brigtness table in ahd_demosaic is calculated in reversed order to prevent
possible (very unlikely) multithreaded app problem.
 o Fixed file extension in half_mt.c sample.
 o Fixed incomplete data fields reset in LibRaw::recycle()
 o Patches for ./configure system for better LCMS2 support
 o math.h included before any other includes to make KDE compile with Visual
C++ happy
 o Fuji FinePix S5500 size adjusted to ignore (rare?) garbage at top of frame.

LibRaw 0.12.4 (2011-02-05)
* Fixed green matching/half-size incompatibility.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.8 2011/02/03 21:38:07 gls Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.13.1
d19 1
@


1.8
log
@Update graphics/libraw to 0.12.4

Upstream changes:

Imported dcraw 9.06/1.440:

* Added camera support for: Canon S95, Casio EX-Z1080, Panasonic GF2 and GH2,
Samsung NX100, Sony A-580
* Updated color data for: Canon G12, Nikon D3100, D7000 and P7000, Olympus E-5,
Pentax K-r and K-5, Samsung NX10 and WB2000
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.7 2011/01/11 19:50:17 gls Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.12.4
@


1.7
log
@Update to 0.12.3

Upstream changes:

Changes in ./configure system for better LCMS2 support
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.6 2010/12/22 16:02:18 gls Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.12.3
@


1.6
log
@Update to 0.12.1

This version fixes crashes on files from Sigma DPx compact cameras.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.5 2010/12/18 23:50:58 wiz Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.12.1
d21 4
@


1.5
log
@Not make-jobs-safe. (Wants to link against libraw before it is completely
built when run with -j16.)
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.4 2010/12/13 20:32:30 gls Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.12.0
@


1.4
log
@Update libraw to 0.12.0

Complete changelist:

* DCB interpolation and FBDD denoising integrated into main LibRaw.
* Two addtional demosaic packs:
o GPL2-licensed: AFD, LMMSE, VCD, Modified AHD and AHD+VCD interpolations.
Additional median filters from 'Modified DCRAW' package. Foveon support also
included in this pack.
o GPL3-licensed: AMaZE interpolation and chromatic aberrations correction from
RawTherapee
* LCMS 2.x support
* New ./configure script, based on GNU autotools.
* Bugfixes:
o Fix in green_matching code to support nonstandard Bayer pattern
o Fixed bug in add_masked_borders_to_bitmap() call for cameras with masked
border composed of odd number of pixels.
* New command line options for unprocessed_raw sample: -B - subtract black
level, -M - add masked pixels to bitmap.
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.3 2010/12/02 15:35:56 wiz Exp $
d19 1
@


1.3
log
@Update to 0.11.3:

2010-11-17 Alex Tutubalin <lexa@@lexa.ru>
	* Nikon P7000: color matrix data and black level patch for ISO >=400
	  Thanks to Gunnar Thorburn
        * Support for several industrial cameras based on Sony ICX 625/655
	  sensor: JAI BB500CL/GE, SVS625CL, ptGrey GRAS-50S5C
	  Thanks to kaare
	* LibRaw 0.11.3
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.2 2010/11/15 19:52:55 drochner Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.11.3
d12 1
a12 1
LICENSE=	gnu-lgpl-v2.1
d17 2
a18 2
HAS_CONFIGURE=	yes
CONFIGURE_ARGS=	-P ${PREFIX}
d20 2
a21 14
SUBST_CLASSES+=		pc
SUBST_STAGE.pc=		post-configure
SUBST_MESSAGE.pc=	Fixing prefix and version in raw.pc file.
SUBST_FILES.pc=		raw.pc
SUBST_SED.pc=		-e 's,@@@@PREFIX@@@@,${PREFIX},'
SUBST_SED.pc+=		-e 's,@@@@VERSION@@@@,${PKGVERSION_NOREV},'

INSTALLATION_DIRS+= lib/pkgconfig

pre-configure:
	${CP} ${FILESDIR}/raw.pc ${WRKSRC}

post-install:
	${INSTALL_DATA} ${WRKSRC}/raw.pc ${DESTDIR}${PREFIX}/lib/pkgconfig
d23 1
@


1.2
log
@fix "vi" artefact
@
text
@d1 1
a1 1
# $NetBSD: Makefile,v 1.1.1.1 2010/11/15 18:59:38 gls Exp $
d4 1
a4 1
DISTNAME=		LibRaw-0.11.2
@


1.1
log
@Initial revision
@
text
@d1 1
a1 1
# $NetBSD$
d25 1
a25 1
SUBST_SED.pc+=		-e 's,@@@@VERSION@@@@,${PKGVERSIONi_NOREV},'
@


1.1.1.1
log
@Import libraw 0.11.2 into the NetBSD Packages collection.

LibRaw is a library for reading RAW files obtained from digital photo
cameras (CRW/CR2, NEF, RAF, DNG, and others).

LibRaw is based on the source codes of the dcraw utility, where part of
drawbacks have already been eliminated and part will be fixed in future.
The users of the library are provided with API to be built into their
software programs.

@
text
@@
