diff --git a/README.chromium b/README.chromium index d3296d491..6db0265a7 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 1867 +Version: 1868 License: BSD License File: LICENSE diff --git a/include/libyuv/row.h b/include/libyuv/row.h index 680982e73..55d4529df 100644 --- a/include/libyuv/row.h +++ b/include/libyuv/row.h @@ -2140,9 +2140,7 @@ void ARGBMirrorRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); void ARGBMirrorRow_Any_MSA(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -void ARGBMirrorRow_Any_LSX(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); +void ARGBMirrorRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); void ARGBMirrorRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 7f41b76cf..40efd042f 100644 --- a/include/libyuv/version.h +++ b/include/libyuv/version.h @@ -11,6 +11,6 @@ #ifndef INCLUDE_LIBYUV_VERSION_H_ #define INCLUDE_LIBYUV_VERSION_H_ -#define LIBYUV_VERSION 1867 +#define LIBYUV_VERSION 1868 #endif // INCLUDE_LIBYUV_VERSION_H_ diff --git a/source/convert_from_argb.cc b/source/convert_from_argb.cc index 897b2c110..eae3ea0df 100644 --- a/source/convert_from_argb.cc +++ b/source/convert_from_argb.cc @@ -2151,7 +2151,7 @@ int ARGBToJ420(const uint8_t* src_argb, #endif #if defined(HAS_ARGBTOYJROW_RVV) if (TestCpuFlag(kCpuHasRVV)) { - ARGBToYJRow = ARGBToYJRow_RVV; + ARGBToYJRow = ARGBToYJRow_RVV; } #endif @@ -2287,7 +2287,7 @@ int ARGBToJ422(const uint8_t* src_argb, #endif #if defined(HAS_ARGBTOYJROW_RVV) if (TestCpuFlag(kCpuHasRVV)) { - ARGBToYJRow = ARGBToYJRow_RVV; + ARGBToYJRow = ARGBToYJRow_RVV; } #endif @@ -2361,7 +2361,7 @@ int ARGBToJ400(const uint8_t* src_argb, #endif #if defined(HAS_ARGBTOYJROW_RVV) if (TestCpuFlag(kCpuHasRVV)) { - ARGBToYJRow = ARGBToYJRow_RVV; + ARGBToYJRow = ARGBToYJRow_RVV; } #endif @@ -2926,7 +2926,8 @@ int ARGBToAB64(const uint8_t* src_argb, } // Enabled if 1 pass is available -#if defined(HAS_RAWTOYJROW_NEON) || defined(HAS_RAWTOYJROW_MSA) || defined(HAS_RAWTOYJROW_RVV) +#if defined(HAS_RAWTOYJROW_NEON) || defined(HAS_RAWTOYJROW_MSA) || \ + defined(HAS_RAWTOYJROW_RVV) #define HAS_RAWTOYJROW #endif diff --git a/source/planar_functions.cc b/source/planar_functions.cc index 72ede82b1..32424fb91 100644 --- a/source/planar_functions.cc +++ b/source/planar_functions.cc @@ -4711,7 +4711,7 @@ static int ARGBSobelize(const uint8_t* src_argb, #endif #if defined(HAS_ARGBTOYJROW_RVV) if (TestCpuFlag(kCpuHasRVV)) { - ARGBToYJRow = ARGBToYJRow_RVV; + ARGBToYJRow = ARGBToYJRow_RVV; } #endif diff --git a/source/row_lsx.cc b/source/row_lsx.cc index 48baafb70..15595efef 100644 --- a/source/row_lsx.cc +++ b/source/row_lsx.cc @@ -32,18 +32,18 @@ extern "C" { } // Load 32 YUV422 pixel data -#define READYUV422_D(psrc_y, psrc_u, psrc_v, out_y, uv_l, uv_h) \ - { \ - __m128i temp0, temp1; \ - \ - DUP2_ARG2(__lsx_vld, psrc_y, 0, psrc_u, 0, out_y, temp0); \ - temp1 = __lsx_vld(psrc_v, 0); \ - temp0 = __lsx_vsub_b(temp0, const_80); \ - temp1 = __lsx_vsub_b(temp1, const_80); \ - temp0 = __lsx_vsllwil_h_b(temp0, 0); \ - temp1 = __lsx_vsllwil_h_b(temp1, 0); \ - uv_l = __lsx_vilvl_h(temp0, temp1); \ - uv_h = __lsx_vilvh_h(temp0, temp1); \ +#define READYUV422_D(psrc_y, psrc_u, psrc_v, out_y, uv_l, uv_h) \ + { \ + __m128i temp0, temp1; \ + \ + DUP2_ARG2(__lsx_vld, psrc_y, 0, psrc_u, 0, out_y, temp0); \ + temp1 = __lsx_vld(psrc_v, 0); \ + temp0 = __lsx_vsub_b(temp0, const_80); \ + temp1 = __lsx_vsub_b(temp1, const_80); \ + temp0 = __lsx_vsllwil_h_b(temp0, 0); \ + temp1 = __lsx_vsllwil_h_b(temp1, 0); \ + uv_l = __lsx_vilvl_h(temp0, temp1); \ + uv_h = __lsx_vilvh_h(temp0, temp1); \ } // Load 16 YUV422 pixel data @@ -60,8 +60,8 @@ extern "C" { } // Convert 16 pixels of YUV420 to RGB. -#define YUVTORGB_D(in_y, in_uvl, in_uvh, ubvr, ugvg, yg, yb, b_l, \ - b_h, g_l,g_h, r_l, r_h) \ +#define YUVTORGB_D(in_y, in_uvl, in_uvh, ubvr, ugvg, yg, yb, b_l, b_h, g_l, \ + g_h, r_l, r_h) \ { \ __m128i u_l, u_h, v_l, v_h; \ __m128i yl_ev, yl_od, yh_ev, yh_od; \ @@ -204,23 +204,22 @@ extern "C" { } // Pack and Store 16 ARGB values. -#define STOREARGB_D(a_l, a_h, r_l, r_h, g_l, g_h, b_l, b_h, pdst_argb) \ - { \ - \ - __m128i temp0, temp1, temp2, temp3; \ - temp0 = __lsx_vpackev_b(g_l, b_l); \ - temp1 = __lsx_vpackev_b(a_l, r_l); \ - temp2 = __lsx_vpackev_b(g_h, b_h); \ - temp3 = __lsx_vpackev_b(a_h, r_h); \ - r_l = __lsx_vilvl_h(temp1, temp0); \ - r_h = __lsx_vilvh_h(temp1, temp0); \ - g_l = __lsx_vilvl_h(temp3, temp2); \ - g_h = __lsx_vilvh_h(temp3, temp2); \ - __lsx_vst(r_l, pdst_argb, 0); \ - __lsx_vst(r_h, pdst_argb, 16); \ - __lsx_vst(g_l, pdst_argb, 32); \ - __lsx_vst(g_h, pdst_argb, 48); \ - pdst_argb += 64; \ +#define STOREARGB_D(a_l, a_h, r_l, r_h, g_l, g_h, b_l, b_h, pdst_argb) \ + { \ + __m128i temp0, temp1, temp2, temp3; \ + temp0 = __lsx_vpackev_b(g_l, b_l); \ + temp1 = __lsx_vpackev_b(a_l, r_l); \ + temp2 = __lsx_vpackev_b(g_h, b_h); \ + temp3 = __lsx_vpackev_b(a_h, r_h); \ + r_l = __lsx_vilvl_h(temp1, temp0); \ + r_h = __lsx_vilvh_h(temp1, temp0); \ + g_l = __lsx_vilvl_h(temp3, temp2); \ + g_h = __lsx_vilvh_h(temp3, temp2); \ + __lsx_vst(r_l, pdst_argb, 0); \ + __lsx_vst(r_h, pdst_argb, 16); \ + __lsx_vst(g_l, pdst_argb, 32); \ + __lsx_vst(g_h, pdst_argb, 48); \ + pdst_argb += 64; \ } // Pack and Store 8 ARGB values. @@ -362,11 +361,11 @@ void I422ToUYVYRow_LSX(const uint8_t* src_y, } void I422ToARGBRow_LSX(const uint8_t* src_y, - const uint8_t* src_u, - const uint8_t* src_v, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width) { + const uint8_t* src_u, + const uint8_t* src_v, + uint8_t* dst_argb, + const struct YuvConstants* yuvconstants, + int width) { int x; int len = width / 16; __m128i vec_yb, vec_yg, vec_ub, vec_ug, vec_vr, vec_vg; @@ -492,8 +491,8 @@ void I422ToRGB24Row_LSX(const uint8_t* src_y, g_h, r_l, r_h); temp0 = __lsx_vpackev_b(g_l, b_l); temp1 = __lsx_vpackev_b(g_h, b_h); - DUP4_ARG3(__lsx_vshuf_b, r_l, temp0, shuffler1, r_h, temp1, shuffler1, - r_l, temp0, shuffler0, r_h, temp1, shuffler0, temp2, temp3, temp0, + DUP4_ARG3(__lsx_vshuf_b, r_l, temp0, shuffler1, r_h, temp1, shuffler1, r_l, + temp0, shuffler0, r_h, temp1, shuffler0, temp2, temp3, temp0, temp1); b_l = __lsx_vilvl_d(temp1, temp2); diff --git a/unit_test/cpu_test.cc b/unit_test/cpu_test.cc index da9d3a3b2..93867fa78 100644 --- a/unit_test/cpu_test.cc +++ b/unit_test/cpu_test.cc @@ -215,8 +215,9 @@ TEST_F(LibYUVBaseTest, TestCpuId) { cpu_info[0] = cpu_info[1]; // Reorder output cpu_info[1] = cpu_info[3]; cpu_info[3] = 0; - printf("Cpu Vendor: %s 0x%x 0x%x 0x%x\n", reinterpret_cast(&cpu_info[0]), - cpu_info[0], cpu_info[1], cpu_info[2]); + printf("Cpu Vendor: %s 0x%x 0x%x 0x%x\n", + reinterpret_cast(&cpu_info[0]), cpu_info[0], cpu_info[1], + cpu_info[2]); EXPECT_EQ(12u, strlen(reinterpret_cast(&cpu_info[0]))); // CPU Family and Model