compSpecParams[ci - 1] = compParam;
compSpecParams[ci] = compParam;
	void initializeComponentParameters() {		int nf = getNumberOfImageComponents();		componentIdentifiers = new int[nf];		int[][] compSpecParams = new int[0][];		int hmax = 1;		int vmax = 1;		for (int i = 0; i < nf; i++) {			int ofs = i * 3 + 10;			int ci = reference[ofs] & 0xFF;			componentIdentifiers[i] = ci - 1;			int hi = (reference[ofs + 1] & 0xFF) / 16;			int vi = (reference[ofs + 1] & 0xFF) % 16;			int tqi = reference[ofs + 2] & 0xFF;			if (hi > hmax) {				hmax = hi;			}			if (vi > vmax) {				vmax = vi;			}			int[] compParam = new int[5];			compParam[0] = tqi;			compParam[1] = hi;			compParam[2] = vi;			if (compSpecParams.length < ci) {				int[][] newParams = new int[ci][];				System.arraycopy(compSpecParams, 0, newParams, 0, compSpecParams.length);				compSpecParams = newParams;			}			compSpecParams[ci - 1] = compParam;		}		int x = getSamplesPerLine();		int y = getNumberOfLines();		int[] multiples = new int[] { 8, 16, 24, 32 };		for (int i = 0; i < nf; i++) {			int[] compParam = compSpecParams[componentIdentifiers[i]];			int hi = compParam[1];			int vi = compParam[2];			int compWidth = (x * hi + hmax - 1) / hmax;			int compHeight = (y * vi + vmax - 1) / vmax;			int dsWidth = roundUpToMultiple(compWidth, multiples[hi - 1]);			int dsHeight = roundUpToMultiple(compHeight, multiples[vi - 1]);			compParam[3] = dsWidth;			compParam[4] = dsHeight;		}		setMaxHFactor(hmax);		setMaxVFactor(vmax);		componentParameters = compSpecParams;	}