javlak
7th October 2011, 10:51
Hi.
I am trying to write a window filter, i.e. like a gaussian blur (3x3, 5x5 etc). What I want to do is instead of checking if my window goes "out of bounds", like for instance in the first and last pixels of the picture, is to pad the frame with a mirror of the first and last few rows and columns (OK, I didn't pay much attention at my DSP classes about 20 years ago but I remember that much).
For instance, before the "real" first row will be a copy of that row, and before that a copy of the second "real" row and so on. So I can start processing at (0,0) instead of (1,1). But that would mean that I would have to change vi.width and vi.height but not at the constructor, as this will only be done internally and not affect the output video's dimensions.
Is this possible to do or do I have to write two separate filters, one to do the pixel padding, the other my window function and then crop with an avisynth script?
Thanks in advance.
I am trying to write a window filter, i.e. like a gaussian blur (3x3, 5x5 etc). What I want to do is instead of checking if my window goes "out of bounds", like for instance in the first and last pixels of the picture, is to pad the frame with a mirror of the first and last few rows and columns (OK, I didn't pay much attention at my DSP classes about 20 years ago but I remember that much).
For instance, before the "real" first row will be a copy of that row, and before that a copy of the second "real" row and so on. So I can start processing at (0,0) instead of (1,1). But that would mean that I would have to change vi.width and vi.height but not at the constructor, as this will only be done internally and not affect the output video's dimensions.
Is this possible to do or do I have to write two separate filters, one to do the pixel padding, the other my window function and then crop with an avisynth script?
Thanks in advance.