fix(draw_kit): reclaim 4x waveform oversample; relocate waveformColumnCount to component_geometry
kWaveformOversample set to 1 (was 4) — overbinning produced byte-identical pixels because columnMinMax exact partition already makes the draw gap-free. Comments credit columnMinMax, not oversampling.
This commit is contained in:
@@ -121,9 +121,9 @@ std::string sampleLabel(const std::vector<SampleChoice>& samples, const std::str
|
||||
return "?";
|
||||
}
|
||||
|
||||
// The bin count a card's thumbnail is computed at: kWaveformOversample bins per drawn
|
||||
// thumbnail pixel column (FA3 anti-alias) — drawWaveform collapses them per column via
|
||||
// peaks::columnMinMax. thumbnailFor clamps the request to the decoded frame count.
|
||||
// The bin count a card's thumbnail is computed at: one bin per drawn pixel column — the
|
||||
// gap-free render comes from peaks::columnMinMax's exact partition, not from extra bins.
|
||||
// thumbnailFor clamps the request to the decoded frame count.
|
||||
int thumbBins(const BrowserLayout& layout) {
|
||||
return (std::max)(1, kWaveformOversample *
|
||||
waveformColumnCount(toKitBox(cardThumbnailRect(layout, 0))));
|
||||
@@ -1011,9 +1011,9 @@ void ReaSamplerEditor::paintSample(LICE_IBitmap* bmp, int w, int h) {
|
||||
const Rect waveArea = bands.hero;
|
||||
fillSurface(bmp, toKitBox(waveArea), Role::BgBase, InteractionState::Rest);
|
||||
if (frames > 0 && waveArea.width() > 0) {
|
||||
// FA3 anti-alias: request kWaveformOversample bins per drawn pixel column (clamped
|
||||
// to the frame count) — drawWaveform collapses them per column via
|
||||
// peaks::columnMinMax into a gap-free true min/max envelope.
|
||||
// FA3 gap-free: one bin per drawn pixel column (kWaveformOversample == 1, so this
|
||||
// multiplies by 1). The gap-free draw comes from peaks::columnMinMax's exact
|
||||
// partition — extra bins produce no visible change. Clamped to frame count below.
|
||||
const std::int64_t wantBins =
|
||||
static_cast<std::int64_t>((std::max)(1, waveformColumnCount(toKitBox(waveArea)))) *
|
||||
kWaveformOversample;
|
||||
|
||||
Reference in New Issue
Block a user