diff options
author | Lajos Molnar <lajos@ti.com> | 2012-02-21 09:06:31 -0500 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-03-06 07:08:23 -0500 |
commit | c0c1cfcb577d61ec55e209bc5f869d3d80a8f371 (patch) | |
tree | ae9fd192d44637645723430c777a12d21c6252f7 /drivers/video/omap2 | |
parent | 08f3267e264e3cf05f0e79cf0f63a2162fd4bd1c (diff) |
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>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r-- | drivers/video/omap2/dss/dispc_coefs.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/video/omap2/dss/dispc_coefs.c b/drivers/video/omap2/dss/dispc_coefs.c index 069bccbb3f12..038c15b04215 100644 --- a/drivers/video/omap2/dss/dispc_coefs.c +++ b/drivers/video/omap2/dss/dispc_coefs.c | |||
@@ -19,14 +19,13 @@ | |||
19 | 19 | ||
20 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
21 | #include <video/omapdss.h> | 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 | static const struct dispc_coef coef3_M8[8] = { | 25 | static const struct dispc_coef coef3_M8[8] = { |
27 | { 0, 0, 128, 0, 0 }, | 26 | { 0, 0, 128, 0, 0 }, |
28 | { 0, -4, 123, 9, 0 }, | 27 | { 0, -4, 123, 9, 0 }, |
29 | { 0, -4, 108, 87, 0 }, | 28 | { 0, -4, 108, 24, 0 }, |
30 | { 0, -2, 87, 43, 0 }, | 29 | { 0, -2, 87, 43, 0 }, |
31 | { 0, 64, 64, 0, 0 }, | 30 | { 0, 64, 64, 0, 0 }, |
32 | { 0, 43, 87, -2, 0 }, | 31 | { 0, 43, 87, -2, 0 }, |
@@ -168,7 +167,7 @@ static const struct dispc_coef coef5_M8[8] = { | |||
168 | 167 | ||
169 | static const struct dispc_coef coef5_M9[8] = { | 168 | static const struct dispc_coef coef5_M9[8] = { |
170 | { -3, 10, 114, 10, -3 }, | 169 | { -3, 10, 114, 10, -3 }, |
171 | { -6, 24, 110, 0, -1 }, | 170 | { -6, 24, 111, 0, -1 }, |
172 | { -8, 40, 103, -7, 0 }, | 171 | { -8, 40, 103, -7, 0 }, |
173 | { -11, 58, 91, -11, 1 }, | 172 | { -11, 58, 91, -11, 1 }, |
174 | { 0, -12, 76, 76, -12 }, | 173 | { 0, -12, 76, 76, -12 }, |
@@ -319,7 +318,7 @@ const struct dispc_coef *dispc_ovl_get_scale_coef(int inc, int five_taps) | |||
319 | }; | 318 | }; |
320 | 319 | ||
321 | inc /= 128; | 320 | inc /= 128; |
322 | for (i = 0; i < ARRAY_LEN(coefs); ++i) | 321 | for (i = 0; i < ARRAY_SIZE(coefs); ++i) |
323 | if (inc >= coefs[i].Mmin && inc <= coefs[i].Mmax) | 322 | if (inc >= coefs[i].Mmin && inc <= coefs[i].Mmax) |
324 | return five_taps ? coefs[i].coef_5 : coefs[i].coef_3; | 323 | return five_taps ? coefs[i].coef_5 : coefs[i].coef_3; |
325 | return NULL; | 324 | return NULL; |