Exemplo n.º 1
0
        void FloorCurveDecode( Mapping mapping )
        {
            for( int i = 0; i < channels; i++ ) {
                int submapNum = mapping.mux[i];
                int floorNum = mapping.submapFloor[submapNum];

                Floor floor = floorConfigs[floorNum];
                noResidue[i] = (bool)floor.ReadPerPacketData( this, bitReader, null );
            }

            // nonezero vector propagate
            for( int i = 0; i < mapping.couplingSteps; i++ ) {
                if( !noResidue[mapping.magnitude[i]] || !noResidue[mapping.angle[i]] ) {
                    noResidue[mapping.magnitude[i]] = false;
                    noResidue[mapping.angle[i]] = false;
                }
            }
        }
 void ReadMappingsSetup( int count )
 {
     mappingConfigs = new Mapping[count];
     for( int i = 0; i < mappingConfigs.Length; i++ ) {
         int mappingType = bitReader.ReadBits( 16 );
         Mapping mapping = null;
         if( mappingType == 0 ) {
             mapping = new Mapping();
         } else {
             throw new InvalidDataException( "Invalid mapping type: " + mappingType );
         }
         mapping.ReadSetupData( this, bitReader );
         mappingConfigs[i] = mapping;
     }
 }
Exemplo n.º 3
0
 void ResidueDecode( Mapping mapping )
 {
     for( int i = 0; i < mapping.submaps; i++ ) {
         int ch = 0;
         for( int j = 0; j < channels; j++ ) {
             if( mapping.mux[j] == i ) {
                 doNotDecode[ch] = noResidue[j];
                 ch++;
             }
         }
         int residueNum = mapping.submapResidue[i];
         residueArgs.ch = ch;
         residueArgs.doNotDecode = doNotDecode;
         residueConfigs[residueNum].ReadPerPacketData( this, bitReader, residueArgs );
         ch = 0;
         for( int j = 0; j < channels; j++ ) { // TODO: spec seems to suggest <=, look into
             if( mapping.mux[j] == i ) {
                 // TODO: residue_vector[j] = decoded_residue_vector[ch];
                 ch++;
             }
         }
     }
 }
Exemplo n.º 4
0
 void InverseCoupling( Mapping mapping )
 {
     // TODO: inverse coupling
     for( int i = mapping.couplingSteps - 1; i >= 0; i-- ) {
     }
 }