Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Xiph.Org
aom-rav1e
Commits
cfa03374
Commit
cfa03374
authored
Jun 03, 2016
by
Debargha Mukherjee
Committed by
Gerrit Code Review
Jun 03, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge "Factor out x86 SIMD intrinsic synonyms" into nextgenv2
parents
1e160ce5
9ebca469
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
149 additions
and
111 deletions
+149
-111
vpx_dsp/x86/blend_mask6_sse4.c
vpx_dsp/x86/blend_mask6_sse4.c
+80
-111
vpx_dsp/x86/synonyms.h
vpx_dsp/x86/synonyms.h
+69
-0
No files found.
vpx_dsp/x86/blend_mask6_sse4.c
View file @
cfa03374
This diff is collapsed.
Click to expand it.
vpx_dsp/x86/synonyms.h
0 → 100644
View file @
cfa03374
/*
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VPX_DSP_X86_SYNONYS_H_
#define VPX_DSP_X86_SYNONYS_H_
#include <immintrin.h>
#include "./vpx_config.h"
#include "vpx/vpx_integer.h"
/**
* Various reusable shorthands for x86 SIMD intrinsics.
*
* Intrinsics prefixed with xx_ operate on or return 128bit XMM registers.
* Intrinsics prefixed with yy_ operate on or return 256bit YMM registers.
*/
// Loads and stores to do away with the tedium of casting the address
// to the right type.
static
INLINE
__m128i
xx_loadl_32
(
const
void
*
a
)
{
return
_mm_cvtsi32_si128
(
*
(
const
uint32_t
*
)
a
);
}
static
INLINE
__m128i
xx_loadl_64
(
const
void
*
a
)
{
return
_mm_loadl_epi64
((
const
__m128i
*
)
a
);
}
static
INLINE
__m128i
xx_load_128
(
const
void
*
a
)
{
return
_mm_load_si128
((
const
__m128i
*
)
a
);
}
static
INLINE
__m128i
xx_loadu_128
(
const
void
*
a
)
{
return
_mm_loadu_si128
((
const
__m128i
*
)
a
);
}
static
INLINE
void
xx_storel_32
(
void
*
const
a
,
const
__m128i
v
)
{
*
(
uint32_t
*
)
a
=
_mm_cvtsi128_si32
(
v
);
}
static
INLINE
void
xx_storel_64
(
void
*
const
a
,
const
__m128i
v
)
{
_mm_storel_epi64
((
__m128i
*
)
a
,
v
);
}
static
INLINE
void
xx_store_128
(
void
*
const
a
,
const
__m128i
v
)
{
_mm_store_si128
((
__m128i
*
)
a
,
v
);
}
static
INLINE
void
xx_storeu_128
(
void
*
const
a
,
const
__m128i
v
)
{
_mm_storeu_si128
((
__m128i
*
)
a
,
v
);
}
static
INLINE
__m128i
xx_round_epu16
(
__m128i
v_val_w
)
{
return
_mm_avg_epu16
(
v_val_w
,
_mm_setzero_si128
());
}
static
INLINE
__m128i
xx_roundn_epu16
(
__m128i
v_val_w
,
int
bits
)
{
const
__m128i
v_s_w
=
_mm_srli_epi16
(
v_val_w
,
bits
-
1
);
return
_mm_avg_epu16
(
v_s_w
,
_mm_setzero_si128
());
}
#endif // VPX_DSP_X86_SYNONYS_H_
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