mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-16 13:59:51 +02:00
new segmentation algorithm
fixes the 'blocky sky problem' (saturation problem: when luma was flat, chroma noise was taking over, resulting in random segment id assigned. When just using a common uniform segment was better). + side clean-up and readibility/experimentability MACRO'ization + added '-map 7' option Change-Id: I35982a9e43c0fecbfdd7b05e4813e8ba8c121d71
This commit is contained in:
@ -29,9 +29,6 @@ extern "C" {
|
||||
#define ENC_MIN_VERSION 2
|
||||
#define ENC_REV_VERSION 0
|
||||
|
||||
// size of histogram used by CollectHistogram.
|
||||
#define MAX_COEFF_THRESH 64
|
||||
|
||||
// intra prediction modes
|
||||
enum { B_DC_PRED = 0, // 4x4 modes
|
||||
B_TM_PRED = 1,
|
||||
@ -162,6 +159,14 @@ static WEBP_INLINE int QUANTDIV(int n, int iQ, int B) {
|
||||
}
|
||||
extern const uint8_t VP8Zigzag[16];
|
||||
|
||||
// size of histogram used by CollectHistogram.
|
||||
#define MAX_COEFF_THRESH 31
|
||||
typedef struct VP8Histogram VP8Histogram;
|
||||
struct VP8Histogram {
|
||||
// TODO(skal): we only need to store the max_value and last_non_zero actually.
|
||||
int distribution[MAX_COEFF_THRESH + 1];
|
||||
};
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// Headers
|
||||
|
||||
|
Reference in New Issue
Block a user