📄 jpege_vlc_kc.h
字号:
//////////////////////////////////////////////////////////////////////////////////////////////////////// jpege_vlc_kc.h (Prototypes for JPEG VLC Kernel 'SC' File//// Notice: COPYRIGHT (C) STREAM PROCESSORS, INC. 2005-2007// THIS PROGRAM IS PROVIDED UNDER THE TERMS OF THE SPI// END-USER LICENSE AGREEMENT (EULA). THE PROGRAM MAY ONLY// BE USED IN A MANNER EXPLICITLY SPECIFIED IN THE EULA,// WHICH INCLUDES LIMITATIONS ON COPYING, MODIFYING,// REDISTRIBUTION AND WARANTIES. UNAUTHORIZED USE OF THIS// PROGRAM IS STRICTLY PROHIBITED. YOU MAY OBTAIN A COPY OF// THE EULA FROM WWW.STREAMPROCESSORS.COM. // /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////#ifndef __JPEGE_VLC_KC_H#define __JPEGE_VLC_KC_H////////////////////////////////////////////////////////////////////////////////////////////////////// #includes ////////////////////////////////////////////////////////////////////////////////////////////////////#include "spi_common.h"////////////////////////////////////////////////////////////////////////////////// Constants////////////////////////////////////////////////////////////////////////////////#define MASK_16BIT 0xffff#define BITS_PER_BYTE 8kernel void jpege_vlc_kc ( stream int16x2 coefs (seq_in), // Transformed & quantized co-efficients as input stream uint32x1 dc_huffman_table(array_in), // Each huffman table entry is a 32 bit word. // The high 16 bit is the code length, the low 16 bit is the code word // dc_huffman_table has a total of 12 entries. stream uint32x1 ac_huffman_table(array_in), // ac_huffman table has a total of 160 entries stream uint32x1 bitstream (array_io), // Ouput bitstream stream int32x1 prev_block_data_strm(array_io), // This stream consists of prev dc coeff, prev incomplete word, // & no. of bits in prev incomplete word stream uint32x1 prev_bitstream_offset_strm(array_io), // This bitstream points to the last word position of the previous block stream uint32x1 next_bitstream_offset_strm(array_io), // This bitstream is updated to pint to the last word position of current block stream uint32x1 run_level(array_io), // Used as temporary storage for runs & levels of each block // The high 16 bit is the run, the low 16 bit is the level uint32x1 last_iter_in_row(in) // This flag is true if we are encoding the last strip is a row );inline void kernel stuff_zero_bytes( stream uint32x1 bitstream(array_io), vec uint32x1 input_data(in), vec uint32x1 word_position(in), vec uint32x1 output_data(out), vec uint32x1 stuffed_word(out), vec uint32x1 bits_cur_word_in(in), vec uint32x1 bits_cur_word_out(out) );inline void kernel write_bits ( stream uint32x1 bitstream(array_io), vec uint32x1 in_size(in), vec uint32x1 out_size(out), vec uint32x1 cur_word_in(in), vec uint32x1 cur_word_out(out), vec uint32x1 data(in), vec uint32x1 num_bits(in), uint32x1 write_last_word(in) );inline void kernel dc_coeff_encode( stream uint32x1 dc_huffman_table(array_in), stream uint32x1 bitstream(array_io), vec uint32x1 start_index(in), stream int32x1 prev_block_data_strm(array_io), vec int32x1 zz_0(in), vec uint32x1 half_word_hi_lo(in), vec uint32x1 cur_word(out), vec uint32x1 cur_word_position(out) );inline void kernel huffman_encode ( vec int32x1 zz_0(in), vec int32x1 zz_63(in), stream int32x1 run_level(array_io), vec uint32x1 run_level_size(in), stream uint32x1 ac_huffman_table(array_in), stream uint32x1 bitstream(array_io), stream int32x1 prev_block_data_strm(array_io), vec uint32x1 escape_code_length(in), vec uint32x1 escape_code_word(in), vec uint32x1 eob_code_length(in), vec uint32x1 eob_code_word(in), vec uint32x1 cur_word_in(in), vec uint32x1 cur_word_position_in(in), vec uint32x1 last_word(out), vec uint32x1 last_word_pos(out) );inline void kernel calc_run_level( stream uint32x1 run_level(array_io), vec int32x1 level(in), vec int32x1 run_in(in), vec int32x1 run_out(out), vec uint32x1 num_non_zero_in(in), vec uint32x1 num_non_zero_out(out), vec uint32x1 pack(in) );#endif // __JPEGE_VLC_KC_H/////////////////////////////////////////////////////////////////
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -