|
| 1 | +# efm-decoder |
| 2 | + |
| 3 | +**EFM Decoder Tools Suite** |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +The efm-decoder suite provides a comprehensive collection of specialized tools for decoding Eight-to-Fourteen Modulation (EFM) encoded digital data from LaserDisc and Compact Disc captures. This modular approach replaces the deprecated single-tool `ld-process-efm` with specialized components that operate at different stages of the EFM decoding pipeline. |
| 8 | + |
| 9 | +## Tool Suite Components |
| 10 | + |
| 11 | +### efm-decoder tool |
| 12 | +**EFM to F2 Section Processor** - Converts raw EFM data to synchronized F2 sections |
| 13 | +- Input: Raw .efm files from ld-decode |
| 14 | +- Output: .f2 section files |
| 15 | +- Function: Frame synchronization, deinterleaving, initial error detection |
| 16 | + |
| 17 | +### efm-decoder tool |
| 18 | +**F2 Section Multi-Source Stacker** - Combines multiple F2 sources for improved quality |
| 19 | +- Input: Multiple .f2 files from same source material |
| 20 | +- Output: Enhanced .f2 file |
| 21 | +- Function: Majority-vote error correction, multi-capture recovery |
| 22 | + |
| 23 | +### efm-decoder tool |
| 24 | +**D24 Data Processor** - Converts F2 sections to D24 format with CIRC error correction |
| 25 | +- Input: .f2 section files |
| 26 | +- Output: .d24 files with error correction applied |
| 27 | +- Function: CIRC decoding, Reed-Solomon error correction, frame validation |
| 28 | + |
| 29 | +### efm-decoder tool |
| 30 | +**Audio Stream Decoder** - Extracts PCM audio from D24 data |
| 31 | +- Input: .d24 files |
| 32 | +- Output: .wav audio files |
| 33 | +- Function: Audio deinterleaving, sample reconstruction, format conversion |
| 34 | + |
| 35 | +### efm-decoder tool |
| 36 | +**Data Stream Decoder** - Extracts binary data from D24 streams |
| 37 | +- Input: .d24 files |
| 38 | +- Output: .bin data files |
| 39 | +- Function: Data sector extraction, file system recovery, metadata preservation |
| 40 | + |
| 41 | +### efm-decoder tool |
| 42 | +**Virtual File System Verifier** - Validates and analyzes recovered data |
| 43 | +- Input: .bin data files |
| 44 | +- Output: Verification reports and extracted files |
| 45 | +- Function: VFS integrity checking, file extraction, quality assessment |
| 46 | + |
| 47 | +## Standard Processing Workflows |
| 48 | + |
| 49 | +### Audio Recovery (CD/LaserDisc Digital Audio) |
| 50 | + |
| 51 | +#### Single-Source Workflow |
| 52 | +```bash |
| 53 | +# Standard pipeline for digital audio extraction |
| 54 | +efm-decoder-f2 capture.efm capture.f2 |
| 55 | +efm-decoder-d24 capture.f2 capture.d24 |
| 56 | +efm-decoder-audio capture.d24 final_audio.wav |
| 57 | +``` |
| 58 | + |
| 59 | +#### Multi-Source Enhanced Recovery |
| 60 | +```bash |
| 61 | +# Multiple captures for damaged discs |
| 62 | +efm-decoder-f2 capture1.efm capture1.f2 |
| 63 | +efm-decoder-f2 capture2.efm capture2.f2 |
| 64 | +efm-decoder-f2 capture3.efm capture3.f2 |
| 65 | + |
| 66 | +# Stack for improved quality |
| 67 | +efm-stacker-f2 capture1.f2 capture2.f2 capture3.f2 stacked.f2 |
| 68 | + |
| 69 | +# Continue with enhanced input |
| 70 | +efm-decoder-d24 stacked.f2 enhanced.d24 |
| 71 | +efm-decoder-audio enhanced.d24 recovered_audio.wav |
| 72 | +``` |
| 73 | + |
| 74 | +### Data Recovery (Domesday LaserDisc, CD-ROM) |
| 75 | + |
| 76 | +#### Standard Data Extraction |
| 77 | +```bash |
| 78 | +# Pipeline for data disc recovery |
| 79 | +efm-decoder-f2 data_capture.efm data.f2 |
| 80 | +efm-decoder-d24 data.f2 data.d24 |
| 81 | +efm-decoder-data data.d24 recovered_data.bin --output-metadata data_info.txt |
| 82 | +``` |
| 83 | + |
| 84 | +#### Complete Domesday Recovery with Verification |
| 85 | +```bash |
| 86 | +# Multi-source Domesday disc recovery |
| 87 | +efm-decoder-f2 domesday1.efm dom1.f2 |
| 88 | +efm-decoder-f2 domesday2.efm dom2.f2 |
| 89 | +efm-decoder-f2 domesday3.efm dom3.f2 |
| 90 | + |
| 91 | +# Stack multiple sources |
| 92 | +efm-stacker-f2 dom1.f2 dom2.f2 dom3.f2 domesday_stacked.f2 |
| 93 | + |
| 94 | +# Process to final data |
| 95 | +efm-decoder-d24 domesday_stacked.f2 domesday.d24 |
| 96 | +efm-decoder-data domesday.d24 domesday.bin --output-metadata domesday_meta.txt |
| 97 | + |
| 98 | +# Verify and extract VFS content |
| 99 | +vfs-verifier domesday.bin domesday_report.txt \ |
| 100 | + --vfs-type domesday \ |
| 101 | + --extract-files \ |
| 102 | + --verify-checksums \ |
| 103 | + --output-dir domesday_extracted |
| 104 | +``` |
| 105 | + |
| 106 | +## Pipeline Architecture |
| 107 | + |
| 108 | +### EFM Decoding Stages |
| 109 | + |
| 110 | +The EFM decoding process involves multiple clearly defined stages: |
| 111 | + |
| 112 | +``` |
| 113 | +Raw EFM Data → F2 Sections → D24 Data → Audio/Data Output |
| 114 | + ↓ ↓ ↓ ↓ |
| 115 | +efm-decoder-f2 [stacking] efm-decoder-d24 decoder-audio/data |
| 116 | + ↓ |
| 117 | + efm-stacker-f2 |
| 118 | +``` |
| 119 | + |
| 120 | +### Stage Descriptions |
| 121 | + |
| 122 | +1. **Raw EFM (.efm)** - Output from ld-decode containing synchronized EFM bitstream |
| 123 | +2. **F2 Sections (.f2)** - Deinterleaved 98-frame sections with sync and error detection |
| 124 | +3. **D24 Data (.d24)** - CIRC error-corrected data ready for final decoding |
| 125 | +4. **Final Output** - PCM audio (.wav) or binary data (.bin) with optional verification |
| 126 | + |
| 127 | +### Multi-Source Enhancement |
| 128 | + |
| 129 | +The pipeline supports multi-source stacking at the F2 level: |
| 130 | +- Capture same material multiple times with different equipment/settings |
| 131 | +- Combine sources using majority-vote error correction |
| 132 | +- Dramatically improves recovery of damaged or degraded media |
| 133 | +- Particularly effective for archive-quality Domesday LaserDisc recovery |
| 134 | + |
| 135 | +## Advanced Features |
| 136 | + |
| 137 | +### Pipelining Capabilities |
| 138 | +- **Streaming Processing**: Tools can process data in chunks for memory efficiency |
| 139 | +- **Parallel Sources**: Multiple captures can be processed simultaneously |
| 140 | +- **Quality Assessment**: Each stage provides error statistics and quality metrics |
| 141 | +- **Format Flexibility**: Support for both audio and data applications |
| 142 | + |
| 143 | +### Error Correction Hierarchy |
| 144 | +1. **Hardware Level**: ld-decode RF signal recovery |
| 145 | +2. **EFM Level**: efm-decoder-f2 frame sync and validation |
| 146 | +3. **Multi-Source**: efm-stacker-f2 voting correction |
| 147 | +4. **CIRC Level**: efm-decoder-d24 Reed-Solomon correction |
| 148 | +5. **Application Level**: Format-specific validation (vfs-verifier) |
| 149 | + |
| 150 | +### Quality Enhancement Strategies |
| 151 | +- **Multiple Captures**: Different hardware, settings, environmental conditions |
| 152 | +- **Temporal Diversity**: Captures at different times for aging media |
| 153 | +- **Hardware Diversity**: Different laser assemblies, tracking mechanisms |
| 154 | +- **Parameter Tuning**: Optimized settings per capture session |
| 155 | + |
| 156 | +## Performance and Scalability |
| 157 | + |
| 158 | +### Processing Requirements |
| 159 | +- **CPU**: Multi-threaded processing for Reed-Solomon operations |
| 160 | +- **Memory**: Scales with source count for stacking operations |
| 161 | +- **Storage**: Intermediate files require 2-3x source data size |
| 162 | +- **Time**: Real-time processing possible for single sources |
| 163 | + |
| 164 | +### Optimization Strategies |
| 165 | +- **Chunked Processing**: Handle large files without memory constraints |
| 166 | +- **Parallel Decode**: Process multiple sources simultaneously |
| 167 | +- **Progressive Enhancement**: Start with best single source, add others as available |
| 168 | +- **Quality-Based Selection**: Automatically select optimal source combinations |
| 169 | + |
| 170 | +## Technical Background |
| 171 | + |
| 172 | +### Eight-to-Fourteen Modulation (EFM) |
| 173 | +- **Purpose**: Channel coding for optical storage reliability |
| 174 | +- **Encoding**: 8-bit data → 14-bit channel patterns + 3 merge bits |
| 175 | +- **Benefits**: DC-free signal, clock recovery, minimum transition density |
| 176 | +- **Constraints**: Run-length limits (3-11 transitions), spectral shaping |
| 177 | + |
| 178 | +### Cross-Interleaved Reed-Solomon Code (CIRC) |
| 179 | +- **C1 Code**: (32,28) RS code, corrects random errors |
| 180 | +- **C2 Code**: (28,24) RS code, corrects burst errors |
| 181 | +- **Interleaving**: 108-frame delay spread, 4000+ bit burst correction |
| 182 | +- **Integration**: Works with EFM constraints and optical tracking |
| 183 | + |
| 184 | +### Frame Structure and Timing |
| 185 | +- **F3 Frames**: 588 channel bits, 1/7350 second duration |
| 186 | +- **F2 Sections**: 98 F3 frames, 1/75 second (sector timing) |
| 187 | +- **Synchronization**: 24-bit sync pattern + frame validation |
| 188 | +- **Data Capacity**: 24 bytes user data + 8 bytes error correction per frame |
| 189 | + |
| 190 | + |
| 191 | + |
0 commit comments