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

« back to all changes in this revision

Viewing changes to source/blender/imbuf/IMB_imbuf.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:
70
70
#ifndef __IMB_IMBUF_H__
71
71
#define __IMB_IMBUF_H__
72
72
 
 
73
#define IM_MAX_SPACE 64
 
74
 
73
75
/**
74
76
 *
75
77
 * \attention defined in ???
82
84
 */
83
85
struct anim;
84
86
 
 
87
struct ColorManagedDisplay;
 
88
 
85
89
/**
86
90
 *
87
91
 * \attention Defined in allocimbuf.c
93
97
 *
94
98
 * \attention Defined in readimage.c
95
99
 */
96
 
struct ImBuf *IMB_ibImageFromMemory(unsigned char *mem, size_t size,
97
 
                                    int flags, const char *descr);
 
100
struct ImBuf *IMB_ibImageFromMemory(unsigned char *mem, size_t size, int flags, char colorspace[IM_MAX_SPACE], const char *descr);
98
101
 
99
102
/**
100
103
 *
106
109
 *
107
110
 * \attention Defined in readimage.c
108
111
 */
109
 
struct ImBuf *IMB_loadiffname(const char *filepath, int flags);
 
112
struct ImBuf *IMB_loadiffname(const char *filepath, int flags, char colorspace[IM_MAX_SPACE]);
110
113
 
111
114
/**
112
115
 *
245
248
 *
246
249
 * \attention Defined in anim_movie.c
247
250
 */
248
 
struct anim *IMB_open_anim(const char *name, int ib_flags, int streamindex);
 
251
struct anim *IMB_open_anim(const char *name, int ib_flags, int streamindex, char colorspace[IM_MAX_SPACE]);
249
252
void IMB_close_anim(struct anim *anim);
250
253
void IMB_close_anim_proxies(struct anim *anim);
251
254
 
368
371
void IMB_rect_from_float(struct ImBuf *ibuf);
369
372
/* Create char buffer for part of the image, color corrected if necessary,
370
373
 * Changed part will be stored in buffer. This is expected to be used for texture painting updates */
371
 
void IMB_partial_rect_from_float(struct ImBuf *ibuf, float *buffer, int x, int y, int w, int h);
 
374
void IMB_partial_rect_from_float(struct ImBuf *ibuf, float *buffer, int x, int y, int w, int h, int is_data);
372
375
void IMB_float_from_rect(struct ImBuf *ibuf);
373
 
void IMB_float_from_rect_simple(struct ImBuf *ibuf); /* no profile conversion */
374
 
/* note, check that the conversion exists, only some are supported */
375
 
void IMB_convert_profile(struct ImBuf *ibuf, int profile);
376
 
float *IMB_float_profile_ensure(struct ImBuf *ibuf, int profile, int *alloc);
377
376
void IMB_color_to_bw(struct ImBuf *ibuf);
378
377
void IMB_saturation(struct ImBuf *ibuf, float sat);
379
378
 
391
390
        int profile_to, int profile_from, int predivide,
392
391
        int width, int height, int stride_to, int stride_from);
393
392
void IMB_buffer_float_clamp(float *buf, int width, int height);
 
393
void IMB_buffer_float_unpremultiply(float *buf, int width, int height);
 
394
void IMB_buffer_float_premultiply(float *buf, int width, int height);
394
395
 
395
396
/**
396
397
 * Change the ordering of the color bytes pointed to by rect from
405
406
 * \attention defined in imageprocess.c
406
407
 */
407
408
void bicubic_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
408
 
void neareast_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
 
409
void nearest_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
409
410
void bilinear_interpolation(struct ImBuf *in, struct ImBuf *out, float u, float v, int xout, int yout);
410
411
 
411
 
void bicubic_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v);
412
 
void neareast_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v);
413
 
void bilinear_interpolation_color(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v);
414
 
void bilinear_interpolation_color_wrap(struct ImBuf *in, unsigned char *col, float *col_float, float u, float v);
 
412
void bicubic_interpolation_color(struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
 
413
void nearest_interpolation_color(struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
 
414
void bilinear_interpolation_color(struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
 
415
void bilinear_interpolation_color_wrap(struct ImBuf *in, unsigned char col[4], float col_float[4], float u, float v);
 
416
 
 
417
void IMB_alpha_under_color_float(float *rect_float, int x, int y, float backcol[3]);
 
418
void IMB_alpha_under_color_byte(unsigned char *rect, int x, int y, float backcol[3]);
415
419
 
416
420
/**
417
421
 *
418
422
 * \attention defined in readimage.c
419
 
 * \deprecated Only here for backwards compatibility of the
420
 
 * \deprecated plugin system.
421
423
 */  
422
 
struct ImBuf *IMB_loadifffile(int file, int flags, const char *descr);
 
424
struct ImBuf *IMB_loadifffile(int file, int flags, char colorspace[IM_MAX_SPACE], const char *descr);
423
425
 
424
426
/**
425
427
 *
467
469
/* Premultiply alpha */
468
470
 
469
471
void IMB_premultiply_alpha(struct ImBuf *ibuf);
 
472
void IMB_unpremultiply_alpha(struct ImBuf *ibuf);
470
473
 
471
474
/**
472
475
 *
480
483
 * \attention Defined in rectop.c
481
484
 */
482
485
void IMB_rectfill(struct ImBuf *drect, const float col[4]);
483
 
void IMB_rectfill_area(struct ImBuf *ibuf, float *col, int x1, int y1, int x2, int y2);
 
486
void IMB_rectfill_area(struct ImBuf *ibuf, const float col[4], int x1, int y1, int x2, int y2, struct ColorManagedDisplay *display);
484
487
void IMB_rectfill_alpha(struct ImBuf *ibuf, const float value);
485
488
 
486
489
/* this should not be here, really, we needed it for operating on render data, IMB_rectfill_area calls it */
487
 
void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height, const float col[4], int x1, int y1, int x2, int y2);
 
490
void buf_rectfill_area(unsigned char *rect, float *rectf, int width, int height,
 
491
                       const float col[4], struct ColorManagedDisplay *display,
 
492
                       int x1, int y1, int x2, int y2);
488
493
 
489
494
/* defined in metadata.c */
490
495
int IMB_metadata_change_field(struct ImBuf *img, const char *key, const char *field);
500
505
short imb_addtilesImBuf(struct ImBuf *ibuf);
501
506
void imb_freetilesImBuf(struct ImBuf *ibuf);
502
507
 
 
508
/* threaded processors */
 
509
void IMB_processor_apply_threaded(int buffer_lines, int handle_size, void *init_customdata,
 
510
                                  void (init_handle) (void *handle, int start_line, int tot_line,
 
511
                                                      void *customdata),
 
512
                                  void *(do_thread) (void *));
 
513
 
 
514
/* ffmpeg */
 
515
void IMB_ffmpeg_init(void);
 
516
const char *IMB_ffmpeg_last_error(void);
 
517
 
503
518
#endif
504
519