<feed xmlns='http://www.w3.org/2005/Atom'>
<title>atracdenc/src/atrac, branch fix_input_file_path</title>
<subtitle>OpenSource ATRAC1 ATRAC3 Encoder</subtitle>
<id>https://code.mastervirt.ru/atracdenc/atom?h=fix_input_file_path</id>
<link rel='self' href='https://code.mastervirt.ru/atracdenc/atom?h=fix_input_file_path'/>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/atracdenc/'/>
<updated>2026-05-03T12:41:21Z</updated>
<entry>
<title>Add MSYS2 build support (#70)</title>
<updated>2026-05-03T12:41:21Z</updated>
<author>
<name>Daniil Cherednik</name>
<email>dan.cherednik@gmail.com</email>
</author>
<published>2026-05-03T12:41:21Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/atracdenc/commit/?id=3e04903c35c61a0f0be0c2db409f5fd5f58d6e12'/>
<id>urn:sha1:3e04903c35c61a0f0be0c2db409f5fd5f58d6e12</id>
<content type='text'>
* Add MSYS2 build support

Add a selectable PCM I/O backend so MSVC builds can keep Media Foundation while MSYS2/MinGW builds use libsndfile.

Teach the libsndfile finder about MINGW_PREFIX and add a Windows MSYS2 CI job that builds the libsndfile backend.

Fix and enable tests for MSYS2 builds</content>
</entry>
<entry>
<title>atrac3: reimplement tonal encoding. Use flatness-based tonal extraction</title>
<updated>2026-04-19T22:27:45Z</updated>
<author>
<name>Daniil Cherednik</name>
<email>dan.cherednik@gmail.com</email>
</author>
<published>2026-04-18T14:51:23Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/atracdenc/commit/?id=e784b79cfef682059cf5cc8cf9bed635e714c439'/>
<id>urn:sha1:e784b79cfef682059cf5cc8cf9bed635e714c439</id>
<content type='text'>
- Add shared CalcSpectralFlatnessPerBfu helper in atrac_psy_common
  with BFU-table mapping.
- Implement ATRAC3 tonal extraction: compute MDCT energy, estimate
  per-BFU flatness, extract up to 5-bin strongest tonal run in
  low-flatness BFUs, and zero extracted bins in residual.
- Map extracted tonal bins into TTonalBlocks and integrate them into
  bitstream coding.
- Update ATRAC3 bit allocation - reduce residual bits for BFUs with tonal
  blocks, and increase tonal quantizer selection.
- Restore --notonal CLI option in main.cpp for A/B comparison.
</content>
</entry>
<entry>
<title>[AT3] refactor bitstream allocation loop to bs_encode</title>
<updated>2026-04-11T21:20:06Z</updated>
<author>
<name>Daniil Cherednik</name>
<email>dan.cherednik@gmail.com</email>
</author>
<published>2026-04-11T21:18:36Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/atracdenc/commit/?id=a958b27a43f0a436406dc51b942ca2f3a417e7a7'/>
<id>urn:sha1:a958b27a43f0a436406dc51b942ca2f3a417e7a7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix Windows C++17 build and MSVC flag warnings</title>
<updated>2026-04-08T22:12:05Z</updated>
<author>
<name>Daniil Cherednik</name>
<email>dan.cherednik@gmail.com</email>
</author>
<published>2026-04-08T22:12:05Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/atracdenc/commit/?id=73e432a3ed6b122ae1fb9d0daf20169c303e2f94'/>
<id>urn:sha1:73e432a3ed6b122ae1fb9d0daf20169c303e2f94</id>
<content type='text'>
</content>
</entry>
<entry>
<title>atrac3: add YAML gain control debug logging (--yaml-log)</title>
<updated>2026-04-08T21:33:40Z</updated>
<author>
<name>Daniil Cherednik</name>
<email>dan.cherednik@gmail.com</email>
</author>
<published>2026-03-16T17:14:19Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/atracdenc/commit/?id=901974b3aa5045226201c710da13a8365a7bf1c8'/>
<id>urn:sha1:901974b3aa5045226201c710da13a8365a7bf1c8</id>
<content type='text'>
Inspired by edge264's YAML logging approach (FOSDEM 2026): emit every
gain control decision as a self-contained YAML stream so any frame can
be grep'd, analyzed with Python, or used to craft custom test curves.

  ./atracdenc -e atrac3 -i in.wav -o out.oma --yaml-log gain.yaml

Each YAML document covers one frame (frame:/time: header) with channels
and bands nested below. Per-band fields emitted in pipeline order:
  high_freq_ratio, overlap_ratio, dynamic_min_score, gain[], next_level
  pcm_qmf (256 raw QMF samples, non-modulated, non-windowed)
  curve_raw, rms_cur, rms_next_mod, point0_level, crossover
  curve_final, max_gain, ratio, level_boost, scale_boost, total_boost
  gain_boost (or skip: &lt;reason&gt; at each early-exit point)

New files / changes:
  src/yaml_log.h         - TYamlFmtGuard (stream format RAII),
                           YamlWriteFloatSeq (vector + ptr/len overloads)
  src/atrac/at3/atrac3.h - YamlLog field in TAtrac3EncoderSettings
  src/atrac3denc.h       - FrameNum counter + YamlLog pointer on TAtrac3Encoder
  src/atrac3denc.cpp     - frame header in GetLambda, incremental YAML in
                           CreateSubbandInfo at every decision point
  src/main.cpp           - --yaml-log &lt;file&gt; CLI flag

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>atrac3: ratio-scored transients, per-band gain boost, pre-echo reduction</title>
<updated>2026-03-15T20:13:24Z</updated>
<author>
<name>Daniil Cherednik</name>
<email>dan.cherednik@gmail.com</email>
</author>
<published>2026-03-15T20:13:24Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/atracdenc/commit/?id=34aee45f701cd49824a83cc3781b0c12976eca2f'/>
<id>urn:sha1:34aee45f701cd49824a83cc3781b0c12976eca2f</id>
<content type='text'>
Rewrites the ATRAC3 gain control pipeline to eliminate noise flashes
and substantially reduce pre-echo artifacts:

Transient detection &amp; curve building (transient_detector.cpp/h):
- Replace legacy heuristic detector with ratio-scored DetectTransients:
  score = peak/floor for rising (c/a) or falling (a/c) triplets, scored
  and ranked, top-N kept, sorted by location
- Add explicit point0 derived from windowed-RMS match between bufCur and
  the curve-modulated bufNext (CalcWindowedRmsAfterCurve)
- Replace RegionMax with RegionRMS for smoother region amplitude estimate
- Add per-band detection thresholds kMinScorePerBand[4] = {1.9,1.9,2.1,2.2}
- Dynamic minScore: scale threshold by min(1.5, max(1.0, overlapRatio)) to
  suppress false-positive curves when previous frame dominates
- Scale constraint: curve[0].Level &gt;= 3 to cap cross-frame amplification at 2x

Bit allocation (atrac3_bitstream.cpp/h):
- Add GainBoostPerBand[NumQMF] to TSingleChannelElement, computed in
  CreateSubbandInfo and applied in CalcBitsAllocation
- levelBoost: compensate for Demodulate's GainLevel[minLevel] attenuation
- scaleBoost: compensate for next-frame cross-frame scale via lookahead
- Both capped (kLevelBoostCap=1, kScaleBoostCap=2) to avoid bit starvation

Upsampler (atrac3denc.cpp):
- Raise cutoff from 600 Hz to 800 Hz for tighter band separation

Tests (gain_processor_ut.cpp):
- Relax fixed curve shape assertions to ExpectCurveReasonable (bounds checks)
- Relax quantization error bound for dense-event spacing (&lt;=128 samples)

Results (branch new_psy vs original baseline):
  riddler: pre-echo worse 43-&gt;15/479 frames, 0 flashes
  spine:   pre-echo worse 192-&gt;107/1804 frames, 0 flashes

Co-Authored-By: Claude Sonnet 4.6 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>Fix energy calculation for quantization units</title>
<updated>2025-09-05T20:08:03Z</updated>
<author>
<name>Daniil Cherednik</name>
<email>dan.cherednik@gmail.com</email>
</author>
<published>2025-08-23T19:59:46Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/atracdenc/commit/?id=65b8ae4337ad68ae0c10f609a11e77d96e5ad8e2'/>
<id>urn:sha1:65b8ae4337ad68ae0c10f609a11e77d96e5ad8e2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Use common bit allocation engine for AT1 mode</title>
<updated>2025-07-31T21:40:11Z</updated>
<author>
<name>Daniil Cherednik</name>
<email>dan.cherednik@gmail.com</email>
</author>
<published>2025-07-30T21:15:12Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/atracdenc/commit/?id=e8400f35fa8f9bff628cca0c9d5ed9184b6d4bd9'/>
<id>urn:sha1:e8400f35fa8f9bff628cca0c9d5ed9184b6d4bd9</id>
<content type='text'>
This commit also removes handling "bfuidxconst" option
and mark it as deprecated. This option actually does not
affect encoding speed significantly.
</content>
</entry>
<entry>
<title>Move implementation details into corresponding dirs (#52)</title>
<updated>2025-07-22T20:54:21Z</updated>
<author>
<name>Daniil Cherednik</name>
<email>dan.cherednik@gmail.com</email>
</author>
<published>2025-07-22T20:54:21Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/atracdenc/commit/?id=61045345fa43e54fb4fc3eee0e05b25451af9ca5'/>
<id>urn:sha1:61045345fa43e54fb4fc3eee0e05b25451af9ca5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Clean qmf code. (#51)</title>
<updated>2025-07-21T20:39:37Z</updated>
<author>
<name>Daniil Cherednik</name>
<email>dan.cherednik@gmail.com</email>
</author>
<published>2025-07-21T20:39:37Z</published>
<link rel='alternate' type='text/html' href='https://code.mastervirt.ru/atracdenc/commit/?id=e9eb8305dcdbdbf5a9cbabf766c6e908e63a19b1'/>
<id>urn:sha1:e9eb8305dcdbdbf5a9cbabf766c6e908e63a19b1</id>
<content type='text'>
- Remove unused TQmf template pcm type parameter
- Do not copy buffer twice in the synthesis fb</content>
</entry>
</feed>
