mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-19 23:07:33 +09:00
parent
3cc2485e42
commit
072fbe1a93
46 changed files with 395 additions and 173 deletions
|
|
@ -79,4 +79,4 @@ extern const uint16_t VP8FixedCostsI4[NUM_BMODES][NUM_BMODES][NUM_BMODES];
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* WEBP_ENC_COST_ENC_H_ */
|
||||
#endif // WEBP_ENC_COST_ENC_H_
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ typedef struct {
|
|||
double literal_cost_; // Cached values of dominant entropy costs:
|
||||
double red_cost_; // literal, red & blue.
|
||||
double blue_cost_;
|
||||
uint8_t is_used_[5]; // 5 for literal, red, blue, alpha, distance
|
||||
} VP8LHistogram;
|
||||
|
||||
// Collection of histograms with fixed capacity, allocated as one
|
||||
|
|
@ -67,7 +68,9 @@ void VP8LHistogramCreate(VP8LHistogram* const p,
|
|||
int VP8LGetHistogramSize(int palette_code_bits);
|
||||
|
||||
// Set the palette_code_bits and reset the stats.
|
||||
void VP8LHistogramInit(VP8LHistogram* const p, int palette_code_bits);
|
||||
// If init_arrays is true, the arrays are also filled with 0's.
|
||||
void VP8LHistogramInit(VP8LHistogram* const p, int palette_code_bits,
|
||||
int init_arrays);
|
||||
|
||||
// Collect all the references into a histogram (without reset)
|
||||
void VP8LHistogramStoreRefs(const VP8LBackwardRefs* const refs,
|
||||
|
|
@ -83,6 +86,9 @@ void VP8LFreeHistogramSet(VP8LHistogramSet* const histo);
|
|||
// using 'cache_bits'. Return NULL in case of memory error.
|
||||
VP8LHistogramSet* VP8LAllocateHistogramSet(int size, int cache_bits);
|
||||
|
||||
// Set the histograms in set to 0.
|
||||
void VP8LHistogramSetClear(VP8LHistogramSet* const set);
|
||||
|
||||
// Allocate and initialize histogram object with specified 'cache_bits'.
|
||||
// Returns NULL in case of memory error.
|
||||
// Special case of VP8LAllocateHistogramSet, with size equals 1.
|
||||
|
|
@ -113,7 +119,7 @@ double VP8LBitsEntropy(const uint32_t* const array, int n);
|
|||
|
||||
// Estimate how many bits the combined entropy of literals and distance
|
||||
// approximately maps to.
|
||||
double VP8LHistogramEstimateBits(const VP8LHistogram* const p);
|
||||
double VP8LHistogramEstimateBits(VP8LHistogram* const p);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ extern "C" {
|
|||
// version numbers
|
||||
#define ENC_MAJ_VERSION 1
|
||||
#define ENC_MIN_VERSION 0
|
||||
#define ENC_REV_VERSION 0
|
||||
#define ENC_REV_VERSION 2
|
||||
|
||||
enum { MAX_LF_LEVELS = 64, // Maximum loop filter level
|
||||
MAX_VARIABLE_LEVEL = 67, // last (inclusive) level with variable cost
|
||||
|
|
@ -278,7 +278,7 @@ int VP8IteratorIsDone(const VP8EncIterator* const it);
|
|||
// Import uncompressed samples from source.
|
||||
// If tmp_32 is not NULL, import boundary samples too.
|
||||
// tmp_32 is a 32-bytes scratch buffer that must be aligned in memory.
|
||||
void VP8IteratorImport(VP8EncIterator* const it, uint8_t* tmp_32);
|
||||
void VP8IteratorImport(VP8EncIterator* const it, uint8_t* const tmp_32);
|
||||
// export decimated samples
|
||||
void VP8IteratorExport(const VP8EncIterator* const it);
|
||||
// go to next macroblock. Returns false if not finished.
|
||||
|
|
@ -515,4 +515,4 @@ void WebPCleanupTransparentAreaLossless(WebPPicture* const pic);
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* WEBP_ENC_VP8I_ENC_H_ */
|
||||
#endif // WEBP_ENC_VP8I_ENC_H_
|
||||
|
|
|
|||
|
|
@ -115,4 +115,4 @@ void VP8LColorSpaceTransform(int width, int height, int bits, int quality,
|
|||
} // extern "C"
|
||||
#endif
|
||||
|
||||
#endif /* WEBP_ENC_VP8LI_ENC_H_ */
|
||||
#endif // WEBP_ENC_VP8LI_ENC_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue