mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-10-28 18:07:12 +08:00
[libyuv] Remove prototypes and HAS_ macros for nonexistent functions
Remove 73 function declarations and 7 HAS_ feature macros from include/libyuv/ headers (and unused MAKEROWY/MAKEROWYJ definitions from source/row_common.cc) that have no corresponding implementation or SIMD: - 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 and source/row_common.cc: Remove 59 orphaned row function declarations (ABGR/BGRA/RGBA ToYRow/ToYJRow/ToUVRow/ToUVJRow _C and _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. Maximum SIMD ISA supported per C row function: ------------------------------------------------------------------------ C Row Function arm x86 riscv wasm loongson hexagon ------------------------------------------------------------------------ AB64ToARGBRow_C NEON AVX2 RVV - - HVX ABGRToAR30Row_C NEON AVX512BW - - - - AR30ToAB30Row_C - AVX512BW - - - - AR30ToABGRRow_C - AVX512BW - - - - AR30ToARGBRow_C - AVX512BW - - - - AR64ShuffleRow_C NEON AVX512BW RVV WASMSIMD - - AR64ToAB64Row_C NEON AVX512BW RVV WASMSIMD - HVX AR64ToARGBRow_C NEON AVX2 RVV - - HVX ARGB1555ToARGBRow_C SVE2 AVX2 - WASMSIMD LASX - ARGB1555ToUVMatrixRow_C NEON AVX2 - WASMSIMD - - ARGB1555ToUVRow_C NEON - - - LASX - ARGB1555ToYMatrixRow_C NEON AVX2 - WASMSIMD - - ARGB1555ToYRow_C NEON - - - LASX - ARGB4444ToARGBRow_C NEON AVX2 - WASMSIMD LASX - ARGB4444ToUVMatrixRow_C NEON AVX2 - WASMSIMD - - ARGB4444ToUVRow_C NEON - - - - - ARGB4444ToYMatrixRow_C NEON AVX2 - WASMSIMD - - ARGB4444ToYRow_C NEON - - - - - ARGBAddRow_C NEON AVX2 - - LASX HVX ARGBAffineRow_C - SSE2 - - - - ARGBAlphaBlendRow_C SME AVX512BW RVV WASMSIMD LASX HVX ARGBAttenuateRow_C NEON AVX512BW RVV - LASX HVX ARGBBlendRow_C NEON AVX512BW RVV WASMSIMD LASX HVX ARGBColorMatrixRow_C I8MM SSSE3 - - LASX - ARGBColorTableRow_C - X86 - - - - ARGBCopyAlphaRow_C - AVX2 - - - HVX ARGBCopyYToAlphaRow_C NEON AVX512BW RVV WASMSIMD - HVX ARGBExtractAlphaRow_C NEON AVX512BW RVV WASMSIMD LASX HVX ARGBGrayRow_C DOTPROD AVX512VNNI - - LASX - ARGBLumaColorTableRow_C - SSSE3 - - - - ARGBMirrorRow_C NEON AVX512BW RVV WASMSIMD LASX HVX ARGBMultiplyRow_C SME AVX512BW RVV - LASX HVX ARGBOrRow_C SME AVX512BW RVV WASMSIMD LASX HVX ARGBPolynomialRow_C - AVX2 - - - - ARGBQuantizeRow_C NEON SSE2 - - LASX - ARGBSepiaRow_C DOTPROD SSSE3 - - LASX - ARGBSetRow_C NEON X86 RVV - LASX HVX ARGBShadeRow_C NEON SSE2 - - LASX - ARGBShuffleRow_C NEON AVX512BW RVV WASMSIMD LASX - ARGBSubtractRow_C NEON AVX2 - - LASX HVX ARGBToAB64Row_C NEON AVX2 RVV - - HVX ARGBToABGRRow_C NEON AVX512BW RVV WASMSIMD LASX HVX ARGBToAR30Row_C NEON AVX512BW - - - - ARGBToAR64Row_C NEON AVX2 RVV - - HVX ARGBToARGB1555Row_C NEON AVX2 - WASMSIMD LASX - ARGBToARGB4444Row_C NEON AVX2 - WASMSIMD LASX - ARGBToBGRARow_C NEON AVX512BW RVV WASMSIMD LASX HVX ARGBToRAWRow_C SVE2 AVX512BW RVV - LASX - ARGBToRGB24Row_C SVE2 AVX512BW RVV - LASX - ARGBToRGB565DitherRow_C SVE2 AVX2 - WASMSIMD LASX - ARGBToRGB565Row_C SVE2 AVX2 - WASMSIMD LASX - ARGBToRGBARow_C NEON AVX512BW RVV WASMSIMD LASX HVX ARGBToUV444MatrixRow_C I8MM AVX512VNNI RVV WASMSIMD - HVX ARGBToUVMatrixRow_C SME AVX512VNNI RVV WASMSIMD - HVX ARGBToYMatrixRow_C SME AVX512VNNI RVV WASMSIMD LASX HVX ARGBUnattenuateRow_C - AVX2 - - - - AYUVToUVRow_C SVE2 AVX512VBMI - - - - AYUVToVURow_C SVE2 AVX512VBMI - - - - AYUVToYRow_C NEON AVX512VBMI - - - - BlendPlaneRow_C NEON AVX512BW RVV WASMSIMD - HVX ByteToFloatRow_C NEON - - - - - ComputeCumulativeSumRow_C NEON AVX2 - - - - Convert16To8Row_C SME AVX512BW RVV - - HVX Convert8To16Row_C SME AVX512BW RVV WASMSIMD - HVX Convert8To8Row_C SME AVX2 - - - HVX CopyRow_16_C - - - - - HVX CopyRow_C SME AVX512BW RVV - LASX HVX CumulativeSumToAverageRow_C NEON AVX2 - - - - DetileRow_16_C NEON AVX - - - - DetileRow_C NEON SSE2 - - - - DetileSplitUVRow_C NEON SSSE3 - - - - DivideRow_16_C SVE2 AVX2 - - - HVX GaussRow_C NEON - - - - - GaussRow_F32_C NEON - - - - - HalfFloatRow_C SVE2 AVX2 - - LASX - HalfMergeUVRow_C SVE2 AVX512BW - - - - HalfRow_16To8_C SME AVX512BW RVV - - HVX HalfWidthRow_16To8_C SME AVX512BW RVV - - - I210AlphaToARGBRow_C SME AVX2 - - - - I210ToAR30Row_C SME AVX2 - - - - I210ToARGBRow_C SME AVX2 - - - - I212ToAR30Row_C SME AVX2 - - - - I212ToARGBRow_C SME AVX2 - - - - I400ToARGBRow_C SME AVX512BW RVV - LASX HVX I410AlphaToARGBRow_C SME AVX2 - - - - I410ToAR30Row_C SME AVX2 - - - - I410ToARGBRow_C SME AVX2 - - - - I422AlphaToARGBRow_C SME AVX512BW RVV - LASX HVX I422ToAR30Row_C SME AVX512BW RVV WASMSIMD - - I422ToARGB1555Row_C SME AVX2 - WASMSIMD LASX - I422ToARGB4444Row_C SME AVX2 - WASMSIMD LASX - I422ToARGBRow_C SME AVX512BW RVV WASMSIMD LASX HVX I422ToRGB24Row_C SME AVX512VBMI RVV WASMSIMD LASX - I422ToRGB565Row_C SME AVX2 - WASMSIMD LASX - I422ToRGBARow_C SME AVX2 RVV - LASX HVX I422ToUYVYRow_C NEON AVX2 - - LASX - I422ToYUY2Row_C NEON AVX2 - - LASX - I444AlphaToARGBRow_C SME AVX2 RVV - - HVX I444ToARGBRow_C SME AVX2 RVV - LASX HVX I444ToRGB24Row_C SME AVX2 RVV - - - InterpolateRow_16_C SME AVX512BW - WASMSIMD - HVX InterpolateRow_C SME AVX512BW RVV WASMSIMD LASX HVX J400ToARGBRow_C NEON AVX512BW RVV WASMSIMD LASX HVX MergeAR64Row_C NEON AVX2 - - - - MergeARGB16To8Row_C NEON AVX2 - - - - MergeARGBRow_C NEON AVX2 RVV - - HVX MergeRGBRow_C NEON AVX512VBMI RVV - - - MergeUVRow_16_C SME AVX2 - - - HVX MergeUVRow_C SME AVX512BW RVV WASMSIMD LASX HVX MergeXR30Row_C NEON AVX2 - - - - MergeXR64Row_C NEON AVX2 - - - - MergeXRGB16To8Row_C NEON AVX2 - - - - MergeXRGBRow_C NEON AVX2 RVV - - HVX MirrorRow_16_C - AVX512BW - - - HVX MirrorRow_C NEON AVX512BW - WASMSIMD LASX HVX MirrorSplitUVRow_C NEON AVX512BW - WASMSIMD LASX HVX MirrorUVRow_C NEON AVX512BW RVV WASMSIMD LASX HVX MultiplyRow_16_C SME AVX512BW RVV WASMSIMD - HVX NV12ToARGBRow_C SME AVX512BW RVV WASMSIMD LASX HVX NV12ToRGB24Row_C SME AVX512VBMI RVV - - - NV12ToRGB565Row_C NEON AVX2 - WASMSIMD LASX - NV21ToARGBRow_C SME AVX512BW RVV WASMSIMD LASX HVX NV21ToRGB24Row_C SME AVX512VBMI RVV - - - NV21ToYUV24Row_C NEON AVX2 - - - - P210ToAR30Row_C SME AVX2 - - - - P210ToARGBRow_C SME AVX2 - - - - P410ToAR30Row_C SME AVX2 - - - - P410ToARGBRow_C SME AVX2 - - - - RAWToARGBRow_C SVE2 AVX512BW RVV WASMSIMD LASX - RAWToRGB24Row_C SVE2 AVX512VBMI RVV WASMSIMD LASX - RAWToRGBARow_C SVE2 AVX512VBMI RVV - - - RGB24MirrorRow_C NEON AVX512VBMI - WASMSIMD - - RGB24ToARGBRow_C SVE2 AVX512BW RVV WASMSIMD LASX - RGB565ToARGBRow_C NEON AVX2 - WASMSIMD LASX - RGB565ToUVMatrixRow_C NEON AVX2 - WASMSIMD - - RGB565ToUVRow_C NEON - - - LASX - RGB565ToYMatrixRow_C NEON AVX2 - WASMSIMD - - RGB565ToYRow_C NEON - - - LASX - RGBAToARGBRow_C NEON AVX512BW RVV WASMSIMD LASX HVX RGBColorTableRow_C - X86 - - - - RGBToUV444MatrixRow_C NEON AVX512BW RVV WASMSIMD - - RGBToUVMatrixRow_C NEON AVX512BW RVV WASMSIMD - - RGBToYMatrixRow_C DOTPROD AVX512BW RVV WASMSIMD LASX - SetRow_C NEON ERMS - - LASX HVX SobelRow_C NEON SSE2 - - LASX - SobelToPlaneRow_C NEON SSE2 - - LASX - SobelXRow_C NEON SSE2 - - - - SobelXYRow_C NEON SSE2 - - LASX - SobelYRow_C NEON SSE2 - - - - SplitARGBRow_C NEON AVX2 RVV - - HVX SplitRGBRow_C NEON AVX2 RVV - - - SplitUVRow_16_C NEON AVX2 - - - HVX SplitUVRow_C SVE2 AVX512BW RVV - LASX HVX SplitXRGBRow_C NEON AVX2 RVV - - HVX SwapUVRow_C NEON AVX512BW RVV WASMSIMD - HVX UYVYToARGBRow_C SME AVX2 - - LASX - UYVYToUV422Row_C NEON AVX2 - - LASX HVX UYVYToUVRow_C SVE2 AVX2 - - LASX HVX UYVYToYRow_C SVE2 AVX2 - - LASX HVX YUY2ToARGBRow_C SME AVX2 - - LASX - YUY2ToNVUVRow_C NEON AVX2 - - - - YUY2ToUV422Row_C NEON AVX2 - - LASX HVX YUY2ToUVRow_C SVE2 AVX2 - - LASX HVX YUY2ToYRow_C SVE2 AVX2 - - LASX HVX ------------------------------------------------------------------------ SIMD (164/164 100%) 152 93% 154 94% 64 39% 56 34% 73 45% 64 39% ------------------------------------------------------------------------ Bug: None Change-Id: I969a3c5060173aa46b4d1f085837e284fbed1a85
This commit is contained in:
parent
205022c08c
commit
4957ddbafb
@ -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,
|
||||
|
||||
@ -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_;
|
||||
|
||||
@ -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
|
||||
@ -2679,48 +2672,9 @@ void RGBToUV444MatrixRow_Any_AVX512BW(const uint8_t* src_rgb,
|
||||
int width,
|
||||
const struct ArgbConstants* c);
|
||||
|
||||
void ABGRToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
|
||||
void RGBAToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
|
||||
void BGRAToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
|
||||
void ABGRToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width);
|
||||
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 +2694,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 +2720,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,
|
||||
@ -2916,51 +2760,6 @@ void RAWToUVRow_Any_LASX(const uint8_t* src_ptr,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void ABGRToUVJRow_C(const uint8_t* src_rgb,
|
||||
int src_stride_rgb,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void BGRAToUVRow_C(const uint8_t* src_rgb,
|
||||
int src_stride_rgb,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void ABGRToUVRow_C(const uint8_t* src_rgb,
|
||||
int src_stride_rgb,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void RGBAToUVRow_C(const uint8_t* src_rgb,
|
||||
int src_stride_rgb,
|
||||
uint8_t* dst_u,
|
||||
uint8_t* dst_v,
|
||||
int width);
|
||||
void RGBAToUVJRow_C(const uint8_t* src_rgb,
|
||||
int src_stride_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 +2788,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 +2962,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 +4817,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 +5182,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,
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -634,51 +634,6 @@ static __inline uint8_t RGBToV(uint8_t r, uint8_t g, uint8_t b) {
|
||||
}
|
||||
#define AVGB(a, b) (((a) + (b) + 1) >> 1)
|
||||
|
||||
#define MAKEROWY(NAME, R, G, B, BPP) \
|
||||
void NAME##ToYRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width) { \
|
||||
int x; \
|
||||
for (x = 0; x < width; ++x) { \
|
||||
dst_y[0] = RGBToY(src_rgb[R], src_rgb[G], src_rgb[B]); \
|
||||
src_rgb += BPP; \
|
||||
dst_y += 1; \
|
||||
} \
|
||||
} \
|
||||
void NAME##ToUVRow_C(const uint8_t* src_rgb, int src_stride_rgb, \
|
||||
uint8_t* dst_u, uint8_t* dst_v, int width) { \
|
||||
const uint8_t* src_rgb1 = src_rgb + src_stride_rgb; \
|
||||
int x; \
|
||||
for (x = 0; x < width - 1; x += 2) { \
|
||||
uint8_t ab = (src_rgb[B] + src_rgb[B + BPP] + src_rgb1[B] + \
|
||||
src_rgb1[B + BPP] + 2) >> \
|
||||
2; \
|
||||
uint8_t ag = (src_rgb[G] + src_rgb[G + BPP] + src_rgb1[G] + \
|
||||
src_rgb1[G + BPP] + 2) >> \
|
||||
2; \
|
||||
uint8_t ar = (src_rgb[R] + src_rgb[R + BPP] + src_rgb1[R] + \
|
||||
src_rgb1[R + BPP] + 2) >> \
|
||||
2; \
|
||||
dst_u[0] = RGBToU(ar, ag, ab); \
|
||||
dst_v[0] = RGBToV(ar, ag, ab); \
|
||||
src_rgb += BPP * 2; \
|
||||
src_rgb1 += BPP * 2; \
|
||||
dst_u += 1; \
|
||||
dst_v += 1; \
|
||||
} \
|
||||
if (width & 1) { \
|
||||
uint8_t ab = (src_rgb[B] + src_rgb1[B] + 1) >> 1; \
|
||||
uint8_t ag = (src_rgb[G] + src_rgb1[G] + 1) >> 1; \
|
||||
uint8_t ar = (src_rgb[R] + src_rgb1[R] + 1) >> 1; \
|
||||
dst_u[0] = RGBToU(ar, ag, ab); \
|
||||
dst_v[0] = RGBToV(ar, ag, ab); \
|
||||
} \
|
||||
}
|
||||
|
||||
MAKEROWY(ARGB, 2, 1, 0, 4)
|
||||
MAKEROWY(BGRA, 1, 2, 3, 4)
|
||||
MAKEROWY(ABGR, 0, 1, 2, 4)
|
||||
MAKEROWY(RGBA, 3, 2, 1, 4)
|
||||
#undef MAKEROWY
|
||||
|
||||
// JPeg uses BT.601-1 full range
|
||||
// y = 0.29900 * r + 0.58700 * g + 0.11400 * b
|
||||
// u = -0.16874 * r - 0.33126 * g + 0.50000 * b + center
|
||||
@ -700,57 +655,6 @@ MAKEROWY(RGBA, 3, 2, 1, 4)
|
||||
static __inline uint8_t RGBToYJ(uint8_t r, uint8_t g, uint8_t b) {
|
||||
return (77 * r + 150 * g + 29 * b + 128) >> 8;
|
||||
}
|
||||
static __inline uint8_t RGBToUJ(uint8_t r, uint8_t g, uint8_t b) {
|
||||
return (128 * b - 85 * g - 43 * r + 0x8000) >> 8;
|
||||
}
|
||||
static __inline uint8_t RGBToVJ(uint8_t r, uint8_t g, uint8_t b) {
|
||||
return (128 * r - 107 * g - 21 * b + 0x8000) >> 8;
|
||||
}
|
||||
|
||||
// ARGBToYJ_C and ARGBToUVJ_C
|
||||
#define MAKEROWYJ(NAME, R, G, B, BPP) \
|
||||
void NAME##ToYJRow_C(const uint8_t* src_rgb, uint8_t* dst_y, int width) { \
|
||||
int x; \
|
||||
for (x = 0; x < width; ++x) { \
|
||||
dst_y[0] = RGBToYJ(src_rgb[R], src_rgb[G], src_rgb[B]); \
|
||||
src_rgb += BPP; \
|
||||
dst_y += 1; \
|
||||
} \
|
||||
} \
|
||||
void NAME##ToUVJRow_C(const uint8_t* src_rgb, int src_stride_rgb, \
|
||||
uint8_t* dst_u, uint8_t* dst_v, int width) { \
|
||||
const uint8_t* src_rgb1 = src_rgb + src_stride_rgb; \
|
||||
int x; \
|
||||
for (x = 0; x < width - 1; x += 2) { \
|
||||
uint8_t ab = (src_rgb[B] + src_rgb[B + BPP] + src_rgb1[B] + \
|
||||
src_rgb1[B + BPP] + 2) >> \
|
||||
2; \
|
||||
uint8_t ag = (src_rgb[G] + src_rgb[G + BPP] + src_rgb1[G] + \
|
||||
src_rgb1[G + BPP] + 2) >> \
|
||||
2; \
|
||||
uint8_t ar = (src_rgb[R] + src_rgb[R + BPP] + src_rgb1[R] + \
|
||||
src_rgb1[R + BPP] + 2) >> \
|
||||
2; \
|
||||
dst_u[0] = RGBToUJ(ar, ag, ab); \
|
||||
dst_v[0] = RGBToVJ(ar, ag, ab); \
|
||||
src_rgb += BPP * 2; \
|
||||
src_rgb1 += BPP * 2; \
|
||||
dst_u += 1; \
|
||||
dst_v += 1; \
|
||||
} \
|
||||
if (width & 1) { \
|
||||
uint16_t ab = (src_rgb[B] + src_rgb1[B] + 1) >> 1; \
|
||||
uint16_t ag = (src_rgb[G] + src_rgb1[G] + 1) >> 1; \
|
||||
uint16_t ar = (src_rgb[R] + src_rgb1[R] + 1) >> 1; \
|
||||
dst_u[0] = RGBToUJ(ar, ag, ab); \
|
||||
dst_v[0] = RGBToVJ(ar, ag, ab); \
|
||||
} \
|
||||
}
|
||||
|
||||
MAKEROWYJ(ARGB, 2, 1, 0, 4)
|
||||
MAKEROWYJ(ABGR, 0, 1, 2, 4)
|
||||
MAKEROWYJ(RGBA, 3, 2, 1, 4)
|
||||
#undef MAKEROWYJ
|
||||
|
||||
static __inline uint8_t RGBToYMatrix(uint8_t b0,
|
||||
uint8_t b1,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user