rename t1_enc_sigpass_step and t1_enc_sigpass with opj_ prefix and update type
This commit is contained in:
parent
3b953cc763
commit
c60a84b6f5
|
@ -49,16 +49,15 @@ static void t1_updateflags(flag_t *flagsp, int s, int stride);
|
||||||
/**
|
/**
|
||||||
Encode significant pass
|
Encode significant pass
|
||||||
*/
|
*/
|
||||||
static void t1_enc_sigpass_step(
|
static void opj_t1_enc_sigpass_step(opj_t1_t *t1,
|
||||||
opj_t1_t *t1,
|
flag_t *flagsp,
|
||||||
flag_t *flagsp,
|
OPJ_INT32 *datap,
|
||||||
int *datap,
|
OPJ_UINT32 orient,
|
||||||
int orient,
|
OPJ_INT32 bpno,
|
||||||
int bpno,
|
OPJ_INT32 one,
|
||||||
int one,
|
OPJ_INT32 *nmsedec,
|
||||||
int *nmsedec,
|
OPJ_BYTE type,
|
||||||
char type,
|
OPJ_UINT32 vsc);
|
||||||
int vsc);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Decode significant pass
|
Decode significant pass
|
||||||
|
@ -97,13 +96,12 @@ static INLINE void t1_dec_sigpass_step_mqc_vsc(
|
||||||
/**
|
/**
|
||||||
Encode significant pass
|
Encode significant pass
|
||||||
*/
|
*/
|
||||||
static void t1_enc_sigpass(
|
static void opj_t1_enc_sigpass( opj_t1_t *t1,
|
||||||
opj_t1_t *t1,
|
OPJ_INT32 bpno,
|
||||||
int bpno,
|
OPJ_UINT32 orient,
|
||||||
int orient,
|
OPJ_INT32 *nmsedec,
|
||||||
int *nmsedec,
|
OPJ_BYTE type,
|
||||||
char type,
|
OPJ_UINT32 cblksty);
|
||||||
int cblksty);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Decode significant pass
|
Decode significant pass
|
||||||
|
@ -419,18 +417,19 @@ static void t1_updateflags(flag_t *flagsp, int s, int stride) {
|
||||||
sp[1] |= T1_SIG_NW;
|
sp[1] |= T1_SIG_NW;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void t1_enc_sigpass_step(
|
void opj_t1_enc_sigpass_step( opj_t1_t *t1,
|
||||||
opj_t1_t *t1,
|
flag_t *flagsp,
|
||||||
flag_t *flagsp,
|
OPJ_INT32 *datap,
|
||||||
int *datap,
|
OPJ_UINT32 orient,
|
||||||
int orient,
|
OPJ_INT32 bpno,
|
||||||
int bpno,
|
OPJ_INT32 one,
|
||||||
int one,
|
OPJ_INT32 *nmsedec,
|
||||||
int *nmsedec,
|
OPJ_BYTE type,
|
||||||
char type,
|
OPJ_UINT32 vsc
|
||||||
int vsc)
|
)
|
||||||
{
|
{
|
||||||
int v, flag;
|
OPJ_INT32 v;
|
||||||
|
OPJ_UINT32 flag;
|
||||||
|
|
||||||
opj_mqc_t *mqc = t1->mqc; /* MQC component */
|
opj_mqc_t *mqc = t1->mqc; /* MQC component */
|
||||||
|
|
||||||
|
@ -531,22 +530,24 @@ static INLINE void t1_dec_sigpass_step_mqc_vsc(
|
||||||
}
|
}
|
||||||
} /* VSC and BYPASS by Antonin */
|
} /* VSC and BYPASS by Antonin */
|
||||||
|
|
||||||
static void t1_enc_sigpass(
|
void opj_t1_enc_sigpass(opj_t1_t *t1,
|
||||||
opj_t1_t *t1,
|
OPJ_INT32 bpno,
|
||||||
int bpno,
|
OPJ_UINT32 orient,
|
||||||
int orient,
|
OPJ_INT32 *nmsedec,
|
||||||
int *nmsedec,
|
OPJ_BYTE type,
|
||||||
char type,
|
OPJ_UINT32 cblksty
|
||||||
int cblksty)
|
)
|
||||||
{
|
{
|
||||||
int i, j, k, one, vsc;
|
OPJ_UINT32 i, j, k, vsc;
|
||||||
|
OPJ_INT32 one;
|
||||||
|
|
||||||
*nmsedec = 0;
|
*nmsedec = 0;
|
||||||
one = 1 << (bpno + T1_NMSEDEC_FRACBITS);
|
one = 1 << (bpno + T1_NMSEDEC_FRACBITS);
|
||||||
for (k = 0; k < t1->h; k += 4) {
|
for (k = 0; k < t1->h; k += 4) {
|
||||||
for (i = 0; i < t1->w; ++i) {
|
for (i = 0; i < t1->w; ++i) {
|
||||||
for (j = k; j < k + 4 && j < t1->h; ++j) {
|
for (j = k; j < k + 4 && j < t1->h; ++j) {
|
||||||
vsc = ((cblksty & J2K_CCP_CBLKSTY_VSC) && (j == k + 3 || j == t1->h - 1)) ? 1 : 0;
|
vsc = ((cblksty & J2K_CCP_CBLKSTY_VSC) && (j == k + 3 || j == t1->h - 1)) ? 1 : 0;
|
||||||
t1_enc_sigpass_step(
|
opj_t1_enc_sigpass_step(
|
||||||
t1,
|
t1,
|
||||||
&t1->flags[((j+1) * t1->flags_stride) + i + 1],
|
&t1->flags[((j+1) * t1->flags_stride) + i + 1],
|
||||||
&t1->data[(j * t1->w) + i],
|
&t1->data[(j * t1->w) + i],
|
||||||
|
@ -1305,7 +1306,7 @@ static void t1_encode_cblk(
|
||||||
|
|
||||||
switch (passtype) {
|
switch (passtype) {
|
||||||
case 0:
|
case 0:
|
||||||
t1_enc_sigpass(t1, bpno, orient, &nmsedec, type, cblksty);
|
opj_t1_enc_sigpass(t1, bpno, orient, &nmsedec, type, cblksty);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
t1_enc_refpass(t1, bpno, &nmsedec, type, cblksty);
|
t1_enc_refpass(t1, bpno, &nmsedec, type, cblksty);
|
||||||
|
@ -1950,7 +1951,7 @@ static void t1_encode_cblk_v2(
|
||||||
|
|
||||||
switch (passtype) {
|
switch (passtype) {
|
||||||
case 0:
|
case 0:
|
||||||
t1_enc_sigpass(t1, bpno, orient, &nmsedec, type, cblksty);
|
opj_t1_enc_sigpass(t1, bpno, orient, &nmsedec, type, cblksty);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
t1_enc_refpass(t1, bpno, &nmsedec, type, cblksty);
|
t1_enc_refpass(t1, bpno, &nmsedec, type, cblksty);
|
||||||
|
|
|
@ -99,13 +99,13 @@ typedef struct opj_t1 {
|
||||||
/** RAW component */
|
/** RAW component */
|
||||||
opj_raw_t *raw;
|
opj_raw_t *raw;
|
||||||
|
|
||||||
int *data;
|
OPJ_INT32 *data;
|
||||||
flag_t *flags;
|
flag_t *flags;
|
||||||
int w;
|
OPJ_UINT32 w;
|
||||||
int h;
|
OPJ_UINT32 h;
|
||||||
int datasize;
|
OPJ_UINT32 datasize;
|
||||||
int flagssize;
|
OPJ_UINT32 flagssize;
|
||||||
int flags_stride;
|
OPJ_UINT32 flags_stride;
|
||||||
} opj_t1_t;
|
} opj_t1_t;
|
||||||
|
|
||||||
#define MACRO_t1_flags(x,y) t1->flags[((x)*(t1->flags_stride))+(y)]
|
#define MACRO_t1_flags(x,y) t1->flags[((x)*(t1->flags_stride))+(y)]
|
||||||
|
|
Loading…
Reference in New Issue