Skip to content

Commit

Permalink
feat(raw): raw reader - exposing max_raw_memory_mb (#4454)
Browse files Browse the repository at this point in the history
PR is to address
#3881
feature request. The reported wanted to expose
`imgdata.rawparams.max_raw_memory_mb` as `raw:max_raw_memory_mb`

---------

Signed-off-by: Ankit Sinha <[email protected]>
  • Loading branch information
ankmachine authored Sep 30, 2024
1 parent c1318c1 commit 8bfa994
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/doc/builtinplugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2179,6 +2179,11 @@ options are supported:
0 - do not use FBDD noise reduction, 1 - light FBDD reduction,
2 (and more) - full FBDD reduction
(Default: 0)
* - ``raw:max_raw_memory_mb``
- int
- Maximum memory allocation for processing of raw images. Stop processing if
raw buffer size grows larger than that value (in megabytes).
(Default: 2048)


|
Expand Down
5 changes: 5 additions & 0 deletions src/raw.imageio/rawinput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,11 @@ RawInput::open_raw(bool unpack, const std::string& name,
// Output 16 bit images
m_processor->imgdata.params.output_bps = 16;

// Exposing max_raw_memory_mb setting. Default max is 2048.
m_processor->imgdata.rawparams.max_raw_memory_mb
= config.get_int_attribute("raw:max_raw_memory_mb", 2048);


// Disable exposure correction (unless config "raw:auto_bright" == 1)
m_processor->imgdata.params.no_auto_bright
= !config.get_int_attribute("raw:auto_bright", 0);
Expand Down

0 comments on commit 8bfa994

Please sign in to comment.