From: Sunmi Lee Date: Tue, 3 Jul 2018 02:30:44 +0000 (+0900) Subject: [COMMON] fimc-is2: Moved macro function declaration X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f63c9ca97c37467d4b7331022724eafe510a847f;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] fimc-is2: Moved macro function declaration To use simplified macro function to calculate of linear interpolation for CAC, old version macro function was moved into tdnr header file. PR JIRA ID: CPR-25 Change-Id: Id0463922876df9b9c3695c5a3f9f370820face04 Signed-off-by: Sunmi Lee --- diff --git a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.h b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.h index f1b59f4ca11b..76a6299ceeff 100644 --- a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.h +++ b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-mcscaler-v2.h @@ -27,14 +27,6 @@ (output_id + ENTRY_M0P) #define GET_DJAG_ZOOM_RATIO(in, out) (u32)(((in * 1000 / out) << MCSC_PRECISION) / 1000) -#define INTERPOLATE_SHIFT (12) -#define INTERPOLATE_NUMERATOR(Y1, Y2, diff_x_x1) \ - ((((Y2) - (Y1)) * (diff_x_x1)) << INTERPOLATE_SHIFT) -#define GET_LINEAR_INTERPOLATE_VALUE(Y1, Y2, diff_x2_x1, diff_x_x1) \ - (((INTERPOLATE_NUMERATOR((int)Y1, (int)Y2, diff_x_x1)) / (diff_x2_x1)) + \ - (((int)(Y1) << INTERPOLATE_SHIFT))) -#define RESTORE_SHIFT_VALUE(value) ((int)(value) >> INTERPOLATE_SHIFT) - enum mcsc_img_format { MCSC_YUV422_1P_YUYV = 0, MCSC_YUV422_1P_YVYU, diff --git a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr.h b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr.h index 18d12d773ae9..5f5c9e6dedad 100644 --- a/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr.h +++ b/drivers/media/platform/exynos/fimc-is2/hardware/fimc-is-hw-tdnr.h @@ -15,6 +15,13 @@ /* DDK delivered NI to multiply 10 */ #define MULTIPLIED_NI(value) (10 * (value)) +#define INTERPOLATE_SHIFT (12) +#define INTERPOLATE_NUMERATOR(Y1, Y2, diff_x_x1) \ + ((((Y2) - (Y1)) * (diff_x_x1)) << INTERPOLATE_SHIFT) +#define GET_LINEAR_INTERPOLATE_VALUE(Y1, Y2, diff_x2_x1, diff_x_x1) \ + (((INTERPOLATE_NUMERATOR((int)Y1, (int)Y2, diff_x_x1)) / (diff_x2_x1)) + \ + (((int)(Y1) << INTERPOLATE_SHIFT))) +#define RESTORE_SHIFT_VALUE(value) ((int)(value) >> INTERPOLATE_SHIFT) enum tdnr_mode { TDNR_MODE_BYPASS = 0,