File: LSBFDecoder.cc

package info (click to toggle)
apngasm 2.91-6
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,760 kB
  • sloc: ansic: 34,259; cpp: 7,258; makefile: 40
file content (30 lines) | stat: -rw-r--r-- 491 bytes parent folder | download | duplicates (20)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include "LSBFDecoder.h"

namespace NStream {
namespace NLSBF {

BYTE kInvertTable[256];

class CInverterTableInitializer
{
public:
  CInverterTableInitializer()
  {
    for(int i = 0; i < 256; i++)
    {
      BYTE aByte = BYTE(i);
      BYTE aByteInvert = 0;
      for(int j = 0; j < 8; j++)
      {
        aByteInvert <<= 1;
        if (aByte & 1)
          aByteInvert |= 1;
        aByte >>= 1;
      }
      kInvertTable[i] = aByteInvert;
    }
  }
} g_InverterTableInitializer;


}}