private int checkPaddingNeeded() {
		int i = 0, j = 3*mSize/2-1, max = 0;
		int[] r = new int[NB_DECODED];
		for (int k=0;k<NB_DECODED;k++) {
			if (mDecodedVideo[k] != null) {
				i = 0;
				while (i<j && (mDecodedVideo[k][j-i]&0xFF)<50) i+=2;
				if (i>0) {
					r[k] = ((i>>6)<<6);
					max = r[k]>max ? r[k] : max;
					if (VERBOSE) Log.e(TAG,"Padding needed: "+r[k]);
				} else {
					if (VERBOSE) Log.v(TAG,"No padding needed.");
				}
			}
		}

		return ((max>>6)<<6);
	}
Compares the Y pane of the initial image, and the Y pane
after having encoded & decoded the image.
src/net/majorkernelpanic/streaming/hw/EncoderDebugger.java