mirror of
https://github.com/drewcassidy/quicktex.git
synced 2024-09-13 06:37:34 +00:00
Fix circular dependency
This commit is contained in:
parent
5e2f790ee6
commit
e75ae9c570
@ -37,6 +37,7 @@
|
|||||||
#include "Histogram.h"
|
#include "Histogram.h"
|
||||||
#include "OrderTable.h"
|
#include "OrderTable.h"
|
||||||
#include "SingleColorTable.h"
|
#include "SingleColorTable.h"
|
||||||
|
#include "Tables.h"
|
||||||
|
|
||||||
namespace rgbcx {
|
namespace rgbcx {
|
||||||
using InterpolatorPtr = std::shared_ptr<Interpolator>;
|
using InterpolatorPtr = std::shared_ptr<Interpolator>;
|
||||||
|
@ -29,18 +29,16 @@
|
|||||||
|
|
||||||
#include "../Vector4.h"
|
#include "../Vector4.h"
|
||||||
#include "../util.h"
|
#include "../util.h"
|
||||||
#include "OrderTable.h"
|
|
||||||
#include "Tables.h"
|
|
||||||
|
|
||||||
namespace rgbcx {
|
namespace rgbcx {
|
||||||
template <size_t N> class Histogram {
|
template <size_t N> class Histogram {
|
||||||
public:
|
public:
|
||||||
using Hash = uint16_t;
|
using Hash = uint16_t;
|
||||||
|
|
||||||
Histogram() { _bins = {0}; }
|
Histogram() { _bins.fill(0); }
|
||||||
|
|
||||||
Histogram(std::array<uint8_t, 16> sels) {
|
Histogram(std::array<uint8_t, 16> sels) {
|
||||||
_bins = {0};
|
_bins.fill(0);
|
||||||
for (unsigned i = 0; i < 16; i++) {
|
for (unsigned i = 0; i < 16; i++) {
|
||||||
assert(sels[i] < N);
|
assert(sels[i] < N);
|
||||||
_bins[sels[i]]++;
|
_bins[sels[i]]++;
|
||||||
@ -74,8 +72,6 @@ template <size_t N> class Histogram {
|
|||||||
unsigned packed = 0;
|
unsigned packed = 0;
|
||||||
for (unsigned i = 0; i < (N - 1); i++) { packed |= (_bins[i] << (4U * i)); }
|
for (unsigned i = 0; i < (N - 1); i++) { packed |= (_bins[i] << (4U * i)); }
|
||||||
|
|
||||||
// assert(packed < HashCount);
|
|
||||||
|
|
||||||
return packed;
|
return packed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user