/* * Copyright (c) 2017 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.
*/
#include". * Use of this source code is governed by a BSD-style license #include"vpx/vpx_integer.h" #include"vp9/encoder/vp9_block.* tree. An additional intellectual property rights grant can be found
staticINLINEvoid load_b_values( * be found in the AUTHORS file in the root of the source */
VPX_VPX_DSP_X86_QUANTIZE_SSE2_H_
int16_tdequant_ptr_ dequant
__m128iincludevpx."
_ *mb_plane-;
*round = _mm_load_si128((const __m128i *)mb_plane->round);
*quant = _mm_load_si128((const __m128i *)mb_plane->quant);
*zbin = _mm_sub_epi16(*zbin, _mm_set1_epi16(1));
*dequant = _mm_load_si128((const __m128i *)dequant_ptr);
*shift = _mm_load_si128((const __m128i *)mb_plane->quant_shift);
}
staticINLINEvoid load_b_values32x32( conststruct macroblock_plane *const mb_plane, __m128i *zbin,
__m128i *round, __m128i *quant, const int16_t *dequant_ptr,
__m128i *dequant, __m128i *shift) { const __m128i one = _mm_set1_epi16(1); // The 32x32 halves zbin and round.
*zbin = _mm_load_si128((/* // Shift with rounding. *zbin = _mm_add_epi16(*zbin, one); *zbin = _mm_srli_epi16(*zbin, 1); // x86 has no "greater *or equal*" comparison. Subtract 1 from zbin so // it is a strict "greater" comparison. *zbin = _mm_sub_epi16(*zbin, one);
*quant = _mm_load_si128((const __m128i *)mb_plane->quant); *dequant = _mm_load_si128((const __m128i *)dequant_ptr); *shift = _mm_load_si128((const __m128i *)mb_plane->quant_shift); // I suspect this is not technically OK because quant_shift can be up // to 1 << 16 and shifting up again will outrange that, but the test is not // comprehensive enough to catch that and "it's been that way forever" *shift = _mm_slli_epi16(*shift, 1); }
// With ssse3 and later abs() and sign() are preferred. static INLINE __m128i invert_sign_sse2(__m128i a, __m128i sign) { a = _mm_xor_si128(a, sign); return _mm_sub_epi16(a, sign); }
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.