Tweaks to the spandsp alloc functions, and a fix for bi-level image row

squashing.
This commit is contained in:
Steve Underwood committed 2013-08-31 03:26:31 +08:00
1 parent 8f0dbcaaf8
commit 2ed8e04776
12 files changed
+414 -240

No files matched your search

+11 -1
View File
@@ -53,7 +53,7 @@
#include "spandsp/private/t81_t82_arith_coding.h"
#include "spandsp/private/t85.h"
static __inline__ int32_t pack_32(uint8_t *s)
static __inline__ int32_t pack_32(const uint8_t *s)
{
int32_t value;
@@ -265,6 +265,16 @@ static int finish_sde(t85_decode_state_t *s)
}
/*- End of function --------------------------------------------------------*/
SPAN_DECLARE(bool) t85_analyse_header(uint32_t *width, uint32_t *length, const uint8_t data[], size_t len)
{
if (len < 20)
return false;
*width = pack_32(&data[6]);
*length = pack_32(&data[10]);
return true;
}
/*- End of function --------------------------------------------------------*/
static int check_bih(t85_decode_state_t *s)
{
/* Check that the fixed parameters have the values they are expected to be