diff options
| author | Carl Hetherington <cth@carlh.net> | 2017-12-29 22:51:50 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2017-12-29 22:51:50 +0000 |
| commit | a5ea5c0d2637dd41e3d356cb62cac75b8cadf8ce (patch) | |
| tree | 45ed553eeaf52a58dea79f66ab6345df1c1657d0 /src/lib/j2k_image_proxy.cc | |
| parent | 1701be8b9173c675169b5739fbd94f5e6f8d07d1 (diff) | |
Add basic memory-used stuff for butler and reduce minimum audio
readahead quite a bit. This in turn reduces the maximum butler memory
usage as it will keep getting audio (and hence video) until the
minimum audio readahead is hit.
Diffstat (limited to 'src/lib/j2k_image_proxy.cc')
| -rw-r--r-- | src/lib/j2k_image_proxy.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lib/j2k_image_proxy.cc b/src/lib/j2k_image_proxy.cc index a60af1eb2..2489a9499 100644 --- a/src/lib/j2k_image_proxy.cc +++ b/src/lib/j2k_image_proxy.cc @@ -212,3 +212,14 @@ J2KImageProxy::J2KImageProxy (Data data, dcp::Size size, AVPixelFormat pixel_for { } + +size_t +J2KImageProxy::memory_used () const +{ + size_t m = _data.size(); + if (_decompressed) { + /* 3 components, 16-bits per pixel */ + m += 3 * 2 * _decompressed->size().width * _decompressed->size().height; + } + return m; +} |
