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.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th September 2010, 13:45   #1  |  Link
Mole
Registered User
 
Mole's Avatar
 
Join Date: Oct 2001
Location: Thailand
Posts: 260
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.
Mole is offline   Reply With Quote
Old 9th September 2010, 14:23   #2  |  Link
Alex_ander
Registered User
 
Alex_ander's Avatar
 
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
Alex_ander is offline   Reply With Quote
Old 9th September 2010, 18:30   #3  |  Link
Mole
Registered User
 
Mole's Avatar
 
Join Date: Oct 2001
Location: Thailand
Posts: 260
Umm, thanks!

So, if I need to shift it left and up half pixel, what values do I use?
Mole is offline   Reply With Quote
Old 9th September 2010, 18:37   #4  |  Link
Didée
Registered User
 
Join Date: Apr 2002
Location: Germany
Posts: 5,394
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 18:39.
Didée is offline   Reply With Quote
Old 10th September 2010, 01:23   #5  |  Link
Mole
Registered User
 
Mole's Avatar
 
Join Date: Oct 2001
Location: Thailand
Posts: 260
Thanks a lot!

I use Avisynth 2.5.8.

So, in my case, would it be:
(1920,1080,0.5,0.5,1920,1080)

By the way, what kind of resizer would you recommend for this purpose?
Mole is offline   Reply With Quote
Old 10th September 2010, 05:34   #6  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,173
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.
IanB is offline   Reply With Quote
Old 10th September 2010, 06:54   #7  |  Link
*.mp4 guy
Registered User
 
*.mp4 guy's Avatar
 
Join Date: Feb 2004
Posts: 1,350
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.
*.mp4 guy is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:47.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.