Missing audio asset decryption.
[libdcp.git] / src / argb_frame.h
index bc78b8fba5ef2c33b7d25b8de347f1f38bd5a10e..f26436cd4b08a5d65961572ad3b1f4d536a77372 100644 (file)
 
 */
 
+/** @file  src/argb_frame.h
+ *  @brief Container for a single image from a picture asset.
+ */
+
 #include <stdint.h>
+#include "util.h"
 
 namespace libdcp
 {
 
+/** @class ARGBFrame
+ *  @brief A single frame of picture data held in an ARGB buffer.
+ *
+ *  The format of the data is:
+ *
+ *  <pre>
+ *  Byte   /- 0 -------|- 1 --------|- 2 --------|- 3 --------|- 4 --------|- 5 --------| ...
+ *         |(0, 0) Blue|(0, 0)Green |(0, 0) Red  |(0, 0) Alpha|(0, 1) Blue |(0, 1) Green| ...
+ *  </pre>
+ *
+ *  So that the first byte is the blue component of the pixel at x=0, y=0, the second
+ *  is the green component, and so on.
+ *
+ *  Lines are packed so that the second row directly follows the first.
+ */
 class ARGBFrame
 {
 public:
-       ARGBFrame (int width, int height);
+       ARGBFrame (Size size);
        ~ARGBFrame ();
 
        uint8_t* data () const {
                return _data;
        }
 
+       /** Length of one picture row in bytes */
        int stride () const;
 
+       Size size () const {
+               return _size;
+       }
+
 private:
-       int _width;
-       int _height;
+       Size _size;
        uint8_t* _data;
 };