[COMMON] media: scaler: cleaning up buffer allocation related code
This patch cleans up repetitive code for plane size calculation and
buffer allocation and free of intermediate buffer.
How to calculate plane size varies depending on the pixel format
conditions, however, many repetitive code was used. Common calculation
code is separated by one function.
Intermediate buffer allocation was repetitive and easy to mistake. It is
cleaned up by changing sc_addr structure to use array. It contains
removing redundant code for prefetch buffer.
Change-Id: Iea75d7f204e0addcebfc187b96eb8466320e5fd9
Signed-off-by: Janghyuck Kim <janghyuck.kim@samsung.com>