From e705d274de64642d77f0c919c7ecdc649b9572f0 Mon Sep 17 00:00:00 2001 From: minjaesong Date: Mon, 13 Oct 2025 01:42:44 +0900 Subject: [PATCH] TAV decoding minor changes --- assets/disk0/tvdos/bin/playtav.js | 13 +------------ terranmon.txt | 4 +++- .../src/net/torvald/tsvm/GraphicsJSR223Delegate.kt | 6 +++--- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/assets/disk0/tvdos/bin/playtav.js b/assets/disk0/tvdos/bin/playtav.js index 53b728b..28b3165 100644 --- a/assets/disk0/tvdos/bin/playtav.js +++ b/assets/disk0/tvdos/bin/playtav.js @@ -53,7 +53,6 @@ let subtitlePosition = 0 // 0=bottom center (default) // Parse command line options let interactive = false -let userDefinedFilmGrain = false let filmGrainLevel = null if (exec_args.length > 2) { @@ -69,7 +68,6 @@ if (exec_args.length > 2) { const level = parseInt(parts[1]) if (!isNaN(level) && level >= 1 && level <= 32767) { filmGrainLevel = level - userDefinedFilmGrain = true } } // Try next argument if no '=' found @@ -77,7 +75,6 @@ if (exec_args.length > 2) { const level = parseInt(exec_args[i + 1]) if (!isNaN(level) && level >= 1 && level <= 32767) { filmGrainLevel = level - userDefinedFilmGrain = true i++ // Skip next arg } } @@ -298,13 +295,6 @@ if (header.version < 1 || header.version > 8) { return } -function setFilmGrainLevel(header) { - // decide film grain strength by quality level - filmGrainLevel = [9,6,-4,3,-2,-2,-2][header.qualityLevel - 1] -} - -setFilmGrainLevel(header) - // Helper function to decode channel layout name function getChannelLayoutName(layout) { switch (layout) { @@ -846,7 +836,6 @@ try { currentCueIndex++ } totalFilesProcessed++ - setFilmGrainLevel(header) console.log(`\nStarting file ${currentFileIndex}:`) console.log(`Resolution: ${header.width}x${header.height}`) @@ -908,8 +897,8 @@ try { serial.println(` FIELD_SIZE: ${FIELD_SIZE}`) } - //let thisFrameNoiseLevel = (filmGrainLevel >= 0) ? filmGrainLevel : -(filmGrainLevel - (trueFrameCount % 2)) // grain synthesis is now part of the spec + // TODO if filmGrainLevel != null, user requested custom film grain level // Call new TAV hardware decoder that handles Zstd decompression internally // Note: No longer using JS gzip.decompFromTo - Kotlin handles Zstd natively diff --git a/terranmon.txt b/terranmon.txt index 2b318a2..283e47d 100644 --- a/terranmon.txt +++ b/terranmon.txt @@ -943,6 +943,7 @@ transmission capability, and region-of-interest coding. * Payload ## Packet Types +