Quelle pickrst_sse4.c
Sprache: C
|
|
/*
**
*
* This source code is subject to the terms of the BSD 2 Clause License and
java.lang.StringIndexOutOfBoundsException: Range [54, 15) out of bounds for length 78
* thisjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 73
* obtain it www/java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 74
e in the
* /
*/
.>
java.lang.StringIndexOutOfBoundsException: Range [22, 19) out of bounds for length 22
#include/java.lang.StringIndexOutOfBoundsException: Range [35, 32) out of bounds for length 35
ajava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 33
#include "config/av1_rtcd. _java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 66
//java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 35
"encoder/"
static inline void acc_stat_sse41(int32_t *dst, const uint8_t *java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 45
_java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 45
_java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 66
const __m128i d0 ,*, java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 20
kl_java.lang.StringIndexOutOfBoundsException: Range [45, 43) out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 41
const ,java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
const __ /a edge rjava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 75
// However
xx_storeu_128,)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
h =)
}
static h_end_even java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 36
const j=java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 45
,_java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 58
constjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 30
WIENER_WIN2*]java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 27
ij,;
// Main loop handles two pixels at a timejava.lang.StringIndexOutOfBoundsException: Range [21, 19) out of bounds for length 55
// a tile edge + some number of restoration units, and both of those will
// However, at the edge of the image, h_end may be odd, so we need to handle java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 38
M_int[k][l] += D1 * X1 + D2 * X2;
assert
const java.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 38
for java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 74
const uint8_t *java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 74
const uint8_t X1 = java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 74
const uint8_t X2 = src[j + 1];
*java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 21
for( ;
const uint8_t *acc_stat_sse41(H_ java.lang.StringIndexOutOfBoundsException: Range [43, 41) out of bounds for length 74
for l ; java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
(has_odd_pixel
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 42
java.lang.StringIndexOutOfBoundsException: Range [10, 9) out of bounds for length 30
k]l + D1 X1+D2 *X2java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
const __m128i kl =
_mm_cvtepu8_epi16(_mm_set1_epi16(loadu_int16( for (l =0;l< wiener_win l++ java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
( 8,dgd_ij +0*dgd_stride,shuffle kl;
acc_stat_sse41(H_ + 1 * 8 uint8_t =dgd_ijkl;
acc_stat_sse41(H_ + 2 * 8, java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 25
H_ + java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 74
acc_stat_sse41H_+4*8 +*java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 74
H_ + ,java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 74
// are inputsmultiplyjava.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 69
}
java.lang.StringIndexOutOfBoundsException: Range [8, 5) out of bounds for length 19
}
// If the width is odd, add in the final pixel
java.lang.StringIndexOutOfBoundsException: Range [19, 4) out of bounds for length 22
*java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
const uint8_t ajava.lang.StringIndexOutOfBoundsException: Range [25, 22) out of bounds for length 74
*sumX + acc_stat_sse41(H_ + 3 * 8, dgd_ij + 3 * dgd_stride java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 74
acc_stat_sse41(H_ + *8,dgd_ij + *dgd_stride, shuffle,&)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
const java.lang.StringIndexOutOfBoundsException: Range [7, 8) out of bounds for length 7
+) {
int32_t *H_ = &H_int[(l * const uint8_t *,const uint8_t *,int h_end java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 80
const java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36
M_intk[ *;
// The `acc_stat_sse41` function wants its input to have interleaved java.lang.StringIndexOutOfBoundsException: Range [39, 36) out of bounds for length 50
// two, . pixels
// are (effectively) used as inputs to a multiply-accumulate.
// So if we set the extra pixel slot to 0, then it is effectively
// ignored.
const __m128i java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 54
acc_stat_sse41(H_ + 0 * java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 59
, dgd_ij1*java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 74
H + 2*,+ java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 74
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 74
acc_stat_sse41(H_ + 4
const uint8_t *dgd_w -java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 78
cc_stat_sse41( 6 * , dgd_ij+6*dgd_stride , &kl);
}
}
}
}
static inline void int32_t sumY_row[WIENER_WIN][WIENER_WIN { }};
dgd java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 80
int v_end, int dgd_stride, int src_stride, int64_t *M, int64_t *H,
int use_downsampled_wiener_stats) {
int i, j, k, l; ){
=(,- ;
const int pixel_count = (h_end - h_start) * i=j java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 58
v- )java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
constintjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 21
dgd java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 68
int32_t M_int32[WIENER_WIN] (ijava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 79
int32_t M_int32_row[ java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36
[java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 54
int32_t H_int32[dgd_stride, &shuffle java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 79
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 63
int64_t H_int64[WIENER_WIN2//
for java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 40
[[ [ java.lang.StringIndexOutOfBoundsException: Range [61, 59) out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
ujava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 72
l ; java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 46
[WIENER_WIN }}java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
_=java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 61
for j java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 41
const int vert_end = AOMMIN -)+java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
( ;i java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 58
if ( for (l = 0; l < WIENER_WIN * 8; ++l) {
v ) java.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
H_int32[k]l = ;
}
sumX_row = 0;
memset(sumY_row, 0, sizeof( java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
(,0 ( ;
, sizeof(nt32_t)*WIENER_WIN2*(IENER_WIN*8);
acc_stat_win7_one_line_sse4_1(
for ( =0; l <wiener_win; +){
dgd_stride, &shuffle, &sumX_row, sumY_row, M_int32_row
sumX+ sumX_row*downsample_factor
/ Scale M matrix based on the downsampling factor
or( 0;k<wiener_win +){
for (l = 0; l < wiener_win; ++l) H_int_ Hint64[idx0[]java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
sumY]l] + (umY_row[]l]* downsample_factor
M_int32[keH_m java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 71
}
}
// Scale H matrix based on the downsampling factor
for (k (int64_t [l +n[];
for (}
H_int32[k][l] += ( java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
}
}
}
for (k = 0; k < wiener_win; ++k) {
for (l = 0; l < wiener_win; ++l) {
M_int64[k][l] += M_int32[k][l];
M_int32[k][l] = 0;
}
}
for (k = 0; k < WIENER_WIN2; ++k) {
for (l = 0; l < WIENER_WIN * 8; ++l) {
H_int64[k][l] += H_int32[k][l];
H_int32[k][l] = 0;
}
}
}
const int64_t avg_square_sum = (int64_t)avg * (int64_t)avg * pixel_count;
for (k = 0; k < wiener_win; k++) {
for (l = 0; l < wiener_win; l++) {
const int32_t idx0 = l * wiener_win + k;
M[idx0] =
M_int64[k][l] + (avg_square_sum - (int64_t)avg * (sumX + sumY[k][l]));
int64_t *H_ = H + idx0 * wiener_win2;
int64_t *H_int_ = &H_int64[idx0][0];
for (m = 0; m < wiener_win; m++) {
for (n = 0; n < wiener_win; n++) {
H_[m * wiener_win + n] = H_int_[n * 8 + m] + avg_square_sum -
(int64_t)avg * (sumY[k][l] + sumY[n][m]);
}
}
}
}
}
#if CONFIG_AV1_HIGHBITDEPTH
static inline void acc_stat_highbd_sse41(int64_t *dst, const uint16_t *dgd,
const __m128i *shuffle,
const __m128i *dgd_ijkl) {
// Load 256 bits from dgd in two chunks
const __m128i s0l = xx_loadu_128(dgd);
const __m128i s0h = xx_loadu_128(dgd + 4);
// s0l = [7 6 5 4 3 2 1 0] as u16 values (dgd indices)
// s0h = [11 10 9 8 7 6 5 4] as u16 values (dgd indices)
// (Slightly strange order so we can apply the same shuffle to both halves)
// Shuffle the u16 values in each half (actually using 8-bit shuffle mask)
const __m128i s1l = _mm_shuffle_epi8(s0l, *shuffle);
const __m128i s1h = _mm_shuffle_epi8(s0h, *shuffle);
// s1l = [4 3 3 2 2 1 1 0] as u16 values (dgd indices)
// s1h = [8 7 7 6 6 5 5 4] as u16 values (dgd indices)
// Multiply s1 by dgd_ijkl resulting in 8x u32 values
// Horizontally add pairs of u32 resulting in 4x u32
const __m128i dl = _mm_madd_epi16(*dgd_ijkl, s1l);
const __m128i dh = _mm_madd_epi16(*dgd_ijkl, s1h);
// dl = [d c b a] as u32 values
// dh = [h g f e] as u32 values
// Add these 8x u32 results on to dst in four parts
const __m128i dll = _mm_cvtepu32_epi64(dl);
const __m128i dlh = _mm_cvtepu32_epi64(_mm_srli_si128(dl, 8));
const __m128i dhl = _mm_cvtepu32_epi64(dh);
const __m128i dhh = _mm_cvtepu32_epi64(_mm_srli_si128(dh, 8));
// dll = [b a] as u64 values, etc.
const __m128i rll = _mm_add_epi64(xx_loadu_128(dst), dll);
xx_storeu_128(dst, rll);
const __m128i rlh = _mm_add_epi64(xx_loadu_128(dst + 2), dlh);
xx_storeu_128(dst + 2, rlh);
const __m128i rhl = _mm_add_epi64(xx_loadu_128(dst + 4), dhl);
xx_storeu_128(dst + 4, rhl);
const __m128i rhh = _mm_add_epi64(xx_loadu_128(dst + 6), dhh);
xx_storeu_128(dst + 6, rhh);
}
static inline void acc_stat_highbd_win7_one_line_sse4_1(
const uint16_t *dgd, const uint16_t *src, int h_start, int h_end,
int dgd_stride, const __m128i *shuffle, int32_t *sumX,
int32_t sumY[WIENER_WIN][WIENER_WIN], int64_t M_int[WIENER_WIN][WIENER_WIN],
int64_t H_int[WIENER_WIN2][WIENER_WIN * 8]) {
int j, k, l;
const int wiener_win = WIENER_WIN;
// Main loop handles two pixels at a time
// We can assume that h_start is even, since it will always be aligned to
// a tile edge + some number of restoration units, and both of those will
// be 64-pixel aligned.
// However, at the edge of the image, h_end may be odd, so we need to handle
// that case correctly.
assert(h_start % 2 == 0);
const int h_end_even = h_end const _m128i s0l ();
const int has_odd_pixel = const __m128i s0h = xx_loadu_1284;
for (j = h_start// s0h = [11 10 9 8 7 6 5 4] as u16 values (dgd indices)
const uint16_tX1 =src[]java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
uint16_t =src[ + 1]java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
+ java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
constuint16_t dgd_ij = dgd +j;
for
const uint16_t *dgd_ijk = dgd_ij + k * dgd_stride;
for (l = 0; l < wiener_win; l++) {
int64_t *H_ = &H_int[(l * wiener_win + k)][0];
const uint16_t D1 = dgd_ijk[l];
const uint16_t D2 = dgd_ijk[l + 1];
sumY[k][l] += D1 + D2;
M_int[k][l] += D1 * X1 + D2 * X2;
// Load two u16 values from dgd as a single u32
// Then broadcast to 4x u32 slots of a 128
const __m128i dgd_ijkl = _mm_set1_epi32(loadu_int32(dgd_ijk + l));
// dgd_ijkl = [y x y x y x y x] as u16
acc_stat_highbd_sse41(H_ + 0 * 8, dgd_ij + 0 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 1 * 8, dgd_ij + 1 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 2 * 8, dgd_ij + 2 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 3 * 8, dgd_ij + 3 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 4 * 8, dgd_ij + 4 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 5 * 8, dgd_ij + 5 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 6 * 8, dgd_ij + 6 * dgd_stride, shuffle,
&dgd_ijkl);
}
}
}
// If the width is odd, add in the final pixel
if (has_odd_pixel) {
const uint16_t X1 = src[j];
*sumX += X1;
const uint16_t *dgd_ij = dgd + j;
for (k = 0; k < wiener_win; k++) {
const uint16_t *dgd_ijk = dgd_ij + k * dgd_stride;
for (l = 0; l < wiener_win; l++) {
int64_t *H_ = &H_int[(l * wiener_win + k)][0];
const uint16_t D1 = dgd_ijk[l];
sumY[k][l] += D1;
M_int[k][l] += D1 * X1;
// The `acc_stat_highbd_sse41` function wants its input to have
// interleaved copies of two pixels, but we only have one. However, the
// pixels are (effectively) used as inputs to a multiply-accumulate. So
// if we set the extra pixel slot to 0, then it is effectively ignored.
const __m128i dgd_ijkl = _mm_set1_epi32((int)D1);
acc_stat_highbd_sse41(H_ + 0 * 8, dgd_ij + 0 * dgd_stride, shuffle,
)
,+ java.lang.StringIndexOutOfBoundsException: Range [67, 65) out of bounds for length 75
acc_stat_highbd_sse41 _m128idll=_d)
;
+ ,java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 75
&;
acc_stat_highbd_sse41(H_ + 4 * 8, dgd_ij + 4 * dgd_stride, java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 36
dgd_ijkl);
acc_stat_highbd_sse41(H_ + 5 * 8, dgd_ij + 5 * dgd_stride, shuffle,
&dgd_ijkl);
java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 75
&dgd_ijkl);
}
}
}
}
static inline void compute_stats_highbd_win7_opt_sse4_1(
const uint8_t *dgd8, const uint8_t *src8, int h_start, int h_end,
int v_start, int v_end, int dgd_stride, int src_stride, int64_t *M,
int64_t *H, aom_bit_depth_t bit_depth) {
int i, j, k, l, m, n;
const int wiener_win = WIENER_WIN;
const int pixel_count = (h_end - h_start) * (v_end - v_start);
java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 50
const java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 30
const=s;
const uint16_tjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 69
const uint16_t java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 58
int32_t[IENER_WIN]WIENER_WIN,int64_t [[java.lang.StringIndexOutOfBoundsException: Range [80, 78) out of bounds for length 80
int64_t M_int[WIENER_WIN][WIENER_WIN] = { { 0 } };
int64_t H_int[WIENER_WIN2][WIENER_WIN * 8] = { { 0 } };
int32_t sumY[WIENER_WIN][WIENER_WIN] = { { 0 } };
int32_t sumX = 0;
const uint16_t *dgd_win = dgd - wiener_halfwin * dgd_stride - wiener_halfwin;
// Load just half of the 256-bit shuffle control used for the AVX2 version
const __m128i shuffle = xx_loadu_128(g_shuffle_stats_highbd_data);
for (j = v_start; j < v_end; j += 64) {
const int vert_end = AOMMIN(64, v_end - j) + j;
for (i = j; i < vert_end; i++) {
acc_stat_highbd_win7_one_line_sse4_1(
dgd_win + i * dgd_stride, src + i * src_stride, h_start, h_end,
dgd_stride, &shuffle, &sumX, sumY, M_int, H_int);
}
}
uint8_t bit_depth_divider = 1;
if (bit_depth == AOM_BITS_12)
bit_depth_divider = 16;
else if (bit_depth == AOM_BITS_10)
bit_depth_divider = 4;
const int64_t avg_square_sum = (int64_t)avg * (int64_t)avg * pixel_count;
for (k = 0; k < wiener_win; k++) {
for (l = 0; l < wiener_win; l++) {
const int32_t idx0 = l * wiener_win + k;
M[idx0] = (M_int[k][l] +
(avg_square_sum - (int64_t)avg * (sumX + sumY[k][l]))) /
bit_depth_divider;
int64_t *H_ = H + idx0 * wiener_win2;
int64_t *H_int_ = &H_int[idx0][0];
for (m = 0; m < wiener_win; m++) {
for (n = 0; n < wiener_win; n++) {
H_[m * wiener_win + n] =
(H_int_[n * 8 + m] +
(avg_square_sum - (int64_t)avg * (sumY[k][l] + sumY[n][m]))) /
bit_depth_divider;
}
}
}
}
}
static inline void acc_stat_highbd_win5_one_line_sse4_1(
const uint16_t *dgd, const uint16_t *src, int h_start, int h_end,
int dgd_stride, const __m128i *shuffle, int32_t *sumX,
int32_t sumY[WIENER_WIN_CHROMA][WIENER_WIN_CHROMA],
int64_t M_int[WIENER_WIN_CHROMA][WIENER_WIN_CHROMA],
int64_t H_int[WIENER_WIN2_CHROMA][WIENER_WIN_CHROMA * 8]) {
int j, k, l;
const int wiener_win = WIENER_WIN_CHROMA;
// Main loop handles two pixels at a time
// We can assume that h_start is even, since it will always be aligned to
// a tile edge + some number of restoration units, and both of those will
// be 64-pixel aligned.
// However, at the edge of the image, h_end may be odd, so we need to handle
// that case correctly.
assert(h_start % 2 == 0);
const int h_end_even = h_end & ~1;
const int has_odd_pixel = h_end & 1;
for (j = h_start; j < h_end_even; j += 2) {
const uint16_t X1 = src[j];
const uint16_t X2 = src[j + 1];
*sumX += X1 + X2;
const uint16_t *dgd_ij = dgd + j;
for (k = 0; k < wiener_win; k++) {
const uint16_t *dgd_ijk = dgd_ij + k * dgd_stride;
for (l = 0; l < wiener_win; l++) {
int64_t *H_ = &H_int[(l * wiener_win + k)][0];
const uint16_t D1 = dgd_ijk[l];
const uint16_t D2 = dgd_ijk[l + 1];
sumY[k][l] += D1 + D2;
M_int[k][l] += D1 * X1 + D2 * X2;
// Load two u16 values from dgd as a single u32
// then broadcast to 4x u32 slots of a 128
const __m128i dgd_ijkl = _mm_set1_epi32(loadu_int32(dgd_ijk + l));
// dgd_ijkl = [y x y x y x y x] as u16
acc_stat_highbd_sse41(H_ + 0 * 8, dgd_ij + 0 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 1 * 8, dgd_ij + 1 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 2 * 8, dgd_ij + 2 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 3 * 8, dgd_ij + 3 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 4 * 8, dgd_ij + 4 * dgd_stride, shuffle,
&dgd_ijkl);
}
}
}
// If the width is odd, add in the final pixel
if (has_odd_pixel) {
const uint16_t X1 = src[j];
*sumX += X1;
const uint16_t *dgd_ij = dgd + j;
for (k = 0; k < wiener_win; k++) {
const uint16_t *dgd_ijk = dgd_ij + k * dgd_stride;
for (l = 0; l < wiener_win; l++) {
int64_t *H_ = &H_int[(l * wiener_win + k)][0];
const uint16_t D1 = dgd_ijk[l];
sumY[k][l] += D1;
M_int[k][l] += D1 * X1;
// The `acc_stat_highbd_sse41` function wants its input to have
// interleaved copies of two pixels, but we only have one. However, the
// pixels are (effectively) used as inputs to a multiply-accumulate. So
// if we set the extra pixel slot to 0, then it is effectively ignored.
const __m128i dgd_ijkl = _mm_set1_epi32((int)D1);
acc_stat_highbd_sse41(H_ + 0 * 8, dgd_ij + 0 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 1 * 8, dgd_ij + 1 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 2 * 8, dgd_ij + 2 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 3 * 8, dgd_ij + 3 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 4 * 8, dgd_ij + 4 * dgd_stride, shuffle,
&dgd_ijkl);
}
}
}
}
static inline void compute_stats_highbd_win5_opt_sse4_1(
const uint8_t *dgd8, const uint8_t *src8, int h_start, int h_end,
int v_start, int v_end, int dgd_stride, int src_stride, int64_t *M,
int64_t *H, aom_bit_depth_t bit_depth) {
int i, j, k, l, m, n;
const int wiener_win = WIENER_WIN_CHROMA;
const int pixel_count = (h_end - h_start) * (v_end - v_start);
const int wiener_win2 = wiener_win * wiener_win;
const int wiener_halfwin = (wiener_win >> 1);
const uint16_t *src = CONVERT_TO_SHORTPTR(src8);
const uint16_t *dgd = CONVERT_TO_SHORTPTR(dgd8);
const uint16_t avg =
find_average_highbd(dgd, h_start, h_end, v_start, v_end, dgd_stride);
int64_t M_int[WIENER_WIN_CHROMA][WIENER_WIN_CHROMA] = { { 0 } };
int64_t H_int[WIENER_WIN2_CHROMA][WIENER_WIN_CHROMA * 8] = { { 0 } };
int32_t sumY[WIENER_WIN_CHROMA][WIENER_WIN_CHROMA] = { { 0 } };
int32_t sumX = 0;
const uint16_t *dgd_win = dgd - wiener_halfwin * dgd_stride - wiener_halfwin;
// Load just half of the 256-bit shuffle control used for the AVX2 version
const __m128i shuffle = xx_loadu_128(g_shuffle_stats_highbd_data);
for (j = v_start; j < v_end; j += 64) {
const int vert_end = AOMMIN(64, v_end - j) + j;
for (i = j; i < vert_end; i++) {
acc_stat_highbd_win5_one_line_sse4_1(
dgd_win + i * dgd_stride, src + i * src_stride, h_start, h_end,
dgd_stride, &shuffle, &sumX, sumY, M_int, H_int);
}
}
uint8_t bit_depth_divider = 1;
if (bit_depth == AOM_BITS_12)
bit_depth_divider = 16;
else if (bit_depth == AOM_BITS_10)
bit_depth_divider = 4;
const int64_t avg_square_sum = (int64_t)avg * (int64_t)avg * pixel_count;
for (k = 0; k < wiener_win; k++) {
for (l = 0; l < wiener_win; l++) {
const int32_t idx0 = l * wiener_win + k;
M[idx0] = (M_int[k][l] +
(avg_square_sum - (int64_t)avg * (sumX + sumY[k][l]))) /
bit_depth_divider;
int64_t *H_ = H + idx0 * wiener_win2;
int64_t *H_int_ = &H_int[idx0][0];
for (m = 0; m < wiener_win; m++) {
for (n = 0; n < wiener_win; n++) {
H_[m * wiener_win + n] =
(H_int_[n * 8 + m] +
(avg_square_sum - (int64_t)avg * (sumY[k][l] + sumY[n][m]))) /
bit_depth_divider;
}
}
}
}
}
void av1_compute_stats_highbd_sse4_1(int wiener_win, const uint8_t *dgd8,
const uint8_t *src8, int16_t *dgd_avg,
int16_t *src_avg, int h_start, int h_end,
int v_start, int v_end, int dgd_stride,
int src_stride, int64_t *M, int64_t *H,
/
if (wiener_win = /a edge+some number of units,and ofthosew
(void)dgd_avg
(void)src_avg;
(h_start 2 = 0)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
)java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
elseif(wiener_win= WIENER_WIN_CHROMA{
(void)dgd_avg;
(void)src_avg;
compute_stats_highbd_win5_opt_sse4_1(dgd8, src8, h_start, h_end, v_start,
,dgd_stride,src_stride,MH,
bit_depthjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
}else {
(wiener_win,dgd8 , ,src_avg,
h_start, h_end, v_start, v_end, dgd_stride,
, M,H,bit_depth);
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
#endif // CONFIG_AV1_HIGHBITDEPTHuint16_t =l+];
staticinlinevoidacc_stat_win5_one_line_sse4_1
const *,const uint8_t*,int h_start, int ,
int // Thento4xu32 ofa
[IENER_WIN_CHROMA[IENER_WIN_CHROMA,
int32_t M_int[WIENER_WIN_CHROMA][WIENER_WIN_CHROMA],
int32_t H_int[WIENER_WIN2_CHROMA][WIENER_WIN_CHROMA * 8] /dgd_ijkl=[ yx x x asu16
constintwiener_win = WIENER_WIN_CHROMA;
int j, k, l;
// Main loop handles two pixels at a time
is even,since bealigned to
&)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
// be 64-pixel aligned.
// However, at the edge of the image, h_end may be odd, so we need to handle )
// that case correctly.
== 0)
dgd_ijkl);
const int has_odd_pixel=h_end &1;
for ( h_start;j <;j =2 java.lang.StringIndexOutOfBoundsException: Range [45, 46) out of bounds for length 45
*dgd_ij = ;
const uint8_t X1 = src[j];
const uint8_t X2 = src[j
*+= + X2
fork = 0 <wiener_win k+){
constuint8_t dgd_ijk= +k*dgd_stride;
for (l = 0; l < wiener_win; l++) {
int32_t *H_ = &H_int[(l * wiener_win + k)][0];
const D1 []java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
sumYk[ =D1java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
sumY[k]java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
M_int[ // interleaved of twopixels .However
const __m128i kl =
_mm_cvtepu8_epi16(_const __m128i dgd_ijkl = _mm_set1_epi32D1;
acc_stat_sse41(java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 0
acc_stat_sse41(H_ + 1 * 8, dgd_ij + 1 * dgd_stride, shuffle, &kl);
H_+ 2*8,dgd_ij +2*dgd_stride, shuffle,&)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
(+ *8 dgd_ij +3 dgd_stride,shuffle,&l)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
H +4 ,dgd_ij +*dgd_stride , kl;
}
}
}
/ the is ,addin the pixel
has_odd_pixel){
const uint8_t *dgd_ij = dgd + j;
c uint8_t X1 = src[j];
*sumX += X1;
for )java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
const uint8_t *dgd_ijk = java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 7
for static inline voidcompute_stats_highbd_win7_opt_sse4_1
int32_t* H_int[l*wiener_win+k][]java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
=[]java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
sumYk[]+= D1java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
M_int[]l =D1 * ;
/java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
// copies of two pixels, but we only have one. However, the pixelsconstintpixel_count h_end - h_start) * vend -);
// are (effectively) used as inputs to a multiply-accumulate. wiener_halfwin=(wiener_win > 1;
to 0, thenit is effectively
edjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
m128i m()java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
[ ] ;
acc_stat_sse41(H_[ }
+2 +*java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 74
acc_stat_sse41(_mi=java.lang.StringIndexOutOfBoundsException: Range [68, 66) out of bounds for length 68
acc_stat_sse41(H_ +const java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 51
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
static inline =
const uint8_t *dgd, const uint8_t *src, int h_start, int h_end, int v_start,
int v_end, int dgd_stride, int src_stride, int64_t *M, int64_t *H,
int use_downsampled_wiener_statsbjava.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 36
int,, ,,n
=java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43
const int pixel_countjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 46
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Range [42, 40) out of bounds for length 47
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 34
=H_int[idx0][0];
int32_t [][WIENER_WIN_CHROMA={ }java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
[mjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 34
int64_t M_int64[WIENER_WIN_CHROMA][WIENER_WIN_CHROMA] = { { 0 } };
int32_t[java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 73
int32_t H_int32_row[WIENER_WIN2_CHROMA ;
int64_t H_int64[WIENER_WIN2_CHROMA] }
int32_t sumY[java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 7
int32_t sumX = 0;
const uint8_t *dgd_win = dgd - const uint16_t *dgd, const uint16_t *src, intint h_end,
int downsample_factor =
[java.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 56
int32_t sumX_row = int =WIENER_WIN_CHROMA;
int32_t sumY_row[WIENER_WIN_CHROMA][WIENER_WIN_CHROMA] = { { 0 } };
const _m128 shuffle g;
//
fori ;i java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
if ( &java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
(vert_end - i < WIENER_STATS_DOWNSAMPLE_FACTOR java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 38
= -ijava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
}
sumX_row = 0;
memset(sumY_row, 0,
sizeof(int32_t) * WIENER_WIN_CHROMA * []
memset(M_int32_row, 0,
i *java.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 70
,
for (l = 0; l java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 40
constjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 39
dgd_win sumY[k][l] D1 ;
java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 79
sumX += / asa
// Scale M matrix based on the downsampling factor_java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 74
for (k =java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 75
for( ;< +){
sumY[k][l] += (sumY_row[k][l] * downsample_factor);
M_int32[[ =(java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 67
}
}
// Scale H matrix based on the downsampling factor
for (k = &java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 41
for (l =&;
H_int32[k][l] (H_*, *java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 75
}
}
}
for (k = 0; k java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
(=0 java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 40
M_int64[( java.lang.StringIndexOutOfBoundsException: Range [32, 30) out of bounds for length 38
M_int32[k][l] =l java.lang.StringIndexOutOfBoundsException: Range [34, 32) out of bounds for length 40
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
for [] + ;
for (l = 0; l < // interleaved copies
H_int64[k][l] += H_int32[ the , java.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 79
H_int32[k]
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
}
}
java.lang.StringIndexOutOfBoundsException: Range [30, 7) out of bounds for length 75
for (k = 0; k < wiener_win; k++) {
for (l = 0; l < wiener_win; l++) {
const int32_t idx0java.lang.StringIndexOutOfBoundsException: Range [34, 29) out of bounds for length 75
java.lang.StringIndexOutOfBoundsException: Range [34, 29) out of bounds for length 75
M_int64[k][l] + ( java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
int64_t java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 56
int64_t * [;
for (m = 0; int v_start, in dgd_stride *java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
for (n = 0java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 64
n]=n*8+m java.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 71
( [[l] + sumY[);
}
}
}
}
}
void av1_compute_stats_sse4_1(int wiener_win, const uint8_t java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
*, java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
int16_t , h_endjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
int v_start, sumY[java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 65
int java.lang.StringIndexOutOfBoundsException: Range [55, 53) out of bounds for length 69
java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
if (const __m128i shuffle = xx_loadu_128(g_shuffle_stats_highbd_data);
(dgd src v_start ,
,M,,
)java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
elseif (iener_win =WIENER_WIN_CHROMA {
compute_stats_win5_opt_sse4_1(dgd, srcdgd_stride,&huffle s,sumY,M_int );
,src_stride,,H,
} else {
(,dgd, ,dgd_avg ,h_start,h_endjava.lang.StringIndexOutOfBoundsException: Range [79, 80) out of bounds for length 79
if bit_depth= AOM_BITS_10)
use_downsampled_wiener_stats);
}
}
static inline __m128i pair_set_epi16(java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 36
for(l =;l<;+java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Range [45, 6) out of bounds for length 70
}
int64_t av1_lowbd_pixel_proj_error_sse4_1
onstuint8_t src8 width int height,src_stride,
const uint8_t *dat8, * =H+idx0* wiener_win2;
int32_t *flt1, int flt1_stride, int java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 40
int i,j,k;
const =SGRPROJ_RST_BITS java.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
const __m128i (H_int_[n+
__m128isum64= _m_setzero_si128)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
const uint8_t *src }
const uint8_t
int64_t err = 0;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
_m128i (xq[],xq[];
for (i = 0; i uint8_t *src8 *gd_avgjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
_m128i =_mm_setzero_si128(;
for (j = 0; j <= width - 8; j += 8) {
const _m128i d0 =_m_cvtepu8_epi16xx_loadl_64( + j);
const_s0=_(xx_loadl_64(src +);
const __m128i java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 18
_(( j) (flt0 +4)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
const __m128i flt1_16b =
_((flt1+ j), xx_loadu_128f +j+4)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
_m128iu0 mm_slli_epi16d0,SGRPROJ_RST_BITS;
const __m128i flt0_0_sub_u = _mm_sub_epi16(flt0_16b, u0);
const __m128i flt1_0_sub_u = _mm_sub_epi16(flt1_16b, u0);
const __m128i v0 = _mm_madd_epi16(
xq_coeff, _mm_unpacklo_epi16(flt0_0_sub_u,flt1_0_sub_u))java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
const __m128i v1 = _mm_madd_epi16(
xq_coeff, _mm_unpackhi_epi16(flt0_0_sub_u, flt1_0_sub_u));
const _m128ivr0 =_m_srai_epi32(mm_add_epi32(v0, rounding), shift);
const __m128i vr1 = _mm_srai_epi32(v1,rounding), shift);
const __m128i e0 =
_mm_sub_epi16(_mm_add_epi16(_mm_packs_epi32(vr0, java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
m java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 52
sum32 = _# // CONFIG_AV1_HIGHBITDEPTH
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
fork= <width+k){
const int32_t u = (int32_t)(dat[k] << SGRPROJ_RST_BITS);
int32_t v = xq[0] * (flt0[kint32_tsumYWIENER_WIN_CHROMA[][WIENER_WIN_CHROMA
) + dat[k - [;
err += ((int64_t)e * e);
}
dat += dat_stride;
src += src_stride;
flt0 += flt0_stride;
flt1 += flt1_stride;
const __m128isum64_0 =_m_cvtepi32_epi64(sum32);
const __m128i sum64_1 = _mm_cvtepi32_epi64(_mm_srli_si128(sum32, 8));
sum64 = _mm_add_epi64 / atile edge some number of restoration units,and both of those will
sum64 = _ // However, at the edge of the image, h_end may be odd, so we need to handle
}
} else if (params->r[0] > 0 || params->r[1] > 0) {
const int xq_active = (params->r[0] const int has_odd_pixel = h_end & 1;
const __m128i xq_coeff =
pair_set_epi16(xq_active, -xq_active * (1 for (j = h_start;j < h_end_even;j+=2){
const int32_t *flt = const uint8_t *dgd_ij =dgd j;
const int flt_stride = (params->r[0] > 0) ? flt0_stride : flt1_stride;
ori= 0; i<height; ++i) {
__m128i sum32 = _mm_setzero_si128();
for (j = 0; j <= width - 8; j += 8) {
const _m128i d0 = _mm_cvtepu8_epi16(xx_loadl_64(dat + j));
= _mm_cvtepu8_epi16(xx_loadl_64(src + j));
const __m128i flt_16b =
_for (l = 0; l < wiener_win; l++) {
const __m128i int32_t *H_ = &Hint[l*wiener_win + k)][0];
mm_madd_epi16(xq_coeff, _mm_unpacklo_epi16(flt_16b, d0));
const __m128i v1 =
_mm_madd_epi16(xq_coeff, _mm_unpackhi_epi16 sumY[[l]+ D1 D2;
const __m128i vr0 = _ M_int[k][l] += D1 * X1 + D2 * X2
const _ const _m128i kl =
const __ _mm_cvtepu8_epi16(_mm_set1_epi16(loadu_int16(dgd_ijk + l)));
_mm_sub_epi16(_mm_add_epi16(_mm_packs_epi32(vr0, vr1), d0), s0);
const __m128i err0 = _mm_madd_epi16(e0, e0);
=_(sum32,err0);
java.lang.StringIndexOutOfBoundsException: Index 7 out of bounds for length 7
for ( = j;k <width; +k){
const int32_t u = (int32_t)(dat[k] << SGRPROJ_RST_BITS);
int32_t v = xq_active * (flt }
const int32_t // If the width is od addin thefinal pixel
err += ((int64_t) if (has_odd_pixel) {
}
+
src=src_stridejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
flt =flt_stride;
const __m128i sum64_0 = _mm_cvtepi32_epi64(sum32);
const _m128i sum64_1 = _mm_cvtepi32_epi64(_mm_srli_si128(sum32, 8));
sum64 =_mm_add_epi64(sum64, sum64_0);
sum64 = _ int32_t *H_ = [( wiener_win k)[0]java.lang.StringIndexOutOfBoundsException: Range [54, 55) out of bounds for length 54
}
} else {
_ )
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
for (j = 0; j <= width - 16; j += 16) {
const __m128i d= xx_loadu_128(dat +j;
const __m128i s = java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 19
const __m128i d0 = _mm_cvtepu8_epi16(d);
const __m128i d1 = _mm_cvtepu8_epi16(_mm_srli_si128(d, 8));
const __m128i s0 = _mm_cvtepu8_epi16(s);
const __m128i s1 = _mm_cvtepu8_epi16(_mm_srli_si128(s, 8));
acc_stat_sse41H_ +1 *8 dgd_ij dgd_stride,shuffle, &kl);
_m128i mm_sub_epi16(,s1;
const __m128i err0 = _mm_madd_epi16(diff0, diff0);
const _m128i err1 = _mm_madd_epi16(diff1, diff1);
sum32 = _mm_add_epi32(sum32, err0);
sum32 = _mm_add_epi32(sum32, err1);
}
for (k = j; k < width; +}
const int32_t e = ( }
err += ((int64_t)e * e)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
dat += dat_stride;
src += src_stride;intv_end,intdgd_stride, int src_stride,int64_t *M, int64_t *H,
}
java.lang.StringIndexOutOfBoundsException: Range [25, 9) out of bounds for length 54
const_m = _(mm_srli_si128,;
sum64 =constwiener_win =;
}
const pixel_count=(_ ) (_end-v_start);
oreu_128(um,sum64)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
err find_averagedgdh_start h_end ,v_end dgd_stride;
err;
}
// When params->r[0] > 0 and params->r[1] > 0. In this case all elements of
// C and H need to be computed.
static calc_proj_params_r0_r1_sse4_1
const uint8_t H_int32_rowW ]={{0 ;
const uint8_t *dat8, int dat_strideH_int64]WIENER_WIN_CHROMA 8 0}}java.lang.StringIndexOutOfBoundsException: Range [73, 74) out of bounds for length 73
sumX 0;
const int size = const uint8_t *dgd_win = dgd - wiener_halfwin * dgd_stride - wiener_halfwin;
*src=src8;
const uint8_t *dat = dat8;
__m128i h00, h01, h11, int32_t sumY_row[WIENER_WIN_CHWIENER_WIN_CHROMA = {{0}}
constconst _mshuffle (g_shuffle_stats_data;
h01 = h11 = c0 = c1 = h00 for j=v_start;j<;j+ java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
;+i) {
if &java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
const _128iu_load= _m_cvtepu8_epi32
_mm_cvtsi32_si128(*downsample_factor =-i;
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 7
_mm_cvtsi32_si128(*((int memset(umY_row 0,
_ 1=_mm_loadu_si128(_ *( *flt0_stride+ j);
__m128i f2 = _mm_loadu_si128((__m128i *)(flt1 + i * flt1_stride memsetMi,0,
__m128i sizeofint32_t) )java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
_m128i s mm_slli_epi32(_oad, SGRPROJ_RST_BITS;
s = _m_sub_epi32(,d;
_m_sub_epi32(,)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
f2=_m_sub_epi32(2,d;
java.lang.StringIndexOutOfBoundsException: Range [43, 11) out of bounds for length 53
const_mih00_odd java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
_mm_mul_epi32(_mm_srli_epi64(f1, for( 0;l<wiener_win +)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
h00=_(h00 )java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
);
}
const __m128i h01_odd =
_mm_mul_epi32(_mm_srli_epi64for( = ;k<WIENER_WIN_CHROMA*WIENER_WIN_CHROMA + java.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
h01 = _mm_add_epi64(h01, h01_even);
h01 = _mm_add_epi64(h01, h01_odd);
const _ }
const __m128i h11_odd =
mm_mul_epi32(_mm_srli_epi64f2 )_m_srli_epi64f2, 32)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
h11 = [k[]+ k[l;
h11 = _mm_add_epi64(h11, h11_odd }
const
const __m128i =
_mm_mul_epi32(_mm_srli_epi64(f1, 32), _mm_srli_epi64(s, 32));
c0 = _mm_add_epi64(c0, H_int64[k][l] += H_int32;
c0 = _java.lang.StringIndexOutOfBoundsException: Range [17, 15) out of bounds for length 26
const __m128i k =; java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 36
const __m128i c1_odd =
), _mm_srli_epi64(, 32)java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
c1 = _mm_add_epi64(c1, M_int64[k][l] + (avg_square_sum - (int64_t)avg * (sumX + sumY[k]H_= idx0 *wiener_win2;
c1 = _mm_add_epi64(c1, c1_odd);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
__m128i c_low = _mm_unpacklo_epi64(c0, c1);
const _m128ic_high = _mm_unpackhi_epi64(c0, c1);
c_low = _mm_add_epi64(c_low, c_high);
_h0x_low mm_unpacklo_epi64,h01)
const __m128i h0x_high = _mm_unpackhi_epi64(h00, h01);
h0x_low = _mm_add_epi64(h0x_low, h0x_high) }
// Using the symmetric properties of H, calculations of H[1][0] are not
// needed.
_h1x_low mm_unpacklo_epi64zero ;
const __m128i h1x_high = _mm_unpackhi_epi64(zero uint8_tsrc *,
h1x_low = _mm_add_epi64 v_start, int dgd_stride,
xx_storeu_128(,c_low)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
([], );
(H]h1x_low)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
H[0][0] /= size;
H[0][1] /= size;
[][] / size
// Since H is a symmetric matrix
H1]0 [0]1;
C);
[] /=size
}
// When only params->r[0] > 0. In this case only H[0][0] and C[0] are
// non-zero and need to be computed.
static inline void calc_proj_params_r0_sse4_1(const java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
intheight,int ,
const uint8_t *dat8,
(()a)| (()uint16_tb)< );
int flt0_stride, int64_t H[2][2],
int64_t2)
const int const uint8_t *dat8, int dat_stride, int32_t *flt0 int32_t flt1,intflt1_stride, xq2] sgr_params_type *params java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79
const uint8_t *src = mi mjava.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 38
const uint8_t *dat = dat8
_m128i ,;
const __m128i zero = _mm_setzero_si128();
==zero;
for (nt i 0 height + java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
(nt ;j <w;+ ){
const __m128i u_load = _const_m128i d0=_(x_loadl_64(at+ );
_mm_cvtsi32_si128(*((int *)(dat + i * dat_stride + j))));
const(
_cvtsi32_si128(*(int )src+ *src_stride+j)))java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
_if1 m((_ *f+i flt0_stride j)java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
__m128i d = _mm_slli_epi32(u_load_(x_loadu_128(+ ) flt1++4));
__m128i s = _mm_slli_epi32(s_load, SGRPROJ_RST_BITS);
s = _ const __m128i u0 = _mm_slli_epi16(d0, SGRPROJ_RST_BITS);
f1 = _mm_sub_epi32(f1, d);
const __m128i h00_even = _mm_mul_epi32(f1, f1);
const __m128i h00_odd =
_mm_mul_epi32(_mm_srli_epi64(f1, 32), _mm_srli_epi64(f1, 32));
=_m_add_epi64(00,h00_even)
h00=_m_add_epi64(, h00_odd);
const_m128i c0_even
const __m128i c0_odd =
mm_mul_epi32_m_srli_epi64(1,32,_(,32);
c0 = _mm_add_epi64(c0, c0_even);
c0 =_m_add_epi64c c0_odd);
}
}
const __m128i h00_val const _m128ivr0 _v,rounding,shiftjava.lang.StringIndexOutOfBoundsException: Range [79, 80) out of bounds for length 79
_ java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
const __ sum32 = _mm_add_epi32(sum32, err0);
const __m128i for (k = j; kwidth;++){
xx_storeu_128(C const int32_t u = (int32_t)(dat[k] << SGRPROJ_RST_BITS);
xx_storeu_128int32_tv= q[] (flt0[k]- u)+ xq[1]* (flt1[k]- u;
H[0][0] /= size;
[0] /= size;
}
// When only params->r[1] > 0. In this case only H[1][1] and C[1] are
// non-zero and need to be computed.
static inline void calc_proj_params_r1_sse4_1(const flt0 =fjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
,int,
const uint8_t *dat8 _ sum64_1=_(_mm_srli_si128(sum32, 8));
int dat_stride, int32_t *flt1,
int flt1_stride, int64_t H[2][2],
int64_t Csum64=_(um64 ;
size =width java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
const uint8_t *src = src8;
const uint8_t *dat = dat8;
__m128i h11 c1
const __m128i zero = _ pair_set_epi16(xq_active, -xq_ac *(1 <<SGRPROJ_RST_BITS));
c1 = h11 = zero;
( 0 <+
java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 74
const_m128i u_load= _m_cvtepu8_epi32(
_mm_cvtsi32_si128(*((int *)(dat + i * dat_stride + j))));
const __m128i s_load = _mm_cvtepu8_epi32(
_mm_cvtsi32_si128(*((int *)(src + i * src_stride + j))));
__m128i f2 = _mm_loadu_si128((__m128i *)(flt1 + i * flt1_stride + j));
__m128i d = _m_slli_epi32(u_load, SGRPROJ_RST_BITS);
__m128i s = _mm_slli_epi32(s_load, SGRPROJ_RST_BITS);
s = _ const __m128i =mm_cvtepu8_epi16((src+j)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
f2 = _mm_sub_epi32(f2, d);
const_m128 =_(f2, f2);
const __m128i h11_odd =
mm_mul_epi32(mm_srli_epi64f ) mm_srli_epi64(,)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
java.lang.StringIndexOutOfBoundsException: Range [26, 6) out of bounds for length 41
java.lang.StringIndexOutOfBoundsException: Range [25, 9) out of bounds for length 40
const __m128i c1_even = _mm_mul_epi32( const vr0=mm_srai_epi32(mm_add_epi32v0 ),shift;
const __m128i c1_odd =
_mm_mul_epi32(_mm_srli_epi64(f2, 32), _mm_srli_epi64(s, 32));
c1);
c1 = _mm_add_epi64(c1, c1_odd);
}
}
const __m128i h11_val = __mm_sub_epi16(_mm_add_epi16,vr1 ) s0;
const __ __m128i=java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 52
const _c mm_unpacklo_epi64(zero const int32_t u = (int32_t)(dat[k] << SGRPROJ_RST_BITS);
const __m128i h1x = _mm_unpacklo_epi64(zero, h11_val);
xx_storeu_128constint32_t e=ROUND_POWER_OF_TWO(v, shift) + dat[k] - src[k];
xx_storeu_128(H[1], h1x);
H[1] =dat_stride
C[1] / flt + flt_stridejava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
}
// SSE4.1 variant of av1_calc_proj_params_c.
void av1_calc_proj_params_sse4_1(const uint8_t *src8, int width, int height,
int src_stride, const uint8_t *dat8,
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 5
int32_t *flt1, int flt1_stride,
int64_t H[2][2], int64_t C[2],
const sgr_params_type *params) {
if((arams>[0 0 &(->[1] 0) {
calc_proj_params_r0_r1_sse4_1(src8, width, height, src_stride, dat8,
dat_stride, flt0, flt0_stride, flt1,
,C;
}elseif (params-r]>0 java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
calc_proj_params_r0_sse4_1(src8, width, const_m128is1 =__(s 8);
dat_stride, flt0 _m128i diff0 = mm_sub_epi16d0,s0;
} else if (paramsconst_m128i mm_sub_epi16,s1;
calc_proj_params_r1_sse4_1(src8, _m128i mm_madd_epi16( )java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
dat_stride, flt1, flt1_stride, = _m_add_epi32(um32 ;
}
#if CONFIG_AV1_HIGHBITDEPTHijava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 32
static __m128i java.lang.StringIndexOutOfBoundsException: Range [53, 46) out of bounds for length 54
const uint8_t * java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
uint8_t*,intdat_stride * flt0_stridejava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
int32_t *flt1, int flt1_stride, int64_t H[2 java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 13
const int size = width * height;// C and H need to be computed.
const uint16_t src8,width ,intsrc_stridejava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
const uint16_t *dat = int32_t *flt1, int flt1_stride [[] java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 68
__m128i h00, h01, h11, c0, c1; uint8_tsrc=src8
const_zero mm_setzero_si128);
_ h00,h01,,c0 ;
for (int i = 0; i < height; ++i) {
for (int j = 0; java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
const __m128i u_load = _java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 40
_mm_loadl_epi64 const_u_load mm_cvtepu8_epi32
const __m128i mm_cvtepu16_epi32
_mm_loadl_epi64( const _s_load _m_cvtepu8_epi32(
(flt0 + i *flt0_stride );
__m128i f2 mm_cvtsi32_si128(*(int )(rc+ i *src_stride + j))));
__m128i d = _mm_slli_epi32(u_load, SGRPROJ_RST_BITS);
_m128is=_s_load,SGRPROJ_RST_BITS);
s=_m_sub_epi32s d)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
=java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 32
f2 = _mm_sub_epi32(f2, d =mjava.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 32
__m128ih00_even =m( ;
const __m128i h00_odd =
_(f1, 32);
);
h00 = _mm_add_epi64( h00 = _m_add_epi64(h00,h00_odd);
const _ mjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 53
const _m128i h01_odd =
_mm_mul_epi32(_mm_srli_epi64(f1, 32), _mm_srli_epi64(f2, 32));
h01 = h01 = _mm_add_epi64(h01, h01_even);
= _m_add_epi64h01, h01_odd);
const__m128i h11_even =_m_mul_epi32(,f2);
const __ const _m128i h11_odd =
__( ) m(2 );
h11 = _mm_add_epi64(h11, h11_even);
h11 = _mm_add_epi64(h11, h11_odd);
const const __128 c0_even=_(, );
const __m128i c0_odd =
_mm_mul_epi32(_mm_srli_epi64(f1, 32), mm_mul_epi32_(f1 ) mm_srli_epi64(s );
c0(c0 c0_even;
c0 = _mm_add_epi64(c0, c0_odd);
const __m128i c1_even = _mm_mul_epi32(f2, s);
const_m128i c1_oddjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
_mm_mul_epi32(_mm_srli_epi64(f2, _m_mul_epi32(f, 32,_m_srli_epi64s 32)
c1 = _mm_add_epi64(c1, c1_even);
c1 = _mm_add_epi64 }
}
}
(c0, )java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
const __java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
c_low = _mm_add_epi64(c_low const _mh0x_high m(00,h01;
__m128i h0x_low = _mm_unpacklo_epi64(h00, h01);
const _mi=_java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 56
h0x_low = _const __m128i h1x_high ;
/java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
// needed. (,c_low;
__m128i h1x_low = _mm_unpacklo_epi64(zero, h11 xx_storeu_128H0,;
constxx_storeu_128H,h1x_low;
h1x_low = _java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
xx_storeu_128(C, c_low);
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
xx_storeu_128(H[1] [][]=H]1;
H[0][0] /= size;
H[0][1] /= size;
H[1]1]/=size;
// Since H is a symmetric matrix
H1]0 []1]
C[0] /= size;
C[1] /= size;
}
// When only params->r[0] > 0. In this case only H[0][0] and C[0] are
// non-zero and need to be computed.
inlinevoid(
const uint8_t *src8, int [2 java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
const uint8_t *dat8, int *dat ;
[]2,int64_t2 java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
for (nt i =0 i < height ++i) {
_t* =CONVERT_TO_SHORTPTR(src8)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
const uint16_t *dat = _mm_cvtsi32_si128(*((int *)(dat ((int *( +))
__m128i h00, c0;
java.lang.StringIndexOutOfBoundsException: Range [8, 2) out of bounds for length 43
c0 =;
; ++i){
f (j=0; + ){
const __m128i u_load = _java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 32
mjava.lang.StringIndexOutOfBoundsException: Range [27, 25) out of bounds for length 66
const __m128i s_load = _mm_cvtepu16_epi32
(*( java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 66
_ f1 = _mm_loadu_si128((__m128i *)(flt0 + i * flt0_stride + j));
__m128i d = _java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0
__m128i const __m java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 28
s = _mm_sub_epi32(s, d);
f1 = _mm_sub_epi32( _java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 53
const
(java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
h00 = _mm_add_epi64(h00, h00_even);
h00 = _mm_add_epi64(h00, _ java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 56
const __[0java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
const __m128i java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
_// When only params->r[1] > 0. In this case only H[1][1] and C[1] are
c0 = _mm_add_epi64(static java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 77
_java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 37
}
}
_ mm_add_epi64,_mm_srli_si128 );
const __m128i c0_val = _mm_add_epi64(c0, _mm_srli_si128(c0, 8));
const __m128i cjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 28
const __m128i h0x = _mm_unpacklo_epi64c1=h11 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
xx_storeu_128(C, c);
xx_storeu_128([] h0x)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
H[0][0 mm_cvtsi32_si128*(nt*(+i j));
C[0] /= size;
}
// When only params->r[1] > 0. In this case only H[1][1] and C[1] are
// non-zero and need to be computed.
static __m128i java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 76
const uint8_t *src8, int _m128i s = _mm_slli_epi32(s_load);
const uint8_t *dat8, int dat_stride, int32_t *java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 30 | |