This file contains hidden or 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
template<typename T, int C> | |
void Reflect_101(const T* const input, T* output, int pad_top, int pad_bottom, int pad_left, int pad_right, const int* original_size) { | |
// This function padd a 2D matrix or a multichannel image with the specified top,bottom,left,right pad and it applies | |
// a reflect 101 like cv::copyMakeBorder, the main (and only) difference is the following constraint to prevent out of buffer reading | |
pad_top = std::min(pad_top, original_size[0] - 1); | |
pad_bottom = std::min(pad_bottom, original_size[0] - 1); | |
pad_left = std::min(pad_left, original_size[1] - 1); | |
pad_right = std::min(pad_right, original_size[1] - 1); |
This file contains hidden or 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
// DEINTERLEAVE RGB Image | |
template<typename T, typename U> | |
inline void deinterleave_BGR(const T* const interleaved_BGR, U** const deinterleaved_BGR, const uint32_t nsize) { | |
constexpr uint32_t block = 262144 / (3 * std::max(sizeof(T), sizeof(U))); | |
constexpr float round = std::is_integral_v<U> ? std::is_integral_v<T> ? 0 : 0.5f : 0; | |
#pragma omp parallel for | |
for (int32_t x = 0; x < nsize; x += block) |
This file contains hidden or 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
template<typename T, int C> | |
void horizontal_blur_kernel_reflect(const T* in, T* out, const int w, const int h, const int ksize) | |
{ | |
// change the local variable types depending on the template type for faster calculations | |
using calc_type = std::conditional_t<std::is_integral_v<T>, uint32_t, float>; | |
int r = 0.5f * (ksize - 1); | |
r = std::min(r, w - 1); | |
const float iarr = 1.f / (r + r + 1); |
This file contains hidden or 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
.method public static patcher()V | |
.locals 4 | |
.line 15 | |
new-instance v0, Ljava/io/File; | |
const-string v1, "/data/data/com.facebook.work/lib-compressed/libxplat_fizz_client_protocolAndroid.so" | |
invoke-direct {v0, v1}, Ljava/io/File;-><init>(Ljava/lang/String;)V | |
.line 16 |
This file contains hidden or 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
iget-object v3, v0, LX/AzF;->A0H:Landroid/content/Context; | |
new-instance v1, Ljava/lang/StringBuilder; | |
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V | |
invoke-virtual {v3}, Landroid/content/Context;->getFilesDir()Ljava/io/File; | |
move-result-object v2 | |
invoke-virtual {v2}, Ljava/io/File;->toString()Ljava/lang/String; | |
move-result-object v2 | |
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; | |
const-string v2, "/ard_fe/" | |
invoke-virtual {v1, v2}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder; |
This file contains hidden or 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
.method public static exportList(Ljava/lang/String;Ljava/lang/String;)V | |
.registers 8 | |
:try_start_0 | |
new-instance v0, Ljava/io/File; | |
new-instance v1, Ljava/lang/StringBuilder; | |
invoke-direct {v1}, Ljava/lang/StringBuilder;-><init>()V | |
invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File; |
This file contains hidden or 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
.method public static copyFiles(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Z | |
.registers 11 | |
new-instance v0, Ljava/io/File; | |
invoke-static {}, Landroid/os/Environment;->getExternalStorageDirectory()Ljava/io/File; | |
move-result-object v1 | |
const-string v2, "Download/Effects" |