Package net.fec.openrq.decoder

Examples of net.fec.openrq.decoder.SourceBlockState


        try {
            final int sbn = readSBN(buffer, fecParams);
            final int K = DataUtils.getK(fecParams, sbn);

            final SourceBlockState state = readState(buffer);

            final int numMiss = readNumMissingSourceSymbols(buffer, K, state);
            final Set<Integer> missing = readMissingSourceSymbols(buffer, numMiss, K);

            final int numAvail = readNumAvailableRepairSymbols(buffer, K, state);
View Full Code Here


        try {
            final int sbn = readSBN(in, fecParams);
            final int K = DataUtils.getK(fecParams, sbn);

            final SourceBlockState state = readState(in);

            final int numMiss = readNumMissingSourceSymbols(in, K, state);
            final Set<Integer> missing = readMissingSourceSymbols(in, numMiss, K);

            final int numAvail = readNumAvailableRepairSymbols(in, K, state);
View Full Code Here

            final ByteBuffer sbnAndStateBuf = ByteBuffer.allocate(SizeOf.BYTE + SizeOf.BYTE);
            ExtraChannels.readBytes(ch, sbnAndStateBuf, BufferOperation.FLIP_ABSOLUTELY);

            final int sbn = readSBN(sbnAndStateBuf, fecParams);
            final int K = DataUtils.getK(fecParams, sbn);
            final SourceBlockState state = readState(sbnAndStateBuf);

            final ByteBuffer numMissBuf = ByteBuffer.allocate(SizeOf.SHORT);
            ExtraChannels.readBytes(ch, numMissBuf, BufferOperation.FLIP_ABSOLUTELY);

            final int numMiss = readNumMissingSourceSymbols(numMissBuf, K, state);
View Full Code Here

        if (buf.remaining() < SizeOf.BYTE) {
            throw new InternalParsingException("source block state is missing");
        }

        final SourceBlockState state = byteToState(buf.get());
        return checkState(state);
    }
View Full Code Here

        return checkState(state);
    }

    private static SourceBlockState readState(DataInput in) throws IOException, InternalParsingException {

        final SourceBlockState state = byteToState(in.readByte());
        return checkState(state);
    }
View Full Code Here

        for (SourceBlockEncoder sbEnc : enc.sourceBlockIterable()) {
            final int K = sbEnc.numberOfSourceSymbols();
            final Set<Integer> esis = TestingCommon.randomAnyESIs(RAND, K + MAX_EXTRA_SYMBOLS);
            final Iterator<Integer> esiIter = esis.iterator();
            SourceBlockState sbState = SourceBlockState.INCOMPLETE;

            // this should loop K times
            while (sbState == SourceBlockState.INCOMPLETE) {
                final EncodingPacket packet = sbEnc.encodingPacket(esiIter.next());
                final SourceBlockDecoder sbDec = dec.sourceBlock(packet.sourceBlockNumber());
View Full Code Here

TOP

Related Classes of net.fec.openrq.decoder.SourceBlockState

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.