Ejemplo n.º 1
0
		@Override
		public byte[] cvtPixelFormat(final byte[] input, final byte[] output,
				final int width, final int height) {
			/* COLOR_TI_FormatYUV420PackedSemiPlanar is NV12.
			 * We could set the preview to NV21, which is alike but with U and V reversed and
			 * convert from there by just flipping 2 bytes.
			 * What we do now is we take the common YV12 preview format and have a slightly
			 * more expensive conversion.
			 */
			return PixelFormat.YV12toYUV420PackedSemiPlanar(input,
					output, width, height);
		}
Ejemplo n.º 2
0
		@Override
		public byte[] cvtPixelFormat(byte[] input, byte[] output, int width,
				int height) {
			return PixelFormat.YV12toYUV420Planar(input, output, width,
					height);
		}