]> git.sesse.net Git - movit/commitdiff
Fix YCbCrInput after the ResourcePool texture changes.
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 21 Jan 2014 20:39:09 +0000 (21:39 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Tue, 21 Jan 2014 20:39:09 +0000 (21:39 +0100)
ycbcr_input.cpp
ycbcr_input.h

index 2a67ea7158f483cee4a8f25c7bc233df6beab83f..87140be7828064535972aa10d75cb4675ba11124 100644 (file)
@@ -6,6 +6,7 @@
 #include <string.h>
 
 #include "effect_util.h"
 #include <string.h>
 
 #include "effect_util.h"
+#include "resource_pool.h"
 #include "util.h"
 #include "ycbcr_input.h"
 
 #include "util.h"
 #include "ycbcr_input.h"
 
index 0f868a8a4ee4fdfc67cfd35a36bb8cb5fb7d3821..eb8d0ec335db4b90bb8b138f45b3c67ddb31fbde 100644 (file)
 #include <string>
 
 #include "effect.h"
 #include <string>
 
 #include "effect.h"
+#include "effect_chain.h"
 #include "image_format.h"
 #include "input.h"
 
 #include "image_format.h"
 #include "input.h"
 
+class ResourcePool;
+
 struct YCbCrFormat {
        // Which formula for Y' to use.
        YCbCrLumaCoefficients luma_coefficients;
 struct YCbCrFormat {
        // Which formula for Y' to use.
        YCbCrLumaCoefficients luma_coefficients;
@@ -87,6 +90,11 @@ public:
                this->pitch[channel] = pitch;
        }
 
                this->pitch[channel] = pitch;
        }
 
+       virtual void inform_added(EffectChain *chain)
+       {
+               resource_pool = chain->get_resource_pool();
+       }
+
 private:
        ImageFormat image_format;
        YCbCrFormat ycbcr_format;
 private:
        ImageFormat image_format;
        YCbCrFormat ycbcr_format;
@@ -98,6 +106,7 @@ private:
        unsigned width, height, widths[3], heights[3];
        const unsigned char *pixel_data[3];
        unsigned pitch[3];
        unsigned width, height, widths[3], heights[3];
        const unsigned char *pixel_data[3];
        unsigned pitch[3];
+       ResourcePool *resource_pool;
 };
 
 #endif // !defined(_MOVIT_YCBCR_INPUT_H)
 };
 
 #endif // !defined(_MOVIT_YCBCR_INPUT_H)