#436·jsmpeg

Help Needed: Generating DCT_COEFF_2 Table for MPEG-2 Intra VLC (intra_vlc=1) Support

Author: syjjxCreated Oct 22, 2025Updated Jun 1, 2026

First, let me explain why I tried to support MPEG2. I applied your project to live streaming, but I discovered that modern devices do not support MPEG1 hardware encoding, whereas MPEG2 is supported. Tests show that MPEG2 hardware encoding can reduce CPU overhead to 10%, which is only 1/10 of the original. Therefore, I attempted the following modifications to extend support for MPEG2. I have now preliminarily completed MPEG2 decoding, but I encountered a problem: when intra_vlc=1 in MPEG2 video encoding, which means using the MPEG-2 intra VLC table, and referring to Table-15 in IEC-13818-2, I hoped to generate the corresponding DCT_COEFF_2 table, but my attempt failed. I'm requesting help; could you please help generate the corresponding DCT_COEFF_2?