mirror of
https://github.com/webmproject/libwebp.git
synced 2024-11-20 04:18:26 +01:00
dsp: s/VP8LSetHistogramData/VP8SetHistogramData/
this function is for lossy encoding; the VP8L prefix is used by lossless Change-Id: I147590a91477a77af51ed79cc640546dfe53abdb
This commit is contained in:
parent
ede5e1584c
commit
182497993b
@ -183,8 +183,8 @@ typedef void (*VP8CHisto)(const uint8_t* ref, const uint8_t* pred,
|
|||||||
VP8Histogram* const histo);
|
VP8Histogram* const histo);
|
||||||
extern VP8CHisto VP8CollectHistogram;
|
extern VP8CHisto VP8CollectHistogram;
|
||||||
// General-purpose util function to help VP8CollectHistogram().
|
// General-purpose util function to help VP8CollectHistogram().
|
||||||
void VP8LSetHistogramData(const int distribution[MAX_COEFF_THRESH + 1],
|
void VP8SetHistogramData(const int distribution[MAX_COEFF_THRESH + 1],
|
||||||
VP8Histogram* const histo);
|
VP8Histogram* const histo);
|
||||||
|
|
||||||
// must be called before using any of the above
|
// must be called before using any of the above
|
||||||
void VP8EncDspInit(void);
|
void VP8EncDspInit(void);
|
||||||
|
@ -41,8 +41,8 @@ const int VP8DspScan[16 + 4 + 4] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
// general-purpose util function
|
// general-purpose util function
|
||||||
void VP8LSetHistogramData(const int distribution[MAX_COEFF_THRESH + 1],
|
void VP8SetHistogramData(const int distribution[MAX_COEFF_THRESH + 1],
|
||||||
VP8Histogram* const histo) {
|
VP8Histogram* const histo) {
|
||||||
int max_value = 0, last_non_zero = 1;
|
int max_value = 0, last_non_zero = 1;
|
||||||
int k;
|
int k;
|
||||||
for (k = 0; k <= MAX_COEFF_THRESH; ++k) {
|
for (k = 0; k <= MAX_COEFF_THRESH; ++k) {
|
||||||
@ -74,7 +74,7 @@ static void CollectHistogram(const uint8_t* ref, const uint8_t* pred,
|
|||||||
++distribution[clipped_value];
|
++distribution[clipped_value];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VP8LSetHistogramData(distribution, histo);
|
VP8SetHistogramData(distribution, histo);
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@ -1475,7 +1475,7 @@ static void CollectHistogram(const uint8_t* ref, const uint8_t* pred,
|
|||||||
: "memory"
|
: "memory"
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
VP8LSetHistogramData(distribution, histo);
|
VP8SetHistogramData(distribution, histo);
|
||||||
}
|
}
|
||||||
|
|
||||||
#undef CONVERT_COEFFS_TO_BIN
|
#undef CONVERT_COEFFS_TO_BIN
|
||||||
|
@ -749,7 +749,7 @@ static void CollectHistogram(const uint8_t* ref, const uint8_t* pred,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VP8LSetHistogramData(distribution, histo);
|
VP8SetHistogramData(distribution, histo);
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
@ -95,7 +95,7 @@ static void CollectHistogram(const uint8_t* ref, const uint8_t* pred,
|
|||||||
++distribution[out[k]];
|
++distribution[out[k]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
VP8LSetHistogramData(distribution, histo);
|
VP8SetHistogramData(distribution, histo);
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user