-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Gin
committed
Nov 23, 2023
1 parent
cf8955d
commit 572623a
Showing
15 changed files
with
1,475 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
...urce/Kernels/BinaryImageFilters/Kernels_BinaryImage_BasicFilters_Core_64x8_arm64_NEON.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* Binary Image Basic Filters (arm64 NEON) | ||
* | ||
* From: https://github.com/PokemonAutomation/Arduino-Source | ||
* | ||
*/ | ||
|
||
#ifdef PA_AutoDispatch_arm64_20_M1 | ||
|
||
#include "Kernels/BinaryMatrix/Kernels_BinaryMatrix_Arch_64x8_arm64_NEON.h" | ||
#include "Kernels_BinaryImage_BasicFilters_Routines.h" | ||
#include "Kernels_BinaryImage_BasicFilters_arm64_NEON.h" | ||
|
||
namespace PokemonAutomation{ | ||
namespace Kernels{ | ||
|
||
|
||
void filter_by_mask_64x8_arm64_NEON( | ||
const PackedBinaryMatrix_IB& matrix, | ||
uint32_t* image, size_t bytes_per_row, | ||
uint32_t replace_with, bool replace_if_zero | ||
){ | ||
FilterByMask_arm64_NEON filter(replace_with, replace_if_zero); | ||
filter_by_mask(static_cast<const PackedBinaryMatrix_64x8_arm64_NEON&>(matrix).get(), image, bytes_per_row, filter); | ||
} | ||
|
||
|
||
void compress_rgb32_to_binary_range_64x8_arm64_NEON( | ||
const uint32_t* image, size_t bytes_per_row, | ||
PackedBinaryMatrix_IB& matrix0, uint32_t mins0, uint32_t maxs0 | ||
){ | ||
Compressor_RgbRange_arm64_NEON compressor0(mins0, maxs0); | ||
compress_rgb32_to_binary( | ||
image, bytes_per_row, | ||
static_cast<PackedBinaryMatrix_64x8_arm64_NEON&>(matrix0).get(), compressor0 | ||
); | ||
} | ||
void compress_rgb32_to_binary_range_64x8_arm64_NEON( | ||
const uint32_t* image, size_t bytes_per_row, | ||
CompressRgb32ToBinaryRangeFilter* filters, size_t filter_count | ||
){ | ||
compress_rgb32_to_binary<PackedBinaryMatrix_64x8_arm64_NEON, Compressor_RgbRange_arm64_NEON>( | ||
image, bytes_per_row, filters, filter_count | ||
); | ||
} | ||
|
||
|
||
void compress_rgb32_to_binary_euclidean_64x8_arm64_NEON( | ||
const uint32_t* image, size_t bytes_per_row, | ||
PackedBinaryMatrix_IB& matrix, | ||
uint32_t expected, double max_euclidean_distance | ||
){ | ||
// TODO: | ||
// Compressor_RgbEuclidean_arm64_NEON compressor(expected, max_euclidean_distance); | ||
// compress_rgb32_to_binary( | ||
// image, bytes_per_row, | ||
// static_cast<PackedBinaryMatrix_64x8_arm64_NEON&>(matrix).get(), compressor | ||
// ); | ||
} | ||
|
||
|
||
|
||
} | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.