Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2015-07-27 23:34:55 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2015-07-27 23:36:39 +0300
commit72e821bacc5090368811c2207faf1d0edc42e9c9 (patch)
treeae57954ae5451b885b921978ff9a5ff69867767d /source/blender/imbuf/intern
parent4706773eaf45f0563fe7e7b89fedd9cea52b27b8 (diff)
Jpeg2000: Fixed for DCP pipeline
Profile and color space were not properly set. Conflicts: source/blender/imbuf/intern/jp2.c
Diffstat (limited to 'source/blender/imbuf/intern')
-rw-r--r--source/blender/imbuf/intern/jp2.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/jp2.c b/source/blender/imbuf/intern/jp2.c
index 8750b825fb6..e8dd8a8c200 100644
--- a/source/blender/imbuf/intern/jp2.c
+++ b/source/blender/imbuf/intern/jp2.c
@@ -58,6 +58,11 @@ typedef struct img_folder {
float *rates;
} img_fol_t;
+enum {
+ DCP_CINEMA2K = 3,
+ DCP_CINEMA4K = 4,
+};
+
static int check_jp2(unsigned char *mem) /* J2K_CFMT */
{
return memcmp(JP2_HEAD, mem, sizeof(JP2_HEAD)) ? 0 : 1;
@@ -458,7 +463,6 @@ static void cinema_parameters(opj_cparameters_t *parameters)
/* 9-7 transform */
parameters->irreversible = 1;
-
}
static void cinema_setup_encoder(opj_cparameters_t *parameters, opj_image_t *image, img_fol_t *img_fol)
@@ -478,6 +482,9 @@ static void cinema_setup_encoder(opj_cparameters_t *parameters, opj_image_t *ima
image->comps[0].w, image->comps[0].h);
parameters->cp_rsiz = STD_RSIZ;
}
+ else {
+ parameters->cp_rsiz = DCP_CINEMA2K;
+ }
break;
case CINEMA4K_24:
@@ -493,6 +500,9 @@ static void cinema_setup_encoder(opj_cparameters_t *parameters, opj_image_t *ima
image->comps[0].w, image->comps[0].h);
parameters->cp_rsiz = STD_RSIZ;
}
+ else {
+ parameters->cp_rsiz = DCP_CINEMA2K;
+ }
parameters->numpocs = initialise_4K_poc(parameters->POC, parameters->numresolution);
break;
case OFF:
@@ -606,7 +616,7 @@ static opj_image_t *ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters)
cinema_parameters(parameters);
}
- color_space = CLRSPC_SYCC;
+ color_space = (ibuf->foptions.flag & JP2_YCC) ? CLRSPC_SYCC : CLRSPC_SRGB;
prec = 12;
numcomps = 3;
}