[1.5] backport revisions 996, 997, 1000, 1008-1012 from trunk (JPIP modifications)

This commit is contained in:
Antonin Descampe
2011-11-01 23:28:07 +00:00
parent 6a1530e4b1
commit 49a0f0db8f
28 changed files with 1384 additions and 872 deletions

View File

@@ -162,8 +162,7 @@ bool modify_mainheader( Byte_t *j2kstream, int numOfdecomp, SIZmarker_param_t SI
if( !(newLcod = modify_CODmkrstream( COD, numOfdecomp, j2kstream)))
return false;
// memmove( j2kstream+2+newLcod, j2kstream+2+COD.Lcod, (*j2klen)-(SIZ.Lsiz+newLcod+6));// new->oldLcod
memmove( j2kstream+2+newLcod, j2kstream+2+COD.Lcod, (*j2klen)-(SIZ.Lsiz+COD.Lcod+6));
memmove( j2kstream+2+newLcod, j2kstream+2+COD.Lcod, (*j2klen)-(SIZ.Lsiz+COD.Lcod+6));
*j2klen -= ( COD.Lcod - newLcod);
return true;
@@ -222,6 +221,7 @@ Byte2_t modify_CODmkrstream( CODmarker_param_t COD, int numOfdecomp, Byte_t *COD
newLcod = COD.Lcod;
CODstream += 2;
}
CODstream += 5; // skip Scod & SGcod
// SPcod