M-HT
Very Active Member
Hi,
I was curious whether it's feasible to run scalers on the DSP, so I did some programming and testing.
I started with the scale2x algorithm to resize a 256x256 16-bit image.
I used dspbridge and the DSP for Dummies framework to run things on DSP and for compiling I used TMS320C6x C/C++ Compiler v7.3.2.
For optimizing I didn't use any assembler, but I did use compiler intrinsics.
Everything was measured at stock Pandora speed (600 MHz).
Result 1:
The overhead of calling the scaler on DSP is 3.43 ms.
Considering that scaling the image using NEON scaler costs 1.06 ms, it looks like running scale2x on DSP is pointless.
The next idea would be to take another scaler which on arm/neon needs more time than the overhead and run it on DSP (possible scalers are 2xSaI, SuperEagle2x, Super2xSaI, ...).
Result 2:
The best optimized version of scale2x on DSP needed 12.25 ms (including the overhead) to resize the image.
This version processes two pixels at once - two 16-bit values in 32-bit register - similar to how the NEON scaler works.
The best version without processing two pixels at once (except reading and writing to memory) needed 15.32 ms (including the overhead) to resize the image.
Since scale2x is a really simple scaler, it seems that it's not possible to run a more complicated scalers on DSP with acceptable speed (because it would run much slower than scale2x).
I was curious whether it's feasible to run scalers on the DSP, so I did some programming and testing.
I started with the scale2x algorithm to resize a 256x256 16-bit image.
I used dspbridge and the DSP for Dummies framework to run things on DSP and for compiling I used TMS320C6x C/C++ Compiler v7.3.2.
For optimizing I didn't use any assembler, but I did use compiler intrinsics.
Everything was measured at stock Pandora speed (600 MHz).
Result 1:
The overhead of calling the scaler on DSP is 3.43 ms.
Considering that scaling the image using NEON scaler costs 1.06 ms, it looks like running scale2x on DSP is pointless.
The next idea would be to take another scaler which on arm/neon needs more time than the overhead and run it on DSP (possible scalers are 2xSaI, SuperEagle2x, Super2xSaI, ...).
Result 2:
The best optimized version of scale2x on DSP needed 12.25 ms (including the overhead) to resize the image.
This version processes two pixels at once - two 16-bit values in 32-bit register - similar to how the NEON scaler works.
The best version without processing two pixels at once (except reading and writing to memory) needed 15.32 ms (including the overhead) to resize the image.
Since scale2x is a really simple scaler, it seems that it's not possible to run a more complicated scalers on DSP with acceptable speed (because it would run much slower than scale2x).
Last edited by a moderator: