Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

OMAPDSS: DISPC: Fix FIR coefficients

coef3_M8 had an incorrect phase with 50% more intensity. This resulted in
banding on slightly down/upscaled images. Fixed a rounding error in coef5_M9.

Also removed ARRAY_LEN macro as ARRAY_SIZE is the standard linux one.

Signed-off-by: Lajos Molnar <lajos@ti.com>
Signed-off-by: Archit Taneja <archit@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>

authored by

Lajos Molnar and committed by
Tomi Valkeinen
c0c1cfcb 08f3267e

+4 -5
+4 -5
drivers/video/omap2/dss/dispc_coefs.c
··· 19 19 20 20 #include <linux/kernel.h> 21 21 #include <video/omapdss.h> 22 - #include "dispc.h" 23 22 24 - #define ARRAY_LEN(array) (sizeof(array) / sizeof(array[0])) 23 + #include "dispc.h" 25 24 26 25 static const struct dispc_coef coef3_M8[8] = { 27 26 { 0, 0, 128, 0, 0 }, 28 27 { 0, -4, 123, 9, 0 }, 29 - { 0, -4, 108, 87, 0 }, 28 + { 0, -4, 108, 24, 0 }, 30 29 { 0, -2, 87, 43, 0 }, 31 30 { 0, 64, 64, 0, 0 }, 32 31 { 0, 43, 87, -2, 0 }, ··· 167 168 168 169 static const struct dispc_coef coef5_M9[8] = { 169 170 { -3, 10, 114, 10, -3 }, 170 - { -6, 24, 110, 0, -1 }, 171 + { -6, 24, 111, 0, -1 }, 171 172 { -8, 40, 103, -7, 0 }, 172 173 { -11, 58, 91, -11, 1 }, 173 174 { 0, -12, 76, 76, -12 }, ··· 318 319 }; 319 320 320 321 inc /= 128; 321 - for (i = 0; i < ARRAY_LEN(coefs); ++i) 322 + for (i = 0; i < ARRAY_SIZE(coefs); ++i) 322 323 if (inc >= coefs[i].Mmin && inc <= coefs[i].Mmax) 323 324 return five_taps ? coefs[i].coef_5 : coefs[i].coef_3; 324 325 return NULL;