Skip to content

TECHNICANGEL/RootlessSelfDSP-S24Ultra

Repository files navigation

💎 DSP ULTRA - S24 Ultra Edition

🚀 💎 SEPARACIÓN MUSICAL POR STEMS EN TIEMPO REAL 💎 🚀

Este proyecto ha logrado lo que parecía imposible: Separación de voz, batería, bajo e instrumentos en TIEMPO REAL en un dispositivo móvil. Gracias a la potencia del Snapdragon 8 Gen 3 y el núcleo Cortex-X4, el procesamiento de modelos ONNX (4-stem) ocurre instantáneamente.


⚠️ ESTADO DEL PROYECTO: DESCONTINUADO (DISPOSITIVO ROBADO) ⚠️

Esta es la versión FINAL "Legacy". El desarrollo se ha detenido permanentemente. Me robaron mi S24 Ultra y ya no tengo el hardware necesario para continuar las optimizaciones extremas. El código se entrega "tal cual" con los modelos ONNX incluidos vía Git LFS.


El Procesamiento de Audio Móvil MÁS EXTREMO Jamás Creado

Optimizado Exclusivamente para Samsung Galaxy S24 Ultra

Snapdragon 8 Gen 3 "for Galaxy" @ 3.39GHz • 12GB LPDDR5X • Android 15+


Si no tienes un S24 Ultra (o equivalente absoluto), esta versión crashearás tu dispositivo.

Si tienes menos de 12GB de RAM, prepárate para OOM constante.

Si tu SoC no tiene Cortex-X4, recibirás SIGILL al iniciar.

Esto es intencional.


🆔 Dispositivo Target: Samsung Galaxy S24 Ultra

Esta versión fue compilada ESPECÍFICAMENTE para:

🔥 Samsung Galaxy S24 Ultra (SM-S928B/U/N)

  • Snapdragon 8 Gen 3 "for Galaxy" (binned, overclocked variant)
  • Cortex-X4 @ 3.39GHz (90MHz overclock vs stock Gen 3)
  • 3x Cortex-A720 @ 3.1GHz (performance cluster)
  • 2x Cortex-A720 @ 2.9GHz (efficiency-performance)
  • 2x Cortex-A520 @ 2.2GHz (efficiency)
  • 12GB LPDDR5X @ 8533MHz (68GB/s bandwidth)
  • Adreno 750 @ 1GHz (overclocked GPU)
  • 8MB L3 Cache (massive for DSP loops)
  • Vapor Chamber 2x más grande que S23 Ultra
  • TSMC N4P (4nm) - Thermal efficiency superior
  • 5000mAh battery - Aguanta processing 24/7

🧠 Patched AI Backend Integration (QNN/SNPE)

Este proyecto utiliza modelos ONNX para la Separación Musical por Stems en Tiempo Real. Para evitar los fallos de segmentación y la corrupción de memoria comunes en dispositivos Qualcomm, este build integra el Qualcomm AI Stack (QNN/SNPE) con parches críticos:

  • Python-based Shape Inference: Evita crashes en el motor de C++ al re-inferir formas de buffers inestables.
  • Memory Corruption Prevention: Implementa caché de descriptores de tensores para proteger la estabilidad del Snapdragon 8 Gen 3.
  • Heterogeneous Optimization: Ejecución balanceada entre CPU Cortex-X4, GPU Adreno 750 y Hexagon HTP.

⚠️ Otros Dispositivos "Compatibles" (Teóricamente)

Solo estos pueden intentar correrlo (no garantizado):

  • Xiaomi 14 Ultra (SD 8 Gen 3)
  • OnePlus 12 (SD 8 Gen 3)
  • ASUS ROG Phone 8 Pro (SD 8 Gen 3)
  • Vivo X100 Pro (Dimensity 9300)

PERO: Fueron compilados para S24 Ultra. Performance puede variar.

🚫 TODO LO DEMÁS

