zfm: size string for gigabytes

This commit is contained in:
minjaesong
2025-11-13 09:45:37 +09:00
parent 9247471bf2
commit a45a919c84
3 changed files with 7 additions and 7 deletions

View File

@@ -72,6 +72,7 @@ let cursor = [0, 0] // absolute position!
function bytesToReadable(i) { function bytesToReadable(i) {
return ''+ ( return ''+ (
(i > 999999999) ? (((i / 10000000)|0)/100 + "G") :
(i > 999999) ? (((i / 10000)|0)/100 + "M") : (i > 999999) ? (((i / 10000)|0)/100 + "M") :
(i > 9999) ? (((i / 100)|0)/10 + "K") : (i > 9999) ? (((i / 100)|0)/10 + "K") :
i i

View File

@@ -25,7 +25,7 @@ TAD (TSVM Advanced Audio) is a modern audio codec built on discrete wavelet tran
- **Pre-processing** - **Pre-processing**
- First-order IIR pre-emphasis filter (α=0.5) shifts quantisation noise to lower frequencies, where they are less objectionable to listeners - First-order IIR pre-emphasis filter (α=0.5) shifts quantisation noise to lower frequencies, where they are less objectionable to listeners
- Gamma compression (γ=0.5) for dynamic range compression before quantisation - Gamma companding (γ=0.5) for dynamic range compression before quantisation
- Mid/Side stereo transformation exploits stereo correlation - Mid/Side stereo transformation exploits stereo correlation
- Lambda companding (λ=6.0) with Laplacian CDF mapping for full bit utilisation - Lambda companding (λ=6.0) with Laplacian CDF mapping for full bit utilisation
@@ -141,7 +141,7 @@ Audio is automatically resampled to 32 KHz stereo if necessary.
- Shifts quantisation noise toward lower frequencies - Shifts quantisation noise toward lower frequencies
- Improves perceptual quality - Improves perceptual quality
3. **Gamma Compression** 3. **Gamma Companding**
- Dynamic range compression with γ=0.5 - Dynamic range compression with γ=0.5
- Applied independently to each sample - Applied independently to each sample
- Reduces quantisation error for low-amplitude signals - Reduces quantisation error for low-amplitude signals
@@ -205,7 +205,7 @@ Audio is automatically resampled to 32 KHz stereo if necessary.
- R = Mid - Side - R = Mid - Side
- Reconstruct stereo channels - Reconstruct stereo channels
7. **Gamma Expansion** 7. **Gamma Decompanding**
- Inverse gamma with γ⁻¹=2.0 - Inverse gamma with γ⁻¹=2.0
- Restore original dynamic range - Restore original dynamic range
@@ -309,7 +309,7 @@ Different weights for Mid and Side channels reflect perceptual importance of fre
### Quality Characteristics ### Quality Characteristics
- **Frequency Response**: Flat 0-16 KHz within perceptual limits - **Frequency Response**: Flat 0-16 KHz within perceptual limits
- **Dynamic Range**: Preserved through gamma compression/expansion - **Dynamic Range**: Preserved through gamma companding
- **Stereo Imaging**: Maintained through Mid/Side decorrelation - **Stereo Imaging**: Maintained through Mid/Side decorrelation
- **Perceptual Quality**: Optimised for human auditory system characteristics - **Perceptual Quality**: Optimised for human auditory system characteristics

View File

@@ -6706,7 +6706,7 @@ static void quantise_dwt_coefficients_perceptual_per_coeff_no_normalisation(tav_
quantised[i] = (int16_t)CLAMP((int)quantised_val, -32768, 32767); quantised[i] = (int16_t)CLAMP((int)quantised_val, -32768, 32767);
// Debug: Print LL subband coefficients (9×7 at top-left for 560×448) // Debug: Print LL subband coefficients (9×7 at top-left for 560×448)
static int debug_once = 1; /*static int debug_once = 1;
if (debug_once && i < 63 && width == 560 && !is_chroma) { if (debug_once && i < 63 && width == 560 && !is_chroma) {
int x = i % width; int x = i % width;
int y = i / width; int y = i / width;
@@ -6715,7 +6715,7 @@ static void quantise_dwt_coefficients_perceptual_per_coeff_no_normalisation(tav_
x, y, i, coeffs[i], weight, effective_q, quantised_val, quantised[i]); x, y, i, coeffs[i], weight, effective_q, quantised_val, quantised[i]);
if (i == 62) debug_once = 0; if (i == 62) debug_once = 0;
} }
} }*/
} }
} }
@@ -9852,7 +9852,6 @@ int main(int argc, char *argv[]) {
{"fps", required_argument, 0, 'f'}, {"fps", required_argument, 0, 'f'},
{"quality", required_argument, 0, 'q'}, {"quality", required_argument, 0, 'q'},
{"quantiser", required_argument, 0, 'Q'}, {"quantiser", required_argument, 0, 'Q'},
{"quantiser", required_argument, 0, 'Q'},
{"wavelet", required_argument, 0, 1010}, {"wavelet", required_argument, 0, 1010},
{"channel-layout", required_argument, 0, 'c'}, {"channel-layout", required_argument, 0, 'c'},
{"bitrate", required_argument, 0, 'b'}, {"bitrate", required_argument, 0, 'b'},