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. |
6th March 2020, 11:18 | #1 | Link |
Registered User
Join Date: Jan 2015
Posts: 1,056
|
Resize then sub-pixel shift without resampling twice?
One of the coolest thing about AVIsynth's built-in resizers is that they can perform both a resize and a sub-pixel crop with a single rescale. HOWEVER, the way they're set up assumes that the user wishes to crop first and then resize. If I wanted to resize first and then crop by a fractional number of pixels, I'd have to rescale twice like this:
Code:
mpeg2source("101.d2v") bilinearresize(720,405) spline144resize(720,304,0,50.5,720,304)
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. |
6th March 2020, 11:43 | #2 | Link | |
Broadcast Encoder
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 2,904
|
Quote:
Mathematician: Jokes aside, I don't generally use the built-in crop function but when I do, I always crop first and then resize as I think it's easier for me to do the calculations and check it, so I don't know. |
|
6th March 2020, 11:48 | #3 | Link |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
There's no such thing as "cropping by a fractional number of pixels." Just combine the scale and shift into one call and then crop:
Code:
spline16resize(720, 405, 0, 0.5, 720, last.height) crop(0,50,0,-51) (I'm curious to know what colourspace mpeg2source is returning here that allows you to resize to an odd height. Could it be that you've left out some information? Surely not...) PS Since I'm presumably still on ignore for daring to answer previous questions informatively and succinctly, I think it'd be fun if everyone else replied to say how great my answer is. |
6th March 2020, 13:44 | #4 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Great answer Wonkey
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? |
7th March 2020, 05:56 | #5 | Link | |||
Registered User
Join Date: Jan 2015
Posts: 1,056
|
Quote:
Quote:
Quote:
Actually it's for saying insane and incorrect things like "There's no such thing as cropping by a fractional number of pixels"
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. Last edited by Katie Boundary; 7th March 2020 at 06:10. |
|||
7th March 2020, 13:13 | #6 | Link | |||
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
Quote:
Quote:
Quote:
And stop spamming the forum with your stupid memes. This isn't Facebook. Last edited by wonkey_monkey; 7th March 2020 at 13:18. |
|||
7th March 2020, 13:41 | #7 | Link | |
Registered User
Join Date: Sep 2003
Location: Berlin, Germany
Posts: 3,079
|
The AviSynth docs and IanB call it "Sub Pixel Shifter"...
Quote:
It's just semantics. I think that you could also call it "Crop by a fractional number of pixels". Last edited by manolito; 7th March 2020 at 13:47. |
|
18th March 2020, 03:16 | #11 | Link |
結城有紀
Join Date: Dec 2003
Location: NJ; OR; Shanghai
Posts: 894
|
The result of an operation must consists of full pixels. You can't resize to integers and then crop to floats. Your can't have a result of 719.5px width for example.
And as others have mentioned, you can't crop subpixels for real. "Cropping" inside resizer changes the source-target pixel mapping, not actually removing pixels or subpixels. |
20th March 2020, 06:27 | #12 | Link | |||
Registered User
Join Date: Jan 2015
Posts: 1,056
|
Quote:
Quote:
Quote:
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. Last edited by Katie Boundary; 20th March 2020 at 06:29. |
|||
20th March 2020, 09:33 | #13 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
Quote:
I recommend that no-one else wastes their time on this thread because the question has been answered. Last edited by wonkey_monkey; 20th March 2020 at 11:51. |
|
21st March 2020, 03:03 | #16 | Link | |
Registered User
Join Date: Oct 2012
Posts: 7,923
|
Quote:
feel free to go on a crusade to rename every case of resizing in the video world where it is actually rescaling/resampling and "correct" it. |
|
22nd March 2020, 21:20 | #17 | Link | |
Registered User
Join Date: Jan 2015
Posts: 1,056
|
Quote:
What baffles me is that there are so many illiterate morons who feel the need to dump off-topic shit in my threads and then complain about the amount of shit in them. People like YOU are the reason why this plays out every time. Post constructively or STFU.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. Last edited by Katie Boundary; 22nd March 2020 at 21:24. |
|
23rd March 2020, 00:32 | #18 | Link | |
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
Quote:
Do you really not realise how excruciatingly difficult you make it for people to help you? Last edited by wonkey_monkey; 23rd March 2020 at 00:46. |
|
23rd March 2020, 01:42 | #19 | Link | |
Registered User
Join Date: Dec 2002
Location: Region 0
Posts: 1,436
|
Quote:
Tell us how you really feel Katie. Let it all out. We're here for you! |
|
23rd March 2020, 03:43 | #20 | Link |
Registered User
Join Date: Feb 2002
Location: California
Posts: 2,695
|
Given what is happening in this world at the moment, most of us are worried about our friends, neighbors, and our community, but this one is still self-centered and spouting attitude.
So much for "a crisis brings out the best in everyone." Or, maybe this IS her best ... |
Thread Tools | Search this Thread |
Display Modes | |
|
|