[FFmpeg-devel] New filter: remap?

F.Sluiter fsluiter at gmail.com
Fri Feb 26 00:13:34 CET 2016


Give me a few weeks, I have a day job and a son in the weekends, but would
be happy to work together on it!

2016-02-26 0:11 GMT+01:00 Paul B Mahol <onemda at gmail.com>:

> Dana 25. 2. 2016. 23:43 osoba "F.Sluiter" <fsluiter at gmail.com> napisala
> je:
> >
> > I am not considering a format change (yet), maybe I wasn't clear enough
> on
> > how this filter would work.
> > Displace works now with a image stream and two in puts, x_displacement,
> > y_dispacement. x and y are relative so they are added to the x,y location
> > of the source pixel.  the pixel x,y currently being copied ends up at
> > (x+displacement_x,y+displacement_y).
> > However, my remap filter would do and absolute "displacement" or rather
> > "remap", ampping from source pixels to target pixels.
> > so the x,y found in the second and third input would determine which
> source
> > pixel is copied to the current location.The filter would be almost
> similar
> > code to the displace filter but it would copy the source pixel directly
> > from the given location in stead of displacing it with a relative value..
> > pseudo code:
> >
> > /*displace*/
> > inputimage source[][];
> > input displace_x[][];
> > input displace_y[][];
> > output target[][];
> >
> > for (int i; i <max_i;i++){
> >   for int j; j<max_j;j++){
> >     target[i+displace_x[i][j]][j+displace_y[i][j]] = source[i][j];
> > }}
> >
> > /*remap*/
> > inputimage source[][];
> > input remap_x[][];
> > input remap_y[][];
> > output target[][];
> >
> > for (int i; i <max_i;i++){
> >   for int j; j<max_j;j++){
> >     target[i][j] = source[remap_x[i][j]][remap_y[i][j]];
>
> I'm looking for the source, if it doesnt appear in reasonable time frame I
> will do it :)
>
> > }}
> >
> > It might sound trivial, but with "remap" the target can be for example
> > bigger or with a different aspect ratio, and remap_x,remap_y would just
> > tell you were the pixels are coming from. So the same pixel from the
> source
> > could be copied multiple times to different locations in the target. With
> > displace, you can move a pixel only once.... It is "Push" vs "Pull".
> >
>
>
> >
> > 2016-02-25 23:06 GMT+01:00 Paul B Mahol <onemda at gmail.com>:
> >
> > > On 2/25/16, F.Sluiter <fsluiter at gmail.com> wrote:
> > > > Could you actually be more specific, what would be needed for 16bit
> > > > support? I was naively thinking to just a binary copy from source
> pixel
> > > to
> > > > target for starters.
> > >
> > > For example, first input is 8bit depth and 2nd and 3rd are 16bit depth
> > > so remap works for > 256 dimensions.
> > >
> > > Maybe you want to work with nonsubsampled formats only and not have
> option
> > > to remap y/u/v differently from each other?
> > > _______________________________________________
> > > ffmpeg-devel mailing list
> > > ffmpeg-devel at ffmpeg.org
> > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel at ffmpeg.org
> > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list