JPEG Decoder ⚡🔧

Accurate Edition — Range-Reduced Taylor Series + Hardened Pipeline

11-term Taylor cos/sin with angle reduction for double-precision accuracy

⏳ Compiling WASM...
📁

Drop a JPEG here or click to browse

Baseline JPEG — decoded with accuracy-hardened WebAssembly & 11-term Taylor series

Try a sample:
✅ Accuracy Fixes in This Version
🎯Range Reduction
Angles reduced to [-π, π] before Taylor series — fixes divergence for large inputs
📐11-Term Taylor Series
Both sin() and cos() use 11 terms with iterative computation for < 1e-15 error
🔄Proper Byte Stuffing
FF 00 → FF handling in entropy stream, restart markers (FFD0-FFD7) correctly skipped
🧮Correct Zigzag Order
Standard ITU-T T.81 zigzag table mapping from stream order to natural 8×8 order
📊Quantization Table Order
DQT entries stored in natural order after zigzag reordering, with 8/16-bit precision support
🎨BT.601 Color Conversion
Correct YCbCr→RGB with Cb/Cr centered at 128, proper coefficients (1.402, 0.344136, 0.714136, 1.772)
🔢DC Prediction Per-Component
DC predictors maintained per frame component index, reset at restart markers
📏Separable IDCT
Row-then-column decomposition for O(N³) with better numerical stability