]> git.sesse.net Git - casparcg/commitdiff
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Mon, 3 Jan 2011 14:35:41 +0000 (14:35 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Mon, 3 Jan 2011 14:35:41 +0000 (14:35 +0000)
core/processor/pixel_format.h [new file with mode: 0644]

diff --git a/core/processor/pixel_format.h b/core/processor/pixel_format.h
new file mode 100644 (file)
index 0000000..44c88ca
--- /dev/null
@@ -0,0 +1,42 @@
+#pragma once\r
+\r
+#include <vector>\r
+\r
+namespace caspar { namespace core {\r
+               \r
+struct pixel_format\r
+{\r
+       enum type\r
+       {\r
+               bgra,\r
+               rgba,\r
+               argb,\r
+               abgr,\r
+               ycbcr,\r
+               ycbcra,\r
+               count,\r
+               invalid\r
+       };\r
+};\r
+\r
+struct pixel_format_desc\r
+{\r
+       struct plane\r
+       {\r
+               plane() : linesize(0), width(0), height(0), size(0), channels(0){}\r
+               plane(size_t width, size_t height, size_t channels)\r
+                       : linesize(width*channels), width(width), height(height), size(width*height*channels), channels(channels){}\r
+               size_t linesize;\r
+               size_t width;\r
+               size_t height;\r
+               size_t size;\r
+               size_t channels;\r
+       };\r
+\r
+       pixel_format_desc() : pix_fmt(pixel_format::invalid){}\r
+       \r
+       pixel_format::type pix_fmt;\r
+       std::vector<plane> planes;\r
+};\r
+\r
+}}
\ No newline at end of file