Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b25adf3 authored by Michael Bestas's avatar Michael Bestas
Browse files

Revert "Fix compiling warnings"

* We'll take the upstream fix

This reverts commit 2ba45029.

Change-Id: I067db32fe72db2b177b55cf68562daf227931e7a
parent 72e7ad5e
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@

void JNIFUNCF(ImageFilterBwFilter, nativeApplyFilter, jobject bitmap, jint width, jint height, jint rw, jint gw, jint bw)
{
    (void)obj;
    char* destination = 0;
    AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
    unsigned char * rgb = (unsigned char * )destination;
+19 −1
Original line number Diff line number Diff line
@@ -17,9 +17,27 @@
#include <math.h>
#include "filters.h"

unsigned char clamp(int c)
{
    int N = 255;
    c &= ~(c >> 31);
    c -= N;
    c &= (c >> 31);
    c += N;
    return  (unsigned char) c;
}

int clampMax(int c,int max)
{
    c &= ~(c >> 31);
    c -= max;
    c &= (c >> 31);
    c += max;
    return  c;
}

void JNIFUNCF(ImageFilterContrast, nativeApplyFilter, jobject bitmap, jint width, jint height, jfloat bright)
{
    (void)obj;
    char* destination = 0;
    AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
    unsigned char * rgb = (unsigned char * )destination;
+0 −1
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@

void JNIFUNCF(ImageFilterEdge, nativeApplyFilter, jobject bitmap, jint width, jint height, jfloat p)
{
    (void)obj;
    char* destination = 0;
    AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);

+0 −1
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@

void JNIFUNCF(ImageFilterExposure, nativeApplyFilter, jobject bitmap, jint width, jint height, jfloat bright)
{
    (void)obj;
    char* destination = 0;
    AndroidBitmap_lockPixels(env, bitmap, (void**) &destination);
    unsigned char * rgb = (unsigned char * )destination;
+2 −18
Original line number Diff line number Diff line
@@ -44,24 +44,8 @@ typedef unsigned int Color;
#define ALPHA (i+3)
#define CLAMP(c) (MAX(0, MIN(255, c)))

__inline__ unsigned char  clamp(int c)
{
    int N = 255;
    c &= ~(c >> 31);
    c -= N;
    c &= (c >> 31);
    c += N;
    return  (unsigned char) c;
}

__inline__ int clampMax(int c,int max)
{
    c &= ~(c >> 31);
    c -= max;
    c &= (c >> 31);
    c += max;
    return  c;
}
__inline__ unsigned char  clamp(int c);
__inline__ int clampMax(int c,int max);

extern void rgb2hsv( unsigned char *rgb,int rgbOff,unsigned short *hsv,int hsvOff);
extern void hsv2rgb(unsigned short *hsv,int hsvOff,unsigned char  *rgb,int rgbOff);
Loading