Tiny perf improvement in T1 stage for subtile decoding
[openjpeg.git] / src / lib / openjp2 / image.c
index ecd65eceb373e154e3d3f10f312503a82861f8fb..e29172b2b5d59679ceed8b38ec1b80831c840395 100644 (file)
@@ -74,7 +74,7 @@ opj_image_t* OPJ_CALLCONV opj_image_create(OPJ_UINT32 numcmpts,
                 opj_image_destroy(image);
                 return NULL;
             }
-            comp->data = (OPJ_INT32*) opj_aligned_malloc(
+            comp->data = (OPJ_INT32*) opj_image_data_alloc(
                              (size_t)comp->w * comp->h * sizeof(OPJ_INT32));
             if (!comp->data) {
                 /* TODO replace with event manager, breaks API */
@@ -99,7 +99,7 @@ void OPJ_CALLCONV opj_image_destroy(opj_image_t *image)
             for (compno = 0; compno < image->numcomps; compno++) {
                 opj_image_comp_t *image_comp = &(image->comps[compno]);
                 if (image_comp->data) {
-                    opj_aligned_free(image_comp->data);
+                    opj_image_data_free(image_comp->data);
                 }
             }
             opj_free(image->comps);