Exemplo n.º 1
0
 protected void assertCrEquals(Picture expected, Picture actual) {
   StringBuilder builder = new StringBuilder();
   if (!compareComponentsBlockwise(
       expected.getPlaneData(2),
       actual.getPlaneData(2),
       expected.getWidth() / 2,
       expected.getHeight() / 2,
       builder)) {
     assertTrue(builder.toString(), false);
   }
 }
Exemplo n.º 2
0
 protected void assertFrameEquals(Picture expected, Picture actual) {
   StringBuilder builder = new StringBuilder();
   if (!compareComponentsBlockwise(
       expected.getPlaneData(0),
       actual.getPlaneData(0),
       expected.getWidth(),
       expected.getHeight(),
       builder)) {
     assertTrue("Luma doesn't match: " + builder.toString(), false);
   }
   if (!compareComponentsBlockwise(
       expected.getPlaneData(1),
       actual.getPlaneData(1),
       expected.getWidth() / 2,
       expected.getHeight() / 2,
       builder)) {
     assertTrue("CB doesn't match: " + builder.toString(), false);
   }
   if (!compareComponentsBlockwise(
       expected.getPlaneData(2),
       actual.getPlaneData(2),
       expected.getWidth() / 2,
       expected.getHeight() / 2,
       builder)) {
     assertTrue("CR doesn't match: " + builder.toString(), false);
   }
 }