V2/Cet/HW/Cet.HW.Drivers.SureHT1632/CompositionTargetSureHT1632.cs
/// <summary>
/// Conversion of a single section of the cache
/// </summary>
/// <param name="offset"></param>
/// <param name="red"></param>
/// <param name="green"></param>
Conversion of a single section of the cache
Conversion of a single section of the cache
private void GetBufferColumn(
            int offset,
            ref byte red,
            ref byte green)
        {
            int row7 = this._cache[offset];
            int row6 = this._cache[offset + ColumnCount];
            int row5 = this._cache[offset + ColumnCount * 2];
            int row4 = this._cache[offset + ColumnCount * 3];
            int row3 = this._cache[offset + ColumnCount * 4];
            int row2 = this._cache[offset + ColumnCount * 5];
            int row1 = this._cache[offset + ColumnCount * 6];
            int row0 = this._cache[offset + ColumnCount * 7];
            int tempRed =
                ((row0 & Colors.Red) == Colors.Red ? 1 : 0) +
                ((row1 & Colors.Red) == Colors.Red ? 2 : 0) +
                ((row2 & Colors.Red) == Colors.Red ? 4 : 0) +
                ((row3 & Colors.Red) == Colors.Red ? 8 : 0) +
                ((row4 & Colors.Red) == Colors.Red ? 16 : 0) +
                ((row5 & Colors.Red) == Colors.Red ? 32 : 0) +
                ((row6 & Colors.Red) == Colors.Red ? 64 : 0) +
                ((row7 & Colors.Red) == Colors.Red ? 128 : 0);
            int tempGreen =
                ((row0 & Colors.Lime) == Colors.Lime ? 1 : 0) +
                ((row1 & Colors.Lime) == Colors.Lime ? 2 : 0) +
                ((row2 & Colors.Lime) == Colors.Lime ? 4 : 0) +
                ((row3 & Colors.Lime) == Colors.Lime ? 8 : 0) +
                ((row4 & Colors.Lime) == Colors.Lime ? 16 : 0) +
                ((row5 & Colors.Lime) == Colors.Lime ? 32 : 0) +
                ((row6 & Colors.Lime) == Colors.Lime ? 64 : 0) +
                ((row7 & Colors.Lime) == Colors.Lime ? 128 : 0);
            red = (byte)tempRed;
            green = (byte)tempGreen;
        }
private void GetBufferColumn ( int offset , ref byte red , ref byte green ) { int row7 = this . _cache [ offset ] ; int row6 = this . _cache [ offset + ColumnCount ] ; int row5 = this . _cache [ offset + ColumnCount * 2 ] ; int row4 = this . _cache [ offset + ColumnCount * 3 ] ; int row3 = this . _cache [ offset + ColumnCount * 4 ] ; int row2 = this . _cache [ offset + ColumnCount * 5 ] ; int row1 = this . _cache [ offset + ColumnCount * 6 ] ; int row0 = this . _cache [ offset + ColumnCount * 7 ] ; int tempRed = ( ( row0 & Colors . Red ) == Colors . Red ? 1 : 0 ) + ( ( row1 & Colors . Red ) == Colors . Red ? 2 : 0 ) + ( ( row2 & Colors . Red ) == Colors . Red ? 4 : 0 ) + ( ( row3 & Colors . Red ) == Colors . Red ? 8 : 0 ) + ( ( row4 & Colors . Red ) == Colors . Red ? 16 : 0 ) + ( ( row5 & Colors . Red ) == Colors . Red ? 32 : 0 ) + ( ( row6 & Colors . Red ) == Colors . Red ? 64 : 0 ) + ( ( row7 & Colors . Red ) == Colors . Red ? 128 : 0 ) ; int tempGreen = ( ( row0 & Colors . Lime ) == Colors . Lime ? 1 : 0 ) + ( ( row1 & Colors . Lime ) == Colors . Lime ? 2 : 0 ) + ( ( row2 & Colors . Lime ) == Colors . Lime ? 4 : 0 ) + ( ( row3 & Colors . Lime ) == Colors . Lime ? 8 : 0 ) + ( ( row4 & Colors . Lime ) == Colors . Lime ? 16 : 0 ) + ( ( row5 & Colors . Lime ) == Colors . Lime ? 32 : 0 ) + ( ( row6 & Colors . Lime ) == Colors . Lime ? 64 : 0 ) + ( ( row7 & Colors . Lime ) == Colors . Lime ? 128 : 0 ) ; red = ( byte ) tempRed ; green = ( byte ) tempGreen ; }
Conversion of a single section of the cache
Conversion of a single section of the cache
//int row0 = this._cache[offset]; //int row1 = this._cache[offset + ColumnCount]; //int row2 = this._cache[offset + ColumnCount * 2]; //int row3 = this._cache[offset + ColumnCount * 3]; //int row4 = this._cache[offset + ColumnCount * 4]; //int row5 = this._cache[offset + ColumnCount * 5]; //int row6 = this._cache[offset + ColumnCount * 6]; //int row7 = this._cache[offset + ColumnCount * 7];
offset
int
None
byte
ref
red
None
green
None