Example #1
0
 def test_gray16be_inspection(self):
     fmt = VideoFormat("gray16be", 640, 480)
     self.assertEqual(fmt.name, "gray16be")
     self.assertEqual(len(fmt.components), 1)
     self.assertFalse(fmt.is_planar)
     self.assertFalse(fmt.has_palette)
     self.assertFalse(fmt.is_rgb)
     self.assertEqual(fmt.chroma_width(), 640)
     self.assertEqual(fmt.chroma_height(), 480)
     self.assertEqual(fmt.chroma_width(1024), 1024)
     self.assertEqual(fmt.chroma_height(1024), 1024)
     comp = fmt.components[0]
     self.assertEqual(comp.plane, 0)
     self.assertEqual(comp.bits, 16)
     self.assertTrue(comp.is_luma)
     self.assertFalse(comp.is_chroma)
     self.assertEqual(comp.width, 640)
     self.assertEqual(comp.height, 480)
     self.assertFalse(comp.is_alpha)
Example #2
0
 def test_gray16be_inspection(self):
     fmt = VideoFormat('gray16be', 640, 480)
     self.assertEqual(fmt.name, 'gray16be')
     self.assertEqual(len(fmt.components), 1)
     self.assertFalse(fmt.is_planar)
     self.assertFalse(fmt.has_palette)
     self.assertFalse(fmt.is_rgb)
     self.assertEqual(fmt.chroma_width(), 640)
     self.assertEqual(fmt.chroma_height(), 480)
     self.assertEqual(fmt.chroma_width(1024), 1024)
     self.assertEqual(fmt.chroma_height(1024), 1024)
     comp = fmt.components[0]
     self.assertEqual(comp.plane, 0)
     self.assertEqual(comp.bits, 16)
     self.assertTrue(comp.is_luma)
     self.assertFalse(comp.is_chroma)
     self.assertEqual(comp.width, 640)
     self.assertEqual(comp.height, 480)
     self.assertFalse(comp.is_alpha)
Example #3
0
 def test_rgb24_inspection(self):
     fmt = VideoFormat('rgb24', 640, 480)
     self.assertEqual(fmt.name, 'rgb24')
     self.assertEqual(len(fmt.components), 3)
     self.assertFalse(fmt.is_planar)
     self.assertFalse(fmt.has_palette)
     self.assertTrue(fmt.is_rgb)
     self.assertEqual(fmt.chroma_width(), 640)
     self.assertEqual(fmt.chroma_height(), 480)
     self.assertEqual(fmt.chroma_width(1024), 1024)
     self.assertEqual(fmt.chroma_height(1024), 1024)
     for i in range(3):
         comp = fmt.components[i]
         self.assertEqual(comp.plane, 0)
         self.assertEqual(comp.bits, 8)
         self.assertFalse(comp.is_luma)
         self.assertFalse(comp.is_chroma)
         self.assertFalse(comp.is_alpha)
         self.assertEqual(comp.width, 640)
         self.assertEqual(comp.height, 480)
Example #4
0
 def test_rgb24_inspection(self):
     fmt = VideoFormat("rgb24", 640, 480)
     self.assertEqual(fmt.name, "rgb24")
     self.assertEqual(len(fmt.components), 3)
     self.assertFalse(fmt.is_planar)
     self.assertFalse(fmt.has_palette)
     self.assertTrue(fmt.is_rgb)
     self.assertEqual(fmt.chroma_width(), 640)
     self.assertEqual(fmt.chroma_height(), 480)
     self.assertEqual(fmt.chroma_width(1024), 1024)
     self.assertEqual(fmt.chroma_height(1024), 1024)
     for i in xrange(3):
         comp = fmt.components[i]
         self.assertEqual(comp.plane, 0)
         self.assertEqual(comp.bits, 8)
         self.assertFalse(comp.is_luma)
         self.assertFalse(comp.is_chroma)
         self.assertFalse(comp.is_alpha)
         self.assertEqual(comp.width, 640)
         self.assertEqual(comp.height, 480)