src/main/java/org/jcodec/algo/DataConvert.java
public static int[] fromByte(byte[] b, int depth, boolean isBe) {
        if (depth == 24)
            if (isBe)
                return from24BE(b);
            else
                return from24LE(b);
        else if (depth == 16)
            if (isBe)
                return from16BE(b);
            else
                return from16LE(b);
        throw new NotSupportedException("Conversion from " + depth + "bit "
                + (isBe ? "big endian" : "little endian") + " is not supported.");
    }
public static int[] fromByte(byte[] b, int depth, boolean isBe) {
        if (depth == 24)
            if (isBe)
                return from24BE(b);
            else
                return from24LE(b);
        else if (depth == 16)
            if (isBe)
                return from16BE(b);
            else
                return from16LE(b);
        throw new NotSupportedException("Conversion from " + depth + "bit "
                + (isBe ? "big endian" : "little endian") + " is not supported.");
    }
Generic byte-array to integer-array conversion

Converts each depth-bit sequence from the input byte array into integer

@param b
Input bytes
@param depth
Bit depth of the integers
@param isBe
If integers are big-endian or little-endian
@return