|
|
|
@ -283,17 +283,17 @@ static unsigned char clip_table[768]; |
|
|
|
|
|
|
|
|
|
static SwsVector *sws_getConvVec(SwsVector *a, SwsVector *b); |
|
|
|
|
|
|
|
|
|
static const uint8_t __attribute__((aligned(8))) dither_2x2_4[2][8]={ |
|
|
|
|
DECLARE_ALIGNED(8, static const uint8_t, dither_2x2_4[2][8])={ |
|
|
|
|
{ 1, 3, 1, 3, 1, 3, 1, 3, }, |
|
|
|
|
{ 2, 0, 2, 0, 2, 0, 2, 0, }, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
static const uint8_t __attribute__((aligned(8))) dither_2x2_8[2][8]={ |
|
|
|
|
DECLARE_ALIGNED(8, static const uint8_t, dither_2x2_8[2][8])={ |
|
|
|
|
{ 6, 2, 6, 2, 6, 2, 6, 2, }, |
|
|
|
|
{ 0, 4, 0, 4, 0, 4, 0, 4, }, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
const uint8_t __attribute__((aligned(8))) dither_8x8_32[8][8]={ |
|
|
|
|
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_32[8][8])={ |
|
|
|
|
{ 17, 9, 23, 15, 16, 8, 22, 14, }, |
|
|
|
|
{ 5, 29, 3, 27, 4, 28, 2, 26, }, |
|
|
|
|
{ 21, 13, 19, 11, 20, 12, 18, 10, }, |
|
|
|
@ -305,7 +305,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_32[8][8]={ |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#if 0 |
|
|
|
|
const uint8_t __attribute__((aligned(8))) dither_8x8_64[8][8]={ |
|
|
|
|
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_64[8][8])={ |
|
|
|
|
{ 0, 48, 12, 60, 3, 51, 15, 63, }, |
|
|
|
|
{ 32, 16, 44, 28, 35, 19, 47, 31, }, |
|
|
|
|
{ 8, 56, 4, 52, 11, 59, 7, 55, }, |
|
|
|
@ -317,7 +317,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_64[8][8]={ |
|
|
|
|
}; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
const uint8_t __attribute__((aligned(8))) dither_8x8_73[8][8]={ |
|
|
|
|
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_73[8][8])={ |
|
|
|
|
{ 0, 55, 14, 68, 3, 58, 17, 72, }, |
|
|
|
|
{ 37, 18, 50, 32, 40, 22, 54, 35, }, |
|
|
|
|
{ 9, 64, 5, 59, 13, 67, 8, 63, }, |
|
|
|
@ -329,7 +329,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_73[8][8]={ |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
#if 0 |
|
|
|
|
const uint8_t __attribute__((aligned(8))) dither_8x8_128[8][8]={ |
|
|
|
|
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_128[8][8])={ |
|
|
|
|
{ 68, 36, 92, 60, 66, 34, 90, 58, }, |
|
|
|
|
{ 20, 116, 12, 108, 18, 114, 10, 106, }, |
|
|
|
|
{ 84, 52, 76, 44, 82, 50, 74, 42, }, |
|
|
|
@ -342,7 +342,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_128[8][8]={ |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#if 1 |
|
|
|
|
const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={ |
|
|
|
|
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={ |
|
|
|
|
{117, 62, 158, 103, 113, 58, 155, 100, }, |
|
|
|
|
{ 34, 199, 21, 186, 31, 196, 17, 182, }, |
|
|
|
|
{144, 89, 131, 76, 141, 86, 127, 72, }, |
|
|
|
@ -354,7 +354,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={ |
|
|
|
|
}; |
|
|
|
|
#elif 1 |
|
|
|
|
// tries to correct a gamma of 1.5
|
|
|
|
|
const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={ |
|
|
|
|
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={ |
|
|
|
|
{ 0, 143, 18, 200, 2, 156, 25, 215, }, |
|
|
|
|
{ 78, 28, 125, 64, 89, 36, 138, 74, }, |
|
|
|
|
{ 10, 180, 3, 161, 16, 195, 8, 175, }, |
|
|
|
@ -366,7 +366,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={ |
|
|
|
|
}; |
|
|
|
|
#elif 1 |
|
|
|
|
// tries to correct a gamma of 2.0
|
|
|
|
|
const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={ |
|
|
|
|
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={ |
|
|
|
|
{ 0, 124, 8, 193, 0, 140, 12, 213, }, |
|
|
|
|
{ 55, 14, 104, 42, 66, 19, 119, 52, }, |
|
|
|
|
{ 3, 168, 1, 145, 6, 187, 3, 162, }, |
|
|
|
@ -378,7 +378,7 @@ const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={ |
|
|
|
|
}; |
|
|
|
|
#else |
|
|
|
|
// tries to correct a gamma of 2.5
|
|
|
|
|
const uint8_t __attribute__((aligned(8))) dither_8x8_220[8][8]={ |
|
|
|
|
DECLARE_ALIGNED(8, const uint8_t, dither_8x8_220[8][8])={ |
|
|
|
|
{ 0, 107, 3, 187, 0, 125, 6, 212, }, |
|
|
|
|
{ 39, 7, 86, 28, 49, 11, 102, 36, }, |
|
|
|
|
{ 1, 158, 0, 131, 3, 180, 1, 151, }, |
|
|
|
|