X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=resample_effect.h;h=b06b09b57ae9af67f18e938396adc8ab8ddbdd0d;hp=f0112b3ca7c4abcec1ba73a6ce420f65b10162dd;hb=34776d3ed2565ee834405e575bf3bfc7f7933e36;hpb=b757191bc6d258887445d88cdfe5b18666295660 diff --git a/resample_effect.h b/resample_effect.h index f0112b3..b06b09b 100644 --- a/resample_effect.h +++ b/resample_effect.h @@ -53,9 +53,14 @@ public: private: void update_size(); + void update_offset_and_zoom(); SingleResamplePassEffect *hpass, *vpass; int input_width, input_height, output_width, output_height; + + float offset_x, offset_y; + float zoom_x, zoom_y; + float zoom_center_x, zoom_center_y; }; class SingleResamplePassEffect : public Effect { @@ -80,6 +85,7 @@ public: } } virtual bool changes_output_size() const { return true; } + virtual bool sets_virtual_output_size() const { return false; } virtual void get_output_size(unsigned *width, unsigned *height, unsigned *virtual_width, unsigned *virtual_height) const { *virtual_width = *width = this->output_width; @@ -97,10 +103,19 @@ private: EffectChain *chain; Direction direction; GLuint texnum; + GLint uniform_sample_tex; + float uniform_num_loops, uniform_slice_height, uniform_sample_x_scale, uniform_sample_x_offset; + float uniform_whole_pixel_offset; + int uniform_num_samples; + int input_width, input_height, output_width, output_height; + float offset, zoom; int last_input_width, last_input_height, last_output_width, last_output_height; + float last_offset, last_zoom; int src_bilinear_samples, num_loops; float slice_height; + int last_texture_width, last_texture_height; + GLuint last_texture_internal_format; }; } // namespace movit