Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Rar20Multimedia.h « Rar20 « Compress « 7zip - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7af86d07e27dc553461b1e1234c20fa0ee6eaca2 (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
// Rar20Multimedia.h
// According to unRAR license,
// this code may not be used to develop a 
// RAR (WinRAR) compatible archiver

#ifndef __RAR20_MULTIMEDIA_H
#define __RAR20_MULTIMEDIA_H

#include "../../../Common/Types.h"

namespace NCompress {
namespace NRar20 {
namespace NMultimedia {

struct CAudioVariables
{
  int K1,K2,K3,K4,K5;
  int D1,D2,D3,D4;
  int LastDelta;
  UInt32 Dif[11];
  UInt32 ByteCount;
  int LastChar;

  void Init();
};

const int kNumChanelsMax = 4;

class CPredictor
{
  CAudioVariables m_AudioVariablesArray[kNumChanelsMax];
  int m_ChannelDelta;
public:
  int CurrentChannel;

  void Init();
  Byte Predict();
  void Update(Byte realValue, int predictedValue);
};

}}}

#endif