metal-performance-shaders

Metal - Resize video buffer before passing to custom Kernel filter

余生颓废 提交于 2019-11-28 02:17:39
Within our iOS app, we are using custom filters using Metal (CIKernel/CIColorKernel wrappers). Let's assume we have a 4K video and a custom video composition with a 1080p output size, that applies an advanced filter on the video buffers. Obviously, we don't need to filter the video in its original size, doing so we'll probably terminate the app with a memory warning (true story). This is the video-filtering pipeline: Getting the buffer in 4K (as CIImage ) --> Apply filter on the CIImage --> the filter applies the CIKernel Metal filter function on the CIImage --> Return the filtered CIImage to

Metal - Resize video buffer before passing to custom Kernel filter

限于喜欢 提交于 2019-11-26 23:40:41
问题 Within our iOS app, we are using custom filters using Metal (CIKernel/CIColorKernel wrappers). Let's assume we have a 4K video and a custom video composition with a 1080p output size, that applies an advanced filter on the video buffers. Obviously, we don't need to filter the video in its original size, doing so we'll probably terminate the app with a memory warning (true story). This is the video-filtering pipeline: Getting the buffer in 4K (as CIImage ) --> Apply filter on the CIImage -->