PEZW_globals.cpp
上传用户:sun1608
上传日期:2007-02-02
资源大小:6116k
文件大小:5k
源码类别:

流媒体/Mpeg4/MP4

开发平台:

Visual C++

  1. /****************************************************************************/
  2. /*   MPEG4 Visual Texture Coding (VTC) Mode Software                        */
  3. /*                                                                          */
  4. /*   This software was jointly developed by the following participants:     */
  5. /*                                                                          */
  6. /*   Single-quant,  multi-quant and flow control                            */
  7. /*   are provided by  Sarnoff Corporation                                   */
  8. /*     Iraj Sodagar   (iraj@sarnoff.com)                                    */
  9. /*     Hung-Ju Lee    (hjlee@sarnoff.com)                                   */
  10. /*     Paul Hatrack   (hatrack@sarnoff.com)                                 */
  11. /*     Shipeng Li     (shipeng@sarnoff.com)                                 */
  12. /*     Bing-Bing Chai (bchai@sarnoff.com)                                   */
  13. /*     B.S. Srinivas  (bsrinivas@sarnoff.com)                               */
  14. /*                                                                          */
  15. /*   Bi-level is provided by Texas Instruments                              */
  16. /*     Jie Liang      (liang@ti.com)                                        */
  17. /*                                                                          */
  18. /*   Shape Coding is provided by  OKI Electric Industry Co., Ltd.           */
  19. /*     Zhixiong Wu    (sgo@hlabs.oki.co.jp)                                 */
  20. /*     Yoshihiro Ueda (yueda@hlabs.oki.co.jp)                               */
  21. /*     Toshifumi Kanamaru (kanamaru@hlabs.oki.co.jp)                        */
  22. /*                                                                          */
  23. /*   OKI, Sharp, Sarnoff, TI and Microsoft contributed to bitstream         */
  24. /*   exchange and bug fixing.                                               */
  25. /*                                                                          */
  26. /*                                                                          */
  27. /* In the course of development of the MPEG-4 standard, this software       */
  28. /* module is an implementation of a part of one or more MPEG-4 tools as     */
  29. /* specified by the MPEG-4 standard.                                        */
  30. /*                                                                          */
  31. /* The copyright of this software belongs to ISO/IEC. ISO/IEC gives use     */
  32. /* of the MPEG-4 standard free license to use this  software module or      */
  33. /* modifications thereof for hardware or software products claiming         */
  34. /* conformance to the MPEG-4 standard.                                      */
  35. /*                                                                          */
  36. /* Those intending to use this software module in hardware or software      */
  37. /* products are advised that use may infringe existing  patents. The        */
  38. /* original developers of this software module and their companies, the     */
  39. /* subsequent editors and their companies, and ISO/IEC have no liability    */
  40. /* and ISO/IEC have no liability for use of this software module or         */
  41. /* modification thereof in an implementation.                               */
  42. /*                                                                          */
  43. /* Permission is granted to MPEG members to use, copy, modify,              */
  44. /* and distribute the software modules ( or portions thereof )              */
  45. /* for standardization activity within ISO/IEC JTC1/SC29/WG11.              */
  46. /*                                                                          */
  47. /* Copyright 1995, 1996, 1997, 1998 ISO/IEC                                 */
  48. /****************************************************************************/
  49. /****************************************************************************/
  50. /*     Texas Instruments Predictive Embedded Zerotree (PEZW) Image Codec    */
  51. /*    Developed by Jie Liang (liang@ti.com)                                */
  52. /*                         */ 
  53. /*     Copyright 1996, 1997, 1998 Texas Instruments                    */
  54. /****************************************************************************/
  55. /****************************************************************************
  56.    File name:         PEZW_globals.c
  57.    Author:            Jie Liang  (liang@ti.com)
  58.    Functions:         define global variables visible to the PEZW module
  59.    Revisions:         v1.0 (10/04/98)
  60. *****************************************************************************/
  61. #include <wvtpezw_tree_codec.hpp>
  62. #include <PEZW_zerotree.hpp>
  63. WINT *the_wvt_tree;
  64. WINT *wvt_tree_maxval; 
  65. WINT MaxValue; 
  66. int *snr_weight;
  67. int len_tree_struct;
  68. WINT *abs_wvt_tree;
  69. int *vloc_map, *hloc_map;
  70. short *ScanTrees;
  71. short *next_ScanTrees;
  72. int tree_depth;
  73. short *sig_pos;
  74. char *sig_layer;
  75. int num_Sig;
  76. Ac_encoder **Encoder;
  77. Ac_decoder **Decoder;
  78. unsigned char ***buffer_ptr;
  79. unsigned char bptemp;
  80. short *level_pos;
  81. unsigned char *prev_label;
  82. char *sign_bit;
  83. Ac_model *context_model;
  84. Ac_model *model_sign;
  85. Ac_model *model_sub;
  86. unsigned int *maskbit;
  87. unsigned char *bitplane;
  88. int freq_dom_ZTRZ[No_of_symbols] =   {1, 1, 1, 1, 0};     
  89. int freq_dom2_IZER[No_of_symbols] =  {1, 1, 0, 0, 0};