Spaces:
Runtime error
Runtime error
/* | |
* This file is part of FFmpeg. | |
* | |
* FFmpeg is free software; you can redistribute it and/or | |
* modify it under the terms of the GNU Lesser General Public | |
* License as published by the Free Software Foundation; either | |
* version 2.1 of the License, or (at your option) any later version. | |
* | |
* FFmpeg is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
* Lesser General Public License for more details. | |
* | |
* You should have received a copy of the GNU Lesser General Public | |
* License along with FFmpeg; if not, write to the Free Software | |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
*/ | |
/** | |
* @file | |
* Contains misc utility macros and inline functions | |
*/ | |
/*********************************************************************** | |
* Vector types | |
**********************************************************************/ | |
/*********************************************************************** | |
* Null vector | |
**********************************************************************/ | |
// used to build registers permutation vectors (vcprm) | |
// the 's' are for words in the _s_econd vector | |
// Transpose 8x8 matrix of 16-bit elements (in-place) | |
/** @brief loads unaligned vector @a *src with offset @a offset | |
and returns it */ | |
static inline vec_u8 unaligned_load(int offset, const uint8_t *src) | |
{ | |
register vec_u8 first = vec_ld(offset, src); | |
register vec_u8 second = vec_ld(offset + 15, src); | |
register vec_u8 mask = vec_lvsl(offset, src); | |
return vec_perm(first, second, mask); | |
} | |
static inline vec_u8 load_with_perm_vec(int offset, const uint8_t *src, vec_u8 perm_vec) | |
{ | |
vec_u8 a = vec_ld(offset, src); | |
vec_u8 b = vec_ld(offset + 15, src); | |
return vec_perm(a, b, perm_vec); | |
} | |
/** | |
* loads vector known misalignment | |
* @param perm_vec the align permute vector to combine the two loads from lvsl | |
*/ | |