]> git.sesse.net Git - movit/blobdiff - flat_input.h
Allow setting width/height on FlatInput and YCbCrInput after instantiation.
[movit] / flat_input.h
index 14f8df16b82c853a9ad7bcf8b05301789cc202a2..d8b62b7ec369b4ecf4272bd90cbf89fa4933bf08 100644 (file)
@@ -107,6 +107,20 @@ public:
 
        void invalidate_pixel_data();
 
+       // Note: Sets pitch to width, so even if your pitch is unchanged,
+       // you will need to re-set it after this call.
+       void set_width(unsigned width)
+       {
+               this->pitch = this->width = width;
+               invalidate_pixel_data();
+       }
+
+       void set_height(unsigned height)
+       {
+               this->height = height;
+               invalidate_pixel_data();
+       }
+
        void set_pitch(unsigned pitch) {
                this->pitch = pitch;
                invalidate_pixel_data();