⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dst_codeword_heap.h

📁 关于视频压缩的jpeg2000压缩算法,C编写
💻 H
字号:
/*****************************************************************************//* Copyright 1998, Hewlett-Packard Company                                   *//* All rights reserved                                                       *//* File: "dst_codeword_heap.h"                                               *//* Description: Defines the `dst_codeword_heap' object, which is required to *//*              efficiently manage dynamic resizing and recycling of         *//*              storage for compressed code words.                           *//* Author: David Taubman                                                     *//* Affiliation: Hewlett-Packard and                                          *//*              The University of New South Wales, Australia                 *//* Version: V3.2A                                                            *//* Last Revised: 14 January, 1999                                            *//*****************************************************************************/#ifndef DST_CODEWORD_HEAP_H#define DST_CODEWORD_HEAP_H#include <ifc.h>#define DST_CODE_MEM_KEY "COMPRESSED CODEWORD MEMORY"/* ========================================================================= *//* ---------------------------- Type Definitions --------------------------- *//* ========================================================================= */#define DST_HEAP_WORDS 8#define DST_HEAP_BYTES (DST_HEAP_WORDS*4)#define DST_HEAP_GROUP_UNITS 64/*****************************************************************************//*                                dst_heap_unit                              *//*****************************************************************************/typedef  struct dst_heap_unit {    std_int words[DST_HEAP_WORDS];    struct dst_heap_unit *next;    struct dst_heap_group *group;  } dst_heap_unit, *dst_heap_unit_ptr;  /* This structure is used to manage the dynamic memory consumption     associated with compressed bit-streams.  Heap units are managed     within larger `heap_group' structures to minimize the impact of     dynamic memory allocation on implementation efficiency.  The     `group' field points to the group to which the heap unit belongs.     If the heap unit is not currently in use, this field is set to     NULL; it is only set to point to the relevant group once the unit     is allocated to a client via the `dst_codeword_heap__get_unit' function.         The `next' field is available to the user and will generally be     used to create a linked list of heap units which are associated with     a common store. *//*****************************************************************************//*                                dst_heap_group                             *//*****************************************************************************/typedef  struct dst_heap_group {    dst_heap_unit units[DST_HEAP_GROUP_UNITS];    std_int free_units;    struct dst_heap_group *next;  } dst_heap_group, *dst_heap_group_ptr;  /* This structure is used to allocate and manage multiple heap units     at once for improved efficiency.  All heap units managed by the     encoder/decoder are chained via their `next' fields. *//*****************************************************************************//*                               dst_codeword_heap                           *//*****************************************************************************/typedef struct dst_codeword_heap_obj *dst_codeword_heap_ref;typedef dst_heap_unit_ptr (*dst_codeword_heap__get_unit__func)  (dst_codeword_heap_ref self);typedef void (*dst_codeword_heap__return_unit__func)  (dst_codeword_heap_ref self, dst_heap_unit_ptr unit);typedef void (*dst_codeword_heap__terminate__func)  (dst_codeword_heap_ref self);typedef  struct dst_codeword_heap_obj {    dst_codeword_heap__get_unit__func get_unit;    dst_codeword_heap__return_unit__func return_unit;    dst_codeword_heap__terminate__func terminate;    dst_heap_group_ptr heap;  } dst_codeword_heap_obj;  /* This structure represents an object in the same style as those defined     in the public interface header, "ifc.h", which is responsible     for managing the codeword heap.  The arithmetic coding engine requires     a reference to this object. *//* ========================================================================= *//* --------------------------- Exported Functions -------------------------- *//* ========================================================================= */extern dst_codeword_heap_ref  create_dst_codeword_heap(void);#endif /* DST_CODEWORD_HEAP_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -