]> git.sesse.net Git - movit/blobdiff - ycbcr_input.cpp
Unbreak YCbCrInput (it needs to still support setting the "needs_mipmaps" int to...
[movit] / ycbcr_input.cpp
index 25fb97932129ca0f7bcb804a59ea4b8b3b9de191..6cf311628692b5c278ce20c99071d02739be9451 100644 (file)
@@ -65,7 +65,6 @@ YCbCrInput::YCbCrInput(const ImageFormat &image_format,
                        unsigned width, unsigned height)
        : image_format(image_format),
          ycbcr_format(ycbcr_format),
-         needs_mipmaps(false),
          width(width),
          height(height),
          resource_pool(NULL)
@@ -84,8 +83,6 @@ YCbCrInput::YCbCrInput(const ImageFormat &image_format,
        heights[2] = height / ycbcr_format.chroma_subsampling_y;
 
        pixel_data[0] = pixel_data[1] = pixel_data[2] = NULL;
-
-       register_int("needs_mipmaps", &needs_mipmaps);
 }
 
 YCbCrInput::~YCbCrInput()
@@ -244,4 +241,13 @@ void YCbCrInput::invalidate_pixel_data()
        }
 }
 
+bool YCbCrInput::set_int(const std::string& key, int value)
+{
+       if (key == "needs_mipmaps") {
+               // We currently do not support this.
+               return (value == 0);
+       }
+       return Effect::set_int(key, value);
+}
+
 }  // namespace movit