Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
BC
public
external
libvpx
Commits
aa295918
Commit
aa295918
authored
12 years ago
by
Yunqing Wang
Browse files
Options
Download
Patches
Plain Diff
Rewrote fdct8x8
Use consistent algorithm. Change-Id: Ib8484821ebc454b9d3380a3d6571798decd037f3
parent
094e2572
v1.14.0-linphone
1.4.X
experimental
feature/update_to_v1.9.0-linphone
feature/uwp_nuget
forest
frame_parallel
highbitdepth
indianrunnerduck
javanwhistlingduck
khakicampbell
linphone
linphone-android
linphone-old
longtailedduck
m29-baseline
m31-baseline
m49-2623
m52-2743
m54-2840
m56-2924
m66-3359
m68-3440
mandarinduck
mcw
mcw2
nextgen
nextgenv2
pcs-2013
playground
sandbox/Jingning/experimental
sandbox/Jingning/transcode
sandbox/Jingning/vpx
sandbox/aconverse@google.com/ansbench
sandbox/debargha/playground
sandbox/hkuang/frame_parallel
sandbox/hkuang@google.com/decode
sandbox/jimbankoski@google.com/proposed-aom
sandbox/jingning@google.com/decoder_test_suite
sandbox/jingning@google.com/experimental
sandbox/jzern@google.com/test
sandbox/wangch@google.com/vp9
sandbox/yaowu@google.com/mergeaom
stable-vp9-decoder
v1.12.0-linphone
v1.6.1_linphone
v1.7.0-linphone
v1.9.0-linphone
v1.9.0
v1.9.0-rc1
v1.8.2
v1.8.1
v1.8.0
v1.7.0
v1.6.1
v1.6.0
v1.5.0
v1.4.0
v1.3.0
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
vp9/encoder/vp9_dct.c
+76
-0
vp9/encoder/vp9_dct.c
with
76 additions
and
0 deletions
vp9/encoder/vp9_dct.c
+
76
−
0
View file @
aa295918
...
...
@@ -323,6 +323,8 @@ static const int16_t adst_i16[256] = {
};
#endif
#define NEW_FDCT8x8 1
#if !NEW_FDCT8x8
static
const
int
xC1S7
=
16069
;
static
const
int
xC2S6
=
15137
;
static
const
int
xC3S5
=
13623
;
...
...
@@ -560,6 +562,7 @@ void vp9_short_fdct8x8_c(short *InputData, short *OutputData, int pitch) {
op
++
;
}
}
#endif
void
vp9_short_fhaar2x2_c
(
short
*
input
,
short
*
output
,
int
pitch
)
{
/* [1 1; 1 -1] orthogonal transform */
...
...
@@ -836,6 +839,79 @@ void vp9_short_fdct8x4_c(short *input, short *output, int pitch)
vp9_short_fdct4x4_c
(
input
+
4
,
output
+
16
,
pitch
);
}
#if NEW_FDCT8x8
static
void
fdct8_1d
(
int16_t
*
input
,
int16_t
*
output
)
{
int16_t
step
[
8
];
int
temp1
,
temp2
;
// stage 1
step
[
0
]
=
input
[
0
]
+
input
[
7
];
step
[
1
]
=
input
[
1
]
+
input
[
6
];
step
[
2
]
=
input
[
2
]
+
input
[
5
];
step
[
3
]
=
input
[
3
]
+
input
[
4
];
step
[
4
]
=
input
[
3
]
-
input
[
4
];
step
[
5
]
=
input
[
2
]
-
input
[
5
];
step
[
6
]
=
input
[
1
]
-
input
[
6
];
step
[
7
]
=
input
[
0
]
-
input
[
7
];
fdct4_1d
(
step
,
step
);
// Stage 2
output
[
4
]
=
step
[
4
];
temp1
=
(
-
step
[
5
]
+
step
[
6
])
*
cospi_16_64
;
temp2
=
(
step
[
6
]
+
step
[
5
])
*
cospi_16_64
;
output
[
5
]
=
dct_const_round_shift
(
temp1
);
output
[
6
]
=
dct_const_round_shift
(
temp2
);
output
[
7
]
=
step
[
7
];
// Stage 3
step
[
4
]
=
output
[
4
]
+
output
[
5
];
step
[
5
]
=
-
output
[
5
]
+
output
[
4
];
step
[
6
]
=
-
output
[
6
]
+
output
[
7
];
step
[
7
]
=
output
[
7
]
+
output
[
6
];
// Stage 4
output
[
0
]
=
step
[
0
];
output
[
4
]
=
step
[
2
];
output
[
2
]
=
step
[
1
];
output
[
6
]
=
step
[
3
];
temp1
=
step
[
4
]
*
cospi_28_64
+
step
[
7
]
*
cospi_4_64
;
temp2
=
step
[
5
]
*
cospi_12_64
+
step
[
6
]
*
cospi_20_64
;
output
[
1
]
=
dct_const_round_shift
(
temp1
);
output
[
5
]
=
dct_const_round_shift
(
temp2
);
temp1
=
step
[
6
]
*
cospi_12_64
+
step
[
5
]
*
-
cospi_20_64
;
temp2
=
step
[
7
]
*
cospi_28_64
+
step
[
4
]
*
-
cospi_4_64
;
output
[
3
]
=
dct_const_round_shift
(
temp1
);
output
[
7
]
=
dct_const_round_shift
(
temp2
);
}
void
vp9_short_fdct8x8_c
(
int16_t
*
input
,
int16_t
*
output
,
int
pitch
)
{
int
shortpitch
=
pitch
>>
1
;
int
i
,
j
;
int16_t
out
[
64
];
int16_t
temp_in
[
8
],
temp_out
[
8
];
// First transform columns
for
(
i
=
0
;
i
<
8
;
i
++
)
{
for
(
j
=
0
;
j
<
8
;
j
++
)
temp_in
[
j
]
=
input
[
j
*
shortpitch
+
i
]
<<
2
;
fdct8_1d
(
temp_in
,
temp_out
);
for
(
j
=
0
;
j
<
8
;
j
++
)
out
[
j
*
8
+
i
]
=
temp_out
[
j
];
}
// Then transform rows
for
(
i
=
0
;
i
<
8
;
++
i
)
{
for
(
j
=
0
;
j
<
8
;
++
j
)
temp_in
[
j
]
=
out
[
j
+
i
*
8
];
fdct8_1d
(
temp_in
,
temp_out
);
for
(
j
=
0
;
j
<
8
;
++
j
)
output
[
j
+
i
*
8
]
=
temp_out
[
j
]
>>
1
;
}
}
#endif
void
vp9_short_walsh4x4_c
(
short
*
input
,
short
*
output
,
int
pitch
)
{
int
i
;
int
a1
,
b1
,
c1
,
d1
;
...
...
This diff is collapsed.
Click to expand it.
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets