The mqc.c code with MQC_PERF_OPT crashes when mqc_init_dec is called with len = 0. This happens with some DCPs. The attached patch fixes the issue and also saves some memory.
Best regards,
Peter
--------------------
3dtv.at
Peter Wimmer
Wankmüllerhofstr. 9
4020 Linz
Austria
Thanks a lot for the patch.
As you are the author of the MQ optimizations (MQC_PERF_OPT), I guess you know what you do by dividing the buffer length by two ... ? What was actually the reason for having a buffer of length (2*len+1) ?
Thanks,
Antonin
> --
> You are subscribed to the mailing-list of the OpenJPEG project.
> Latest news and updates about the project: http://www.openjpeg.org
> To post: email to open...@googlegroups.com
> To unsubscribe: email to openjpeg+u...@googlegroups.com
> For more options: visit http://groups.google.com/group/openjpeg?hl=en?hl=en
> <OpenJPEG Patch.patch>
I can't remember why I used a larger buffer in previous versions, probably "just to be safe". The short buffer worked fine so far with all DCPs I've tested. In the new code it is quite obvious that ip cannot be incremented more often than bp, so doubling the buffer size is not necessary.
Peter
--------------------
3dtv.at
Peter Wimmer
Wankmüllerhofstr. 9
4020 Linz
Austria
off...@3dtv.at
http://www.3dtv.at