Skip to content

Commit

Permalink
modified: src/webql.ispc
Browse files Browse the repository at this point in the history
  • Loading branch information
jvo203 committed Aug 17, 2022
1 parent 491846a commit 3ce793e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/vimage.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <Accelerate/Accelerate.h>

extern int get_physical_cores();
extern void resizeNearestSIMD(unsigned char *restrict pSrc, int srcWidth, int srcHeight, unsigned char *restrict pDest, int dstWidth, int dstHeight);

// entry functions from Fortran
extern void resizeLanczos(float *restrict pSrc, int srcWidth, int srcHeight, float *restrict pDest, int dstWidth, int dstHeight, int numLobes)
Expand Down Expand Up @@ -87,4 +88,9 @@ extern void resizeSuper(float *restrict pSrc, int srcWidth, int srcHeight, float
pDest[offset_dst + j] = pSrc[offset_src + x2];
}
}
}*/
}*/

extern void resizeNearest(unsigned char *restrict pSrc, int srcWidth, int srcHeight, unsigned char *restrict pDest, int dstWidth, int dstHeight)
{
resizeNearestSIMD(pSrc, srcWidth, srcHeight, pDest, dstWidth, dstHeight);
}
2 changes: 1 addition & 1 deletion src/webql.ispc
Original file line number Diff line number Diff line change
Expand Up @@ -1164,7 +1164,7 @@ export void make_video_frame_fixed_legacy(uniform struct fixed_block_t compresse

}

export void resizeNearest(uniform unsigned int8 src[], uniform int srcWidth, uniform int srcHeight, uniform unsigned int8 dst[], uniform int dstWidth, uniform int dstHeight)
export void resizeNearestSIMD(uniform unsigned int8 src[], uniform int srcWidth, uniform int srcHeight, uniform unsigned int8 dst[], uniform int dstWidth, uniform int dstHeight)
{
const uniform int x_ratio = (int)((srcWidth << 16) / dstWidth) + 1;
const uniform int y_ratio = (int)((srcHeight << 16) / dstHeight) + 1;
Expand Down

0 comments on commit 3ce793e

Please sign in to comment.