Subversion Repositories QNX 8.QNX8 IFS tool

Rev

Blame | Last modification | View Log | Download | RSS feed

  1. /* n2d_to.c -- implementation of the NRV2D test overlap algorithm
  2.  
  3.    This file is part of the UCL data compression library.
  4.  
  5.    Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
  6.    All Rights Reserved.
  7.  
  8.    The UCL library is free software; you can redistribute it and/or
  9.    modify it under the terms of the GNU General Public License as
  10.    published by the Free Software Foundation; either version 2 of
  11.    the License, or (at your option) any later version.
  12.  
  13.    The UCL library is distributed in the hope that it will be useful,
  14.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.    GNU General Public License for more details.
  17.  
  18.    You should have received a copy of the GNU General Public License
  19.    along with the UCL library; see the file COPYING.
  20.    If not, write to the Free Software Foundation, Inc.,
  21.    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  22.  
  23.    Markus F.X.J. Oberhumer
  24.    <markus@oberhumer.com>
  25.    http://www.oberhumer.com/opensource/ucl/
  26.  */
  27.  
  28.  
  29.  
  30. /***********************************************************************
  31. // entries for the different bit-buffer sizes
  32. ************************************************************************/
  33.  
  34. #include "ucl_conf.h"
  35. #include <ucl/ucl.h>
  36. #include "getbit.h"
  37.  
  38. #define SAFE
  39. #define TEST_OVERLAP
  40.  
  41.  
  42. UCL_PUBLIC(int)
  43. ucl_nrv2d_test_overlap_8        ( const ucl_bytep src, ucl_uint src_off,
  44.                                         ucl_uint  src_len, ucl_uintp dst_len,
  45.                                         ucl_voidp wrkmem )
  46. {
  47. #define getbit(bb)      getbit_8(bb,src,ilen)
  48. #include "n2d_d.c"
  49. #undef getbit
  50. }
  51.  
  52.  
  53. UCL_PUBLIC(int)
  54. ucl_nrv2d_test_overlap_le16     ( const ucl_bytep src, ucl_uint src_off,
  55.                                         ucl_uint  src_len, ucl_uintp dst_len,
  56.                                         ucl_voidp wrkmem )
  57. {
  58. #define getbit(bb)      getbit_le16(bb,src,ilen)
  59. #include "n2d_d.c"
  60. #undef getbit
  61. }
  62.  
  63.  
  64. UCL_PUBLIC(int)
  65. ucl_nrv2d_test_overlap_le32     ( const ucl_bytep src, ucl_uint src_off,
  66.                                         ucl_uint  src_len, ucl_uintp dst_len,
  67.                                         ucl_voidp wrkmem )
  68. {
  69.     unsigned bc = 0;
  70. #define getbit(bb)      getbit_le32(bb,bc,src,ilen)
  71. #include "n2d_d.c"
  72. #undef getbit
  73. }
  74.  
  75.  
  76. /*
  77. vi:ts=4:et
  78. */
  79.  
  80.