Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Ever wonder why software is so slow...?

Name: Cudder !cXCudderUE 2017-09-04 4:18

Because it's all written by retards.

https://github.com/ArtifexSoftware/jbig2dec/blob/master/jbig2_image.c

Scroll down to jbig2_image_compose_unopt()... and then facepalm. It doesn't take a genius to realise that twiddling an image pixel-by-pixel is going to be dead slow.

Name: Anonymous 2017-09-04 20:36

How do you twiddle an image pixel by pixel without twiddling an image pixel by pixel?
B = op(A, B) = [op(A0,0,B0,0) .. op(Aw-1,h-1,Bw-1,h-1)]
How do you bypass a definition?

Name: Anonymous 2017-09-04 21:13

>>15
Addition gets implemented just fine without recursively taking successors.

Name: Anonymous 2017-09-04 22:03

>>16
You still need to access each operand individually, just like this example of accessing pixels individually.

As far as I can tell, you have to loop over the pixels one at a time and pray that your compiler decides to use SIMD instructions.

Name: Anonymous 2017-09-05 1:21

if (op != JBIG2_COMPOSE_OR) {
case JBIG2_COMPOSE_OR:
?

>>15
if (jbig2_image_get_pixel_transparency(src, i + sx, j + sy)>0)
jbig2_image_set_pixel()

Name: Anonymous 2017-09-05 5:06

>>15
I think a graphic shader would do it an order of magnitude faster, provided the hardware has shader support(openGL/OpenCL/GLSL)

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List