Reputation: 137
Recently I upgraded my phone from a S2(samsung) to a S4. I have developed an application which does some processing on frames. Without changing anything in the code the fps rate in the S4 has decreased . I really have no answer , since I have only change the minSDk version and TargetSdk version...
Here is the code
public void onPreviewFrame(byte[] data, Camera camera)
{
if (Debug_fps) Log.d("Fps","....");
// processing 30 ms
camera.addCallbackBuffer(data);
}
Some relevant Data
AverageTime between frames S2: 5 - 10 ms
AverageTime between frames S4: 30- 35 ms
AverageTime processing S2: 32 ms
AverageTime processing S4: 30 ms
I really do not understand why the big differences, why does it take so long to receive the frame.
I would really appreciate if some could provide an answer,
Thank you in advance
Upvotes: 0
Views: 663
Reputation: 1746
My first guess would be that the S2 has a camera with a mutch smaller resolution (~8 MP) and the S4 has a camera with ~ 13 MP. More pixels mean more time needed to process them. Another reason might be the differnet framework on the two phones. Maybe the Galaxy S4 saves energy by not drawing more frames than absolutely needed (30ms is about 30 fps), so android limits the frames to 30 per second.
Upvotes: 1