Exemplo n.º 1
0
 void CreateLut3DOp(OpRcPtrVec & ops,
                    Lut3DRcPtr lut,
                    Interpolation interpolation,
                    TransformDirection direction)
 {
     ops.push_back( OpRcPtr(new Lut3DOp(lut, interpolation, direction)) );
 }
Exemplo n.º 2
0
 void CreateMatrixOffsetOp(OpRcPtrVec & ops,
                           const float * m44, const float * offset4,
                           TransformDirection direction)
 {
     bool mtxIsIdentity = IsM44Identity(m44);
     bool offsetIsIdentity = IsVecEqualToZero(offset4, 4);
     if(mtxIsIdentity && offsetIsIdentity) return;
     
     ops.push_back( OpRcPtr(new MatrixOffsetOp(m44,
         offset4, direction)) );
 }
Exemplo n.º 3
0
 void CreateLut1DOp(OpRcPtrVec & ops,
                    const Lut1DRcPtr & lut,
                    Interpolation interpolation,
                    TransformDirection direction)
 {
     if(lut->isNoOp()) return;
     
     // TODO: Detect if lut1d can be exactly approximated as y = mx + b
     // If so, return a mtx instead.
     
     ops.push_back( OpRcPtr(new Lut1DOp(lut, interpolation, direction)) );
 }
Exemplo n.º 4
0
    void CreateIdentityMatrixOp(OpRcPtrVec & ops,
                                TransformDirection direction)
    {
        float matrix[16];
        memset(matrix, 0, 16 * sizeof(float));
        matrix[0] = 1.0f;
        matrix[5] = 1.0f;
        matrix[10] = 1.0f;
        matrix[15] = 1.0f;
        float offset[4] = { 0.0f, 0.0f, 0.0f, 0.0f };

        ops.push_back(MatrixOffsetOpRcPtr(new MatrixOffsetOp(matrix,
            offset, direction)));
    }