mirror of
https://github.com/yuzu-emu/FasTC.git
synced 2024-11-24 05:45:41 +01:00
Small refactoring changes.
This commit is contained in:
parent
8ca5d7ac44
commit
8cad373e8e
@ -70,6 +70,7 @@
|
||||
|
||||
// Forward Declarations
|
||||
class BitStream;
|
||||
struct VisitedState;
|
||||
const int kMaxEndpoints = 3;
|
||||
|
||||
static const int kPBits[4][2] = {
|
||||
@ -213,13 +214,12 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
double OptimizeEndpointsForCluster(const RGBACluster &cluster, RGBAVector &p1, RGBAVector &p2, int *bestIndices, int &bestPbitCombo) const;
|
||||
|
||||
struct VisitedState {
|
||||
RGBAVector p1;
|
||||
RGBAVector p2;
|
||||
int pBitCombo;
|
||||
};
|
||||
double OptimizeEndpointsForCluster(
|
||||
const RGBACluster &cluster,
|
||||
RGBAVector &p1, RGBAVector &p2,
|
||||
int *bestIndices,
|
||||
int &bestPbitCombo
|
||||
) const;
|
||||
|
||||
void PickBestNeighboringEndpoints(
|
||||
const RGBACluster &cluster,
|
||||
|
@ -517,7 +517,19 @@ static void ChangePointForDirWithPbitChange(RGBAVector &v, int dir, int oldPbit,
|
||||
}
|
||||
}
|
||||
|
||||
void BC7CompressionMode::PickBestNeighboringEndpoints(const RGBACluster &cluster, const RGBAVector &p1, const RGBAVector &p2, const int curPbitCombo, RGBAVector &np1, RGBAVector &np2, int &nPbitCombo, const VisitedState *visitedStates, int nVisited, float stepSz) const {
|
||||
struct VisitedState {
|
||||
RGBAVector p1;
|
||||
RGBAVector p2;
|
||||
int pBitCombo;
|
||||
};
|
||||
|
||||
void BC7CompressionMode::PickBestNeighboringEndpoints(
|
||||
const RGBACluster &cluster,
|
||||
const RGBAVector &p1, const RGBAVector &p2, const int curPbitCombo,
|
||||
RGBAVector &np1, RGBAVector &np2, int &nPbitCombo,
|
||||
const VisitedState *visitedStates, int nVisited,
|
||||
float stepSz
|
||||
) const {
|
||||
|
||||
// !SPEED! There might be a way to make this faster since we're working
|
||||
// with floating point values that are powers of two. We should be able
|
||||
|
Loading…
Reference in New Issue
Block a user