This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Crop/Resize
#20
(31.10.2020, 23:41)Selur Wrote:
Quote:]
Step 1: Launch "Hybrid".
Step 2: Load " input.m2v" you provided me with.
Step 3: Crop/Resize -> Input PAR 8:9 -> Force Input PAR type: generic, Convert output to PAR "Square Pixel (1:1) - it shows proper 720x540.
So far so good, this I can reproduce.
Quote:step 4: Activate "Picture Crop" - crop right side to 6 px.
- "Picture Resize" with Auto adjust - "height" shows 720x546
same here
Quote:So, I need to crop extra 6 pixels (that's incorrect, correct value is 4px) from top/bottom to get 540
That assumption is only correct if:
a. input and output PAR
and
b. input and output width is the same
or
these two compensate each other.
Quote:Crop: bottom - 4px, top- 2px. Picture Resize shows 720x538 (instead of 540).
Yes, and 538 is correct.
What Hybrid calculates is:
crop resolution: 714x474
target width: 720 -> resizeMult = 720/714 = 1.0084033613445378151260504201681
target par: 1:1 -> parMult = 9/8
resized height = cropHeight*resizeMult*parMult = 474*1.0084033613445378151260504201681*9/8 = 537.73109243697478991596638655462 = 538
-> Hybrid is correct here.

Quote:Crop: bottom - 2px, top- 2px. Picture Resize shows  correct 720x540.
crop resolution: 714x476
target width: 720 -> resizeMult = 720/716 = 1.0055865921787709497206703910615
target par: 1:1 -> parMult = 9/8
resized height = cropHeight*resizeMult*parMult = 476*1.0055865921787709497206703910615*9/8 = 538.49162011173184357541899441341 = 539 which gets rounded to 540 since mod2 is configured (and required due to the color space).
-> Hybrid is correct here.

=> The problem is that you did not think about the resizeMult and parMult that are part of the calculation, since resize should be always done after cropping in Hybrid. Smile

In Hybrid currently the processing order always is:
1. crop
2. resize
3. letterbox

(Now that I think about it, there is another bug: this order is not enforced when using Avisynth or Vapoursynth)


Cu Selur

So, in this case we need somehow calculate and present other required cropping value (in my case vertical 4px) based on Input/Output PARs before resizing.
When you said "...this order is not enforced when using Avisynth or Vapoursynth" - did you mean that they don't respect filter order specified in "Misc"?
Reply


Messages In This Thread
Crop/Resize - by serg - 30.10.2020, 22:23
RE: Crop/Resize - by Selur - 31.10.2020, 06:48
RE: Crop/Resize - by serg - 31.10.2020, 18:32
RE: Crop/Resize - by Selur - 31.10.2020, 18:43
RE: Crop/Resize - by Selur - 31.10.2020, 19:10
RE: Crop/Resize - by serg - 31.10.2020, 19:40
RE: Crop/Resize - by Selur - 31.10.2020, 19:43
RE: Crop/Resize - by Selur - 31.10.2020, 19:53
RE: Crop/Resize - by serg - 31.10.2020, 20:20
RE: Crop/Resize - by Selur - 31.10.2020, 20:47
RE: Crop/Resize - by serg - 31.10.2020, 21:06
RE: Crop/Resize - by Selur - 31.10.2020, 21:09
RE: Crop/Resize - by serg - 31.10.2020, 22:01
RE: Crop/Resize - by Selur - 31.10.2020, 22:08
RE: Crop/Resize - by serg - 31.10.2020, 22:23
RE: Crop/Resize - by Selur - 31.10.2020, 22:24
RE: Crop/Resize - by serg - 31.10.2020, 23:18
RE: Crop/Resize - by Selur - 31.10.2020, 23:00
RE: Crop/Resize - by Selur - 31.10.2020, 23:41
RE: Crop/Resize - by serg - 01.11.2020, 00:22
RE: Crop/Resize - by Selur - 01.11.2020, 00:35
RE: Crop/Resize - by serg - 01.11.2020, 02:50
RE: Crop/Resize - by Selur - 01.11.2020, 09:49
RE: Crop/Resize - by Selur - 01.11.2020, 11:44
RE: Crop/Resize - by serg - 01.11.2020, 22:06
RE: Crop/Resize - by Selur - 01.11.2020, 22:08
RE: Crop/Resize - by Selur - 01.11.2020, 22:32
RE: Crop/Resize - by serg - 02.11.2020, 00:55
RE: Crop/Resize - by Selur - 02.11.2020, 05:51
RE: Crop/Resize - by serg - 02.11.2020, 07:04
RE: Crop/Resize - by Selur - 02.11.2020, 17:07
RE: Crop/Resize - by Selur - 02.11.2020, 18:02
RE: Crop/Resize - by serg - 02.11.2020, 20:23
RE: Crop/Resize - by Selur - 02.11.2020, 20:57
RE: Crop/Resize - by serg - 02.11.2020, 21:19
RE: Crop/Resize - by Selur - 02.11.2020, 21:24
RE: Crop/Resize - by Selur - 02.11.2020, 21:37

Forum Jump:


Users browsing this thread: 2 Guest(s)