~siretart/ubuntu/utopic/blender/libav10

« back to all changes in this revision

Viewing changes to source/blender/imbuf/intern/filetype.c

  • Committer: Package Import Robot
  • Author(s): Matteo F. Vescovi
  • Date: 2012-07-23 08:54:18 UTC
  • mfrom: (14.2.16 sid)
  • mto: (14.2.19 sid)
  • mto: This revision was merged to the branch mainline in revision 42.
  • Revision ID: package-import@ubuntu.com-20120723085418-9foz30v6afaf5ffs
Tags: 2.63a-2
* debian/: Cycles support added (Closes: #658075)
  For now, this top feature has been enabled only
  on [any-amd64 any-i386] architectures because
  of OpenImageIO failing on all others
* debian/: scripts installation path changed
  from /usr/lib to /usr/share:
  + debian/patches/: patchset re-worked for path changing
  + debian/control: "Breaks" field added on yafaray-exporter

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * $Id: filetype.c 29115 2010-06-01 01:01:25Z broken $
3
 
 *
4
2
 * ***** BEGIN GPL LICENSE BLOCK *****
5
3
 *
6
4
 * This program is free software; you can redistribute it and/or
22
20
 * ***** END GPL LICENSE BLOCK *****
23
21
 */
24
22
 
 
23
/** \file blender/imbuf/intern/filetype.c
 
24
 *  \ingroup imbuf
 
25
 */
 
26
 
 
27
 
 
28
#include <stddef.h>
25
29
#include "IMB_imbuf.h"
26
30
#include "IMB_imbuf_types.h"
27
31
#include "IMB_filetype.h"
44
48
#if defined(__APPLE__) && defined(IMBUF_COCOA)
45
49
static int imb_ftype_cocoa(ImFileType *type, ImBuf *ibuf) { return (ibuf->ftype & TIF); }
46
50
#endif
47
 
static int imb_ftype_iris(ImFileType *type, ImBuf *ibuf) { return (ibuf->ftype == IMAGIC); }
 
51
static int imb_ftype_iris(ImFileType *type, ImBuf *ibuf) { (void)type; return (ibuf->ftype == IMAGIC); }
48
52
#ifdef WITH_QUICKTIME
49
53
static int imb_ftype_quicktime(ImFileType *type, ImBuf *ibuf) { return 0; } // XXX
50
54
#endif
55
59
#endif
56
60
 
57
61
ImFileType IMB_FILE_TYPES[]= {
58
 
        {NULL, NULL, imb_is_a_iris, imb_ftype_iris, imb_loadiris, imb_saveiris, NULL, 0, IMAGIC},
59
62
        {NULL, NULL, imb_is_a_jpeg, imb_ftype_default, imb_load_jpeg, imb_savejpeg, NULL, 0, JPG},
60
63
        {NULL, NULL, imb_is_a_png, imb_ftype_default, imb_loadpng, imb_savepng, NULL, 0, PNG},
61
64
        {NULL, NULL, imb_is_a_bmp, imb_ftype_default, imb_bmp_decode, imb_savebmp, NULL, 0, BMP},
62
65
        {NULL, NULL, imb_is_a_targa, imb_ftype_default, imb_loadtarga, imb_savetarga, NULL, 0, TGA},
 
66
        {NULL, NULL, imb_is_a_iris, imb_ftype_iris, imb_loadiris, imb_saveiris, NULL, 0, IMAGIC},
 
67
#ifdef WITH_CINEON
63
68
        {NULL, NULL, imb_is_dpx, imb_ftype_default, imb_loaddpx, imb_save_dpx, NULL, IM_FTYPE_FLOAT, DPX},
64
69
        {NULL, NULL, imb_is_cineon, imb_ftype_default, imb_loadcineon, imb_savecineon, NULL, IM_FTYPE_FLOAT, CINEON},
 
70
#endif
65
71
#ifdef WITH_TIFF
66
72
        {imb_inittiff, NULL, imb_is_a_tiff, imb_ftype_default, imb_loadtiff, imb_savetiff, imb_loadtiletiff, 0, TIF},
67
73
#elif defined(__APPLE__) && defined(IMBUF_COCOA)
68
74
        {NULL, NULL, imb_is_a_cocoa, imb_ftype_cocoa, imb_imb_cocoaLoadImage, imb_savecocoa, NULL, 0, TIF},
69
75
#endif
 
76
#ifdef WITH_HDR
70
77
        {NULL, NULL, imb_is_a_hdr, imb_ftype_default, imb_loadhdr, imb_savehdr, NULL, IM_FTYPE_FLOAT, RADHDR},
 
78
#endif
71
79
#ifdef WITH_OPENEXR
72
 
        {NULL, NULL, imb_is_a_openexr, imb_ftype_default, imb_load_openexr, imb_save_openexr, NULL, IM_FTYPE_FLOAT, OPENEXR},
 
80
        {imb_initopenexr, NULL, imb_is_a_openexr, imb_ftype_default, imb_load_openexr, imb_save_openexr, NULL, IM_FTYPE_FLOAT, OPENEXR},
73
81
#endif
74
82
#ifdef WITH_OPENJPEG
75
83
        {NULL, NULL, imb_is_a_jp2, imb_ftype_default, imb_jp2_decode, imb_savejp2, NULL, IM_FTYPE_FLOAT, JP2},
80
88
#ifdef WITH_QUICKTIME
81
89
        {quicktime_init, quicktime_exit, imb_is_a_quicktime, imb_ftype_quicktime, imb_quicktime_decode, NULL, NULL, 0, QUICKTIME},
82
90
#endif  
83
 
        {NULL, NULL, NULL, NULL, NULL, NULL, 0}};
 
91
        {NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0}};
84
92
        
85
93
void imb_filetypes_init(void)
86
94
{
87
95
        ImFileType *type;
88
96
 
89
 
        for(type=IMB_FILE_TYPES; type->is_a; type++)
90
 
                if(type->init)
 
97
        for (type=IMB_FILE_TYPES; type->is_a; type++)
 
98
                if (type->init)
91
99
                        type->init();
92
100
}
93
101
 
95
103
{
96
104
        ImFileType *type;
97
105
 
98
 
        for(type=IMB_FILE_TYPES; type->is_a; type++)
99
 
                if(type->exit)
 
106
        for (type=IMB_FILE_TYPES; type->is_a; type++)
 
107
                if (type->exit)
100
108
                        type->exit();
101
109
}
102
110