finalize scalar YCbCr conversion back-ported from SSE version;

add missing STBIDEFs to a few functions;
update documentation with full 1.49 info even though most isn't implemented yet
This commit is contained in:
Sean Barrett
2014-12-20 05:13:25 -08:00
parent f259bf27e9
commit bd6b78f268
2 changed files with 107 additions and 55 deletions

View File

@ -9,7 +9,7 @@
#define PNGSUITE_PRIMARY
#if 1
#if 0
void test_ycbcr(void)
{
STBI_SIMD_ALIGN(unsigned char, y[256]);
@ -28,15 +28,15 @@ void test_ycbcr(void)
cb[k] = j;
cr[k] = i;
}
stbi__YCbCr_to_RGB_sse2(out1[0], y, cb, cr, 256, 4);
stbi__YCbCr_to_RGB_backport(out2[0], y, cb, cr, 256, 4);
stbi__YCbCr_to_RGB_row(out1[0], y, cb, cr, 256, 4);
stbi__YCbCr_to_RGB_sse2(out2[0], y, cb, cr, 256, 4);
for (k=0; k < 256; ++k) {
if (out1[k][0] != out2[k][0] || out1[k][1] != out2[k][1] || out1[k][2] != out2[k][2]) {
int dist1 = abs(out1[k][0] - out2[k][0]);
int dist2 = abs(out1[k][1] - out2[k][1]);
int dist3 = abs(out1[k][2] - out2[k][2]);
++count;
if (dist2)
if (out1[k][1] > out2[k][1])
++bigcount;
}
}
@ -50,7 +50,7 @@ void test_ycbcr(void)
int main(int argc, char **argv)
{
int w,h;
test_ycbcr();
//test_ycbcr();
if (argc > 1) {
int i;
for (i=1; i < argc; ++i) {