~ubuntu-branches/ubuntu/maverick/blender/maverick

« back to all changes in this revision

Viewing changes to source/blender/blenkernel/intern/colortools.c

  • Committer: Bazaar Package Importer
  • Author(s): Khashayar Naderehvandi, Khashayar Naderehvandi, Alessio Treglia
  • Date: 2009-01-22 16:53:59 UTC
  • mfrom: (14.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20090122165359-v0996tn7fbit64ni
Tags: 2.48a+dfsg-1ubuntu1
[ Khashayar Naderehvandi ]
* Merge from debian experimental (LP: #320045), Ubuntu remaining changes:
  - Add patch correcting header file locations.
  - Add libvorbis-dev and libgsm1-dev to Build-Depends.
  - Use avcodec_decode_audio2() in source/blender/src/hddaudio.c

[ Alessio Treglia ]
* Add missing previous changelog entries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* 
2
 
 * $Id: colortools.c 14310 2008-04-01 21:09:50Z zaghaghi $
 
2
 * $Id: colortools.c 16632 2008-09-20 13:02:06Z ton $
3
3
 *
4
4
 * ***** BEGIN GPL LICENSE BLOCK *****
5
5
 *
650
650
        vecout[2]= curvemap_evaluateF(cumap->cm+2, fac);
651
651
}
652
652
 
653
 
#define FTOCHAR(val) val<=0.0f?0: (val>=1.0f?255: (char)(255.0f*val))
654
653
 
655
654
void curvemapping_do_ibuf(CurveMapping *cumap, ImBuf *ibuf)
656
655
{
730
729
                        curvemap_make_table(cumap->cm+a, &cumap->clipr);
731
730
        }
732
731
}
 
732
 
 
733
void curvemapping_table_RGBA(CurveMapping *cumap, float **array, int *size)
 
734
{
 
735
        int a;
 
736
        
 
737
        *size = CM_TABLE+1;
 
738
        *array = MEM_callocN(sizeof(float)*(*size)*4, "CurveMapping");
 
739
        curvemapping_initialize(cumap);
 
740
 
 
741
        for(a=0; a<*size; a++) {
 
742
                if(cumap->cm[0].table)
 
743
                        (*array)[a*4+0]= cumap->cm[0].table[a].y;
 
744
                if(cumap->cm[1].table)
 
745
                        (*array)[a*4+1]= cumap->cm[1].table[a].y;
 
746
                if(cumap->cm[2].table)
 
747
                        (*array)[a*4+2]= cumap->cm[2].table[a].y;
 
748
                if(cumap->cm[3].table)
 
749
                        (*array)[a*4+3]= cumap->cm[3].table[a].y;
 
750
        }
 
751
}
 
752