mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Emoji input improvements
This commit is contained in:
@@ -5,5 +5,6 @@
|
||||
|
||||
void splitRGBAIntoYUVAPlanes(uint8_t const *argb, uint8_t *outY, uint8_t *outU, uint8_t *outV, uint8_t *outA, int width, int height, int bytesPerRow);
|
||||
void combineYUVAPlanesIntoARBB(uint8_t *argb, uint8_t const *inY, uint8_t const *inU, uint8_t const *inV, uint8_t const *inA, int width, int height, int bytesPerRow);
|
||||
void scaleImagePlane(uint8_t *outPlane, int outWidth, int outHeight, int outBytesPerRow, uint8_t const *inPlane, int inWidth, int inHeight, int inBytesPerRow);
|
||||
|
||||
#endif /* YuvConversion_h */
|
||||
|
||||
@@ -97,3 +97,19 @@ void combineYUVAPlanesIntoARBB(uint8_t *argb, uint8_t const *inY, uint8_t const
|
||||
|
||||
error = vImageOverwriteChannels_ARGB8888(&srcA, &destArgb, &destArgb, 1 << 0, kvImageDoNotTile);
|
||||
}
|
||||
|
||||
void scaleImagePlane(uint8_t *outPlane, int outWidth, int outHeight, int outBytesPerRow, uint8_t const *inPlane, int inWidth, int inHeight, int inBytesPerRow) {
|
||||
vImage_Buffer src;
|
||||
src.data = (void *)inPlane;
|
||||
src.width = inWidth;
|
||||
src.height = inHeight;
|
||||
src.rowBytes = inBytesPerRow;
|
||||
|
||||
vImage_Buffer dst;
|
||||
dst.data = (void *)outPlane;
|
||||
dst.width = outWidth;
|
||||
dst.height = outHeight;
|
||||
dst.rowBytes = outBytesPerRow;
|
||||
|
||||
vImageScale_Planar8(&src, &dst, nil, kvImageDoNotTile);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user