I am doing an Android project about working with video frames, I need to process each frame before displaying it. The process includes scaling frames with a resolution of 1920x1080 to 2560x1440, color space conversion, and some necessary RGB-based image processing, and all these work must be completed within 33 ms ~ 40 ms.
I optimized yuv-> rgb and other processing with the neon arm, they worked well. But I need to scale the frame first from 1080p to 2k, this is a performance bottleneck.
My question is how to efficiently scale an image with a resolution of 1080p to 2k for 20 ms, I do not have much experience with the scaling algorithm, so any suggestions are useful. Can I use arm neon to optimize an existing algorithm?
Hardware environment:
- Processor: Samsung Exynos 5420
- Memory: 3 GB
- Display: 2560X1600 px
Update:
I will talk about my decoding process, I use MediaCodec to decode regular video (H.264) to YUV (NV12), the default decoder is hardware, it is very fast. Then I use arm neon to convert NV12 to RGBW, and then send the RGBW frame to the surface flasher for display. I just use a regular SurfaceView rahter than GLSurfaceView.
The bottleneck is increasing YUV from 1080p to 2K fast.