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
b8c47a98
Commit
b8c47a98
authored
Jul 20, 2015
by
Jingning Han
Committed by
Gerrit Code Review
Jul 20, 2015
Browse files
Merge "Make local functions in vp9_dct.c static"
parents
149822e3
f62805fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
vp9/encoder/vp9_dct.c
View file @
b8c47a98
...
...
@@ -20,6 +20,34 @@
#include "vp9/common/vp9_systemdependent.h"
#include "vp9/encoder/vp9_dct.h"
static
void
fdct4
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
static
void
fadst4
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
static
void
fdct8
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
static
void
fadst8
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
static
void
fdct16
(
const
tran_low_t
in
[
16
],
tran_low_t
out
[
16
]);
static
void
fadst16
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
static
const
transform_2d
FHT_4
[]
=
{
{
fdct4
,
fdct4
},
// DCT_DCT = 0
{
fadst4
,
fdct4
},
// ADST_DCT = 1
{
fdct4
,
fadst4
},
// DCT_ADST = 2
{
fadst4
,
fadst4
}
// ADST_ADST = 3
};
static
const
transform_2d
FHT_8
[]
=
{
{
fdct8
,
fdct8
},
// DCT_DCT = 0
{
fadst8
,
fdct8
},
// ADST_DCT = 1
{
fdct8
,
fadst8
},
// DCT_ADST = 2
{
fadst8
,
fadst8
}
// ADST_ADST = 3
};
static
const
transform_2d
FHT_16
[]
=
{
{
fdct16
,
fdct16
},
// DCT_DCT = 0
{
fadst16
,
fdct16
},
// ADST_DCT = 1
{
fdct16
,
fadst16
},
// DCT_ADST = 2
{
fadst16
,
fadst16
}
// ADST_ADST = 3
};
static
INLINE
tran_high_t
fdct_round_shift
(
tran_high_t
input
)
{
tran_high_t
rv
=
ROUND_POWER_OF_TWO
(
input
,
DCT_CONST_BITS
);
// TODO(debargha, peter.derivaz): Find new bounds for this assert
...
...
@@ -28,7 +56,7 @@ static INLINE tran_high_t fdct_round_shift(tran_high_t input) {
return
rv
;
}
void
vp9_
fdct4
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
static
void
fdct4
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
tran_high_t
step
[
4
];
tran_high_t
temp1
,
temp2
;
...
...
@@ -125,7 +153,7 @@ void vp9_fdct4x4_c(const int16_t *input, tran_low_t *output, int stride) {
}
}
void
vp9_
fadst4
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
static
void
fadst4
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
tran_high_t
x0
,
x1
,
x2
,
x3
;
tran_high_t
s0
,
s1
,
s2
,
s3
,
s4
,
s5
,
s6
,
s7
;
...
...
@@ -197,7 +225,7 @@ void vp9_fht4x4_c(const int16_t *input, tran_low_t *output,
}
}
void
vp9_
fdct8
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
static
void
fdct8
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
tran_high_t
s0
,
s1
,
s2
,
s3
,
s4
,
s5
,
s6
,
s7
;
// canbe16
tran_high_t
t0
,
t1
,
t2
,
t3
;
// needs32
tran_high_t
x0
,
x1
,
x2
,
x3
;
// canbe16
...
...
@@ -325,7 +353,7 @@ void vp9_fdct8x8_c(const int16_t *input, tran_low_t *final_output, int stride) {
// Rows
for
(
i
=
0
;
i
<
8
;
++
i
)
{
vp9_
fdct8
(
&
intermediate
[
i
*
8
],
&
final_output
[
i
*
8
]);
fdct8
(
&
intermediate
[
i
*
8
],
&
final_output
[
i
*
8
]);
for
(
j
=
0
;
j
<
8
;
++
j
)
final_output
[
j
+
i
*
8
]
/=
2
;
}
...
...
@@ -407,7 +435,7 @@ void vp9_fdct8x8_quant_c(const int16_t *input, int stride,
// Rows
for
(
i
=
0
;
i
<
8
;
++
i
)
{
vp9_
fdct8
(
&
intermediate
[
i
*
8
],
&
coeff_ptr
[
i
*
8
]);
fdct8
(
&
intermediate
[
i
*
8
],
&
coeff_ptr
[
i
*
8
]);
for
(
j
=
0
;
j
<
8
;
++
j
)
coeff_ptr
[
j
+
i
*
8
]
/=
2
;
}
...
...
@@ -634,7 +662,7 @@ void vp9_fdct16x16_c(const int16_t *input, tran_low_t *output, int stride) {
}
}
void
vp9_
fadst8
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
static
void
fadst8
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
tran_high_t
s0
,
s1
,
s2
,
s3
,
s4
,
s5
,
s6
,
s7
;
tran_high_t
x0
=
input
[
7
];
...
...
@@ -792,7 +820,7 @@ void vp9_fwht4x4_c(const int16_t *input, tran_low_t *output, int stride) {
}
// Rewrote to use same algorithm as others.
void
vp9_
fdct16
(
const
tran_low_t
in
[
16
],
tran_low_t
out
[
16
])
{
static
void
fdct16
(
const
tran_low_t
in
[
16
],
tran_low_t
out
[
16
])
{
tran_high_t
step1
[
8
];
// canbe16
tran_high_t
step2
[
8
];
// canbe16
tran_high_t
step3
[
8
];
// canbe16
...
...
@@ -933,7 +961,7 @@ void vp9_fdct16(const tran_low_t in[16], tran_low_t out[16]) {
out
[
15
]
=
(
tran_low_t
)
fdct_round_shift
(
temp2
);
}
void
vp9_
fadst16
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
static
void
fadst16
(
const
tran_low_t
*
input
,
tran_low_t
*
output
)
{
tran_high_t
s0
,
s1
,
s2
,
s3
,
s4
,
s5
,
s6
,
s7
,
s8
;
tran_high_t
s9
,
s10
,
s11
,
s12
,
s13
,
s14
,
s15
;
...
...
vp9/encoder/vp9_dct.h
View file @
b8c47a98
...
...
@@ -17,6 +17,8 @@
extern
"C"
{
#endif
void
vp9_fdct32
(
const
tran_high_t
*
input
,
tran_high_t
*
output
,
int
round
);
void
vp9_highbd_fdct4x4_c
(
const
int16_t
*
input
,
tran_low_t
*
output
,
int
stride
);
void
vp9_highbd_fdct8x8_c
(
const
int16_t
*
input
,
tran_low_t
*
output
,
int
stride
);
void
vp9_highbd_fdct16x16_c
(
const
int16_t
*
input
,
tran_low_t
*
output
,
...
...
@@ -25,35 +27,6 @@ void vp9_highbd_fdct32x32_c(const int16_t *input, tran_low_t *out, int stride);
void
vp9_highbd_fdct32x32_rd_c
(
const
int16_t
*
input
,
tran_low_t
*
out
,
int
stride
);
void
vp9_fdct4
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
void
vp9_fadst4
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
void
vp9_fdct8
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
void
vp9_fadst8
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
void
vp9_fdct16
(
const
tran_low_t
in
[
16
],
tran_low_t
out
[
16
]);
void
vp9_fadst16
(
const
tran_low_t
*
input
,
tran_low_t
*
output
);
void
vp9_fdct32
(
const
tran_high_t
*
input
,
tran_high_t
*
output
,
int
round
);
static
const
transform_2d
FHT_4
[]
=
{
{
vp9_fdct4
,
vp9_fdct4
},
// DCT_DCT = 0
{
vp9_fadst4
,
vp9_fdct4
},
// ADST_DCT = 1
{
vp9_fdct4
,
vp9_fadst4
},
// DCT_ADST = 2
{
vp9_fadst4
,
vp9_fadst4
}
// ADST_ADST = 3
};
static
const
transform_2d
FHT_8
[]
=
{
{
vp9_fdct8
,
vp9_fdct8
},
// DCT_DCT = 0
{
vp9_fadst8
,
vp9_fdct8
},
// ADST_DCT = 1
{
vp9_fdct8
,
vp9_fadst8
},
// DCT_ADST = 2
{
vp9_fadst8
,
vp9_fadst8
}
// ADST_ADST = 3
};
static
const
transform_2d
FHT_16
[]
=
{
{
vp9_fdct16
,
vp9_fdct16
},
// DCT_DCT = 0
{
vp9_fadst16
,
vp9_fdct16
},
// ADST_DCT = 1
{
vp9_fdct16
,
vp9_fadst16
},
// DCT_ADST = 2
{
vp9_fadst16
,
vp9_fadst16
}
// ADST_ADST = 3
};
#ifdef __cplusplus
}
// extern "C"
#endif
...
...
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