Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pi.c copy paste mistakes ? #15

Closed
gcode-importer opened this issue Feb 25, 2010 · 1 comment
Closed

pi.c copy paste mistakes ? #15

gcode-importer opened this issue Feb 25, 2010 · 1 comment

Comments

@gcode-importer
Copy link

Originally reported on Google Code with ID 15

Hi everybody,

I'm not sure of that but I detected what I believe to be little mistakes in 
pi.c source file 
(http://code.google.com/p/openjpeg/source/browse/trunk/libopenjpeg/pi.c) :

at line 212:
if (!((pi->y % (comp->dy << rpy) == 0) || ((pi->y == pi->ty0) && ((try0 << 
levelno) % (1 << rpx))))){

shouldn't rpx be rpy at the end of the line ?

line 219:
if ((res->pw==0)||(res->pw==0)) continue;

res->pw twice ? I think it should be if ((res->pw==0)||(res->ph==0)) ..

the same mistakes (if they are mistakes) are reproduced at lines : 293, 300, 372 and
379

thanks


Reported by anton.lionel on 2010-02-25 09:07:19

@gcode-importer
Copy link
Author

Thanks for catching this amazing bug ! I fixed the code (rev 561 and 562).

Reported by fodevaux on 2010-04-08 18:44:39

  • Status changed: Fixed

@gcode-importer gcode-importer self-assigned this Jun 11, 2015
develone added a commit to develone/openjpeg that referenced this issue Mar 22, 2017
ultibo was having issues with
pi@raspberrypi3:~/jpeg-2000-test/bare-metal/openjp $ ./compile.sh
dwtlift.c:(.text+0x694): undefined reference to `lifting'
libdwtlift.a(opj_malloc.o): In function `opj_aligned_malloc':
opj_malloc.c:(.text+0x40): undefined reference to `posix_memalign'
libdwtlift.a(opj_malloc.o): In function `opj_aligned_realloc':
opj_malloc.c:(.text+0x98): undefined reference to `posix_memalign'
DWT_LIFT_RPi2.lpr(153,98) Error: Error while linking
DWT_LIFT_RPi2.lpr(153,98) Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /home/pi/ultibo/core/fpc/bin/ppcarm returned an error exitcode
ls: cannot access kernel7.img: No such file or directory
-rw-r--r-- 1 pi pi   6344 Mar 21 18:41 dwtlift.o
-rw-r--r-- 1 pi pi 330354 Mar 21 18:41 libdwtlift.a
-rw-r--r-- 1 pi pi 330354 Mar 21 18:41 libopenjp2.a

00000024 <opj_aligned_malloc>:
  24:   e2501000        subs    r1, r0, #0
  28:   012fff1e        bxeq    lr
  2c:   e3a00010        mov     r0, uclouvain#16
  30:   eafffffe        b       0 <memalign>

00000034 <opj_aligned_realloc>:
  34:   e92d4070        push    {r4, r5, r6, lr}
  38:   e2515000        subs    r5, r1, #0
  3c:   0a000004        beq     54 <opj_aligned_realloc+0x20>
  40:   ebfffffe        bl      0 <realloc>
  44:   e310000f        tst     r0, uclouvain#15
  48:   e1a04000        mov     r4, r0
  4c:   1a000002        bne     5c <opj_aligned_realloc+0x28>
  50:   e8bd8070        pop     {r4, r5, r6, pc}
  54:   e1a00005        mov     r0, r5
  58:   e8bd8070        pop     {r4, r5, r6, pc}
  5c:   e3a00010        mov     r0, uclouvain#16
  60:   e1a01005        mov     r1, r5
  64:   ebfffffe        bl      0 <memalign>
  68:   e2506000        subs    r6, r0, #0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants