Add YUV420 riskiness metric.

Basic version for 8 bit only and C only (no simd).

Hidden behind a compile flag because the precompiled table is
fairly large (114kiB) and more than triples the size of the library.

Change-Id: I165c78e863df6a17b32f578bdbffe3adda9ac1d0
This commit is contained in:
Maryla
2023-11-21 18:14:41 +01:00
parent 89c5b91746
commit d7a0506dcc
10 changed files with 6450 additions and 5 deletions

View File

@ -12,6 +12,7 @@
#ifndef WEBP_SHARPYUV_SHARPYUV_DSP_H_
#define WEBP_SHARPYUV_SHARPYUV_DSP_H_
#include "sharpyuv/sharpyuv.h"
#include "sharpyuv/sharpyuv_cpu.h"
#include "src/webp/types.h"
@ -23,6 +24,15 @@ extern void (*SharpYuvFilterRow)(const int16_t* A, const int16_t* B, int len,
const uint16_t* best_y, uint16_t* out,
int bit_depth);
// For each pixel, computes the index to look up that color in a precomputed
// risk score table where the YUV space is subsampled to a size of
// precomputed_scores_table_sampling^3 (see sharpyuv_risk_table.h)
extern void (*SharpYuvRowToYuvSharpnessIndex)(
const uint8_t* r_ptr, const uint8_t* g_ptr, const uint8_t* b_ptr,
int rgb_step, int rgb_bit_depth, int width, uint16_t* dst,
const SharpYuvConversionMatrix* matrix,
int precomputed_scores_table_sampling);
void SharpYuvInitDsp(void);
#endif // WEBP_SHARPYUV_SHARPYUV_DSP_H_