Formatted files with prepare_commit.sh. Code fixed to compile with Visual Studio 10

This commit is contained in:
Aous Naman 2021-09-04 12:09:59 +10:00
parent f00dad44c8
commit b684247201
6 changed files with 2055 additions and 2085 deletions

File diff suppressed because it is too large Load Diff

View File

@ -10617,12 +10617,18 @@ static OPJ_BOOL opj_j2k_read_SPCod_SPCoc(opj_j2k_t *p_j2k,
/* SPcod (G) / SPcoc (D) */
opj_read_bytes(l_current_ptr, &l_tccp->cblksty, 1);
++l_current_ptr;
if ((l_tccp->cblksty & 0x80U) != 0 || (l_tccp->cblksty & 0x48U) == 0x48U) {
/* For HT, we only support one mode, bit 6 set, meaning that "all code-blocks
within the corresponding tile-component shall be HT code-blocks, and
bit 3 is reset, meaning that "No vertically causal context". */
if ((l_tccp->cblksty & J2K_CCP_CBLKSTY_HTMIXED) != 0) {
/* We do not support HT mixed mode yet*/
opj_event_msg(p_manager, EVT_ERROR,
"Error reading SPCod SPCoc element, Invalid code-block style found\n");
"Error reading SPCod SPCoc element. Unsupported Mixed HT code-block style found\n");
return OPJ_FALSE;
}
if ((l_tccp->cblksty & (J2K_CCP_CBLKSTY_HT | J2K_CCP_CBLKSTY_VSC)) ==
(J2K_CCP_CBLKSTY_HT | J2K_CCP_CBLKSTY_VSC)) {
/* For HT, we do not support vertically causal mode yet. */
opj_event_msg(p_manager, EVT_ERROR,
"Error reading SPCod SPCoc element. Unsupported HT mode with vertically causal mode. \n");
return OPJ_FALSE;
}

View File

@ -61,7 +61,8 @@ The functions in J2K.C have for goal to read/write the several parts of the code
#define J2K_CCP_CBLKSTY_VSC 0x08 /**< Vertically stripe causal context */
#define J2K_CCP_CBLKSTY_PTERM 0x10 /**< Predictable termination */
#define J2K_CCP_CBLKSTY_SEGSYM 0x20 /**< Segmentation symbols are used */
#define J2K_CCP_CBLKSTY_HT 0x40 /**< (high throughput) HT codeblock */
#define J2K_CCP_CBLKSTY_HT 0x40 /**< (high throughput) HT codeblocks */
#define J2K_CCP_CBLKSTY_HTMIXED 0x80 /**< MIXED mode HT codeblocks */
#define J2K_CCP_QNTSTY_NOQNT 0
#define J2K_CCP_QNTSTY_SIQNT 1
#define J2K_CCP_QNTSTY_SEQNT 2

View File

@ -1700,8 +1700,7 @@ static void opj_t1_clbl_decode_processor(void* user_data, opj_tls_t* tls)
opj_free(job);
return;
}
}
else {
} else {
if (OPJ_FALSE == opj_t1_decode_cblk(
t1,
cblk,

View File

@ -1262,7 +1262,7 @@ static OPJ_BOOL opj_t2_read_packet_header(opj_t2_t* p_t2,
if ((p_tcp->tccps[p_pi->compno].cblksty & J2K_CCP_CBLKSTY_HT) != 0)
do {
OPJ_UINT32 bit_number;
l_cblk->segs[l_segno].numnewpasses = l_segno == 0 ? 1u : (OPJ_UINT32)n;
l_cblk->segs[l_segno].numnewpasses = l_segno == 0 ? 1 : (OPJ_UINT32)n;
bit_number = l_cblk->numlenbits + opj_uint_floorlog2(
l_cblk->segs[l_segno].numnewpasses);
if (bit_number > 32) {