mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-12 22:14:29 +02:00
anim_diff: add a -raw_comparison flag
If this flag is not used, RGB is premultiplied before comparison. Otherwise, the raw R/G/B values are compared, which can be a problem in transparent area (alpha=0 R/G/B=anything) Change-Id: I131cc10ec92414ad508b81f599a60d0097cac470
This commit is contained in:
committed by
James Zern
parent
155c1b222b
commit
acb297e9c2
@ -40,8 +40,10 @@ bool ReadAnimatedImage(const char filename[], AnimatedImage* const image,
|
||||
bool dump_frames, const char dump_folder[]);
|
||||
|
||||
// Given two RGBA buffers, calculate max pixel difference and PSNR.
|
||||
// If 'premultiply' is true, R/G/B values will be pre-multiplied by the
|
||||
// transparency before comparison.
|
||||
void GetDiffAndPSNR(const uint8_t rgba1[], const uint8_t rgba2[],
|
||||
uint32_t width, uint32_t height, int* const max_diff,
|
||||
double* const psnr);
|
||||
uint32_t width, uint32_t height, bool premultiply,
|
||||
int* const max_diff, double* const psnr);
|
||||
|
||||
#endif // WEBP_EXAMPLES_ANIM_UTIL_H_
|
||||
|
Reference in New Issue
Block a user