Repository navigation
Conversation
|
Pushed For it the UI crate takes Found while checking these pull requests against #1360 (Arabic). Nothing else in this stack needed changing for it. |
|
Pushed The scenario Not changed, and still ASCII only: the custom crop aspect fields, the date picker, and the fields that use egui's own number parser (rules editor, capture-time shift, renaming's start number, contact sheet columns and rows). One of the items in #1395. Merged up into #1378 and #1379. |
…thing in it runs off the side General was 970 pt wide and the other tabs about 600, because a row of controls never wrapped and the widest row set the window's width; the window was also as tall as each tab's content, so it moved up and down between tabs and the tabs moved under the pointer. In a 900 pt wide app window the row labels and the Close button of General were off screen at the left, and a long library path made the window wider than the screen. - settings::window draws the tab bar, which stays put, above the page of the open tab, which scrolls: 560 pt wide and up to 640 pt tall whatever the page holds, less when the app window is smaller. Each page keeps a scroll position of its own, and one that goes on below shows its scroll handle without the pointer on it. It is still drawn in the scroll area every dialog has, which has nothing to scroll; in a window with under 120 pt for the page (far below the desktop minimum) that area scrolls tabs and page together, as before. - A row's controls wrap in the room beside the label, further lines starting under the first control, and a label longer than its column wraps in it (Forget unchanged photos pushed its choices 8 pt out of line). - Paths are one line, shortened from the front after either kind of separator, with all of the path in a tooltip only when it was cut: Library > Location, the folder Auto Import watches (it wrapped over several lines), the smart previews folder (it lost its end, and had two tooltips) and a monitor profile's file. row(), choices() and TABS keep their signatures, the match on the tab is where it was and the shared dialog code changes by one call, so the open pull requests that add tabs and rows still merge. Below 640 pt of app window a row holding a 240 pt field can still be wider than the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ore reading it The row is at the foot of Import. With more sections above it (another pull request adds one) it is below the fold of the 640 pt page, and a row that is not drawn has no text to read: the test failed for the page's length, not for the path. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… or has the focus shows
One widget drew the tab bar and every row of choices: on General the
languages read as a second tab bar. What was chosen differed from what was
not by its fill alone, 1.35 to 1.56:1 in the four themes, and a tab or choice
reached with Tab showed nothing (the frame with and without the focus was
the same, pixel for pixel).
- widgets::tab_button: a tab is its name on the window, a size up from the
headings inside a page, the open one in the text colour over a 2 pt line
of that colour; no border, no fill. Each line of tabs stands on a 1 pt
line the width of the window, so the open tab's line never hangs over the
names below when the tabs take two lines (a narrow window, or Russian at
full width).
- widgets::choice_button, used by settings::choices: the chosen option keeps
its fill and is outlined in the label colour (5.5:1 or more against its
fill, a button and the window in every theme), and is a radio button to a
screen reader. The Export dialog's own rows of choices are as they were.
- Both, and text_button wherever it is used, show a ring while they have the
keyboard focus: 2 pt in the text colour with a 1 pt line of the surface's
colour inside it, within their rect. A double line, where a chosen option
has a single thin one, so the two are told apart by shape. Tab, the arrow
keys, Space and Return already worked.
Widget ids are as they were (button:settingsTab-{id}, button:{id}-{index}).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…Esc in its text boxes gives the text back
- Clear Cache and a model's Remove (Faces, AI Denoise) open a small panel
under the button that says what the action costs, with the action and Keep
(settings::ask_first; {id}:confirm, {id}:keep). Keep has the focus, so
Return alone changes nothing; Esc or a click elsewhere answers no. They
acted on one click: a cache that takes hours to make again in a large
library, a model that is a 261 MB download.
- Smart previews: "Delete them" was a choice made beforehand that a later
press of Choose Folder or Use Library Folder carried out without a word.
The change now waits, says how many smart previews would go and what they
are for, and is made on Delete and Change Folder or dropped on Cancel. The
choice and a waiting change are kept from one frame of the section to the
next only, for the library and folder they were made in (SmartAsk): closing
Settings, another tab, another library, or the folder changed some other
way leaves nothing chosen or asked, and the choice goes back to "Move
them" after any change.
- The text boxes of Settings go through settings::field: Esc gives the text
back and is used up by that, so Settings stays open. Copyright, Creator and
the Auto Import album become the project's TextField; Esc there used to
save what was typed (the box lost the focus) and close the window.
- A tab clicked opens on the next frame, so the page being left is drawn
once more and Copyright or Creator saves what was typed; it was dropped.
- The album box keeps its text per library (one library's album name could
be written into another's).
- Automatically write changes into XMP sidecars has a line saying what is
written where.
The lines that run the commands (let _ = app.run(..)) and the ones next to
them are as they were: storytold#1153's sweep of those lines still applies.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… to do
General held the library's location beside the language and the external
editors; XMP sidecar writing, which governs every later edit, sat under
Import; forgetting unchanged photos and the smart previews folder, which
are the library's own, under Performance. "Display" was the monitor's
colour profile and "Interface" how LightCraft looks.
- Library (new, `library`): where the library is, opening or making
another, where its smart previews are kept, and Local folders.
- Files (new, `files`): XMP sidecars and External Editing.
- General keeps Language, Startup and Culling; Import keeps what happens to
photos as they come in; Performance keeps Rendering and Thumbnail cache.
- Display is labelled Monitor and Interface is labelled Appearance
(settings::tab_label). Their ids, and every other tab id, are as they
were: `app.settings {tab}` from agents, scripts and the rest of the app
opens what it opened.
- What is saved with the library says, in a library that is in memory, that
it will not last, on each tab that holds such settings.
- A section's heading is registered as `heading:{its English name}`
whatever the language (i18n::source_of).
- Files and Monitor are in the nine catalogs.
No section's code moved. The tab functions are split where their sections
begin by inserting the end of one function and the start of the next, and
the tabs call the sections: the lines other open pull requests change are
where they were. Controls keep their widget ids.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… they click it Library is a long page once it also holds Backups (another pull request): the smart previews buttons are then below the fold of the 640 pt page, where a control is not drawn and a click on its place goes nowhere. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…er tab it is
Finding a setting meant knowing or guessing its tab, and reading each of
nine.
- A filter box (field:settingsFilter) is above the tabs. With something
typed, the page gives way to the sections that have every word typed, each
a row with its tab and heading and the first texts of it that match
(settingsFound:{tab}:{section}); no tab is marked open meanwhile.
- A click on a row, Return or Space with the focus on it, or Return in the
filter (the first row) opens that section's tab, empties the filter and
scrolls the section's heading to the top of the page. Down in the filter
goes to the first row.
- Esc with something typed empties the filter and is used up by that,
whether the focus is in the box or on a row; a second Esc closes Settings.
Opening a tab empties it; Settings opened again starts empty.
- What is looked through is read, not kept by hand: every tab's page is
drawn once in an egui context of its own (settings::sections), and each
text drawn belongs to the heading above it. Tab and section names, labels,
buttons and explanations are all there, in the language shown, and
whatever another change adds to a page is found without a word here. It is
read afresh each time the filter is used, so what is found is what the
pages show then. Nothing of that drawing reaches the screen, the widget
list or the window's own memory; it asks what opening each tab asks and
changes no setting. The choices of a closed list and tooltips are not
drawn, so not found.
- The three new sentences are in the nine catalogs.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…section has "sidecar" is also in the Read from photos section another pull request adds to Import, so the tests look for "sidecar names" and a sentence of the XMP hint. The test of a page's remembered scroll reads where the glide comes to rest: on a longer page it was still under way when read. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sections Another pull request adds a section to Appearance: the test says every section found is on that tab, and that one which does not say the word itself is among them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…n every language it has - Tokens::legible gives a colour as it is where it stands the ratio asked for against the surface it is on, and moved toward the text colour until it does where a theme's value is too close. Settings uses it for its explanations (4.20:1 in Charcoal, 4.33:1 in Silver), what the filter found, "In Use" and the outline of the theme card in use (2.9:1 and 2.6:1 in Charcoal), the caution and reject colours as text, and the dim text, cautions and accent of the AI Denoise page: text stands 4.5:1. - settings::legible_controls does the same for what says where a control is, in the window and in the panel a question opens: the borders of text boxes, checkboxes, radio buttons and buttons (1.6 to 1.7:1), a text box in use, and placeholder text (under 4.3:1 in every theme). A choice that is not the chosen one has the same border (widgets::choice_button), and the line under the tabs (1.2 to 1.4:1) stands 3:1. - A colour that read already is unchanged, and the tokens keep their values for the rest of the app. - The hint under External Editing had a menu path with an arrow the fonts lack, which drew as empty boxes; it uses ">". - 27 names and sentences of Settings that no catalog had are in all nine, with the three menu items that hint names (Edit In, Edit in PhotoCraft, Edit in Other Editor); "memory only", "(library default)" and "starting…" go through translation. The Faces page's model rows keep their colours and their strings that bypass translation: storytold#1190 changes those lines. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…st, and shows why Either spelling of a word finds the other, and words a section does not say find it (trash for Culling). A section named for the word comes before one that mentions it, so Return opens the best match. The line under a result starts shortly before the word found, which is drawn stronger; folder paths are not looked through. The filter has the focus when Settings opens, and the heading of the section opened is marked for a moment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… either spelling
"colou", on the way to "colour", found nothing once texts were compared as "color": a
word now counts as typed or in the other spelling. What is typed into a text box of
Settings (an editor's path) is not looked through, and what stands in words where a folder
would ("In memory") is again. The mark on the section landed on goes when its tab is left,
however that is done. The words given to sections are tested against the sections drawn.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he whole word does "colou" found only the texts that say "colour", not those that say "color" or the sections given it, and "catalogu" found nothing: past where the two spellings part, a word still being typed is compared as the one the filter compares in. The release note says that an empty text box's own words are not looked through either. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…der it, and the word is drawn whole The line under a result was cut into pieces at the letters found, each piece in a format of its own (dimmer text, the letters found in the text colour and a heavier weight). epaint shapes each piece by itself, so a match inside a word lost the kerning across the cuts, and in Arabic left the letters either side of them unjoined. The line is now one piece of text in one format. The letters found have a fill behind them and a line under them, a rectangle per stretch per row, placed from the galley's glyphs (a word written from right to left has its glyphs back to front, and is read by the char each glyph says it draws). The line under them is there because the heavier weight is gone: the fill alone would be told by its colour only. The line of text is in one colour, legible on the fill too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…or the focus Tab stops once at the tab bar and once at each row of choices, at the one that is open or holds; the arrow keys, Home and End move inside (widgets::Roving). A checkbox, button, list, radio button or text box that has the focus is ringed 2 pt in the text colour, as a tab or a choice is. A theme's favourite star is a Tab stop whether or not the theme is a favourite. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… row of Settings On the frame the focus came to a button of a row, egui had no filter for it yet and looked for the nearest control in the arrow's direction: a second arrow on the next frame could leave the row for the tab bar. A click on a tab or a choice no longer leaves it ringed as if the keyboard had come to it, an arrow held with a modifier is left alone, and a theme's radio button with the focus is ringed round the whole of it, as a checkbox is. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The interface drew its text in 17 sizes from 8.5 to 20 pt, 102 of 237 uses on half points: a slider's name at 12.5 pt beside a checkbox's 13, a caption at 11 in Settings and 11.5 in Info, panel titles at 13.5, 14, 15 and 17. - theme::TextSize names seven sizes a point or more apart (10 micro, 11 caption, 12 label, 13 body, 14 title, 15 panel title, 18 display), with t.caption(), t.body_strong() and the like for each in both faces. - t.font(n) and t.semibold(n) keep their signatures and give the size of the scale nearest n (of two equally near, the one nearer body), so code that asks by number is on the scale too. - The call sites that were off the scale or set a size past the theme name the size their job has. The smallest text is 10 pt (was 8.5). - cargo xtask type (in ci) refuses a size given in numbers past the theme, and counts the sizes asked of it off the scale (--list names them). Tests: tests_type_scale.rs (every text shape drawn by the library, a photo being edited, each tab of Settings and three dialogs is on the scale; the text styles are sizes of it; any number asked for lands on it), xtask typescale::tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…stay their width
From an independent review of the type scale:
- cargo xtask type stopped at the first `#[cfg(test)] mod …` of a file, which
in lib.rs is line 43: most of that file, and the ends of widgets.rs and
detail.rs, went unchecked. It now blanks comments, strings and each item
under #[cfg(test)], and checks the rest; it also finds a number on the line
after the call and `FontId { size: n }`, and no longer takes a spinner's
size, a string or a trailing comment for a text size.
- Chips and choices are caption size in semibold (11; they were 11.5 and had
gone to 12, which made the Export dialog 13 pt wider). The dialog is 602 pt
wide where it was 615; its size test says so. (That test still fails on its
height, 875 against 846, as it does without this branch.)
- The line over a square grid cell is cut short before the format badge. It
ran on under it, and further at the new sizes.
- A filmstrip cell's name stays 10 pt, so that a 14-letter name still clears
the format beside it.
- TextSize::nearest clamps first: a huge number or infinity is the largest
size, where every size had been equally near and the answer was body.
Tests: tests_type_scale.rs (the line over a square cell ends before the
format; sizes past either end), xtask typescale::tests (code after a test
module, a number on the next line, a font written out, what is not a size).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
From a second review: chips and choices went to caption size (11 pt) in the last commit, but TextSize's comments and the release note still gave them to the label size (12). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Its expected width (615) was changed to 602 two commits ago, for the chips' new size. Twenty-two open pull requests edit those two lines, and the test fails on its height on main as it is: the line is theirs to settle. Until then the width it expects is 13 pt more than the dialog has. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… caption size (602 pt) The format row's choices are set at 11 pt where they were 11.5, so the dialog is 13 pt narrower. The test was left expecting 615 while it failed on its height on main; storytold#990 settled the height, so the width is said here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Dim text (captions, counts, file names, explanations) was 4.20:1 on a panel in Charcoal and 3.3 to 4.3:1 on the surfaces of Silver and Paper; the accent as text 2.56:1 in Charcoal, a caution 3.09:1 in Silver, anything .weak() or a placeholder under 4.1:1 everywhere. Settings corrected its own with Tokens::legible at each place; the rest of the interface did not. - Tokens::for_kind brings text_dim to 4.5:1 against every surface text is written on at rest (panels, canvas, grid, cells, insets, text boxes, buttons), so the 230 places that use it are right without a change. - Tokens::text_link / text_caution / text_error: the accent, caution and error colours as text. The places that wrote in the raw colours use them. - egui's weak text and hyperlink colours are the dim text and the link. - Tokens::selection_fill keeps a chosen chip's label 4.5:1; Tokens::ink_on picks black or white for the count and "!" on the top bar's circles. - A selected filmstrip cell's name is made legible on that cell; a hidden mask's name is dim, not the disabled colour. - A count of nothing in the sidebar stays fainter, on purpose. Tests: tests_type_contrast.rs (every text shape on the library, a photo being edited, each tab of Settings and three dialogs stands 4.5:1 on what is behind it in all four themes; the colours stand out from every surface and keep their order). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ad too From an independent review of the contrast work: the readability scenarios never showed the square grid or a filter, so two things they claim went unchecked. - The format over a square cell was the label colour on a chip that is dark in every theme: 1.48:1 in Silver, 1.40:1 in Paper. It is in the ink that stands out from the chip (Tokens::ink_on). - The line over a chosen square cell is made legible against that cell, as the filmstrip's was (3.60:1 in Silver, 3.74:1 in Paper). - The library scenario now also shows a filtered square grid with a chosen cell, so the count on the filter button is checked on its circle: taking Tokens::ink_on out of the top bar fails it in three themes. - The scenario's check for covered text no longer takes a nearly white header over a white word for the word, and a row mostly cut by a scrolling edge is left out. Not covered by a scenario, as before: a hidden mask's name (the demo has no mask), and cautions in Import, the model dialogs and the rule editor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…be read From a second review: an unchosen square cell with a colour label kept the plain dim text on its tinted ground, 3.44:1 at the least (yellow in Charcoal). The line over a square cell and the name on a filmstrip cell are made legible against the cell as it is filled, chosen or labelled or both. Tests: the library scenario labels two cells of the square grid, one of them the chosen one; with the fix taken out it fails in all four themes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nter on its cell From a third review. Under the pointer a filmstrip cell that is not chosen has a see-through fill, and its name and format were left in plain dim text: 3.01 to 4.09:1 on a cell tinted by a colour label, and 4.05 and 4.12:1 on one with no label in Silver and Paper. The text is now made legible against that fill as it lies over the strip, as it is on an opaque cell. Tests: a scenario of the filmstrip in all four themes, with a yellow, a red and an unlabelled cell, at rest, under the pointer and with a labelled photo chosen. It listed ten kinds of unreadable text before the change. It is also the first test of the filmstrip half of the earlier fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…abel It put the pointer on a yellow, a red and an unlabelled cell, and chose the red one. It now has a cell of each of the five labels and one with none, puts the pointer on each, and chooses each labelled one in turn. With the fix taken out it lists 22 kinds of unreadable text, where it listed ten. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A picture has no theme, but its marks took the theme's colours. In Silver and Paper the stars, the pick flag and the "edited" mark on a thumbnail or a filmstrip cell were the theme's dark greys on a dark bar; the toast wrote the theme's near-black text on a black shade (about 1.5:1). In every theme a rated thumbnail's marks lay on the bare photo unless the pointer was on it. - Tokens::on_photo and Tokens::photo_shade: the ink and the shade, the same in every theme. The ink stands 12:1 on the shade over white. - Grid: marks are in the ink; a rated, flagged or edited photo has a shade as wide as its marks, the whole bar under the pointer or when selected. - Filmstrip: the bar is the shade, the marks the ink. - The toast and "Before" over the original (widgets::on_photo_label). - A rejection's flag stays red: its shape says what it is, and it is 3:1 on the shade. Tests: tests_type_on_photo.rs (marks on a thumbnail and on a filmstrip cell are in the ink with a shade under them, and the shade is dark in the picture that results; a toast and "Before" stand 4.5:1; the ink on the shade over white, black and yellow), each in all four themes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…jection's red is readable From an independent review of the marks over pictures: - The flag of a rejected photo was the theme's red on the shade: 2.97:1 in the dark themes and 2.27:1 in the light ones over a white photo, under the 3:1 its comment claimed. Tokens::on_photo_reject is a lighter red, the same in every theme, 4:1 on the shade over white. - On a thumbnail narrower than its marks the shade ended with the photo but the marks ran on over the gap to the next. Shade and marks are clipped to the photo. - The whole-width bar under the pointer, on a chosen photo and on every filmstrip cell had gone from black at 120 and 130 to 200, a near-opaque band. There is no bar now: marks are on a shade as wide as they are, everywhere. Tests: tests_type_on_photo.rs (the red on the shade over white and black, and drawn in it on a shade in every theme; on 60 pt thumbnails no mark shows outside its thumbnail). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…lag is not dimmed with the photo From a second review, of the last commit on this branch: - Taking away the band along a thumbnail's lower edge left a photo under the pointer with no sign at all, and a chosen one with its outline only, which is 1.1 to 2.1:1 against the grid in Silver and Paper. The band is back as it was (black at 120), under the marks' own shades. - A rejected photo is dimmed by a black wash painted last, over its marks: the new red came out at 2.6 to 2.8:1. The wash is painted before the marks. Tests: tests_type_on_photo.rs (a plain photo has the band when chosen and not otherwise, in every theme; a rejected thumbnail shows the flag's red as it is, 3:1 on its shade: with the wash over the marks no pixel of it is left). Not tested: the clip of marks on a filmstrip cell. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nd the notes say what was left From a third review. Nothing failed when the band along a thumbnail's lower edge was drawn for a chosen photo only: the scenario now puts the pointer on a plain photo too, and fails without the hover. The notes say that the dark bar across a marked filmstrip cell is gone, and which words over a photo were white on their own pills already and are left so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, a name keeps its number - readout::exposure: what a photo was taken with, in one wording and one order (1/250 sec · f/2.8 · ISO 100 · 35 mm), under the histogram, over a square cell, in the info overlay and on the rows of Info. It was "f / 2.8", "f/2.8", "35 mm", "35mm", "1/250 sec", "1/250 s" and "1/250" in three orders. The unit of a shutter speed keeps its translations. - A negative value has a minus (U+2212); typing reads a minus or a hyphen. - readout::value / figures: each figure in a cell as wide as the font's widest, since egui cannot ask Inter for its tabular figures. A slider's value keeps its place while dragged; the sidebar's counts line up. The galley's text is unchanged. - readout::elide_middle: a file name on the filmstrip and in the Import grid is shortened in the middle to the room it has, measured, so the number of the frame stays. Both cut by a count of characters, at the end. Tests: readout::tests (wording, numbers that are none, the minus, cells of one width, middle cuts on characters and in few measurements), tests_type_readout.rs (one photo reads the same in four places; a value's minus and typing; two sliders' values in one column). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… and the sidebar's figures are tested From an independent review of the numbers work: - The field a slider's value opens in began with the minus the value is shown with (U+2212), so copying from it put a character on the clipboard that other programs do not read as a sign. widgets::draft_value gives the hyphen; typing reads either, as before. - Nothing failed when the sidebar's counts went back to the font's own figures. A scenario now checks the room a narrow figure is given on the row of All Photos. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ween a letter and its mark readout::elide_middle cut on chars, so a name written with combining marks (an accented name as macOS stores it, a vowelled Arabic one) could come out with a mark stranded on the "…". It cuts on grapheme clusters now. The UI crate takes unicode-segmentation for it (the engine has it already; Cargo.lock gains the one line of the dependency list). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…gits typed_value read only ASCII digits, so what an Arabic or Persian keyboard gives (١٫٥, ۲۰٪) was no number and the slider kept its value. It reads those digits now, the Arabic decimal sign, comma and percent sign, and passes over what a keyboard or a paste puts around a number to say which way it reads (direction marks, embeddings, isolates). A degree sign after the number is passed over as a percent sign is, wherever such a mark falls. The Arabic thousands sign is still no part of a number, as a comma is a decimal sign here. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
e3c99a6 to
84e629e
Compare
|
Folded into #1374, which now holds this PR's commits together with the rest of its chain, rebased onto current |
…ead the mosaic about 3.5 times faster, same output Both raw repair passes sweep the whole mosaic before binning, so a 2048 px export pays for them at sensor size. Most of the time was per-photosite overhead (two modulo operations for the CFA phase, a Vec push per neighbour, checked index arithmetic, a sort of eight values), not arithmetic. hotpixel.rs (candidate scan) and defects.rs (the quick test in detect) now: - read same-colour neighbours at flat offsets into a fixed array (new cfa_offsets.rs: the table, MAX_NEIGHBOURS / MIN_NEIGHBOURS, and the check that a row of reads stays in the buffer), the one place both loops take their bound from; - walk the CFA phase along the row, compare against the brightest neighbour in integers, skip the median where the excess cannot pass (sigma is never below 1), take the median of eight with a sorting network, and give detect a second, tighter test before judge; - share one acceptance rule (accept(), Noise::MIN_SIGMA) between the fast and plain paths, and make black_spread read exactly what BlackLevel::at reads (a black-level delta shorter than the image counts as zero past its end), which a review found the first version did not. The plain loops stay as test oracles. Measured, Apple M4 Max, 500 Z9 HE* NEFs at 2048 px, GPU on, alternating pairs against v26.47.3 (first version of the change): one photo on one thread, hot-pixel pass 710 -> 200 ms, defect detection 840 -> 240 ms; export CPU per photo 3.99 -> 2.94 s (-25 to -28 % in every pair), wall -18 to -32 %. Output identical: decoded mosaic, defect list and noise estimate hash-identical on 6 Z9 files, 20 JPEGs byte-identical, 160 files from 19 models 0 differences in the whole-stack golden check. 19 new tests compare the fast loops with the plain ones (Bayer in four orders, X-Trans, float data, three samples a photosite, offset active areas, position-varying black levels, thresholds at, below and above each boundary). Sources: own design, a rewrite of this crate's own loops; the median of eight is a partial Batcher odd-even network (a standard construct). No outside code was read. Part of storytold#1377. Manual: none, no user-visible change beyond speed (release notes added). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
… sums each colour once per row of blocks, same output develop_binned (the reduced-size development behind previews and 2048 px exports) allocated its per-block scratch per call and summed each block separately. Now one scratch per thread (thread_local BIN_SCRATCH, sized by block and row width), and when the blocks of a row share a CFA phase (k a multiple of the pattern width) each colour is accumulated once per row of blocks, in the same per-accumulator order, so the result is bit-identical. The old path stays as the test oracle (bin_with(.., fast)); one finish rule (finish_channel) serves both. bin_bench (example) times the binning and fingerprints its output. Measured, Apple M4 Max. bin_bench on 8 raws (Z 9 HE* and lossless, Z6 III, Z 5, D3X, D2H), this branch against main 3ce8865, 4 alternating processes, best of 5: identical output on all 8 at block sizes 2 and 4; binning 27 to 56 % faster at size 2 (Z 9 13.5 -> 9.4 ms) and 39 to 61 % at size 4. Source load of a Z 9 HE* raw at the 2048 px level in the in-process develop driver, 600 alternating rounds: 338.4 -> 328.1 ms, -3.0 % +- 0.55 % (90 % interval); render unchanged. An earlier version that also presized read_bounded (now a separate change) gave -4.8 % CPU per photo over 500 Z 9 exports at 2048 px; no wall-time gain was established there (three rounds). Sources: own design, a rewrite of this crate's own binning loop. Part of storytold#1377. Manual: none, no user-visible change beyond speed (release notes added). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-Tetrix by slices, lifted in place, precincts written straight into the bands Three changes in crates/raw/src/vendor/nefhe.rs, all bit-identical: - inverse Star-Tetrix: away from the image edges nothing is mirrored, so each neighbour is a fixed plane at a fixed offset and a row is four slices added and shifted (the edge rows and columns go through `neighbour`, the mirrored definition, as before). One table (DISPLACEMENT, taps()) names which component each neighbour comes from for both paths; floor division by 8 or 4 is an arithmetic shift. One photo, one thread: 315-337 -> 32-39 ms. - lift: each of the six lifting steps updates its component's plane in place (no neighbour is the component itself), instead of allocating a new w x h plane, 45 MB, six per photo. - the entropy decode writes each precinct's coefficients into its final band range (band_ranges / place_precinct, with length checks and a refusal of a misshapen precinct), and the serial gather of per-slice vectors is gone. The crate's decode_packet_body still returns a copy of the running coefficients on every packet, which is dropped (only bytes_consumed is used): about 18 to 21 ms per Z 9 raw. oxideav-jpegxs's master has decode_packet_body_into without that copy; switching to it is a one-line follow-up once 0.0.10 is published. Measured, Apple M4 Max, whole raw decode on all cores (open_bench), this commit against main 3ce8865, 8 alternating processes, medians: Z 9 HE* 153 -> 107 ms (-30 %), 148 -> 102, 152 -> 110; Z 9 HE 147 -> 104; Z6 III HE* 81 -> 63 (-23 %); Z6 III HE 81 -> 62. Earlier export measurements in storytold#1377 (in-place lift: wall -8 %, CPU -10 %, peak footprint -23 %) were taken on top of a patched crate this commit does not need; with the band writes the final bands are allocated at full size before the slices write them (peak footprint +0.2 to +0.4 GB in that measurement). Output identical: the same mosaic hash and hot-pixel count as main on 6 HE/HE* raws (Z 9, Z6 III); the existing test against the codec crate's own inverse_star_tetrix covers 16 sizes at two value ranges; new tests pin the decode of the fixtures and their mutations before and after, the slice height, the band placement (equal to the concatenation of the parts, a misshapen precinct refused), the fixed-offset taps against `neighbour` at every interior sample, no neighbour being the component itself, and wrong plane lengths not panicking. Sources: own design, a rewrite of this module's own inverse Star-Tetrix, lifting and band placement; checked against oxideav-jpegxs's inverse_star_tetrix (MIT) by the module's existing test. Part of storytold#1377. Manual: none, no user-visible change beyond speed (release notes added). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…-passes Issue storytold#1377: Remove Hot Pixels and Fix Hot and Dead Pixels read the mosaic about 3.5 times faster, same output
…g-scratch Issue storytold#1377: binning keeps one scratch per worker thread and sums each colour once per row of blocks, same output
Issue storytold#1377: Nikon HE and HE* decode 23 to 31 % faster: Star-Tetrix by slices, lifted in place, precincts written straight into the bands
Stacked on #1376: only the commits from
LR-PREF-INTERFACE: an exposure reads one way…on are new here.Rebased onto main after integration batch 35 (#1682) on 2026-10-14, with the PRs under it. These commits applied without conflict.
What was wrong
What changes
Left, BEFORE; right, AFTER: the line under the histogram and the sliders' values.
Left, BEFORE; right, AFTER: the card of Info.
readout::exposure: one wording and one order, "1/250 sec · f/2.8 · ISO 100 · 35 mm", in all four places. The unit of a shutter speed keeps its translations ("s", "с", "秒").readout::valueandreadout::figures: each figure in a cell as wide as the font's widest. A slider's value begins and ends where any other of as many figures does; the counts on the rows of the left sidebar's lists are set the same way. The text of the galley is unchanged, so nothing that reads painted text sees a difference.readout::elide_middle: a name is shortened in the middle to the room it has, measured: "IMG_20…_153012".Limits
With the other pull requests
Nothing new beyond one line in
lib.rs(the list of modules), which four open pull requests also add to.Verification
readout::tests(the wording; numbers that are none, zero, negative or infinite say nothing; the minus; cells of one width; cuts on characters, and a 100 000-character name measured fewer than 40 times) andtests_type_readout.rs(one photo reads the same in four places; a value's minus, and typing with either sign; two sliders' values in one column; the sidebar's count; the typing field's hyphen).tests_model_setuptests fail, as on main undercargo test -p lightcraft-ui-egui). The wasm check was not run after the rebase. The MCP and CLI tests passed before the rebase (a shown value does not reach the control protocol) and were not run after it.🤖 Generated with Claude Code