public void testIntersects()
{
byte[] codecHeader = new byte[] {0x10, 0x11};
byte[] codecHeader2 = new byte[] {0x10, 0x05};
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat(null, new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("abc", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("abc", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", null, 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 3), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), -1, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 3000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), -1, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, null, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, null, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.intArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.intArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, -1.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, -1.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 3.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, -1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, -1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 2, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, -1, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, -1, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 12, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, -1, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, -1, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 13, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, -1, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, -1, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 14, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, -1, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, -1, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 15, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, -1, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, -1, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 16, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, -1, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, -1, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 8, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, null)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, null)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));
assertEquals(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader)
.intersects(
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader2)),
new AviVideoFormat("xyz", new Dimension(1, 2), 2000, Format.byteArray, 2.f, 1, 2, 3, 4, 5, 6, 7, codecHeader));