Re: [FFmpeg-devel] New filter: remap (usecase is fisheye video)
Indeed, working with Paul Mahol and he changed it. Almost ready to publish Op 5 apr. 2016 11:47 schreef "Carl Eugen Hoyos": > F.Sluiter gmail.com> writes: > > > I wrote a new filter for ffmpeg and would value your comments. > > > Files attached are not proper git or diff patches, but the > > filter itself is only a single file. > > We can only read unified diffs as made with git format-patch;-( > > I suspect that your filter should accept more than one input > stream instead of file names. > > Carl Eugen > > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] New filter: remap (usecase is fisheye video)
F.Sluiter gmail.com> writes: > I wrote a new filter for ffmpeg and would value your comments. > Files attached are not proper git or diff patches, but the > filter itself is only a single file. We can only read unified diffs as made with git format-patch;-( I suspect that your filter should accept more than one input stream instead of file names. Carl Eugen ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] New filter: remap?
Yes, i am currently interested in pixels only. Effects I am after are related to lens corrections. Op 26 feb. 2016 12:42 schreef "Paul B Mahol": > On 2/26/16, Thilo Borgmann wrote: > > Am 25.02.16 um 22:24 schrieb F.Sluiter: > >> If it doesn exist I would like to develop a new filter and would like to > >> check if nobody is already working on it or that it exists under a > >> different name. > >> > >> I have been researching the following usecase: > >> > >> Similar tot the displace filter, I would need a filter to remap pixels > >> (the > >> difference being that displace displaces the pixels relative to where it > >> was, remap would specify where the target pixel originates from): > >> > >> Description: Remap pixels as indicated by second and third input stream. > >> > >> It takes three input streams and outputs one stream, the first input is > >> the > >> source, and second and third input are targetmaps. The second and third > >> input specifies the x.y coordinate where the pixel in the target stream > >> originates from. Note that once generated, remap files can be reused > over > >> and over again. Source and target do not have to have the same size. > >> The effect I am trying to achieve is hard to compute with the relative > >> "displace", and a lot more straightforward with "remap". > > > > Why not extend the displace filter to act relative/absolute based on a > > parameter? > > Displace works on pixels components, I guess OP wants to work only with > pixels. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] New filter: remap?
On 2/26/16, Thilo Borgmannwrote: > Am 25.02.16 um 22:24 schrieb F.Sluiter: >> If it doesn exist I would like to develop a new filter and would like to >> check if nobody is already working on it or that it exists under a >> different name. >> >> I have been researching the following usecase: >> >> Similar tot the displace filter, I would need a filter to remap pixels >> (the >> difference being that displace displaces the pixels relative to where it >> was, remap would specify where the target pixel originates from): >> >> Description: Remap pixels as indicated by second and third input stream. >> >> It takes three input streams and outputs one stream, the first input is >> the >> source, and second and third input are targetmaps. The second and third >> input specifies the x.y coordinate where the pixel in the target stream >> originates from. Note that once generated, remap files can be reused over >> and over again. Source and target do not have to have the same size. >> The effect I am trying to achieve is hard to compute with the relative >> "displace", and a lot more straightforward with "remap". > > Why not extend the displace filter to act relative/absolute based on a > parameter? Displace works on pixels components, I guess OP wants to work only with pixels. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] New filter: remap?
Am 25.02.16 um 22:24 schrieb F.Sluiter: > If it doesn exist I would like to develop a new filter and would like to > check if nobody is already working on it or that it exists under a > different name. > > I have been researching the following usecase: > > Similar tot the displace filter, I would need a filter to remap pixels (the > difference being that displace displaces the pixels relative to where it > was, remap would specify where the target pixel originates from): > > Description: Remap pixels as indicated by second and third input stream. > > It takes three input streams and outputs one stream, the first input is the > source, and second and third input are targetmaps. The second and third > input specifies the x.y coordinate where the pixel in the target stream > originates from. Note that once generated, remap files can be reused over > and over again. Source and target do not have to have the same size. > The effect I am trying to achieve is hard to compute with the relative > "displace", and a lot more straightforward with "remap". Why not extend the displace filter to act relative/absolute based on a parameter? 2 cents. -Thilo ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] New filter: remap?
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: > Dana 25. 2. 2016. 23:43 osoba "F.Sluiter" 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 > for int 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 > for int 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 : > > > > > On 2/25/16, F.Sluiter 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@ffmpeg.org > > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > > > > > ___ > > ffmpeg-devel mailing list > > ffmpeg-devel@ffmpeg.org > > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] New filter: remap?
So not color mapping (that would be another awesome filter indeed) but location mapping 2016-02-25 23:42 GMT+01:00 F.Sluiter: > 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 for int 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 for int j; j target[i][j] = source[remap_x[i][j]][remap_y[i][j]]; > }} > > 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 : > >> On 2/25/16, F.Sluiter 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@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> > > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] New filter: remap?
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: > On 2/25/16, F.Sluiter 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@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] New filter: remap?
On 2/25/16, F.Sluiterwrote: > 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@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] New filter: remap?
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. 2016-02-25 22:40 GMT+01:00 F.Sluiter: > It would also be relatively easy to implement anti-aliasing (probably in > version 2). > > 2016-02-25 22:38 GMT+01:00 Paul B Mahol : > >> On 2/25/16, F.Sluiter wrote: >> > If it doesn exist I would like to develop a new filter and would like to >> > check if nobody is already working on it or that it exists under a >> > different name. >> > >> > I have been researching the following usecase: >> > >> > Similar tot the displace filter, I would need a filter to remap pixels >> (the >> > difference being that displace displaces the pixels relative to where it >> > was, remap would specify where the target pixel originates from): >> > >> > Description: Remap pixels as indicated by second and third input stream. >> > >> > It takes three input streams and outputs one stream, the first input is >> the >> > source, and second and third input are targetmaps. The second and third >> > input specifies the x.y coordinate where the pixel in the target stream >> > originates from. Note that once generated, remap files can be reused >> over >> > and over again. Source and target do not have to have the same size. >> > The effect I am trying to achieve is hard to compute with the relative >> > "displace", and a lot more straightforward with "remap". >> >> With 16bit support too? Go ahead, nice idea :-) >> >> I'm interested in motion estimation/interpolation/compensation filters >> too. >> ___ >> ffmpeg-devel mailing list >> ffmpeg-devel@ffmpeg.org >> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel >> > > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] New filter: remap?
It would also be relatively easy to implement anti-aliasing (probably in version 2). 2016-02-25 22:38 GMT+01:00 Paul B Mahol: > On 2/25/16, F.Sluiter wrote: > > If it doesn exist I would like to develop a new filter and would like to > > check if nobody is already working on it or that it exists under a > > different name. > > > > I have been researching the following usecase: > > > > Similar tot the displace filter, I would need a filter to remap pixels > (the > > difference being that displace displaces the pixels relative to where it > > was, remap would specify where the target pixel originates from): > > > > Description: Remap pixels as indicated by second and third input stream. > > > > It takes three input streams and outputs one stream, the first input is > the > > source, and second and third input are targetmaps. The second and third > > input specifies the x.y coordinate where the pixel in the target stream > > originates from. Note that once generated, remap files can be reused over > > and over again. Source and target do not have to have the same size. > > The effect I am trying to achieve is hard to compute with the relative > > "displace", and a lot more straightforward with "remap". > > With 16bit support too? Go ahead, nice idea :-) > > I'm interested in motion estimation/interpolation/compensation filters too. > ___ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > http://ffmpeg.org/mailman/listinfo/ffmpeg-devel > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] New filter: remap?
On 2/25/16, F.Sluiterwrote: > If it doesn exist I would like to develop a new filter and would like to > check if nobody is already working on it or that it exists under a > different name. > > I have been researching the following usecase: > > Similar tot the displace filter, I would need a filter to remap pixels (the > difference being that displace displaces the pixels relative to where it > was, remap would specify where the target pixel originates from): > > Description: Remap pixels as indicated by second and third input stream. > > It takes three input streams and outputs one stream, the first input is the > source, and second and third input are targetmaps. The second and third > input specifies the x.y coordinate where the pixel in the target stream > originates from. Note that once generated, remap files can be reused over > and over again. Source and target do not have to have the same size. > The effect I am trying to achieve is hard to compute with the relative > "displace", and a lot more straightforward with "remap". With 16bit support too? Go ahead, nice idea :-) I'm interested in motion estimation/interpolation/compensation filters too. ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] New filter: remap?
If it doesn exist I would like to develop a new filter and would like to check if nobody is already working on it or that it exists under a different name. I have been researching the following usecase: Similar tot the displace filter, I would need a filter to remap pixels (the difference being that displace displaces the pixels relative to where it was, remap would specify where the target pixel originates from): Description: Remap pixels as indicated by second and third input stream. It takes three input streams and outputs one stream, the first input is the source, and second and third input are targetmaps. The second and third input specifies the x.y coordinate where the pixel in the target stream originates from. Note that once generated, remap files can be reused over and over again. Source and target do not have to have the same size. The effect I am trying to achieve is hard to compute with the relative "displace", and a lot more straightforward with "remap". ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel