A hardware-implemented Huffman decoder converting Huffman-encoded data to raw data using logic gates to implement logic states. The logic states include IDLE, COEFF_READ, COEFF_WRITE, HUFF_ADDR_LOG, HUFF_ADDR_PHY, AMP_CAL, and EOB_RUN13 GEN. IDLE state transfers to COEFF_READ or AMP_CAL states according to eob_run, ac_first_scan, and ss signals, COEFF_READ state transfers to HUFF_ADDR_LOG or AMP_CAL states according to ac_first_scan, ac_refine_scan, eob_run, new_ac_nonzero_coeff, and dc_refine_scan signals. COEFF_WRITE state transfers to AMP_CAL or COEFF_READ states according to ac_first_scan, coeff_index, zero_run, and eob_run signals. HUFF_ADDR_LOG state transfers to HUFF_ADDR_PHY state and HUFF_ADDR_PHY state transfers to AMP_CAL or EOB_RUN_GEN states according to ac_first_scan and ac_refine_scan signals. AMP_CAL state transfers to AMP_CAL, COEFF_WRITE, or HUFF_ADDR_LOG states according to dc_first_scan, dc_refine_scan, ac_first_scan, ac_refine_scan, coeff_index, zero_run, eob_run, new_ac_nonzero_coeff, se, and progr_coeff0_pool signals. EOB_RUN_GEN state transfer to AMP_CAL state.