Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
BC_ReedSolomonGF256.h
Go to the documentation of this file.
1// Copyright 2014 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#ifndef FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMONGF256_H_
8#define FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMONGF256_H_
9
10#include <memory>
11
12#include "third_party/abseil-cpp/absl/types/optional.h"
13
14class CBC_ReedSolomonGF256Poly;
15
17 public:
18 explicit CBC_ReedSolomonGF256(int32_t primitive);
20
21 CBC_ReedSolomonGF256Poly* GetZero() const { return m_zero.get(); }
22 CBC_ReedSolomonGF256Poly* GetOne() const { return m_one.get(); }
23
25 int32_t coefficient);
26 static int32_t AddOrSubtract(int32_t a, int32_t b);
27 int32_t Exp(int32_t a);
28 absl::optional<int32_t> Inverse(int32_t a);
29 int32_t Multiply(int32_t a, int32_t b);
30 void Init();
31
32 private:
33 std::unique_ptr<CBC_ReedSolomonGF256Poly> m_zero;
34 std::unique_ptr<CBC_ReedSolomonGF256Poly> m_one;
35 int32_t m_expTable[256];
36 int32_t m_logTable[256];
37};
38
39#endif // FXBARCODE_COMMON_REEDSOLOMON_BC_REEDSOLOMONGF256_H_
bool Encode(std::vector< int32_t > *toEncode, size_t ecBytes)
CBC_ReedSolomonEncoder(CBC_ReedSolomonGF256 *field)
CBC_ReedSolomonGF256Poly * GetZero() const
int32_t Multiply(int32_t a, int32_t b)
absl::optional< int32_t > Inverse(int32_t a)
CBC_ReedSolomonGF256Poly * GetOne() const
std::unique_ptr< CBC_ReedSolomonGF256Poly > BuildMonomial(int32_t degree, int32_t coefficient)
CBC_ReedSolomonGF256(int32_t primitive)
static int32_t AddOrSubtract(int32_t a, int32_t b)