summaryrefslogtreecommitdiff
path: root/src/bin/jp2
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2022-08-11 18:06:21 +0200
committerEven Rouault <even.rouault@spatialys.com>2022-08-11 18:12:07 +0200
commitc06632c6f6d0a3e106374fe462869b131366c2d0 (patch)
tree6d5682cbd92c75099b82a6a9c933b43560887d96 /src/bin/jp2
parent3d9bcd37534ce1166e1f0a7764faf69bea4d89b1 (diff)
Cleanup code related to quality layer allocation, and add a few safety checks
Diffstat (limited to 'src/bin/jp2')
-rw-r--r--src/bin/jp2/opj_compress.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/bin/jp2/opj_compress.c b/src/bin/jp2/opj_compress.c
index fc9b7c12..8ba3b6d7 100644
--- a/src/bin/jp2/opj_compress.c
+++ b/src/bin/jp2/opj_compress.c
@@ -846,7 +846,7 @@ static int parse_cmdline_encoder(int argc, char **argv,
/* ----------------------------------------------------- */
- case 'q': { /* add fixed_quality */
+ case 'q': { /* layer allocation by distortion ratio (PSNR) */
char *s = opj_optarg;
while (sscanf(s, "%f", &parameters->tcp_distoratio[parameters->tcp_numlayers])
== 1) {
@@ -866,7 +866,7 @@ static int parse_cmdline_encoder(int argc, char **argv,
/* dda */
/* ----------------------------------------------------- */
- case 'f': { /* mod fixed_quality (before : -q) */
+ case 'f': { /* layer allocation by fixed layer */
int *row = NULL, *col = NULL;
OPJ_UINT32 numlayers = 0, numresolution = 0, matrix_width = 0;
@@ -1812,7 +1812,7 @@ static int parse_cmdline_encoder(int argc, char **argv,
parameters->cp_fixed_quality))) {
fprintf(stderr, "[ERROR] options -r -q and -f cannot be used together !!\n");
return 1;
- } /* mod fixed_quality */
+ }
/* if no rate entered, lossless by default */