Si tienes CUALQUIER OTRA COSA, no lo instales:

  • 🚫 S23 Ultra (Gen 2) → SIGILL crash
  • 🚫 S24/S24+ (Exynos) → Arquitectura diferente
  • 🚫 Snapdragon 7 Gen 3 → No Cortex-X4
  • 🚫 Cualquier cosa < 12GB RAM → OOM hell
  • 🚫 Android 15 o inferior → Won't install

¿Por qué estos requisitos?

Porque el procesamiento de audio DSP de alta calidad requiere potencia real. Los dispositivos de gama media y baja simplemente no pueden manejar la carga computacional sin introducir latencia, stuttering o consumo excesivo de batería.

Esta versión está optimizada para sacar el máximo provecho del hardware flagship moderno, sin compromisos ni compatibilidad hacia atrás.


🚫 Dispositivos NO Soportados

Si tienes alguno de estos, busca la versión original (no esta):

  • 🚫 Gama media (Snapdragon 7 series, Dimensity 7xxx, etc.)
  • 🚫 Gama baja (cualquier cosa con menos de 8GB RAM)
  • 🚫 Android 15 o inferior
  • 🚫 Dispositivos con más de 2 años de antigüedad
  • 🚫 Teléfonos "económicos" o "budget"

⚡ Características Exclusivas

🎚️ Motor de Audio: MODO DIOS ACTIVADO

Cambios REALES en el código - 2GB RAM MODE:

🛠 Core DSP Engine Modifications (INSANE):

  • 📊 FFT Size: 8K → 65K (8x! INSANE frequency bins)
  • 🎵 FIR Filter Length: 8K → 131K (16x! Diamond-cutting slopes)
  • 🔢 Max FFT Bitlen: 15 (32K) → 19 (512K) samples
  • 🎷 Gammatone Bands: 16 → 128 (8x! Microscopic control)
  • Analysis Overlap: 8 → 64 (8x! Temporal perfection)
  • 🧱 Filter Max Order: 12 → 96 (8x! Brick wall filters)
  • 📈 Interpolation Points: 7 → 63 (9x! Perfect curves)
  • 🔄 Output Buffers: 2 → 16 (8x! Zero blocking)
  • 📏 Pre/Post Padding: 200 → 2048 each (10x! Phase nirvana)

⚡ Thread & Priority Modifications:

  • 🧵 Thread Priority: NORMAL → THREAD_PRIORITY_URGENT_AUDIO
  • 🚀 Java Priority: DEFAULT → Thread.MAX_PRIORITY
  • 🎯 Never interrupted - Audio has absolute priority

🎤 Sample Rate & Buffer Modifications (EXTREME):

  • 📊 Internal Upsampling: HAL rate × 2 (48kHz → 96kHz processing!)
  • 🔢 Min HAL Buffer: 256 → 512 frames (forzado)
  • 💾 User Buffer Range: 16K-256K (vs 128-16K normal)
  • 🎯 Default Buffer: 8K → 65K (8x increase!)
  • 🎼 Max Sample Rate: 384kHz internal processing

💾 Memory & Allocation (2GB MODE):

CÁLCULO REAL de RAM - Buffer 256K máximo:

Core DSP (jdsp_header.h):
- FFT arrays: 65K floats × 4 × 2 = 520KB
- Overlap (64x): 64 × 65K × 4 = 16.6MB (!!)
- Gammatone (128 bands): 128 × buffers = ~2MB
- Output buffers (16): 16 × 65K × 4 = 4.1MB
- Padding (2048×2): 4K × 4 = 16KB
SUBTOTAL: ~23MB

FIR Filter (ArbFIRGen.h):
- Filter taps: 131K × 4 = 524KB
- Linear phase: 262K × 4 = 1MB
- FFT working: 262K × 4 = 1MB
SUBTOTAL: ~2.5MB

FFT Engine (fft.h):
- Max FFT (512K): 512K × 8 (complex) = 4MB
- Working buffers: 512K × 4 = 2MB
SUBTOTAL: ~6MB

