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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-03-10 14:39:37 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-03-10 14:39:37 +0300
commit0ec0f2a02fb4d6e87db8fe8c7b9027ceab0263af (patch)
tree20ca8b404098b87ac8539578809b852ce829a988 /source/blender/imbuf/intern/cineon/cineonlib.c
parent397ece000812b6acd96f4131c1e2f31cd72be0ab (diff)
Add an option for saving/loading DPX with in log color space with
reference black, reference white and gamma. Added 16 bit TIFF saving. This needs more work to cleanup code and add 16 bit TIFF reading, but committing it now so it can be tested.
Diffstat (limited to 'source/blender/imbuf/intern/cineon/cineonlib.c')
-rw-r--r--source/blender/imbuf/intern/cineon/cineonlib.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/cineon/cineonlib.c b/source/blender/imbuf/intern/cineon/cineonlib.c
index 20f4e0d4de4..3b45a9de822 100644
--- a/source/blender/imbuf/intern/cineon/cineonlib.c
+++ b/source/blender/imbuf/intern/cineon/cineonlib.c
@@ -350,8 +350,10 @@ cineonGetRowBytes(CineonFile* cineon, unsigned short* row, int y) {
/* extract required pixels */
for (pixelIndex = 0; pixelIndex < numPixels; ++pixelIndex) {
- /* row[pixelIndex] = cineon->lut10[cineon->pixelBuffer[pixelIndex]]; */
- row[pixelIndex] = cineon->pixelBuffer[pixelIndex] << 6;
+ if(cineon->params.doLogarithm)
+ row[pixelIndex] = cineon->lut10_16[cineon->pixelBuffer[pixelIndex]];
+ else
+ row[pixelIndex] = cineon->pixelBuffer[pixelIndex] << 6;
}
return 0;
@@ -367,8 +369,10 @@ cineonSetRowBytes(CineonFile* cineon, const unsigned short* row, int y) {
/* put new pixels into pixelBuffer */
for (pixelIndex = 0; pixelIndex < numPixels; ++pixelIndex) {
- /* cineon->pixelBuffer[pixelIndex] = cineon->lut8[row[pixelIndex]]; */
- cineon->pixelBuffer[pixelIndex] = row[pixelIndex] >> 6;
+ if(cineon->params.doLogarithm)
+ cineon->pixelBuffer[pixelIndex] = cineon->lut16_16[row[pixelIndex]];
+ else
+ cineon->pixelBuffer[pixelIndex] = row[pixelIndex] >> 6;
}
/* pack into longwords */