Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/dav1d/headers.h4
-rw-r--r--src/decode.c16
-rw-r--r--src/recon_tmpl.c12
-rw-r--r--src/tables.c8
-rw-r--r--src/warpmv.c12
5 files changed, 26 insertions, 26 deletions
diff --git a/include/dav1d/headers.h b/include/dav1d/headers.h
index f9b89f3..f850d2d 100644
--- a/include/dav1d/headers.h
+++ b/include/dav1d/headers.h
@@ -95,9 +95,9 @@ typedef struct Dav1dWarpedMotionParams {
union {
struct {
int16_t alpha, beta, gamma, delta;
- };
+ } p;
int16_t abcd[4];
- };
+ } u;
} Dav1dWarpedMotionParams;
enum Dav1dPixelLayout {
diff --git a/src/decode.c b/src/decode.c
index f678215..104dd82 100644
--- a/src/decode.c
+++ b/src/decode.c
@@ -773,10 +773,10 @@ static int decode_b(Dav1dTileContext *const t,
signabs(t->warpmv.matrix[3]),
signabs(t->warpmv.matrix[4]),
signabs(t->warpmv.matrix[5]),
- signabs(t->warpmv.alpha),
- signabs(t->warpmv.beta),
- signabs(t->warpmv.gamma),
- signabs(t->warpmv.delta),
+ signabs(t->warpmv.u.p.alpha),
+ signabs(t->warpmv.u.p.beta),
+ signabs(t->warpmv.u.p.gamma),
+ signabs(t->warpmv.u.p.delta),
b->mv2d.y, b->mv2d.x);
#undef signabs
}
@@ -1843,10 +1843,10 @@ static int decode_b(Dav1dTileContext *const t,
signabs(t->warpmv.matrix[3]),
signabs(t->warpmv.matrix[4]),
signabs(t->warpmv.matrix[5]),
- signabs(t->warpmv.alpha),
- signabs(t->warpmv.beta),
- signabs(t->warpmv.gamma),
- signabs(t->warpmv.delta),
+ signabs(t->warpmv.u.p.alpha),
+ signabs(t->warpmv.u.p.beta),
+ signabs(t->warpmv.u.p.gamma),
+ signabs(t->warpmv.u.p.delta),
b->mv[0].y, b->mv[0].x);
#undef signabs
if (f->frame_thread.pass) {
diff --git a/src/recon_tmpl.c b/src/recon_tmpl.c
index 8e96f8e..987cccb 100644
--- a/src/recon_tmpl.c
+++ b/src/recon_tmpl.c
@@ -1082,11 +1082,11 @@ static int warp_affine(Dav1dTileContext *const t,
const int64_t mvy = ((int64_t) mat[4] * src_x + mat5_y) >> ss_ver;
const int dx = (int) (mvx >> 16) - 4;
- const int mx = (((int) mvx & 0xffff) - wmp->alpha * 4 -
- wmp->beta * 7) & ~0x3f;
+ const int mx = (((int) mvx & 0xffff) - wmp->u.p.alpha * 4 -
+ wmp->u.p.beta * 7) & ~0x3f;
const int dy = (int) (mvy >> 16) - 4;
- const int my = (((int) mvy & 0xffff) - wmp->gamma * 4 -
- wmp->delta * 4) & ~0x3f;
+ const int my = (((int) mvy & 0xffff) - wmp->u.p.gamma * 4 -
+ wmp->u.p.delta * 4) & ~0x3f;
const pixel *ref_ptr;
ptrdiff_t ref_stride = refp->p.stride[!!pl];
@@ -1108,10 +1108,10 @@ static int warp_affine(Dav1dTileContext *const t,
}
if (dst16 != NULL)
dsp->mc.warp8x8t(&dst16[x], dstride, ref_ptr, ref_stride,
- wmp->abcd, mx, my HIGHBD_CALL_SUFFIX);
+ wmp->u.abcd, mx, my HIGHBD_CALL_SUFFIX);
else
dsp->mc.warp8x8(&dst8[x], dstride, ref_ptr, ref_stride,
- wmp->abcd, mx, my HIGHBD_CALL_SUFFIX);
+ wmp->u.abcd, mx, my HIGHBD_CALL_SUFFIX);
}
if (dst8) dst8 += 8 * PXSTRIDE(dstride);
else dst16 += 8 * dstride;
diff --git a/src/tables.c b/src/tables.c
index a50bba7..840b409 100644
--- a/src/tables.c
+++ b/src/tables.c
@@ -391,10 +391,10 @@ const Dav1dWarpedMotionParams dav1d_default_wm_params = {
0, 0, 1 << 16,
0, 0, 1 << 16,
},
- .alpha = 0,
- .beta = 0,
- .gamma = 0,
- .delta = 0,
+ .u.p.alpha = 0,
+ .u.p.beta = 0,
+ .u.p.gamma = 0,
+ .u.p.delta = 0,
};
const int8_t dav1d_cdef_directions[2 + 8 + 2 /* dir */][2 /* pass */] = {
diff --git a/src/warpmv.c b/src/warpmv.c
index a933044..439c430 100644
--- a/src/warpmv.c
+++ b/src/warpmv.c
@@ -82,21 +82,21 @@ int dav1d_get_shear_params(Dav1dWarpedMotionParams *const wm) {
if (mat[2] <= 0) return 1;
- wm->alpha = iclip_wmp(mat[2] - 0x10000);
- wm->beta = iclip_wmp(mat[3]);
+ wm->u.p.alpha = iclip_wmp(mat[2] - 0x10000);
+ wm->u.p.beta = iclip_wmp(mat[3]);
int shift;
const int y = apply_sign(resolve_divisor_32(abs(mat[2]), &shift), mat[2]);
const int64_t v1 = ((int64_t) mat[4] * 0x10000) * y;
const int rnd = (1 << shift) >> 1;
- wm->gamma = iclip_wmp(apply_sign64((int) ((llabs(v1) + rnd) >> shift), v1));
+ wm->u.p.gamma = iclip_wmp(apply_sign64((int) ((llabs(v1) + rnd) >> shift), v1));
const int64_t v2 = ((int64_t) mat[3] * mat[4]) * y;
- wm->delta = iclip_wmp(mat[5] -
+ wm->u.p.delta = iclip_wmp(mat[5] -
apply_sign64((int) ((llabs(v2) + rnd) >> shift), v2) -
0x10000);
- return (4 * abs(wm->alpha) + 7 * abs(wm->beta) >= 0x10000) ||
- (4 * abs(wm->gamma) + 4 * abs(wm->delta) >= 0x10000);
+ return (4 * abs(wm->u.p.alpha) + 7 * abs(wm->u.p.beta) >= 0x10000) ||
+ (4 * abs(wm->u.p.gamma) + 4 * abs(wm->u.p.delta) >= 0x10000);
}
static int resolve_divisor_64(const uint64_t d, int *const shift) {