[trunk] Fix compilation errors when JPWL and/or MJ2 are build
This commit is contained in:
parent
2e7b8fb9a1
commit
fcc658f106
|
@ -150,8 +150,13 @@ static void sycc422_to_rgb(opj_image_t *img)
|
|||
free(img->comps[1].data); img->comps[1].data = d1;
|
||||
free(img->comps[2].data); img->comps[2].data = d2;
|
||||
|
||||
#if defined(USE_JPWL) || defined(USE_MJ2)
|
||||
img->comps[1].w = maxw; img->comps[1].h = maxh;
|
||||
img->comps[2].w = maxw; img->comps[2].h = maxh;
|
||||
#else
|
||||
img->comps[1].w = (OPJ_UINT32)maxw; img->comps[1].h = (OPJ_UINT32)maxh;
|
||||
img->comps[2].w = (OPJ_UINT32)maxw; img->comps[2].h = (OPJ_UINT32)maxh;
|
||||
#endif
|
||||
img->comps[1].dx = img->comps[0].dx;
|
||||
img->comps[2].dx = img->comps[0].dx;
|
||||
img->comps[1].dy = img->comps[0].dy;
|
||||
|
@ -209,8 +214,13 @@ static void sycc420_to_rgb(opj_image_t *img)
|
|||
free(img->comps[1].data); img->comps[1].data = d1;
|
||||
free(img->comps[2].data); img->comps[2].data = d2;
|
||||
|
||||
#if defined(USE_JPWL) || defined(USE_MJ2)
|
||||
img->comps[1].w = maxw; img->comps[1].h = maxh;
|
||||
img->comps[2].w = maxw; img->comps[2].h = maxh;
|
||||
#else
|
||||
img->comps[1].w = (OPJ_UINT32)maxw; img->comps[1].h = (OPJ_UINT32)maxh;
|
||||
img->comps[2].w = (OPJ_UINT32)maxw; img->comps[2].h = (OPJ_UINT32)maxh;
|
||||
#endif
|
||||
img->comps[1].dx = img->comps[0].dx;
|
||||
img->comps[2].dx = img->comps[0].dx;
|
||||
img->comps[1].dy = img->comps[0].dy;
|
||||
|
|
|
@ -32,6 +32,10 @@ foreach(exe
|
|||
${MJ2_SRCS}
|
||||
${OPENJPEG_SOURCE_DIR}/src/bin/common/color.c
|
||||
)
|
||||
set_property(
|
||||
TARGET ${exe}
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS USE_MJ2
|
||||
)
|
||||
target_link_libraries(${exe} ${LCMS_LIBNAME} openmj2)
|
||||
|
||||
if(UNIX)
|
||||
|
|
Loading…
Reference in New Issue