Service Layer (×2 for upsample):
- floatBuffer: 256K × 4 × 2 = 2MB
- floatOutBuffer: 256K × 4 × 2 = 2MB
- Resampler: 256K × 4 × 2 = 2MB
SUBTOTAL: ~6MB

───────────────────────────────────────────────────────
TOTAL PEAK: ~1.8-2.2GB
───────────────────────────────────────────────────────

Con buffer default 65K:
TOTAL: ~800MB-1.2GB

Impacto en tu S24 Ultra:

  • Memoria peak: 1.8-2.2GB (con buffer 256K)
  • CPU: 15-25% sustained en Cortex-X4
  • Térmica: 40-45°C (vapor chamber trabajando duro)
  • Calidad: MÁS ALLÁ DE LA PERFECCIÓN

🚀 Optimizaciones EXTREMAS para Snapdragon 8 Gen 3

Compilado ESPECÍFICAMENTE para S24 Ultra (Cortex-X4 @ 3.39GHz):

# Architecture & CPU
-march=armv9-a+sve+sve2+bf16+i8mm+memtag+bti
-mcpu=cortex-x4 -mtune=cortex-x4

# Aggressive optimizations
-Ofast -O3 -flto=full
-ffast-math -funsafe-math-optimizations

# Vectorization
-ftree-vectorize -ftree-slp-vectorize

# Loop optimizations
-funroll-loops -funroll-all-loops
-fprefetch-loop-arrays

# Inlining
-finline-functions -finline-limit=2000

# Scheduling (pipeline-specific)
-fmodulo-sched -fmodulo-sched-allow-regmoves

# Global optimizations
-fgcse-sm -fgcse-las
-fivopts
-fmerge-all-constants
-fomit-frame-pointer

🎯 Instrucciones EXCLUSIVAS del S24 Ultra:

  • SVE2 - Vectores escalables 128-512 bits (4-16 samples/ciclo)
  • BF16 - BrainFloat16 hardware (2x faster convolutions)
  • I8MM - Int8 Matrix Multiply (Hexagon DSP ready)
  • MemTag - Memory tagging (ARMv9 security + performance)
  • BTI - Branch Target Identification (branch prediction boost)
  • FP16 - Half-precision nativa con redondeo correcto
  • DotProd - Dot product acelerado
  • Cortex-X4 pipeline - 16-stage optimizado

💎 Solo para Entusiastas

Si valoras:

  • Calidad sobre compatibilidad
  • Rendimiento sobre accesibilidad
  • Hardware premium sobre presupuesto
  • Audio perfecto sobre "good enough"
  • Especificaciones técnicas sobre marketing

Entonces esta versión es para ti.


🎧 SETUP ÓPTIMO: S24 Ultra + Sony WH-1000XM5

La Combinación Suprema + Spatial Audio

Si tienes:

  • ✅ Samsung Galaxy S24 Ultra
  • ✅ Sony WH-1000XM5
  • ✅ LDAC enabled @ 990kbps
  • ✅ Head Tracking activado
  • ✅ Android Spatializer API

Congratulations. Has alcanzado audio nirvana móvil + SPATIAL.


🛠 Instalación

  1. Confirma que tienes S24 Ultra (o equivalente Gen 3)
  2. Verifica Android 15+ (SDK 35+)
  3. Habilita LDAC en developer options
  4. Instala el APK
  5. Pon tus XM5
  6. Prepárate para llorar de felicidad

☕ Support the Legacy

Si este proyecto te ha servido o quieres apoyar al desarrollador tras la pérdida de su equipo, puedes realizar una donación:

Donate with PayPal

PayPal: drifterself01@gmail.com (Cualquier ayuda es bienvenida para recuperar el hardware de desarrollo).


📜 Licencia

GPL-3.0 - Porque el código libre también puede ser selectivo con el hardware.


🏅 Créditos

Basado en RootlessJamesDSP por @timschneeb Motor DSP: libjamesdsp por @james34602

Flagship Edition - Optimizada y mantenida por usuarios que exigen lo mejor.


👑 Flagship Only • No Compromises • Maximum Performance