#define LARGEST_ALLOWED_RATIO_MISMATCH 800
static int distance(struct gc0310_resolution *res, u32 w, u32 h)
{
- unsigned int w_ratio = ((res->width << 13)/w);
+ unsigned int w_ratio = (res->width << 13)/w;
unsigned int h_ratio;
int match;
if (h == 0)
return -1;
- h_ratio = ((res->height << 13) / h);
+ h_ratio = (res->height << 13) / h;
if (h_ratio == 0)
return -1;
match = abs(((w_ratio << 13) / h_ratio) - ((int)8192));
#define LARGEST_ALLOWED_RATIO_MISMATCH 800
static int distance(struct gc2235_resolution *res, u32 w, u32 h)
{
- unsigned int w_ratio = ((res->width << 13)/w);
+ unsigned int w_ratio = (res->width << 13)/w;
unsigned int h_ratio;
int match;
if (h == 0)
return -1;
- h_ratio = ((res->height << 13) / h);
+ h_ratio = (res->height << 13) / h;
if (h_ratio == 0)
return -1;
match = abs(((w_ratio << 13) / h_ratio) - ((int)8192));
#define LARGEST_ALLOWED_RATIO_MISMATCH 600
static int distance(struct ov2680_resolution *res, u32 w, u32 h)
{
- unsigned int w_ratio = ((res->width << 13)/w);
+ unsigned int w_ratio = (res->width << 13)/w;
unsigned int h_ratio;
int match;
if (h == 0)
return -1;
- h_ratio = ((res->height << 13) / h);
+ h_ratio = (res->height << 13) / h;
if (h_ratio == 0)
return -1;
match = abs(((w_ratio << 13) / h_ratio) - ((int)8192));
#define LARGEST_ALLOWED_RATIO_MISMATCH 800
static int distance(struct ov2722_resolution *res, u32 w, u32 h)
{
- unsigned int w_ratio = ((res->width << 13)/w);
+ unsigned int w_ratio = (res->width << 13)/w;
unsigned int h_ratio;
int match;
if (h == 0)
return -1;
- h_ratio = ((res->height << 13) / h);
+ h_ratio = (res->height << 13) / h;
if (h_ratio == 0)
return -1;
match = abs(((w_ratio << 13) / h_ratio) - ((int)8192));
res->width < w || res->height < h)
return -1;
- ratio = (res->width << 13);
+ ratio = res->width << 13;
ratio /= w;
ratio *= h;
ratio /= res->height;
res->width < w || res->height < h)
return -1;
- ratio = (res->width << 13);
+ ratio = res->width << 13;
ratio /= w;
ratio *= h;
ratio /= res->height;
{
uint32_t blk, i;
const uint32_t block_size = 16;
- const uint32_t total_blocks = (ISP_VEC_NELEMS / block_size);
+ const uint32_t total_blocks = ISP_VEC_NELEMS / block_size;
/* Create VMEM LUTs from the threshold and value arrays.
*
for (k = 0; k < 4; k++)
for (i = 0; i < IA_CSS_MACC_NUM_AXES; i++) {
- idx = (idx_map[i] + (k*IA_CSS_MACC_NUM_AXES));
+ idx = idx_map[i] + (k*IA_CSS_MACC_NUM_AXES);
j = 4*i;
params->data[0][(idx)] = from->data[j];
hi = isp_stats_hi;
lo = isp_stats_lo;
- chunk = (ISP_VEC_NELEMS >> host_stats->grid.deci_factor_log2);
+ chunk = ISP_VEC_NELEMS >> host_stats->grid.deci_factor_log2;
chunk = max(chunk, 1);
for (y = 0; y < out_height; y++) {
*/
- words_per_odd_line = ((odd_line_bytes + 3) >> 2); /* ceil(odd_line_bytes/4); word = 4 bytes */
- words_per_even_line = ((even_line_bytes + 3) >> 2);
+ words_per_odd_line = (odd_line_bytes + 3) >> 2; /* ceil(odd_line_bytes/4); word = 4 bytes */
+ words_per_even_line = (even_line_bytes + 3) >> 2;
words_for_first_line = words_per_odd_line + 2 + (hasSOLandEOL ? 1 : 0);
/* + SOF +packet header + optionally (SOL), but (EOL) is not in the first line */
words_per_odd_line += (1 + (hasSOLandEOL ? 2 : 0));
/* each non-first line has format header, and optionally (SOL) and (EOL). */
words_per_even_line += (1 + (hasSOLandEOL ? 2 : 0));
- mem_words_per_odd_line = ((words_per_odd_line + 7) >> 3);
+ mem_words_per_odd_line = (words_per_odd_line + 7) >> 3;
/* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */
- mem_words_for_first_line = ((words_for_first_line + 7) >> 3);
- mem_words_per_even_line = ((words_per_even_line + 7) >> 3);
+ mem_words_for_first_line = (words_for_first_line + 7) >> 3;
+ mem_words_per_even_line = (words_per_even_line + 7) >> 3;
mem_words_for_EOF = 1; /* last line consisit of the optional (EOL) and EOF */
mem_words = ((embedded_data_size_words + 7) >> 3) +
even_line_bytes = odd_line_bytes;
}
- words_per_odd_line = ((odd_line_bytes + 3) >> 2);
+ words_per_odd_line = (odd_line_bytes + 3) >> 2;
/* ceil(odd_line_bytes/4); word = 4 bytes */
- words_per_even_line = ((even_line_bytes + 3) >> 2);
+ words_per_even_line = (even_line_bytes + 3) >> 2;
- mem_words_per_odd_line = ((words_per_odd_line + 7) >> 3);
+ mem_words_per_odd_line = (words_per_odd_line + 7) >> 3;
/* ceil(words_per_odd_line/8); mem_word = 32 bytes, 8 words */
- mem_words_per_even_line = ((words_per_even_line + 7) >> 3);
+ mem_words_per_even_line = (words_per_even_line + 7) >> 3;
mem_words_per_buff_line =
(mem_words_per_odd_line > mem_words_per_even_line) ? mem_words_per_odd_line : mem_words_per_even_line;