Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
9th September 2010, 12:45 | #1 | Link |
Registered User
Join Date: Oct 2001
Location: Thailand
Posts: 259
|
Subpixel Shifting
I have a few videos which has been resized using a few advanced resize methods.
However, the resulting videos has introduced a small subpixel shift. How can I use AviSynth's resize engine to position the video back to correct place? The shift is half pixel right and half pixel down. |
9th September 2010, 13:23 | #2 | Link |
Registered User
Join Date: Apr 2008
Location: St. Petersburg, Russia
Posts: 334
|
You can try using internal crop engine of a resizer for this, but it's not lossless since it will resample video. Like this:
AddBorders(4,4,4,4) Spline36Resize(720,480,4+x,4+y,-4+x,-4+y) where x & y are your sub-pixel values |
9th September 2010, 17:37 | #4 | Link |
Registered User
Join Date: Apr 2002
Location: Germany
Posts: 5,389
|
spline36resize(width,height,0.5,0.5,width,height)
Using AddBorders() is not required. If by chance you're still using Avisynth 2.5.6, the above code will do exactly nothing. For 2.5.6, you need (width,height,0.5,0.5,width+0.001,height+0.001)
__________________
- We´re at the beginning of the end of mankind´s childhood - My little flickr gallery. (Yes indeed, I do have hobbies other than digital video!) Last edited by Didée; 9th September 2010 at 17:39. |
10th September 2010, 04:34 | #6 | Link |
Avisynth Developer
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
|
Given subrange_height == target_height and subrange_width == target_width you don't want any actual resizing, just pure 0.5 pixel shifting. So try either BilinearResize() or BicubicResize(). These will involve the minimum number of input pixels per output pixel. If you involve to many input pixels like with Lanzos or Spline36 you may introduce ringing artefacts. With Bicubic you may want to try even softer B and C values than the default 1/3, 1/3.
|
10th September 2010, 05:54 | #7 | Link |
Registered User
Join Date: Feb 2004
Posts: 1,348
|
less processed pixels, more blurring. You should really try both a high tap shift, and a low tap shift and see what does batter on you source. If your input is already blurry, for whatever reason, you should probably use a higher tap filter.However if you have something really sharp like flash animation, IanB is likely correct.
|
Thread Tools | Search this Thread |
Display Modes | |
|
|