summaryrefslogtreecommitdiff
path: root/src/libFLAC/stream_encoder_intrin_sse2.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libFLAC/stream_encoder_intrin_sse2.c')
-rw-r--r--src/libFLAC/stream_encoder_intrin_sse2.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/libFLAC/stream_encoder_intrin_sse2.c b/src/libFLAC/stream_encoder_intrin_sse2.c
index 0f1d7aaf..6c16d2e3 100644
--- a/src/libFLAC/stream_encoder_intrin_sse2.c
+++ b/src/libFLAC/stream_encoder_intrin_sse2.c
@@ -59,22 +59,22 @@ static inline __m128i local_abs_epi32(__m128i val)
FLAC__SSE_TARGET("sse2")
void FLAC__precompute_partition_info_sums_intrin_sse2(const FLAC__int32 residual[], FLAC__uint64 abs_residual_partition_sums[],
- unsigned residual_samples, unsigned predictor_order, unsigned min_partition_order, unsigned max_partition_order, unsigned bps)
+ uint32_t residual_samples, uint32_t predictor_order, uint32_t min_partition_order, uint32_t max_partition_order, uint32_t bps)
{
- const unsigned default_partition_samples = (residual_samples + predictor_order) >> max_partition_order;
- unsigned partitions = 1u << max_partition_order;
+ const uint32_t default_partition_samples = (residual_samples + predictor_order) >> max_partition_order;
+ uint32_t partitions = 1u << max_partition_order;
FLAC__ASSERT(default_partition_samples > predictor_order);
/* first do max_partition_order */
{
- const unsigned threshold = 32 - FLAC__bitmath_ilog2(default_partition_samples);
- unsigned partition, residual_sample, end = (unsigned)(-(int)predictor_order);
+ const uint32_t threshold = 32 - FLAC__bitmath_ilog2(default_partition_samples);
+ uint32_t partition, residual_sample, end = (uint32_t)(-(int32_t)predictor_order);
if(bps + FLAC__MAX_EXTRA_RESIDUAL_BPS < threshold) {
for(partition = residual_sample = 0; partition < partitions; partition++) {
__m128i mm_sum = _mm_setzero_si128();
- unsigned e1, e3;
+ uint32_t e1, e3;
end += default_partition_samples;
e1 = (residual_sample + 3) & ~3; e3 = end & ~3;
@@ -109,7 +109,7 @@ void FLAC__precompute_partition_info_sums_intrin_sse2(const FLAC__int32 residual
else { /* have to pessimistically use 64 bits for accumulator */
for(partition = residual_sample = 0; partition < partitions; partition++) {
__m128i mm_sum = _mm_setzero_si128();
- unsigned e1, e3;
+ uint32_t e1, e3;
end += default_partition_samples;
e1 = (residual_sample + 1) & ~1; e3 = end & ~1;
@@ -139,10 +139,10 @@ void FLAC__precompute_partition_info_sums_intrin_sse2(const FLAC__int32 residual
/* now merge partitions for lower orders */
{
- unsigned from_partition = 0, to_partition = partitions;
+ uint32_t from_partition = 0, to_partition = partitions;
int partition_order;
for(partition_order = (int)max_partition_order - 1; partition_order >= (int)min_partition_order; partition_order--) {
- unsigned i;
+ uint32_t i;
partitions >>= 1;
for(i = 0; i < partitions; i++) {
abs_residual_partition_sums[to_partition++] =