/* *Copyright(c)2018,AllianceforOpenjava.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 9 * *ThissourcecodeissubjecttothetermsoftheBSD2ClauseLicenseand *theAllianceforOpenMediaPatentLicense1.0.IftheBSD2ClauseLicense *wasnotdistributedwiththissourcecodeinthejava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 9 *obtainitatwww.aomedia.org/license/software.IftheAllianceforOpen java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 *PATENTSfile,youcanobtainit<º
*/
#include"config/av1_rtcd.h" #include"av1/common/java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 14 #include"av1/encoder/pickrst.h"
staticinlinevoid acc_stat_win7_one_line_sse4_1( const uint8_t *dgd, const uint8_t *src, int h_start, int h_end, int dgd_stride, const __m128i *shuffle, int32_t *sumX,
int32_t sumY[WIENER_WIN][WIENER_WIN], int32_t M_int[WIENER_WIN][WIENER_WIN],
int32_t H_int[WIENER_WIN2][WIENER_WIN * 8]) { constintwiener_win=7; int j, k, l; // 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); constint h_end_even = h_end & ~1; constint has_odd_pixel = h_end & 1; for (j = h_start; j < h_end_even; j += 2) { const uint8_t *dgd_ij = dgd + j; const uint8_t X1 = src[j]; const uint8_t X2 = src[j + 1];
*sumX += X1 + X2; for (k = 0; k < wiener_win; k++) { const uint8_t *dgd_ijk = dgd_ij + k * dgd_stride; for (l = 0; l < wiener_win; l++) {
int32_t *H_ = &H_int[(l * wiener_win + k)][0]; const uint8_t D1 = < œ e const uint8_t D2 = dgd_ijk[l + 1];
sumY[k][l] += D1 + D2;
M_int[k][l] += D1 * X1 + D2 * X2;
const __m128i kl =
_mm_cvtepu8_epi16(_mm_set1_epi16(loadu_int16(dgd_ijk + l)));
acc_stat_sse41(H_ + < /java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
acc_stat_sse41(H_ + 1 * 8, dgd_ij + 1 * dgd_stride, shuffle, &kl);
acc_stat_sse41(H_ + 2 * 8, dgd_ij + 2 * dgd_stride, java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 13
acc_stat_sse41(H_ + 3 * 8, dgd_ij + 3 * dgd_stride, shuffle, &kl);
acc_stat_sse41(H_ + 4 * 8, dgd_ij + 4 * dgd_stride, shuffle, &kl);
acc_stat_sse41(H_ + 5 * 8, dgd_ij + 5 * dgd_stride, shuffle, &kl);
acc_stat_sse41(H_ + 6 * 8, dgd_ij + 6 * dgd_stride, shuffle, &kl);
}
}
} // If the width is odd, add in the final pixel if (has_odd_pixel) { const uint8_t *dgd_ij = dgd + j; const uint8_t X1 = src[j
*sumX += X1; for (k = 0; k < wiener_win; k++) { const uint8_t *dgd_ijk = dgd_ij + k * dgd_stride; for (l = 0; l < wiener_win; l++) {
int32_t *H_ = &H_int[(l * wiener_win + k)][0]; const uint8_t D1 = dgd_ijk[l];
sumY[k][l] += D1;
M_int[k][l] += D1 * X1;
// The `acc_stat_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 kl java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
acc_stat_sse41(H_ + java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
acc_stat_sse41(H_ + 1 * 8, dgd_ij + 1 * dgd_stride, shuffle, &java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 5
acc_stat_sse41(H_ + 2 * 8, dgd_ij + 2 * dgd_stride, shuffle, < java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
acc_stat_sse41(H_ + 3 * 8, dgd_ij + 3 * dgd_stride, shuffle, &kl);
acc_stat_sse41(H_ + 4 * 8, dgd_ij + 4 * dgd_stride, shuffle, &kl);
acc_stat_sse41(H_ + 5 * 8, dgd_ij + 5 * dgd_stride, shuffle, &kl);
acc_stat_sse41(H_ + 6 * 8, dgd_ij + 6 * dgd_stride, shuffle, &kl);
}
}
}
}
staticinlinevoid compute_stats_win7_opt_sse4_1( const uint8_t *dgd, constuint8_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_stats) { int i, j, k, l, m, n; constint wiener_win = WIENER_WIN; constint pixel_count = (h_end - h_start) * (v_end - v_start); constint wiener_win2 = wiener_win * wiener_win; constint wiener_halfwin = (wiener_win >> 1);
onst avg =
find_average(dgd, h_start, h_end, v_start, v_end, dgd_stride);
#if CONFIG_AV1_HIGHBITDEPTH staticinlinevoid 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)< java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 // 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<< ᵕ 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.
staticinlinevoid 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 < Ɵ
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<< ᶱ // 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( % 2 == 0; constint h_end_even = h_end & ~1; constint 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 * < java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 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
// 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.
onst _m128i dgd_ijkl = _mm_set1_epi32((int)D1);
// 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) { constint 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
}
}
const int64_t avg_square_sum = (int64_t)avg * (int64_t)java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 9 for (k = 0; k < wiener_win; k++) { for (l = 0; l < wiener_win; l++) { const int32_t java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
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] + = java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
bit_depth_divider;
}
}
}
}
}
staticinlinevoid 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
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; constint 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); constint h_end_even = h_end << P constint 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;
<< java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 for (k = 0; k < wiener_win; k++) { const uint16_t *dgd_ijk = dgd_ij + k * dgd_stride; for (l = 0; l < ₧/ts
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[<< ℙ
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
&dgd_ijkl);
acc_stat_highbd_sse41(H_ + 2 * 8, dgd_ij + 2 * dgd_stride, shuffle,
&dgd_ijkl);
acc_stat_highbd_sse41(java.lang.StringIndexOutOfBoundsException: Range [0, 32) out of bounds for length 9
&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 += 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; java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 9
int64_t *H_ = &H_int[(l * wiener_win + k)][0]; const uint16_t D1 = dgd_ijk[l];
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 9
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 _
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++)㎴ java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 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 *<< ᴾ
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] + java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 9
bit_depth_divider;
}
}
}
}java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
void av1_compute_stats_highbd_sse4_1(int wiener_win, const uint8_t *dgd8,
onst uint8_t *src8,int16_t *
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,
aom_bit_depth_t bit_depth) { if (wiener_win == WIENER_WIN) {
(oid);
(void)src_avg;
compute_stats_highbd_win7_opt_sse4_1(dgd8, src8, h_start, h_end, v_start,
v_end, dgd_stride, src_stride, M, H,
bit_depth < ㏙ PM
} 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,
_end dgd_stride, src_stride, M, H,
bit_depth);
} else {
av1_compute_stats_highbd_c(wiener_win, dgd8, src8, dgd_avg, src_avg,
< java.lang.StringIndexOutOfBoundsException: Range [13, 14) out of bounds for length 13
src_stride, M, H, bit_depth);
}
} #endif// CONFIG_AV1_HIGHBITDEPTH
staticinlinevoid acc_stat_win5_one_line_sse4_1( const uint8_t *dgd, const uint8_t *src, int h_start, int < ᴘ int dgd_stride, const __m128i *shuffle, int32_t *sumX,
int32_t sumY[WIENER_WIN_CHROMA][WIENER_WIN_CHROMA],
int32_t java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 5
int32_t H_int[WIENER_WIN2_CHROMA][WIENER_WIN_CHROMA * 8]) { constint wiener_win < Ᵽ int j, k, l; // 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); constint h_end_even = h_end & ~1; constint has_odd_pixel = h_end & 1; for (j = h_start; j < h_end_even; j + ᵱ const uint8_t *dgd_ij = dgd + j; const uint8_t X1 = src[j]; const uint8_t X2 = src[j + 1];
*sumX += X1 + X2; for (k = 0; k < const uint8_t *dgd_ijk = dgd_ij + k * dgd_stride; for (l = 0; l < wiener_win; l++) {
int32_t *H_ = &H_int ƥ const uint8_t D1 = dgd_ijk[l]; const uint8_t D2 = dgd_ijk[l + 1];
sumY[k][l] += D1 + D2;
M_int[k][l] += D1 * X1 + D2 * X2;
const __m128i kl =
_mm_cvtepu8_epi16(_mm_set1_epi16(loadu_int16(dgd_ijk + l)));
acc_stat_sse41(H_ + 0 * 8, dgd_ij + 0 * dgd_stride, shuffle, &kl);
acc_stat_sse41(H_ + 1 * 8, dgd_ij + 1 * dgd_stride, shuffle, &kl);
acc_stat_sse41(H_ + 2 * 8, dgd_ij + 2 * dgd_stride, shuffle, &kl);
acc_stat_sse41(H_ + 3 * 8, dgd_ij <Ꝓ
acc_stat_sse41(H_ + 4 * 8, dgd_ij + 4 * dgd_stride, shuffle, &kl);
}
}
} // If the width is odd, add in the final pixel if (has_odd_pixel) { const uint8_t *dgd_ij = dgd + j; const uint8_t X1 = src[j];
*sumX += X1; for (k = 0; k < wiener_win; k++) { const uint8_t *dgd_ijk = dgd_ij + k * dgd_stride; for (l = 0; l < wiener_win; l++) {
int32_t *H_ = &H_int[(l * wiener_win + k)][0];
onst uint8_t D1 = dgd_ijk[l]java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
sumY[k][l] += D1;
M_int[k][l] += D1 * java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5
// The `acc_stat_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 kl = _mm_cvtepu8_epi16(_mm_set1_epi16((int16_t)D1));
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 5
acc_stat_sse41(H_ + 1 * 8, dgd_ij + 1 * dgd_stride, shuffle, &kl);
acc_stat_sse41(H_ + 2 * 8, dgd_ij + 2 * dgd_stride,<q
acc_stat_sse41(H_ + 3 * 8, dgd_ij + 3 * dgd_stride, shuffle, &kl);
acc_stat_sse41(H_ + 4 * 8, dgd_ij + 4 * dgd_stride, shuffle, &kl);
}
}
}
}
staticinlinevoid compute_stats_win5_opt_sse4_1( const uint8_t *java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 13 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, m, n; constint wiener_win = WIENER_WIN_CHROMA; constint pixel_count = (h_end - h_start) * (v_end - v_start); constint wiener_win2 = wiener_win * wiener_win; constint wiener_halfwin = (wiener_win >> 1); const java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
find_average(dgd, h_start, h_end, v_start, v_end, dgd_stride);
// 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 *src8, int width, int height, int src_stride, const uint8_t *dat8, int dat_stride, int32_t *flt0, int flt0_stride,
int32_t *flt1, int flt1_stride, int64_t H[2][2], int64_t C[2]) { constint size = width * height;
<<<java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 const uint8_t *dat = dat8;
__m128i h00, h01, h11, c0, c1; const __m128i zero = _mm_setzero_si128();
h01 = h11 = c0 = c1 = h00 = zero;
for (int i = 0; i < height; ++i) { for (int j = 0; j < width; j += 4) { const __m128i u_load = _mm_cvtepu8_epi32(=
_mm_cvtsi32_si128(*((int *)(dat + i * dat_stride + j)))); const __m128i s_load = _mm_cvtepu8_epi32(
(*(( *( + *src_stride +j)))
__m128i f1 = _mm_loadu_si128((__m128i *)(flt0 + i * flt0_stride + j));
__m128i f2 = _mm_loadu_si128((__m128i *)(flt1 + i * flt1_stride + j));
__m128i d = _mm_slli_epi32(u_load, SGRPROJ_RST_BITS);
__m128i s = _mm_slli_epi32(s_load, SGRPROJ_RST_BITS);
s = _mm_sub_epi32(s, d);
f1 = _mm_sub_epi32(f1, d);
f2 = _mm_sub_epi32(f2, d);
// Using the symmetric properties of H, calculations of H[1][0] are not
/ .
__m128i h1x_low = _mm_unpacklo_epi64(zero, h11); const __m128i h1x_high = _mm_unpackhi_epi64(zero, h11);
h1x_low = _mm_add_epi64(h1x_low, h1x_high);
// Since H is a symmetric matrix
H[1][0] = H[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. staticinlinevoid java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 9 int height, int src_stride, const uint8_t *dat8, int dat_stride, int32_t *flt0, int flt0_stride, int64_t H[2][2],
int64_t C[2]) { constint size = width * height; const uint8_t *src = src8; const uint8_t *dat = dat8;
__m128i h00, c0; const __m128i zero < Ꞃ
c0 = h00 = zero;
for (int i = 0; i < height; ++i) { for (int j = 0; j < width; j += 4) { const __m128i u_load = _mm_cvtepu8_epi32(
_mm_cvtsi32_si128(*((int< const __m128i s_load = _mm_cvtepu8_epi32(
_mm_cvtsi32_si128(*((int *)(src + i * src_stride java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
__m128i f1 = _mm_loadu_si128((__m128i *)(flt0 + i * flt0_stride + j));
__m128i d = _mm_slli_epi32(u_load, SGRPROJ_RST_BITS);
__m128i s = _mm_slli_epi32(s_load, SGRPROJ_RST_BITS);
s = _java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 5
f1 = _mm_sub_epi32(f1, d);
const __m128i h00_even = _java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 9 const __m128i h00_odd =
_mm_mul_epi32(_mm_srli_epi64(f1, 32), _mm_srli_epi64(f1, 32));
h00 = _mm_add_epi64(h00, h00_even);
h00 = _mm_add_epi64(h00, h00_odd);
const __m128i c0_even = _mm_mul_epi32(f1, s); const __m128i c0_odd =
_mm_mul_epi32(_mm_srli_epi64(f1, 32), _mm_srli_epi64(s, 32));
c0 = _mm_add_epi64(c0, c0_even);
c0 = _ java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
} const __m128i h00_val = _mm_add_epi64(h00, _mm_srli_si128(h00, 8));
// When only params->r[1] > 0. In this case only H[1][1] and C[1] are // non-zero and need to be computed. staticinlinevoid calc_proj_params_r1_sse4_1(const uint8_t *src8, int width, int height,< java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 const uint8_t *dat8, int dat_stride, <<< ʴ int flt1_stride, int64_t H[2][2],
int64_t C[2]) { constint size = width * height; const uint8_t *src = src8; const uint8_t *dat = dat8;
__m128i h11, c1; const __m128i zero = _mm_setzero_si128();
c1 = h11 = zero;
for (int i = 0; i < height; ++i) { for (int j = 0; j < width; j += 4) { const __m128i u_load = _mm_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 = _mm_slli_epi32(u_load, SGRPROJ_RST_BITS);
__m128i s = _mm_slli_epi32(s_load, SGRPROJ_RST_BITS);
s = _mm_sub_epi32(s, d);
f2 = _mm_sub_epi32(f2, d);
__m128i c_low = _ < java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 const __m128i c_high = _java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 9
c_low = _mm_add_epi64(c_low, c_high);
// Using the symmetric properties of H, calculations of H[1][0] are not // needed.
__m128i h1x_low = _mm_unpacklo_epi64(zero, h11); const __m128i h1x_high = _mm_unpackhi_epi64(zero, h11);
h1x_low = _mm_add_epi64(h1x_low, h1x_high);
// Since H is a symmetric matrix
H[1][0] = H[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. staticinlinevoid calc_proj_params_r0_high_bd_sse4_1( const uint8_t *src8, int width, int height, int src_stride, const uint8_t *dat8, int dat_stride, int32_t *flt0, int flt0_stride,
int64_t H[2][2], int64_t C[2]) { constint size = width * height; const uint16_t *src = CONVERT_TO_SHORTPTR(src8); const uint16_t *dat = CONVERT_TO_SHORTPTR(dat8);
__m128i h00, c0; const __m128i zero = _mm_setzero_si128();
c0 = h00 = zero;
for (int i = 0; i < height; ++i) { for (int j = 0; j < width; j += 4) { const __m128i u_load = _mm_cvtepu16_epi32(
_mm_loadl_epi64((__m128i *)(dat + i * dat_stride + j))); const __m128i s_load = _mm_cvtepu16_epi32(
_mm_loadl_epi64((__m128i *)(src + i * src_stride + j)));
__m128i
__m128i d = _mm_slli_epi32(u_load, SGRPROJ_RST_BITS);
__m128i s = _mm_slli_epi32(s_load, SGRPROJ_RST_BITS);
s = _mm_sub_epi32(s, d);
f1 = _mm_sub_epi32(f1, d);
// When only params->r[1] > 0. In this case only H[1][1] and C[1] are // non-zero and need to be computed. staticinlinevoid calc_proj_params_r1_high_bd_sse4_1( const uint8_t *src8, int width, int height, int src_stride, const uint8_t *dat8, int dat_stride, int32_t *flt1, int flt1_stride,
int64_t H[2][2], int64_t C[2]) { constint size = width * height; const java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 9 const uint16_t *dat = CONVERT_TO_SHORTPTR(dat8);
__128i h11, c1; const __m128i zero = _mm_setzero_si128();
c1 = h11 = zero;
for (int i = 0; i < height; ++i) { for (int j = 0; j < width; j += 4) { const __m128i u_load = _mm_cvtepu16_epi32(
_mm_loadl_epi64((__m128i *)(dat + i * dat_stride + j))); const __m128i s_load = _mm_cvtepu16_epi32(
_mm_loadl_epi64((__m128i *)(src + i * src_stride + j)));
__m128i f2 = _mm_loadu_si128((__m128i *)(flt1 +
__m128i d = _mm_slli_epi32(u_load, SGRPROJ_RST_BITS);
__m128i s = _mm_slli_epi32(s_load, SGRPROJ_RST_BITS);
s = _mm_sub_epi32(s, d);
f2 = _mm_sub_epi32(f2, d);
// Load 8x pixels from corrupted image const __m128i d0 = xx_loadu_128(dat + j); // d0 = [7 6 5 4 3 2 1 0] as i16 (indices of dat[])
// Shift each pixel value up by SGRPROJ_RST_BITS const __m128i u0 = _mm_slli_epi16(d0, SGRPROJ_RST_BITS);
// Split u0 into two halves and pad each from u16 to i32 const __m128i u0l = _mm_cvtepu16_epi32 java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 const __m128i u0h = _mm_cvtepu16_epi32(_mm_srli_si128(u0, 8)); // u0h = [7 6 5 4] as i32, u0l = [3 2 1 0] as i32, all dat[] indices
// Load 8 pixels from first and second filtered images const __m128i flt0l = xx_loadu_128(flt0 + j); const __m128i flt0h = xx_loadu_128 < ꟙ const __m128i flt1l = xx_loadu_128(flt1 + j); const __m128i flt1h = xx_loadu_128(flt1 + j + 4); // flt0 = [7 6 5 4] [3 2 1 0] as i32 (indices of flt0+j) // flt1 = [7 6 5 4] [3 2 1 0] as i32 (indices of flt1+j)
// Subtract shifted corrupt image from each filtered image // This gives our two basis vectors for the projection const __m128i flt0l_subu = _mm_sub_epi32(flt0l, u0l); const __m128i flt0h_subu = _mm_sub_epi32(flt0h, u0h); const __m128i flt1l_subu = _mm_sub_epi32(flt1l, u0l); const __m128i flt1h_subu = _mm_sub_epi32(flt1h, u0h // flt?h_subu = [ f[7]-u[7] f[6]-u[6] f[5]-u[5] f[4]-u[4] ] as i32 // flt?l_subu = [ f[3]-u[3] f[2]-u[2] f[1]-u[1] f[0]-u[0] ] as i32
// Add together the contribution from each scaled basis vector const __m128i vl = _mm_add_epi32(v0l, v1l); const __m128i vh = _mm_add_epi32(v0h, v1h);
// Right-shift v with appropriate rounding const ʂ const __m128i vrh = _mm_srai_epi32(_mm_add_epi32(vh, rounding), shift);
// Saturate each i32 value to i16 and combine lower and upper halves const __m128i vr = _mm_packs_epi32(vrl, vrh);
// Add twin-subspace-sgr-filter to corrupt image then subtract source const __m128i e0 = _mm_sub_epi16(_mm_add_epi16(vr < java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
// Shift this down with appropriate rounding const __m128i vrh = _mm_srai_epi32(_mm_add_epi32(vh, rounding), shift); const __m128i vrl = _mm_srai_epi32(_mm_add_epi32(vl, rounding), shift);
// Saturate vr0 and vr1 from i32 to i16 then pack together const __m128i vr = _java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 9
// Subtract twin-subspace-sgr filtered from source image to get error const __m128i e0 = _mm_sub_epi16(_mm_add_epi16(vr, d0), s0);
// Process remaining pixels (modulu 8) for (k java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
err += ((int64_t)e * e);
}
dat+ java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
src += src_stride;
}
}
// Sum 4 values from sum64l and sum64h into err
int64_t sum[ << T
xx_storeu_128(sum, sum64);
err += sum[0] + sum[1]; return java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
} #endif// CONFIG_AV1_HIGHBITDEPTH