Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 294341
b: refs/heads/master
c: c0c1cfc
h: refs/heads/master
i:
  294339: 1494cf0
v: v3
  • Loading branch information
Lajos Molnar authored and Tomi Valkeinen committed Mar 6, 2012
1 parent eae106a commit 6860cac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 08f3267e264e3cf05f0e79cf0f63a2162fd4bd1c
refs/heads/master: c0c1cfcb577d61ec55e209bc5f869d3d80a8f371
9 changes: 4 additions & 5 deletions trunk/drivers/video/omap2/dss/dispc_coefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,13 @@

#include <linux/kernel.h>
#include <video/omapdss.h>
#include "dispc.h"

#define ARRAY_LEN(array) (sizeof(array) / sizeof(array[0]))
#include "dispc.h"

static const struct dispc_coef coef3_M8[8] = {
{ 0, 0, 128, 0, 0 },
{ 0, -4, 123, 9, 0 },
{ 0, -4, 108, 87, 0 },
{ 0, -4, 108, 24, 0 },
{ 0, -2, 87, 43, 0 },
{ 0, 64, 64, 0, 0 },
{ 0, 43, 87, -2, 0 },
Expand Down Expand Up @@ -168,7 +167,7 @@ static const struct dispc_coef coef5_M8[8] = {

static const struct dispc_coef coef5_M9[8] = {
{ -3, 10, 114, 10, -3 },
{ -6, 24, 110, 0, -1 },
{ -6, 24, 111, 0, -1 },
{ -8, 40, 103, -7, 0 },
{ -11, 58, 91, -11, 1 },
{ 0, -12, 76, 76, -12 },
Expand Down Expand Up @@ -319,7 +318,7 @@ const struct dispc_coef *dispc_ovl_get_scale_coef(int inc, int five_taps)
};

inc /= 128;
for (i = 0; i < ARRAY_LEN(coefs); ++i)
for (i = 0; i < ARRAY_SIZE(coefs); ++i)
if (inc >= coefs[i].Mmin && inc <= coefs[i].Mmax)
return five_taps ? coefs[i].coef_5 : coefs[i].coef_3;
return NULL;
Expand Down

0 comments on commit 6860cac

Please sign in to comment.