From 8783eb9d10881769aab54134cd6a18342c9fc86e Mon Sep 17 00:00:00 2001 From: Frank Barchard Date: Tue, 27 Oct 2026 03:42:16 -0700 Subject: [PATCH] [libyuv] Remove prototypes and HAS_ macros for nonexistent functions Remove 63 function declarations and 7 HAS_ feature macros from include/libyuv/ headers that have no corresponding implementation in source/: - include/libyuv/convert_from_argb.h: Remove unimplemented ARGBToG and RGBToNV21Matrix declarations. - include/libyuv/mjpeg_decoder.h: Remove unimplemented MJpegDecoder::GetComponentScanlinePadding declaration. - include/libyuv/scale.h: Remove obsolete SetUseReferenceImpl declaration. - include/libyuv/scale_row.h: Remove 10 unimplemented ScaleUVRowDown2 and ScaleUVRowDownEven SSSE3/NEON declarations. - include/libyuv/row.h: Remove 49 orphaned row function declarations (ABGR/BGRA/RGBA ToYRow/ToYJRow/ToUVRow/ToUVJRow _Any wrappers, RGB24/RAW ToUVRow_C/ToUVJRow_C, MirrorRow_Any_SSE2, DetileRow_AVX, DetileRow_Any_AVX, I444ToARGBRow_AVX512BW, and I444ToARGBRow_Any_AVX512BW) and 7 unused HAS_ macros (HAS_ABGRTOYJROW_SSSE3, HAS_RGBATOYJROW_SSSE3, HAS_ABGRTOYJROW_NEON_DOTPROD, HAS_ABGRTOYROW_NEON_DOTPROD, HAS_BGRATOYROW_NEON_DOTPROD, HAS_RGBATOYJROW_NEON_DOTPROD, and HAS_RGBATOYROW_NEON_DOTPROD). - include/libyuv/row.h: Fix typo HAS_I422TORGBBAROW_SSSE3 to HAS_I422TORGBAROW_SSSE3 to re-enable I422ToRGBARow_SSSE3. Bug: None Change-Id: I969a3c5060173aa46b4d1f085837e284fbed1a85 --- include/libyuv/convert_from_argb.h | 21 ---- include/libyuv/mjpeg_decoder.h | 2 - include/libyuv/row.h | 194 +---------------------------- include/libyuv/scale.h | 4 - include/libyuv/scale_row.h | 46 ------- 5 files changed, 1 insertion(+), 266 deletions(-) diff --git a/include/libyuv/convert_from_argb.h b/include/libyuv/convert_from_argb.h index 511160e2f..29d656d0a 100644 --- a/include/libyuv/convert_from_argb.h +++ b/include/libyuv/convert_from_argb.h @@ -390,15 +390,6 @@ int ARGBToI400(const uint8_t* src_argb, int width, int height); -// Convert ARGB to G. (Reverse of J400toARGB, which replicates G back to ARGB) -LIBYUV_API -int ARGBToG(const uint8_t* src_argb, - int src_stride_argb, - uint8_t* dst_g, - int dst_stride_g, - int width, - int height); - // Convert ARGB To NV12. LIBYUV_API int ARGBToNV12(const uint8_t* src_argb, @@ -607,18 +598,6 @@ int ARGBToUYVY(const uint8_t* src_argb, int width, int height); -// RAW to NV21 with Matrix -LIBYUV_API -int RGBToNV21Matrix(const uint8_t* src_raw, - int src_stride_raw, - uint8_t* dst_y, - int dst_stride_y, - uint8_t* dst_vu, - int dst_stride_vu, - const struct ArgbConstants* argbconstants, - int width, - int height); - // RAW to NV21 LIBYUV_API int RAWToNV21(const uint8_t* src_raw, diff --git a/include/libyuv/mjpeg_decoder.h b/include/libyuv/mjpeg_decoder.h index 3ad11ec79..2dc60a275 100644 --- a/include/libyuv/mjpeg_decoder.h +++ b/include/libyuv/mjpeg_decoder.h @@ -168,8 +168,6 @@ class LIBYUV_API MJpegDecoder { void SetScanlinePointers(uint8_t** data); bool DecodeImcuRow(); - int GetComponentScanlinePadding(int component); - // A buffer holding the input data for a frame. Buffer buf_; BufferVector buf_vec_; diff --git a/include/libyuv/row.h b/include/libyuv/row.h index bd748e2bf..feb40f7e0 100644 --- a/include/libyuv/row.h +++ b/include/libyuv/row.h @@ -47,7 +47,7 @@ extern "C" { #define HAS_COPYROW_SSE2 #define HAS_I422TOARGBROW_SSSE3 #define HAS_I422TORGB24ROW_SSSE3 -#define HAS_I422TORGBBAROW_SSSE3 +#define HAS_I422TORGBAROW_SSSE3 #define HAS_I422TORGB565ROW_SSSE3 #define HAS_I422TOARGB1555ROW_SSSE3 #define HAS_I422TOARGB4444ROW_SSSE3 @@ -196,7 +196,6 @@ extern "C" { !defined(LIBYUV_ENABLE_ROWWIN) #define HAS_AB64TOARGBROW_SSSE3 #define HAS_ABGRTOAR30ROW_SSSE3 -#define HAS_ABGRTOYJROW_SSSE3 #define HAS_AR64TOARGBROW_SSSE3 #define HAS_ARGBATTENUATEROW_SSSE3 #define HAS_ARGBTOAB64ROW_SSSE3 @@ -238,7 +237,6 @@ extern "C" { #define HAS_ARGB1555TOARGBROW_AVX2 #define HAS_ARGB4444TOARGBROW_AVX2 #define HAS_RAWTORGBAROW_SSSE3 -#define HAS_RGBATOYJROW_SSSE3 #define HAS_SPLITARGBROW_SSE2 #define HAS_SPLITARGBROW_SSSE3 #define HAS_SPLITRGBROW_SSE41 @@ -695,14 +693,9 @@ extern "C" { #define HAS_P410TOAR30ROW_NEON #define HAS_P410TOARGBROW_NEON -#define HAS_ABGRTOYJROW_NEON_DOTPROD -#define HAS_ABGRTOYROW_NEON_DOTPROD #define HAS_ARGBGRAYROW_NEON_DOTPROD #define HAS_ARGBSEPIAROW_NEON_DOTPROD #define HAS_ARGBTOYMATRIXROW_NEON_DOTPROD -#define HAS_BGRATOYROW_NEON_DOTPROD -#define HAS_RGBATOYJROW_NEON_DOTPROD -#define HAS_RGBATOYROW_NEON_DOTPROD #define HAS_RGBTOYMATRIXROW_NEON_DOTPROD #define HAS_ARGBCOLORMATRIXROW_NEON_I8MM @@ -2687,40 +2680,6 @@ void RGBAToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width); void RGB565ToYRow_C(const uint8_t* src_rgb565, uint8_t* dst_y, int width); void ARGB1555ToYRow_C(const uint8_t* src_argb1555, uint8_t* dst_y, int width); void ARGB4444ToYRow_C(const uint8_t* src_argb4444, uint8_t* dst_y, int width); -void ABGRToYRow_Any_AVX512BW(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); -void ABGRToYJRow_Any_AVX512BW(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); -void RGBAToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -void RGBAToYRow_Any_AVX512BW(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); -void RGBAToYJRow_Any_AVX512BW(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); -void BGRAToYRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -void BGRAToYRow_Any_AVX512BW(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); -void ABGRToYJRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -void RGBAToYJRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -void BGRAToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -void ABGRToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -void RGBAToYRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -void ABGRToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -void ABGRToYJRow_Any_NEON_DotProd(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); -void RGBAToYJRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -void RGBAToYJRow_Any_NEON_DotProd(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); -void BGRAToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -void BGRAToYRow_Any_NEON_DotProd(const uint8_t* src_ptr, - uint8_t* dst_ptr, - int width); void RGB565ToYRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); void ARGB1555ToYRow_Any_NEON(const uint8_t* src_ptr, @@ -2740,86 +2699,6 @@ void ARGB1555ToYRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -void ABGRToUVJRow_Any_NEON(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void ABGRToUVJRow_Any_NEON_I8MM(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void ABGRToUVJRow_Any_SVE2(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void ABGRToUVJRow_Any_SME(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void BGRAToUVRow_Any_NEON(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void BGRAToUVRow_Any_NEON_I8MM(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void BGRAToUVRow_Any_SVE2(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void BGRAToUVRow_Any_SME(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void ABGRToUVRow_Any_NEON(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void ABGRToUVRow_Any_NEON_I8MM(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void ABGRToUVRow_Any_SVE2(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void ABGRToUVRow_Any_SME(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void RGBAToUVRow_Any_NEON(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void RGBAToUVRow_Any_NEON_I8MM(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void RGBAToUVRow_Any_SVE2(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void RGBAToUVRow_Any_SME(const uint8_t* src_ptr, - int src_stride, - uint8_t* dst_u, - uint8_t* dst_v, - int width); void RGB24ToUVRow_Any_NEON(const uint8_t* src_ptr, int src_stride, uint8_t* dst_u, @@ -2846,36 +2725,6 @@ void ARGB4444ToUVRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_u, uint8_t* dst_v, int width); -void ABGRToUVRow_Any_LSX(const uint8_t* src_ptr, - int src_stride_ptr, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void ABGRToUVRow_Any_LASX(const uint8_t* src_ptr, - int src_stride_ptr, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void BGRAToUVRow_Any_LSX(const uint8_t* src_ptr, - int src_stride_ptr, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void BGRAToUVRow_Any_LASX(const uint8_t* src_ptr, - int src_stride_ptr, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void RGBAToUVRow_Any_LSX(const uint8_t* src_ptr, - int src_stride_ptr, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void RGBAToUVRow_Any_LASX(const uint8_t* src_ptr, - int src_stride_ptr, - uint8_t* dst_u, - uint8_t* dst_v, - int width); void ARGB1555ToUVRow_Any_LSX(const uint8_t* src_ptr, int src_stride_ptr, uint8_t* dst_u, @@ -2941,26 +2790,6 @@ void RGBAToUVJRow_C(const uint8_t* src_rgb, uint8_t* dst_u, uint8_t* dst_v, int width); -void RGB24ToUVRow_C(const uint8_t* src_rgb, - int src_stride_rgb, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void RAWToUVRow_C(const uint8_t* src_rgb, - int src_stride_rgb, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void RGB24ToUVJRow_C(const uint8_t* src_rgb, - int src_stride_rgb, - uint8_t* dst_u, - uint8_t* dst_v, - int width); -void RAWToUVJRow_C(const uint8_t* src_rgb, - int src_stride_rgb, - uint8_t* dst_u, - uint8_t* dst_v, - int width); void RGB565ToUVRow_C(const uint8_t* src_rgb565, int src_stride_rgb565, uint8_t* dst_u, @@ -2989,7 +2818,6 @@ void MirrorRow_Any_AVX512BW(const uint8_t* src_ptr, int width); void MirrorRow_Any_AVX2(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); void MirrorRow_Any_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); -void MirrorRow_Any_SSE2(const uint8_t* src, uint8_t* dst, int width); void MirrorRow_Any_NEON(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); void MirrorRow_Any_LSX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); void MirrorRow_Any_LASX(const uint8_t* src_ptr, uint8_t* dst_ptr, int width); @@ -3164,14 +2992,6 @@ void DetileRow_Any_SSE2(const uint8_t* src, ptrdiff_t src_tile_stride, uint8_t* dst, int width); -void DetileRow_AVX(const uint8_t* src, - ptrdiff_t src_tile_stride, - uint8_t* dst, - int width); -void DetileRow_Any_AVX(const uint8_t* src, - ptrdiff_t src_tile_stride, - uint8_t* dst, - int width); void DetileRow_16_C(const uint16_t* src, ptrdiff_t src_tile_stride, uint16_t* dst, @@ -5027,12 +4847,6 @@ void I444ToARGBRow_AVX2(const uint8_t* y_buf, uint8_t* dst_argb, const struct YuvConstants* yuvconstants, int width); -void I444ToARGBRow_AVX512BW(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, - uint8_t* dst_argb, - const struct YuvConstants* yuvconstants, - int width); void I444ToRGB24Row_SSSE3(const uint8_t* y_buf, const uint8_t* u_buf, const uint8_t* v_buf, @@ -5398,12 +5212,6 @@ void I444ToARGBRow_Any_AVX2(const uint8_t* y_buf, uint8_t* dst_ptr, const struct YuvConstants* yuvconstants, int width); -void I444ToARGBRow_Any_AVX512BW(const uint8_t* y_buf, - const uint8_t* u_buf, - const uint8_t* v_buf, - uint8_t* dst_ptr, - const struct YuvConstants* yuvconstants, - int width); void I444ToRGB24Row_Any_AVX2(const uint8_t* y_buf, const uint8_t* u_buf, const uint8_t* v_buf, diff --git a/include/libyuv/scale.h b/include/libyuv/scale.h index 799dbc70f..ada3f6061 100644 --- a/include/libyuv/scale.h +++ b/include/libyuv/scale.h @@ -390,10 +390,6 @@ int Scale(const uint8_t* src_y, int dst_width, int dst_height, int interpolate); - -// For testing, allow disabling of specialized scalers. -LIBYUV_API -void SetUseReferenceImpl(int use); #endif // __cplusplus #ifdef __cplusplus diff --git a/include/libyuv/scale_row.h b/include/libyuv/scale_row.h index 49ed592f3..e58962e7e 100644 --- a/include/libyuv/scale_row.h +++ b/include/libyuv/scale_row.h @@ -1130,14 +1130,6 @@ void ScaleARGBRowDownEvenBox_Any_LSX(const uint8_t* src_ptr, int dst_width); // UV Row functions -void ScaleUVRowDown2_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_uv, - int dst_width); -void ScaleUVRowDown2Linear_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_uv, - int dst_width); void ScaleUVRowDown2Box_SSSE3(const uint8_t* src_ptr, ptrdiff_t src_stride, uint8_t* dst_uv, @@ -1182,14 +1174,6 @@ void ScaleUVRowDown2Box_RVV(const uint8_t* src_ptr, ptrdiff_t src_stride, uint8_t* dst, int dst_width); -void ScaleUVRowDown2_Any_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width); -void ScaleUVRowDown2Linear_Any_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - uint8_t* dst_ptr, - int dst_width); void ScaleUVRowDown2Box_Any_SSSE3(const uint8_t* src_ptr, ptrdiff_t src_stride, uint8_t* dst_ptr, @@ -1210,26 +1194,11 @@ void ScaleUVRowDown2Box_Any_NEON(const uint8_t* src_ptr, ptrdiff_t src_stride, uint8_t* dst_ptr, int dst_width); -void ScaleUVRowDownEven_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - int src_stepx, - uint8_t* dst_uv, - int dst_width); -void ScaleUVRowDownEvenBox_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - int src_stepx, - uint8_t* dst_uv, - int dst_width); void ScaleUVRowDownEven_NEON(const uint8_t* src_ptr, ptrdiff_t src_stride, int src_stepx, uint8_t* dst_uv, int dst_width); -void ScaleUVRowDownEvenBox_NEON(const uint8_t* src_ptr, - ptrdiff_t src_stride, - int src_stepx, - uint8_t* dst_uv, - int dst_width); void ScaleUVRowDown4_RVV(const uint8_t* src_ptr, ptrdiff_t src_stride, int32_t src_stepx, @@ -1240,26 +1209,11 @@ void ScaleUVRowDownEven_RVV(const uint8_t* src_ptr, int32_t src_stepx, uint8_t* dst_uv, int dst_width); -void ScaleUVRowDownEven_Any_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - int src_stepx, - uint8_t* dst_ptr, - int dst_width); -void ScaleUVRowDownEvenBox_Any_SSSE3(const uint8_t* src_ptr, - ptrdiff_t src_stride, - int src_stepx, - uint8_t* dst_ptr, - int dst_width); void ScaleUVRowDownEven_Any_NEON(const uint8_t* src_ptr, ptrdiff_t src_stride, int src_stepx, uint8_t* dst_ptr, int dst_width); -void ScaleUVRowDownEvenBox_Any_NEON(const uint8_t* src_ptr, - ptrdiff_t src_stride, - int src_stepx, - uint8_t* dst_ptr, - int dst_width); void ScaleUVRowUp2_Linear_SSSE3(const uint8_t* src_ptr, uint8_t* dst_ptr,