|
FFmpeg
|
LZW decoding routines. More...
#include "libavutil/attributes.h"#include "bytestream.h"#include "lzw.h"#include "libavutil/mem.h"Go to the source code of this file.
Data Structures | |
| struct | LZWState |
Macros | |
| #define | LZW_MAXBITS 12 |
| #define | LZW_SIZTABLE (1<<LZW_MAXBITS) |
Functions | |
| static int | lzw_get_code (struct LZWState *s) |
| int | ff_lzw_decode_tail (LZWState *p) |
| av_cold void | ff_lzw_decode_open (LZWState **p) |
| av_cold void | ff_lzw_decode_close (LZWState **p) |
| int | ff_lzw_decode_init (LZWState *p, int csize, const uint8_t *buf, int buf_size, int mode) |
| Initialize LZW decoder. | |
| int | ff_lzw_decode (LZWState *p, uint8_t *buf, int len) |
| Decode given number of bytes NOTE: the algorithm here is inspired from the LZW GIF decoder written by Steven A. | |
Variables | |
| static const uint16_t | mask [17] |
LZW decoding routines.
Definition in file lzw.c.
| #define LZW_MAXBITS 12 |
Definition at line 35 of file lzw.c.
Referenced by ff_lzw_decode(), ff_lzw_decode_init(), and ff_lzw_encode_init().
| #define LZW_SIZTABLE (1<<LZW_MAXBITS) |
|
static |
Definition at line 70 of file lzw.c.
Referenced by ff_lzw_decode().
| int ff_lzw_decode_tail | ( | LZWState * | p | ) |
Definition at line 99 of file lzw.c.
Referenced by gif_read_image().
Definition at line 113 of file lzw.c.
Referenced by gif_decode_init(), and tiff_init().
Definition at line 118 of file lzw.c.
Referenced by gif_decode_close(), and tiff_end().
| int ff_lzw_decode_init | ( | LZWState * | p, |
| int | csize, | ||
| const uint8_t * | buf, | ||
| int | buf_size, | ||
| int | mode ) |
Initialize LZW decoder.
| p | LZW context |
| csize | initial code size in bits |
| buf | input data |
| buf_size | input data size |
| mode | decoder working mode - either GIF or TIFF |
Definition at line 131 of file lzw.c.
Referenced by gif_read_image(), and tiff_unpack_strip().
| int ff_lzw_decode | ( | LZWState * | p, |
| uint8_t * | buf, | ||
| int | len ) |
Decode given number of bytes NOTE: the algorithm here is inspired from the LZW GIF decoder written by Steven A.
Bennett in 1987.
| p | LZW context |
| buf | output buffer |
| len | number of bytes to decode |
Definition at line 169 of file lzw.c.
Referenced by gif_read_image(), and tiff_unpack_strip().
|
static |
Definition at line 38 of file lzw.c.
Referenced by ac3_bit_alloc_calc_bap_c(), ac3_decode_frame(), add_hfyu_median_pred_int16_c(), add_int16_c(), add_left_pred_int16_c(), affine_merge_candidate(), affine_merge_const1(), affine_merge_const2(), affine_merge_const3(), affine_merge_const4(), affine_merge_const5(), affine_merge_const6(), apply_filter(), argo_brp_read_header(), asmgen_process_cps(), av_channel_layout_describe_bprint(), av_channel_layout_from_mask(), av_channel_layout_from_string(), av_channel_layout_index_from_channel(), av_channel_layout_retype(), av_channel_layout_subset(), av_opt_set_defaults2(), av_read_image_line2(), av_write_image_line2(), avc_chroma_hv_2x2_msa(), avc_chroma_hv_2x4_msa(), avc_chroma_hv_4x2_msa(), avc_chroma_hv_4x4_msa(), avc_chroma_hv_4x8_msa(), avc_chroma_hv_8x4_msa(), avc_chroma_hv_8x8_msa(), avc_chroma_hv_and_aver_dst_2x2_msa(), avc_chroma_hv_and_aver_dst_2x4_msa(), avc_chroma_hv_and_aver_dst_4x2_msa(), avc_chroma_hv_and_aver_dst_4x4_msa(), avc_chroma_hv_and_aver_dst_4x8_msa(), avc_chroma_hv_and_aver_dst_8x4_msa(), avc_chroma_hv_and_aver_dst_8x8_msa(), avc_chroma_hz_2x2_msa(), avc_chroma_hz_2x4_msa(), avc_chroma_hz_4x2_msa(), avc_chroma_hz_4x4_msa(), avc_chroma_hz_4x8_msa(), avc_chroma_hz_8x4_msa(), avc_chroma_hz_8x8_msa(), avc_chroma_hz_and_aver_dst_2x2_msa(), avc_chroma_hz_and_aver_dst_2x4_msa(), avc_chroma_hz_and_aver_dst_4x2_msa(), avc_chroma_hz_and_aver_dst_4x4_msa(), avc_chroma_hz_and_aver_dst_4x8_msa(), avc_chroma_hz_and_aver_dst_8x4_msa(), avc_chroma_hz_and_aver_dst_8x8_msa(), avc_chroma_hz_nonmult_msa(), binkb_read_bundle(), bit_depth(), blend_line_hv(), blend_line_hv16(), blend_pixel(), blend_pixel16(), blur_image(), blur_pixel(), check_add_hfyu_median_pred_int16(), check_add_int16(), check_add_left_pred_16(), check_add_res(), check_loop_filter(), check_loop_filter_intra(), check_scene_sad(), check_sub_hfyu_median_pred_int16(), checkasm_check_huffyuvdsp(), checkasm_check_vf_bwdif(), checkasm_init_mask16(), checkasm_init_mask8(), checkasm_randomize_mask16(), checkasm_randomize_mask8(), checkasm_run_on_all_cores(), cinepak_decode_codebook(), cinepak_decode_vectors(), clear_to_mask(), clz(), cmp_direct_inline(), codebook_bits_offset(), common_hv_2ht_2vt_4x4_msa(), common_hv_2ht_2vt_4x4_msa(), common_hv_2ht_2vt_4x8_msa(), common_hv_2ht_2vt_4x8_msa(), common_hv_2ht_2vt_8x4_msa(), common_hv_2ht_2vt_8x4_msa(), common_hv_2ht_2vt_8x8mult_msa(), common_hv_2ht_2vt_8x8mult_msa(), common_hv_2ht_2vt_and_aver_dst_4x4_msa(), common_hv_2ht_2vt_and_aver_dst_4x8_msa(), common_hv_2ht_2vt_and_aver_dst_8x4_msa(), common_hv_2ht_2vt_and_aver_dst_8x8mult_msa(), common_hz_2t_4x4_msa(), common_hz_2t_4x4_msa(), common_hz_2t_4x8_msa(), common_hz_2t_4x8_msa(), common_hz_2t_8x4_msa(), common_hz_2t_8x4_msa(), common_hz_2t_8x8mult_msa(), common_hz_2t_8x8mult_msa(), common_hz_2t_and_aver_dst_4x4_msa(), common_hz_2t_and_aver_dst_4x8_msa(), common_hz_2t_and_aver_dst_8x4_msa(), common_hz_2t_and_aver_dst_8x8mult_msa(), compare_add_res(), compare_mv_ref_idx(), compare_pf_ref_idx(), compress_alpha(), compress_color(), compute_bit_depth(), config_output(), copy_color_mask(), copy_src_mask(), cu_get_max_y(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_FUNC(), DECL_READ(), DECL_READ(), DECL_READ(), DECL_READ(), DECL_WRITE(), DECL_WRITE(), decode_0(), decode_13(), decode_bayer_frame(), decode_bmv_frame(), decode_cblk(), decode_channel_code_tab(), decode_clnpass(), decode_dds1(), decode_dsw1(), decode_init(), decode_init(), decode_inter(), decode_long_vertical_delta2(), decode_mvc1(), decode_mvc2(), decode_mvdv(), decode_plane(), decode_region_masked(), decode_residual(), decode_residual_block(), decode_rgb_frame_TMPL(), decode_scaling_list(), decode_scaling_matrices(), decode_sigpass(), decode_tsw1(), decodeplane32(), diff_int16_c(), dither_to_mask(), draw_htext(), draw_htext(), draw_htext16(), draw_htext16(), draw_ihtext(), draw_ihtext16(), draw_rectangle(), draw_vtext(), draw_vtext16(), drawtext(), drawtext(), drawtext(), drawtext(), drawtext(), encode_alpha_plane(), encode_alpha_slice_data(), encode_clnpass(), encode_plane_bitstream(), encode_refpass(), encode_sigpass(), epic_jb_decode_tile(), escape124_decode_frame(), estimate_alpha_plane(), extract_constant_rows(), extract_swizzle(), ff_aac_ec_data_dec(), ff_ac3_bit_alloc_calc_bap_armv6(), ff_ac3_bit_alloc_calc_mask(), ff_acelp_fc_pulse_per_track(), ff_add_hfyu_median_pred_int16_sse4(), ff_add_int16_avx2(), ff_add_int16_neon(), ff_add_int16_sse2(), ff_add_left_pred_int16_unaligned_ssse3(), ff_avg_bilin_16h_msa(), ff_avg_bilin_16hv_msa(), ff_avg_bilin_32h_msa(), ff_avg_bilin_64h_msa(), ff_blend_mask(), ff_dca_count_chs_for_mask(), ff_decode_10_pulses_35bits(), ff_diff_int16_avx2(), ff_diff_int16_sse2(), ff_draw_pc_font(), ff_er_add_slice(), ff_ffv1_compute_bits_per_plane(), ff_h264_check_intra4x4_pred_mode(), ff_hls_senc_parse_audio_setup_info(), ff_jpeg2000_decode_htj2k(), ff_loop_filter_h_44_16_lsx(), ff_loop_filter_h_44_16_msa(), ff_loop_filter_h_48_16_lsx(), ff_loop_filter_h_48_16_msa(), ff_loop_filter_h_4_8_lsx(), ff_loop_filter_h_4_8_msa(), ff_loop_filter_h_84_16_lsx(), ff_loop_filter_h_84_16_msa(), ff_loop_filter_h_88_16_lsx(), ff_loop_filter_h_88_16_msa(), ff_loop_filter_h_8_8_lsx(), ff_loop_filter_h_8_8_msa(), ff_loop_filter_v_16_8_lsx(), ff_loop_filter_v_16_8_msa(), ff_loop_filter_v_44_16_lsx(), ff_loop_filter_v_44_16_msa(), ff_loop_filter_v_48_16_lsx(), ff_loop_filter_v_48_16_msa(), ff_loop_filter_v_4_8_lsx(), ff_loop_filter_v_4_8_msa(), ff_loop_filter_v_84_16_lsx(), ff_loop_filter_v_84_16_msa(), ff_loop_filter_v_88_16_lsx(), ff_loop_filter_v_88_16_msa(), ff_loop_filter_v_8_8_lsx(), ff_loop_filter_v_8_8_msa(), ff_lsb2full(), ff_lzw_decode(), ff_lzw_decode_init(), ff_mlp_filter_channel_arm(), ff_mlp_rematrix_channel(), ff_mlp_rematrix_channel_arm(), ff_opus_rc_enc_end(), ff_put_bilin_16h_msa(), ff_put_bilin_16hv_msa(), ff_put_bilin_32h_msa(), ff_put_bilin_64h_msa(), ff_put_no_rnd_pixels_l2_msa(), ff_put_vp8_bilinear16_h_msa(), ff_put_vp8_bilinear16_hv_msa(), ff_sbc_crc8(), ff_sub_hfyu_median_pred_int16_avx2(), ff_sub_hfyu_median_pred_int16_sse2(), ff_sws_apply_op_q(), ff_sws_comp_mask_needed(), ff_sws_comp_mask_print(), ff_sws_comp_mask_q4(), ff_sws_comp_mask_swizzle(), ff_sws_linear_mask(), ff_sws_op_desc(), ff_sws_op_list_optimize(), ff_sws_op_list_print(), ff_sws_op_list_split_at(), ff_sws_pack_op_decode(), ff_vk_extensions_to_mask(), ff_vp3_h_loop_filter_msa(), ff_vp3_idct_dc_add_msa(), ff_vp3_v_loop_filter_msa(), ff_vp8_h_loop_filter16_inner_lsx(), ff_vp8_h_loop_filter16_inner_msa(), ff_vp8_h_loop_filter16_lsx(), ff_vp8_h_loop_filter16_msa(), ff_vp8_h_loop_filter8uv_inner_msa(), ff_vp8_h_loop_filter8uv_lsx(), ff_vp8_h_loop_filter8uv_msa(), ff_vp8_h_loop_filter_simple_msa(), ff_vp8_idct_add_msa(), ff_vp8_idct_dc_add_msa(), ff_vp8_v_loop_filter16_inner_lsx(), ff_vp8_v_loop_filter16_inner_msa(), ff_vp8_v_loop_filter16_lsx(), ff_vp8_v_loop_filter16_msa(), ff_vp8_v_loop_filter8uv_inner_msa(), ff_vp8_v_loop_filter8uv_lsx(), ff_vp8_v_loop_filter8uv_msa(), ff_vp8_v_loop_filter_simple_msa(), ff_vvc_luma_mv_merge_gpm(), ff_vvc_store_mv(), ff_vvc_store_sb_mvs(), file_check(), fill_ltable(), fill_tile4(), fill_tileX(), filter_channel(), filter_frame(), filter_frame(), filter_frame(), filter_plane_cols(), filter_plane_rows(), filter_slice(), find_ref_idx(), find_ref_idx(), flac_read_header(), flv_read_packet(), flv_write_multichannel_body(), FUNC(), get_cabac_bypass_sign(), get_len(), get_mb_score(), h263_dct_unquantize_msa(), hevc_sao_band_filter_4width_msa(), horiz_mc_qpel_16width_msa(), horiz_mc_qpel_aver_src0_16width_msa(), horiz_mc_qpel_aver_src1_16width_msa(), horiz_mc_qpel_avg_dst_16width_msa(), horiz_mc_qpel_avg_dst_aver_src0_16width_msa(), horiz_mc_qpel_avg_dst_aver_src1_16width_msa(), horiz_mc_qpel_no_rnd_16width_msa(), horiz_mc_qpel_no_rnd_aver_src0_16width_msa(), horiz_mc_qpel_no_rnd_aver_src1_16width_msa(), hv_mc_qpel_aver_horiz_16x16_msa(), hv_mc_qpel_aver_horiz_src0_16x16_msa(), hv_mc_qpel_aver_horiz_src1_16x16_msa(), hv_mc_qpel_no_rnd_horiz_16x16_msa(), hv_mc_qpel_no_rnd_horiz_src0_16x16_msa(), hv_mc_qpel_no_rnd_horiz_src1_16x16_msa(), idct_column_false_mmi(), idct_column_true_mmi(), idct_msa(), idct_row_mmi(), idraw_htext(), idraw_htext16(), idraw_vtext(), idraw_vtext16(), init(), init_cavlc_level_tab(), init_luts(), intra_predict_vert_dc_8x8_msa(), jpeg2000_bitbuf_get_bits_lsb(), jpeg2000_bitbuf_get_bits_lsb_forward(), jpeg2000_bitbuf_peek_bits_lsb(), jpg_decode_data(), linear_to_mask(), linemask_matches(), ljpeg_decode_rgb_scan(), ljpeg_decode_yuv_scan(), LLVMFuzzerTestOneInput(), load_mask(), main(), mask_edges(), masked_description(), match_colors(), mcdec_map_channel_mask(), mlp_channel_layout_subset(), mlp_filter_channel(), mov_dts_channel_layout_to_mask(), mov_read_dac3(), mov_read_dec3(), move_to_mask(), mp3_write_xing(), mpc8_decode_frame(), mpc8_get_mask(), mpeg2_dct_unquantize_inter_msa(), mpegts_check_bitstream(), mss2_blit_wmv9_masked_c(), mss2_blit_wmv9_template(), mss2_gray_fill_masked_c(), mszh_decomp(), mv_compression(), mv_merge_pairwise_candidate(), mvf_to_mi(), mvp_add_difference(), mvp_history_candidates(), nibble_mask(), old_codec4(), pack_to_mask(), parse_coding_header(), parse_waveformatex(), parse_xxch_frame(), pchip_edge_case(), pcm_dvda_parse_header(), picmemset(), planar_rgb_to_uv_lasx(), planar_rgb_to_y_lasx(), png_get_interlaced_row(), png_put_interlaced_row(), pred_get_refs(), pred_mv(), pred_spatial_direct_motion(), print_q4(), print_stats(), process_float(), process_frame(), put_swf_line_edge(), put_swf_rect(), randomize_buffers(), randomize_loopfilter_buffers(), randomize_loopfilter_buffers(), read_residue(), refine_colors(), render_default_font(), renorm_encoder(), rgb2yuv_fsb(), rv34_decode_cbp(), rv34_gen_vlc_ext(), rv34_pred_mv_b(), sad_hv_bilinear_filter_8width_msa(), sane_layout(), scalable_channel_layout_config(), select_region(), set_bit(), set_channel_info(), set_metadata(), set_sr_golomb_flac(), setup_window(), solve_shuffle(), store_slice16_c(), sub_hfyu_median_pred_int16_c(), subsampling_bounds(), translate_linear_op(), translate_shuffle(), try_describe_ambisonic(), twiddle(), ulti_pattern(), unpack_alpha(), vlc_decode_u_suffix(), vp56_mc(), vp6_filter(), vp8_h_loop_filter8_mmi(), vp8_v_loop_filter8_mmi(), vp9_hz_lpf_t4_and_t8_16w(), vp9_hz_lpf_t4_and_t8_16w(), vp9_vt_lpf_t4_and_t8_16w(), vp9_vt_lpf_t4_and_t8_16w(), vp9_vt_lpf_t4_and_t8_8w(), vp9_vt_lpf_t4_and_t8_8w(), vvc_deblock_bs_chroma(), vvc_deblock_bs_luma(), write_element(), x8_get_ac_rlf(), xan_unpack_luma(), xnmodp(), and yuv2planeX_8_lasx().