~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to source/blender/imbuf/intern/cineon/logImageLib.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/** \file blender/imbuf/intern/cineon/logImageLib.h
2
 
 *  \ingroup imbcineon
3
 
 */
4
 
/*
5
 
 *       Common library definitions for Cineon and DPX image files.
6
 
 *
7
 
 *       Copyright 1999,2000,2001 David Hodson <hodsond@acm.org>
8
 
 *
9
 
 *       This program is free software; you can redistribute it and/or modify it
10
 
 *       under the terms of the GNU General Public License as published by the Free
11
 
 *       Software Foundation; either version 2 of the License, or (at your option)
12
 
 *       any later version.
13
 
 *
14
 
 *       This program is distributed in the hope that it will be useful, but
15
 
 *       WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
16
 
 *       or FITNESS FOR A PARTICULAR PURPOSE.    See the GNU General Public License
17
 
 *       for more details.
18
 
 *
19
 
 *       You should have received a copy of the GNU General Public License
20
 
 *       along with this program; if not, write to the Free Software
21
 
 *       Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
 
 *
23
 
 */
24
 
 
25
 
#ifndef __LOGIMAGELIB_H__
26
 
#define __LOGIMAGELIB_H__
27
 
 
28
 
#ifdef __cplusplus
29
 
extern "C" {
30
 
#endif
31
 
 
32
 
/*
33
 
 * Image structure. You don't care what this is.
34
 
 */
35
 
 
36
 
typedef struct _Log_Image_File_t_ LogImageFile;
37
 
 
38
 
/*
39
 
 * Magic numbers for normal and byte-swapped Cineon and Dpx files
40
 
 */
41
 
 
42
 
#define CINEON_FILE_MAGIC 0x802A5FD7
43
 
#define DPX_FILE_MAGIC 0x53445058
44
 
 
45
 
/*
46
 
 * Image 8 bit <-> 10 bit conversion parameters.
47
 
 */
48
 
 
49
 
typedef struct {
50
 
        float gamma;
51
 
        int blackPoint;
52
 
        int whitePoint;
53
 
        int doLogarithm;
54
 
} LogImageByteConversionParameters;
55
 
 
56
 
/* int functions return 0 for OK */
57
 
 
58
 
void logImageSetVerbose(int);
59
 
 
60
 
LogImageFile* logImageOpenFromMem(unsigned char *buffer, unsigned int size, int cineon);
61
 
LogImageFile* logImageOpen(const char* filename, int cineon);
62
 
int logImageGetSize(const LogImageFile* logImage, int* xsize, int* ysize, int* channels);
63
 
LogImageFile* logImageCreate(const char* filename, int cineon, int xsize, int ysize, int channels);
64
 
 
65
 
/* byte conversion routines for mapping logImage (usually) 10 bit values to 8 bit */
66
 
/* see Kodak docs for details... */
67
 
 
68
 
int logImageGetByteConversionDefaults(LogImageByteConversionParameters* params);
69
 
int logImageGetByteConversion(const LogImageFile* logImage, LogImageByteConversionParameters* params);
70
 
int logImageSetByteConversion(LogImageFile* logImage, const LogImageByteConversionParameters* params);
71
 
 
72
 
/* get/set scanline of converted bytes */
73
 
int logImageGetRowBytes(LogImageFile* logImage, unsigned short* row, int y);
74
 
int logImageSetRowBytes(LogImageFile* logImage, const unsigned short* row, int y);
75
 
 
76
 
/* closes file and deletes data */
77
 
void logImageClose(LogImageFile* logImage);
78
 
 
79
 
/* read file and dump header info */
80
 
void logImageDump(const char* filename);
81
 
 
82
 
#ifdef __cplusplus
83
 
}
84
 
#endif
85
 
 
86
 
#endif /* __LOGIMAGELIB_H__ */