summaryrefslogtreecommitdiff
path: root/openjpeg/src/lib/openjp2/dwt.c
diff options
context:
space:
mode:
authorChris Liddell <chris.liddell@artifex.com>2019-11-26 17:45:08 +0000
committerChris Liddell <chris.liddell@artifex.com>2019-11-26 17:51:31 +0000
commit36cbd382b160ee4951d1911f85a4fa0723dd8db3 (patch)
treea23dcd9c0eae82e60ab316b1ae6f623ad18c5891 /openjpeg/src/lib/openjp2/dwt.c
parent107babf6d3652ed9bcf26b20823ac935ba86634b (diff)
downloadghostpdl-36cbd382b160ee4951d1911f85a4fa0723dd8db3.tar.gz
Update openjpeg to 2.3.1
Diffstat (limited to 'openjpeg/src/lib/openjp2/dwt.c')
-rw-r--r--openjpeg/src/lib/openjp2/dwt.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/openjpeg/src/lib/openjp2/dwt.c b/openjpeg/src/lib/openjp2/dwt.c
index 5b98d2b38..5930d1c71 100644
--- a/openjpeg/src/lib/openjp2/dwt.c
+++ b/openjpeg/src/lib/openjp2/dwt.c
@@ -974,7 +974,7 @@ static void opj_idwt53_v(const opj_dwt_t *dwt,
#if (defined(__SSE2__) || defined(__AVX2__))
if (len > 1 && nb_cols == PARALLEL_COLS_53) {
/* Same as below general case, except that thanks to SSE2/AVX2 */
- /* we can efficently process 8/16 columns in parallel */
+ /* we can efficiently process 8/16 columns in parallel */
opj_idwt53_v_cas0_mcols_SSE2_OR_AVX2(dwt->mem, sn, len, tiledp_col, stride);
return;
}
@@ -1017,7 +1017,7 @@ static void opj_idwt53_v(const opj_dwt_t *dwt,
#if (defined(__SSE2__) || defined(__AVX2__))
if (len > 2 && nb_cols == PARALLEL_COLS_53) {
/* Same as below general case, except that thanks to SSE2/AVX2 */
- /* we can efficently process 8/16 columns in parallel */
+ /* we can efficiently process 8/16 columns in parallel */
opj_idwt53_v_cas1_mcols_SSE2_OR_AVX2(dwt->mem, sn, len, tiledp_col, stride);
return;
}
@@ -2041,7 +2041,7 @@ static OPJ_BOOL opj_dwt_decode_partial_tile(
tr_hl_x0 = (OPJ_UINT32)tr->bands[0].x0;
tr_lh_y0 = (OPJ_UINT32)tr->bands[1].y0;
- /* Substract the origin of the bands for this tile, to the subwindow */
+ /* Subtract the origin of the bands for this tile, to the subwindow */
/* of interest band coordinates, so as to get them relative to the */
/* tile */
win_ll_x0 = opj_uint_subs(win_ll_x0, tr_ll_x0);
@@ -2696,17 +2696,20 @@ OPJ_BOOL opj_dwt_decode_partial_97(opj_tcd_tilecomp_t* OPJ_RESTRICT tilec,
/* overflow check */
if (l_data_size > (SIZE_MAX - 5U)) {
/* FIXME event manager error callback */
+ opj_sparse_array_int32_free(sa);
return OPJ_FALSE;
}
l_data_size += 5U;
/* overflow check */
if (l_data_size > (SIZE_MAX / sizeof(opj_v4_t))) {
/* FIXME event manager error callback */
+ opj_sparse_array_int32_free(sa);
return OPJ_FALSE;
}
h.wavelet = (opj_v4_t*) opj_aligned_malloc(l_data_size * sizeof(opj_v4_t));
if (!h.wavelet) {
/* FIXME event manager error callback */
+ opj_sparse_array_int32_free(sa);
return OPJ_FALSE;
}
v.wavelet = h.wavelet;
@@ -2759,7 +2762,7 @@ OPJ_BOOL opj_dwt_decode_partial_97(opj_tcd_tilecomp_t* OPJ_RESTRICT tilec,
tr_hl_x0 = (OPJ_UINT32)tr->bands[0].x0;
tr_lh_y0 = (OPJ_UINT32)tr->bands[1].y0;
- /* Substract the origin of the bands for this tile, to the subwindow */
+ /* Subtract the origin of the bands for this tile, to the subwindow */
/* of interest band coordinates, so as to get them relative to the */
/* tile */
win_ll_x0 = opj_uint_subs(win_ll_x0, tr_ll_x0);