libsharpyuv: add colorspace utilities

Change-Id: I620c8593dc81f39e747de5ed354332adb7278bed
This commit is contained in:
Maryla
2022-04-06 15:38:21 +02:00
parent b8bca81fb6
commit 01a05de1a7
11 changed files with 185 additions and 22 deletions

View File

@ -11,7 +11,7 @@
//
// Author: Skal (pascal.massimino@gmail.com)
#include "./sharpyuv.h"
#include "sharpyuv/sharpyuv.h"
#include <assert.h>
#include <stdlib.h>
@ -455,17 +455,6 @@ void SharpYuvInit(VP8CPUInfo cpu_info_func) {
sharpyuv_last_cpuinfo_used = cpu_info_func;
}
// In YUV_FIX fixed point precision.
static const SharpYuvConversionMatrix kWebpYuvMatrix = {
{16839, 33059, 6420, 16 << 16},
{-9719, -19081, 28800, 128 << 16},
{28800, -24116, -4684, 128 << 16},
};
const SharpYuvConversionMatrix* SharpYuvGetWebpMatrix(void) {
return &kWebpYuvMatrix;
}
int SharpYuvConvert(const uint8_t* r_ptr, const uint8_t* g_ptr,
const uint8_t* b_ptr, int step, int rgb_stride,
uint8_t* dst_y, int dst_stride_y, uint8_t* dst_u,