mirror of
https://github.com/storytold/effectcraft.git
synced 2026-11-20 09:05:51 +00:00
Footage cache (#3271): decoded OpenEXR channels persist in the disk cache
A plane kind in the disk cache (planes/): named f32 planes, bit-exact, keyed by the source file's path and identity, the channel set, the level and the rows; listing their source file, so a changed file or Reload Footage drops them (the sweep covers planes). The plane store reads them before decoding and queues what it decoded (encoded on the writer thread, refused when the disk has no room or the file was dropped since the decode began). The footage source gets the disk cache with set_disk_cache.
This commit is contained in:
1 parent
2ff51655e3
commit
8a3b15d41b
8 files changed
+260
-13
No files matched your search
@@ -116,6 +116,7 @@ pub(crate) fn name_of(kind: Kind, key: u128) -> String {
|
||||
Kind::Frame => disk_cache::entry_name(key),
|
||||
Kind::Layer => format!("layers/{}", disk_cache::entry_name(key)),
|
||||
Kind::Matte => format!("mattes/{}", disk_cache::entry_name(key)),
|
||||
Kind::Plane => format!("planes/{}", disk_cache::entry_name(key)),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,6 +127,9 @@ fn parse_name(name: &str) -> Option<(Kind, u128)> {
|
||||
if let Some(n) = name.strip_prefix("mattes/") {
|
||||
return Some((Kind::Matte, disk_cache::parse_entry_name(n)?));
|
||||
}
|
||||
if let Some(n) = name.strip_prefix("planes/") {
|
||||
return Some((Kind::Plane, disk_cache::parse_entry_name(n)?));
|
||||
}
|
||||
Some((Kind::Frame, disk_cache::parse_entry_name(name)?))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user