Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Yushin Cho
aom-rav1e
Commits
37166d5c
Commit
37166d5c
authored
Jan 02, 2013
by
Yunqing Wang
Committed by
Gerrit Code Review
Jan 02, 2013
Browse files
Merge "Switch the order of calculating 2-D inverse transform" into experimental
parents
e9c69ab1
cc80247f
Changes
1
Hide whitespace changes
Inline
Side-by-side
vp9/common/vp9_idctllm.c
View file @
37166d5c
...
...
@@ -399,10 +399,10 @@ void vp9_ihtllm_float_c(const int16_t *input, int16_t *output, int pitch,
}
/* Converted the transforms to integer form. */
#define VERTICAL_SHIFT 14 // 16
#define VERTICAL_ROUNDING ((1 << (VERTICAL_SHIFT - 1)) - 1)
#define HORIZONTAL_SHIFT 17 // 15
#define HORIZONTAL_SHIFT 14 // 16
#define HORIZONTAL_ROUNDING ((1 << (HORIZONTAL_SHIFT - 1)) - 1)
#define VERTICAL_SHIFT 17 // 15
#define VERTICAL_ROUNDING ((1 << (VERTICAL_SHIFT - 1)) - 1)
void
vp9_ihtllm_c
(
const
int16_t
*
input
,
int16_t
*
output
,
int
pitch
,
TX_TYPE
tx_type
,
int
tx_dim
)
{
int
i
,
j
,
k
;
...
...
@@ -444,41 +444,47 @@ void vp9_ihtllm_c(const int16_t *input, int16_t *output, int pitch,
break
;
}
/* vertical transformation */
/* 2-D inverse transform X = M1*Z*Transposed_M2 is calculated in 2 steps
* from right to left:
* 1. horizontal transform: Y= Z*Transposed_M2
* 2. vertical transform: X = M1*Y
* In SIMD, doing this way could eliminate the transpose needed if it is
* calculated from left to right.
*/
/* Horizontal transformation */
for
(
j
=
0
;
j
<
tx_dim
;
j
++
)
{
for
(
i
=
0
;
i
<
tx_dim
;
i
++
)
{
int
temp
=
0
;
for
(
k
=
0
;
k
<
tx_dim
;
k
++
)
{
temp
+=
p
tv
[
k
]
*
ip
[(
k
*
tx_dim
)
];
temp
+=
i
p
[
k
]
*
pth
[
k
];
}
im
[
i
]
=
(
int16_t
)((
temp
+
VERTICAL_ROUNDING
)
>>
VERTICAL_SHIFT
);
ip
++
;
/* Calculate im and store it in its transposed position. */
im
[
i
]
=
(
int16_t
)((
temp
+
HORIZONTAL_ROUNDING
)
>>
HORIZONTAL_SHIFT
);
ip
+=
tx_dim
;
}
im
+=
tx_dim
;
// 16
pt
v
+=
tx_dim
;
im
+=
tx_dim
;
pt
h
+=
tx_dim
;
ip
=
input
;
}
/*
horizont
al transformation */
/*
Vertic
al transformation */
im
=
&
imbuf
[
0
];
for
(
j
=
0
;
j
<
tx_dim
;
j
++
)
{
const
int16_t
*
pthc
=
pth
;
for
(
i
=
0
;
i
<
tx_dim
;
i
++
)
{
for
(
i
=
0
;
i
<
tx_dim
;
i
++
)
{
for
(
j
=
0
;
j
<
tx_dim
;
j
++
)
{
int
temp
=
0
;
for
(
k
=
0
;
k
<
tx_dim
;
k
++
)
{
temp
+=
im
[
k
]
*
pthc
[
k
];
temp
+=
ptv
[
k
]
*
im
[
k
];
}
op
[
i
]
=
(
int16_t
)((
temp
+
HORIZONT
AL_ROUNDING
)
>>
HORIZONT
AL_SHIFT
);
pthc
+=
tx_dim
;
op
[
j
]
=
(
int16_t
)((
temp
+
VERTIC
AL_ROUNDING
)
>>
VERTIC
AL_SHIFT
);
im
+=
tx_dim
;
}
im
+=
tx_dim
;
// 16
im
=
&
imbuf
[
0
];
ptv
+=
tx_dim
;
op
+=
shortpitch
;
}
}
...
...
Write
Preview
Supports
Markdown
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