diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-10-21 12:43:50 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-10-21 14:13:58 +0200 |
| commit | 0b5d62684fe360e098e3bccaef02ee3e9781cec4 (patch) | |
| tree | 0fa0b5ec1b13612115b847bdc3d1da4fba40ae67 /src/lib/openjp2/j2k.c | |
| parent | 3835f37084c762dc7a14b3e995bc005cf584de7c (diff) | |
API: deprecate 'bpp' member in favor of 'prec'
in opj_image_comp and opj_image_comptparm structures.
bpp was redundant with prec, and almost never set by the library, except
by opj_image_create(). This change should hopefully not impact existing,
working, users of the API, which should already have used prec to get
things working.
Fixes #1379
Diffstat (limited to 'src/lib/openjp2/j2k.c')
| -rw-r--r-- | src/lib/openjp2/j2k.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c index c45e4dbd..3bfe8020 100644 --- a/src/lib/openjp2/j2k.c +++ b/src/lib/openjp2/j2k.c @@ -6975,7 +6975,7 @@ static OPJ_BOOL opj_j2k_is_cinema_compliant(opj_image_t *image, OPJ_UINT16 rsiz, /* Bitdepth */ for (i = 0; i < image->numcomps; i++) { - if ((image->comps[i].bpp != 12) | (image->comps[i].sgnd)) { + if ((image->comps[i].prec != 12) | (image->comps[i].sgnd)) { char signed_str[] = "signed"; char unsigned_str[] = "unsigned"; char *tmp_str = image->comps[i].sgnd ? signed_str : unsigned_str; @@ -6984,7 +6984,7 @@ static OPJ_BOOL opj_j2k_is_cinema_compliant(opj_image_t *image, OPJ_UINT16 rsiz, "Precision of each component shall be 12 bits unsigned" "-> At least component %d of input image (%d bits, %s) is not compliant\n" "-> Non-profile-3 codestream will be generated\n", - i, image->comps[i].bpp, tmp_str); + i, image->comps[i].prec, tmp_str); return OPJ_FALSE; } } @@ -7275,7 +7275,7 @@ static OPJ_BOOL opj_j2k_is_imf_compliant(opj_cparameters_t *parameters, /* Bitdepth */ for (i = 0; i < image->numcomps; i++) { - if (!(image->comps[i].bpp >= 8 && image->comps[i].bpp <= 16) || + if (!(image->comps[i].prec >= 8 && image->comps[i].prec <= 16) || (image->comps[i].sgnd)) { char signed_str[] = "signed"; char unsigned_str[] = "unsigned"; @@ -7284,7 +7284,7 @@ static OPJ_BOOL opj_j2k_is_imf_compliant(opj_cparameters_t *parameters, "IMF profiles require precision of each component to b in [8-16] bits unsigned" "-> At least component %d of input image (%d bits, %s) is not compliant\n" "-> Non-IMF codestream will be generated\n", - i, image->comps[i].bpp, tmp_str); + i, image->comps[i].prec, tmp_str); ret = OPJ_FALSE; } } |
