namespace codec

// namespaces

namespace xf::codec::details

// enums


// structs

struct decOutput
struct hls_compInfo
struct hls_huff_DHT
struct hls_huff_segment
struct img_info
struct sos_data

// global variables

static const uint8_t hls_jpeg_zigzag_to_raster[64]
const short hls_icos_base_8192_scaled[64]


#include "XAcc_jfifparser.hpp"
void kernelParserDecoderTop (
    ap_uint < (16)>* datatoDDR,
    const int size,
    xf::codec::img_info& img_info,
    xf::codec::hls_compInfo hls_cmpnfo [(3)],
    hls::stream <ap_uint <24>>& block_strm,
    int& rtn,
    bool& rtn2,
    xf::codec::decOutput* pout

Level 2 : kernel for jfif parser + huffman decoder.


CH_W size of data path in dataflow region, in bit. when CH_W is 16, the decoder could decode one symbol per cycle in about 99% cases. when CH_W is 8 , the decoder could decode one symbol per cycle in about 80% cases, but use less resource.
datatoDDR the pointer to DDR.
size the total bytes to be read from DDR.
img_info information to recovery the image.
hls_compInfo the component info used to generate the decOutput .
block_strm the stream of coefficients in block,23:is_rst, 22:is_endblock,21~16:bpos,15~0:block val
rtn the flag of the jfif parser succeed
rtn2 the flag of the decode succeed