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

Commit ec2746c3 authored by Jason Sams's avatar Jason Sams
Browse files

Fix ImageProcessing example.

parent 704ff64b
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -5,8 +5,8 @@ struct color_s {
    char a;
};

void filter(struct color_s *in, struct color_s *out, struct vec3_s *luminanceVector) {
    struct vec3_s pixel;
void filter(struct color_s *in, struct color_s *out, struct vecF32_3_s *luminanceVector) {
    struct vecF32_3_s pixel;
    pixel.x = (in->r & 0xFF) / 255.0f;
    pixel.y = (in->g & 0xFF) / 255.0f;
    pixel.z = (in->b & 0xFF) / 255.0f;
@@ -22,10 +22,12 @@ void filter(struct color_s *in, struct color_s *out, struct vec3_s *luminanceVec
}

void main() {
    int t = uptimeMillis();

    struct color_s *in = (struct color_s *) InPixel;
    struct color_s *out = (struct color_s *) OutPixel;

    struct vec3_s luminanceVector;
    struct vecF32_3_s luminanceVector;
    luminanceVector.x = 0.2125f;
    luminanceVector.y = 0.7154f;
    luminanceVector.z = 0.0721f;
@@ -40,5 +42,8 @@ void main() {
        out++;
    }

    t= uptimeMillis() - t;
    debugI32("Filter time", t);

    sendToClient(&count, 1, 4, 0);
}