diff --git a/README.chromium b/README.chromium index 253ac3536..4836a29c5 100644 --- a/README.chromium +++ b/README.chromium @@ -1,6 +1,6 @@ Name: libyuv URL: http://code.google.com/p/libyuv/ -Version: 1764 +Version: 1765 License: BSD License File: LICENSE diff --git a/include/libyuv/convert_from.h b/include/libyuv/convert_from.h index 92ed6a00f..5140ed4f3 100644 --- a/include/libyuv/convert_from.h +++ b/include/libyuv/convert_from.h @@ -132,6 +132,35 @@ int I420ToUYVY(const uint8_t* src_y, int width, int height); +// The following are from convert_argb.h +// DEPRECATED: The prototypes will be removed in future. Use convert_argb.h + +// Convert I420 to ARGB. +LIBYUV_API +int I420ToARGB(const uint8_t* src_y, + int src_stride_y, + const uint8_t* src_u, + int src_stride_u, + const uint8_t* src_v, + int src_stride_v, + uint8_t* dst_argb, + int dst_stride_argb, + int width, + int height); + +// Convert I420 to ABGR. +LIBYUV_API +int I420ToABGR(const uint8_t* src_y, + int src_stride_y, + const uint8_t* src_u, + int src_stride_u, + const uint8_t* src_v, + int src_stride_v, + uint8_t* dst_abgr, + int dst_stride_abgr, + int width, + int height); + // Convert I420 to specified format. // "dst_sample_stride" is bytes in a row for the destination. Pass 0 if the // buffer has contiguous rows. Can be negative. A multiple of 16 is optimal. diff --git a/include/libyuv/version.h b/include/libyuv/version.h index 7c2d059e5..381293c0b 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 1764 +#define LIBYUV_VERSION 1765 #endif // INCLUDE_LIBYUV_VERSION_H_ diff --git a/source/row_gcc.cc b/source/row_gcc.cc index c05418885..c4c012ff4 100644 --- a/source/row_gcc.cc +++ b/source/row_gcc.cc @@ -7146,11 +7146,8 @@ void HalfMergeUVRow_AVX2(const uint8_t* src_u, : "memory", "cc", "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5"); } -void ClampFloatToZero_SSE2(const float* src_x, - float * dst_y, - int width) { - - asm volatile( +void ClampFloatToZero_SSE2(const float* src_x, float* dst_y, int width) { + asm volatile( "pxor %%xmm1,%%xmm1 \n" LABELALIGN diff --git a/source/row_msa.cc b/source/row_msa.cc index 20645708d..fe6df93a6 100644 --- a/source/row_msa.cc +++ b/source/row_msa.cc @@ -3163,8 +3163,8 @@ void ARGBBlendRow_MSA(const uint8_t* src_argb0, dst1 = (v16u8)__msa_pckev_b((v16i8)vec3, (v16i8)vec2); dst2 = (v16u8)__msa_pckev_b((v16i8)vec9, (v16i8)vec8); dst3 = (v16u8)__msa_pckev_b((v16i8)vec11, (v16i8)vec10); - dst0 = (v16u8)__msa_adds_u_b(dst0,dst2); - dst1 = (v16u8)__msa_adds_u_b(dst1,dst3); + dst0 = (v16u8)__msa_adds_u_b(dst0, dst2); + dst1 = (v16u8)__msa_adds_u_b(dst1, dst3); dst0 = __msa_bmnz_v(dst0, const_255, mask); dst1 = __msa_bmnz_v(dst1, const_255, mask); ST_UB2(dst0, dst1, dst_argb, 16); diff --git a/unit_test/color_test.cc b/unit_test/color_test.cc index 2d187ff1c..842fd9944 100644 --- a/unit_test/color_test.cc +++ b/unit_test/color_test.cc @@ -402,7 +402,11 @@ static void YUVHToRGBReference(int y, int u, int v, int* r, int* g, int* b) { } // BT.2020 YUV to RGB reference -static void YUVRec2020ToRGBReference(int y, int u, int v, int* r, int* g, +static void YUVRec2020ToRGBReference(int y, + int u, + int v, + int* r, + int* g, int* b) { *r = RoundToByte((y - 16) * 1.164384 - (v - 128) * -1.67867); *g = RoundToByte((y - 16) * 1.164384 - (u - 128) * 0.187326 - diff --git a/unit_test/scale_test.cc b/unit_test/scale_test.cc index 9801b9d78..aa36202e8 100644 --- a/unit_test/scale_test.cc +++ b/unit_test/scale_test.cc @@ -512,7 +512,7 @@ static int NV12TestFilter(int src_width, int src_height_uv = (Abs(src_height) + 1) >> 1; int64_t src_y_plane_size = (Abs(src_width)) * (Abs(src_height)); - int64_t src_uv_plane_size = (src_width_uv) * (src_height_uv) * 2; + int64_t src_uv_plane_size = (src_width_uv) * (src_height_uv)*2; int src_stride_y = Abs(src_width); int src_stride_uv = src_width_uv * 2; @@ -530,7 +530,7 @@ static int NV12TestFilter(int src_width, int dst_height_uv = (dst_height + 1) >> 1; int64_t dst_y_plane_size = (dst_width) * (dst_height); - int64_t dst_uv_plane_size = (dst_width_uv) * (dst_height_uv) * 2; + int64_t dst_uv_plane_size = (dst_width_uv) * (dst_height_uv)*2; int dst_stride_y = dst_width; int dst_stride_uv = dst_width_uv * 2; @@ -546,17 +546,17 @@ static int NV12TestFilter(int src_width, MaskCpuFlags(disable_cpu_flags); // Disable all CPU optimization. double c_time = get_time(); - NV12Scale(src_y, src_stride_y, src_uv, src_stride_uv, - src_width, src_height, dst_y_c, dst_stride_y, dst_uv_c, - dst_stride_uv, dst_width, dst_height, f); + NV12Scale(src_y, src_stride_y, src_uv, src_stride_uv, src_width, src_height, + dst_y_c, dst_stride_y, dst_uv_c, dst_stride_uv, dst_width, + dst_height, f); c_time = (get_time() - c_time); MaskCpuFlags(benchmark_cpu_info); // Enable all CPU optimization. double opt_time = get_time(); for (i = 0; i < benchmark_iterations; ++i) { - NV12Scale(src_y, src_stride_y, src_uv, src_stride_uv, - src_width, src_height, dst_y_opt, dst_stride_y, dst_uv_opt, - dst_stride_uv, dst_width, dst_height, f); + NV12Scale(src_y, src_stride_y, src_uv, src_stride_uv, src_width, src_height, + dst_y_opt, dst_stride_y, dst_uv_opt, dst_stride_uv, dst_width, + dst_height, f); } opt_time = (get_time() - opt_time) / benchmark_iterations; // Report performance of C vs OPT.