Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
aom-rav1e
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Xiph.Org
aom-rav1e
Commits
e51ee021
Commit
e51ee021
authored
Sep 09, 2016
by
Sarah Parker
Committed by
Gerrit Code Review
Sep 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Swap order of affine parameters" into nextgenv2
parents
797cc30f
c4bcb506
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
30 additions
and
18 deletions
+30
-18
av1/common/mv.h
av1/common/mv.h
+2
-2
av1/common/warped_motion.c
av1/common/warped_motion.c
+3
-3
av1/decoder/decodeframe.c
av1/decoder/decodeframe.c
+3
-3
av1/encoder/bitstream.c
av1/encoder/bitstream.c
+3
-3
av1/encoder/encodeframe.c
av1/encoder/encodeframe.c
+6
-4
av1/encoder/global_motion.h
av1/encoder/global_motion.h
+11
-1
av1/encoder/ransac.c
av1/encoder/ransac.c
+2
-2
No files found.
av1/common/mv.h
View file @
e51ee021
...
...
@@ -102,8 +102,8 @@ typedef struct {
#define GM_ALPHA_PREC_DIFF (WARPEDMODEL_PREC_BITS - GM_ALPHA_PREC_BITS)
#define GM_ALPHA_DECODE_FACTOR (1 << GM_ALPHA_PREC_DIFF)
#define GM_ABS_ALPHA_BITS
1
8
#define GM_ABS_TRANS_BITS
1
8
#define GM_ABS_ALPHA_BITS 8
#define GM_ABS_TRANS_BITS 8
#define GM_TRANS_MAX (1 << GM_ABS_TRANS_BITS)
#define GM_ALPHA_MAX (1 << GM_ABS_ALPHA_BITS)
...
...
av1/common/warped_motion.c
View file @
e51ee021
...
...
@@ -95,11 +95,11 @@ void projectPointsAffine(int16_t *mat, int *points, int *proj, const int n,
WARPEDDIFF_PREC_BITS
);
if
(
subsampling_y
)
*
(
proj
++
)
=
ROUND_POWER_OF_TWO_SIGNED
(
mat
[
5
]
*
2
*
x
+
mat
[
4
]
*
2
*
y
+
mat
[
0
]
+
(
mat
[
5
]
+
mat
[
4
]
-
(
1
<<
WARPEDMODEL_PREC_BITS
))
/
2
,
mat
[
4
]
*
2
*
x
+
mat
[
5
]
*
2
*
y
+
mat
[
0
]
+
(
mat
[
4
]
+
mat
[
5
]
-
(
1
<<
WARPEDMODEL_PREC_BITS
))
/
2
,
WARPEDDIFF_PREC_BITS
+
1
);
else
*
(
proj
++
)
=
ROUND_POWER_OF_TWO_SIGNED
(
mat
[
5
]
*
x
+
mat
[
4
]
*
y
+
mat
[
0
],
*
(
proj
++
)
=
ROUND_POWER_OF_TWO_SIGNED
(
mat
[
4
]
*
x
+
mat
[
5
]
*
y
+
mat
[
0
],
WARPEDDIFF_PREC_BITS
);
points
+=
stride_points
-
2
;
proj
+=
stride_proj
-
2
;
...
...
av1/decoder/decodeframe.c
View file @
e51ee021
...
...
@@ -3411,12 +3411,12 @@ static void read_global_motion_params(Global_Motion_Params *params,
case
GLOBAL_ZERO
:
break
;
case
GLOBAL_AFFINE
:
params
->
motion_params
.
wmmat
[
2
].
as_mv
.
row
=
(
aom_read_primitive_symmetric
(
r
,
GM_ABS_ALPHA_BITS
)
*
GM_ALPHA_DECODE_FACTOR
);
params
->
motion_params
.
wmmat
[
2
].
as_mv
.
col
=
aom_read_primitive_symmetric
(
r
,
GM_ABS_ALPHA_BITS
)
*
GM_ALPHA_DECODE_FACTOR
+
(
1
<<
WARPEDMODEL_PREC_BITS
);
params
->
motion_params
.
wmmat
[
2
].
as_mv
.
col
=
(
aom_read_primitive_symmetric
(
r
,
GM_ABS_ALPHA_BITS
)
*
GM_ALPHA_DECODE_FACTOR
);
// fallthrough intended
case
GLOBAL_ROTZOOM
:
params
->
motion_params
.
wmmat
[
1
].
as_mv
.
row
=
...
...
av1/encoder/bitstream.c
View file @
e51ee021
...
...
@@ -3213,11 +3213,11 @@ static void write_global_motion_params(Global_Motion_Params *params,
case
GLOBAL_ZERO
:
break
;
case
GLOBAL_AFFINE
:
aom_write_primitive_symmetric
(
w
,
(
params
->
motion_params
.
wmmat
[
2
].
as_mv
.
row
>>
GM_ALPHA_PREC_DIFF
)
-
(
1
<<
GM_ALPHA_PREC_BITS
),
w
,
(
params
->
motion_params
.
wmmat
[
2
].
as_mv
.
row
>>
GM_ALPHA_PREC_DIFF
),
GM_ABS_ALPHA_BITS
);
aom_write_primitive_symmetric
(
w
,
(
params
->
motion_params
.
wmmat
[
2
].
as_mv
.
col
>>
GM_ALPHA_PREC_DIFF
),
w
,
(
params
->
motion_params
.
wmmat
[
2
].
as_mv
.
col
>>
GM_ALPHA_PREC_DIFF
)
-
(
1
<<
GM_ALPHA_PREC_BITS
),
GM_ABS_ALPHA_BITS
);
// fallthrough intended
case
GLOBAL_ROTZOOM
:
...
...
av1/encoder/encodeframe.c
View file @
e51ee021
...
...
@@ -4479,7 +4479,7 @@ static void refine_integerized_param(WarpedMotionParams *wm,
static
void
convert_to_params
(
double
*
H
,
TransformationType
type
,
int16_t
*
model
)
{
int
i
;
int
i
,
diag_value
;
int
alpha_present
=
0
;
int
n_params
=
n_trans_model_params
[
type
];
model
[
0
]
=
(
int16_t
)
floor
(
H
[
0
]
*
(
1
<<
GM_TRANS_PREC_BITS
)
+
0
.
5
);
...
...
@@ -4489,11 +4489,13 @@ static void convert_to_params(double *H, TransformationType type,
model
[
1
]
=
(
int16_t
)
clamp
(
model
[
1
],
GM_TRANS_MIN
,
GM_TRANS_MAX
)
*
GM_TRANS_DECODE_FACTOR
;
// TODO(sarahparker) 1 should be subtracted here
for
(
i
=
2
;
i
<
n_params
;
++
i
)
{
diag_value
=
((
i
&&
1
)
?
(
1
<<
GM_ALPHA_PREC_BITS
)
:
0
);
model
[
i
]
=
(
int16_t
)
floor
(
H
[
i
]
*
(
1
<<
GM_ALPHA_PREC_BITS
)
+
0
.
5
);
model
[
i
]
=
(
int16_t
)
clamp
(
model
[
i
],
GM_ALPHA_MIN
,
GM_ALPHA_MAX
)
*
GM_ALPHA_DECODE_FACTOR
;
model
[
i
]
=
(
int16_t
)(
clamp
(
model
[
i
]
-
diag_value
,
GM_ALPHA_MIN
,
GM_ALPHA_MAX
)
+
diag_value
)
*
GM_ALPHA_DECODE_FACTOR
;
alpha_present
|=
(
model
[
i
]
!=
0
);
}
...
...
av1/encoder/global_motion.h
View file @
e51ee021
...
...
@@ -17,7 +17,17 @@
extern
"C"
{
#endif
// compute global motion parameters between two frames
/*
Computes global motion parameters between two frames. The array
"params" should be length 9, where the first 2 slots are translation
parameters in (row, col) order, and the remaining slots correspond
to values in the transformation matrix of the corresponding motion
model. They are arranged in "params" such that values on the tx-matrix
diagonal have odd numbered indices so the folowing matrix:
A | B
C | D
would produce params = [trans row, trans col, B, A, C, D]
*/
int
compute_global_motion_feature_based
(
TransformationType
type
,
YV12_BUFFER_CONFIG
*
frm
,
YV12_BUFFER_CONFIG
*
ref
,
...
...
av1/encoder/ransac.c
View file @
e51ee021
...
...
@@ -615,8 +615,8 @@ static void denormalizeAffine(double *H, double *T1, double *T2) {
H
[
1
]
=
Ha
[
2
];
H
[
2
]
=
Ha
[
1
];
H
[
3
]
=
Ha
[
0
];
H
[
4
]
=
Ha
[
4
];
H
[
5
]
=
Ha
[
3
];
H
[
4
]
=
Ha
[
3
];
H
[
5
]
=
Ha
[
4
];
}
static
void
denormalizeRotZoom
(
double
*
H
,
double
*
T1
,
double
*
T2
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment