// Path: app/src/main/java/se/embargo/retroboy/color/IColorDistance.java
// public interface IColorDistance {
// 	/**
// 	 * @return	A number between 0 and 1 indicating the color distance.
// 	 */
// 	public double get(int r1,int g1,int b1, int r2,int g2,int b2);
// }
// 
// Path: app/src/main/java/se/embargo/retroboy/graphic/DitherMatrixes.java
// public class DitherMatrixes {
// 	public static final int[] MATRIX_8x8 = new int[] {
//     	1, 49, 13, 61, 4, 52, 16, 62, 
//     	33, 17, 45, 29, 36, 20, 48, 32, 
//     	9, 57, 5, 53, 12, 60, 8, 56, 
//     	41, 25, 37, 21, 44, 28, 40, 24, 
//     	3, 51, 15, 62, 2, 50, 14, 62, 
//     	35, 19, 47, 31, 34, 18, 46, 30, 
//     	11, 59, 7, 55, 10, 58, 6, 54, 
//     	43, 27, 39, 23, 42, 26, 38, 22};
// 	
// 	public static final int[] MATRIX_4x4 = new int[] {
//     	1, 9, 3, 11, 
//     	13, 5, 15, 7, 
//     	4, 12, 2, 10, 
//     	15, 8, 14, 6};
// 
// 	public static final int[] MATRIX_2x2 = new int[] {
//     	0, 2,
// 		3, 1};
// }


import se.embargo.core.concurrent.IForBody;
import se.embargo.core.concurrent.Parallel;
import se.embargo.retroboy.color.IColorDistance;
import se.embargo.retroboy.graphic.DitherMatrixes;
import android.content.Context;

package se.embargo.retroboy.filter;


/**
 * 3-tone Yliluoma dithering.
 * @link	http://bisqwit.iki.fi/story/howto/dither/jy/
 */
public class YliluomaTriFilter extends AbstractColorFilter {
	/**
	 * Number of integers per bucket.
	 */
	private static final int COLOR_BUCKET_SIZE = 5;

	/**
	 * Dither matrix.
	 */

// Path: app/src/main/java/se/embargo/retroboy/color/IColorDistance.java
// public interface IColorDistance {
// 	/**
// 	 * @return	A number between 0 and 1 indicating the color distance.
// 	 */
// 	public double get(int r1,int g1,int b1, int r2,int g2,int b2);
// }
// 
// Path: app/src/main/java/se/embargo/retroboy/graphic/DitherMatrixes.java
// public class DitherMatrixes {
// 	public static final int[] MATRIX_8x8 = new int[] {
//     	1, 49, 13, 61, 4, 52, 16, 62, 
//     	33, 17, 45, 29, 36, 20, 48, 32, 
//     	9, 57, 5, 53, 12, 60, 8, 56, 
//     	41, 25, 37, 21, 44, 28, 40, 24, 
//     	3, 51, 15, 62, 2, 50, 14, 62, 
//     	35, 19, 47, 31, 34, 18, 46, 30, 
//     	11, 59, 7, 55, 10, 58, 6, 54, 
//     	43, 27, 39, 23, 42, 26, 38, 22};
// 	
// 	public static final int[] MATRIX_4x4 = new int[] {
//     	1, 9, 3, 11, 
//     	13, 5, 15, 7, 
//     	4, 12, 2, 10, 
//     	15, 8, 14, 6};
// 
// 	public static final int[] MATRIX_2x2 = new int[] {
//     	0, 2,
// 		3, 1};
// }


// Path: app/src/main/java/se/embargo/retroboy/filter/YliluomaTriFilter.java
import se.embargo.core.concurrent.IForBody;
import se.embargo.core.concurrent.Parallel;
import se.embargo.retroboy.color.IColorDistance;
import se.embargo.retroboy.graphic.DitherMatrixes;
import android.content.Context;

package se.embargo.retroboy.filter;


/**
 * 3-tone Yliluoma dithering.
 * @link	http://bisqwit.iki.fi/story/howto/dither/jy/
 */
public class YliluomaTriFilter extends AbstractColorFilter {
	/**
	 * Number of integers per bucket.
	 */
	private static final int COLOR_BUCKET_SIZE = 5;

	/**
	 * Dither matrix.
	 */

	private static final int[] _matrix = DitherMatrixes.MATRIX_8x8;
