|
@@ -23,6 +23,7 @@
|
|
|
|
|
|
#include "intrax8dsp.h"
|
|
|
#include "libavutil/common.h"
|
|
|
+#include "libavutil/intreadwrite.h"
|
|
|
|
|
|
/*
|
|
|
* area positions, #3 is 1 pixel only, other are 8 pixels
|
|
@@ -226,22 +227,16 @@ static void spatial_compensation_1(const uint8_t *restrict src, uint8_t *restric
|
|
|
|
|
|
static void spatial_compensation_2(const uint8_t *restrict src, uint8_t *restrict dst, ptrdiff_t stride)
|
|
|
{
|
|
|
- int x, y;
|
|
|
-
|
|
|
- for (y = 0; y < 8; y++) {
|
|
|
- for (x = 0; x < 8; x++)
|
|
|
- dst[x] = src[area4 + 1 + y + x];
|
|
|
+ for (int y = 0; y < 8; y++) {
|
|
|
+ AV_COPY64U(dst, src + area4 + 1 + y);
|
|
|
dst += stride;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
static void spatial_compensation_3(const uint8_t *restrict src, uint8_t *restrict dst, ptrdiff_t stride)
|
|
|
{
|
|
|
- int x, y;
|
|
|
-
|
|
|
- for (y = 0; y < 8; y++) {
|
|
|
- for (x = 0; x < 8; x++)
|
|
|
- dst[x] = src[area4 + ((y + 1) >> 1) + x];
|
|
|
+ for (int y = 0; y < 8; y++) {
|
|
|
+ AV_COPY64U(dst, src + area4 + ((y + 1) >> 1));
|
|
|
dst += stride;
|
|
|
}
|
|
|
}
|
|
@@ -274,11 +269,8 @@ static void spatial_compensation_5(const uint8_t *restrict src, uint8_t *restric
|
|
|
|
|
|
static void spatial_compensation_6(const uint8_t *restrict src, uint8_t *restrict dst, ptrdiff_t stride)
|
|
|
{
|
|
|
- int x, y;
|
|
|
-
|
|
|
- for (y = 0; y < 8; y++) {
|
|
|
- for (x = 0; x < 8; x++)
|
|
|
- dst[x] = src[area3 + x - y];
|
|
|
+ for (int y = 0; y < 8; y++) {
|
|
|
+ AV_COPY64U(dst, src + area3 - y);
|
|
|
dst += stride;
|
|
|
}
|
|
|
}
|