You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually, before v0.5.0 (which is originally written by me), it use avifImageYUVToRGB to convert it, exactly what you think. And code is simple.
But @ledyba-z create that PR and use vImage for conversion and provide the performance result, so I merge it and release the new version.
And then, since @ledyba-z no longer maintain this repo and write his own AVIF decoder (!), so I maintained this code and get updated to libavif's API break, until now 😂
Currently YUV<->RGB may loss detail and slow if you just use CPU to do conversion.
There are two available open source project used by libavif for RGB to YUV conversion, one is libyuv, another is sharpyuv (Both from Google), or use Apple's vImage to convert.
If you think there are performance regression, I can provide a option in AVIFCoder to let you customize, like :
typedefenum RGBYUVConversion {
case vImage,
case libyuv,
case sharpyuv
} RGBYUVConversion;
@interfaceSDImageAVIFCoder// Control the default RGB to YUV conversion, defaults to vImage (which is fast on Apple platforms)@class (assign) BOOL RGBYUVConversion defaultConversion;
@end
Ah, yes. vImage frameworks can convert YUV to RGB about 100x faster than naive CPU code.
@dreampiggy Hi, I have quit my job on link-u, which is a manga company, and moved to a energy company.
But I am still interested in maintaining, so feel free to mention when something happen to vImage codes!
Activity
dreampiggy commentedon Oct 14, 2022
See: #7
Actually, before v0.5.0 (which is originally written by me), it use
avifImageYUVToRGBto convert it, exactly what you think. And code is simple.But @ledyba-z create that PR and use vImage for conversion and provide the performance result, so I merge it and release the new version.
And then, since @ledyba-z no longer maintain this repo and write his own AVIF decoder (!), so I maintained this code and get updated to libavif's API break, until now 😂
dreampiggy commentedon Oct 14, 2022
Currently YUV<->RGB may loss detail and slow if you just use CPU to do conversion.
There are two available open source project used by libavif for RGB to YUV conversion, one is libyuv, another is sharpyuv (Both from Google), or use Apple's vImage to convert.
dreampiggy commentedon Oct 14, 2022
If you think there are performance regression, I can provide a option in AVIFCoder to let you customize, like :
ledyba-z commentedon Oct 17, 2022
Ah, yes. vImage frameworks can convert YUV to RGB about 100x faster than naive CPU code.
@dreampiggy Hi, I have quit my job on link-u, which is a manga company, and moved to a energy company.
But I am still interested in maintaining, so feel free to mention when something happen to vImage codes!