qk[i] = reference[ofs + i + 1];
qk[i] = reference[ofs + i + 1] & 0xFF;
public int[][] getQuantizationTablesValues() {	int[][] values = new int[4][];	int valuesIndex = 0;	int totalLength = getSegmentLength() - 2;	int ofs = 4;	while (totalLength > 64) {		int[] qk = new int[64];		int pq = (reference[ofs] & 0xFF) >> 4;		if (pq == 0) {			for (int i = 0; i < qk.length; i++) {				qk[i] = reference[ofs + i + 1];			}			ofs += 65;			totalLength -= 65;		} else {			for (int i = 0; i < qk.length; i++) {				int idx = (i - 1) * 2 ;				qk[i] = (reference[ofs + idx + 1] & 0xFF) * 256 + (reference[ofs + idx + 2] & 0xFF);			}			ofs += 129;			totalLength -= 129;		}		if (valuesIndex >= values.length) {			int[][] newValues = new int[values.length + 4][];			System.arraycopy(values, 0, newValues, 0, values.length);			values = newValues;		}		values[valuesIndex] = qk;		valuesIndex++;	}	int[][] newValues = new int[valuesIndex][];	System.arraycopy(values, 0, newValues, 0, valuesIndex);	return newValues;}