libavcodec/huffman.c File Reference

huffman tree builder and VLC generator Copyright (c) 2006 Konstantin Shishkov More...

#include "avcodec.h"
#include "get_bits.h"
#include "huffman.h"

Go to the source code of this file.

Defines

#define HNODE   -1

Functions

static void get_tree_codes (uint32_t *bits, int16_t *lens, uint8_t *xlat, Node *nodes, int node, uint32_t pfx, int pl, int *pos, int no_zero_count)
static int build_huff_tree (VLC *vlc, Node *nodes, int head, int flags)
int ff_huff_build_tree (AVCodecContext *avctx, VLC *vlc, int nb_codes, Node *nodes, HuffCmp cmp, int flags)
 nodes size must be 2*nb_codes first nb_codes nodes.count must be set


Detailed Description

huffman tree builder and VLC generator Copyright (c) 2006 Konstantin Shishkov

This file is part of FFmpeg.

FFmpeg is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

FFmpeg is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with FFmpeg; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Definition in file huffman.c.


Define Documentation

#define HNODE   -1

Definition at line 28 of file huffman.c.

Referenced by ff_huff_build_tree(), and get_tree_codes().


Function Documentation

static int build_huff_tree ( VLC vlc,
Node nodes,
int  head,
int  flags 
) [static]

Definition at line 52 of file huffman.c.

Referenced by ff_huff_build_tree().

int ff_huff_build_tree ( AVCodecContext avctx,
VLC vlc,
int  nb_codes,
Node nodes,
HuffCmp  cmp,
int  flags 
)

nodes size must be 2*nb_codes first nb_codes nodes.count must be set

Definition at line 69 of file huffman.c.

Referenced by fraps2_decode_plane(), and vp6_build_huff_tree().

static void get_tree_codes ( uint32_t *  bits,
int16_t *  lens,
uint8_t *  xlat,
Node nodes,
int  node,
uint32_t  pfx,
int  pl,
int *  pos,
int  no_zero_count 
) [static]

Definition at line 31 of file huffman.c.

Referenced by build_huff_tree().


Generated on Fri Oct 26 02:39:45 2012 for FFmpeg by  doxygen 1.5.8