Topic: Completely disable video crop in SVP 4

I recently stumbled onto an issue in SVP 4, wherein when a video with a nonstandard aspect ratio is loaded, SVP will try to crop it slightly, even if cropping is disabled.

For example, SVP tries to adjust a 1012x720 video to 1008x720.

It wouldn't be that big a deal, except that any time SVP tries to use crop, it breaks the video display.

Is there a way to prevent SVP from doing that?

Re: Completely disable video crop in SVP 4

For example, SVP tries to adjust a 1012x720 video to 1008x720.

Do you have a sample of such video? How did you got it?

Cause video width should be divisible by 8 to be compatible with SVP GPU-accelerated processing.

3 (edited by Nintendo Maniac 64 14-11-2015 23:21:02)

Re: Completely disable video crop in SVP 4

I can confirm that this is indeed a thing.

EDIT: I've attached an example video with a resolution of 1012x720 (I merely cropped a test video that I've previously posted on this here forum).

Post's attachments

sample video clip.mp4 1.87 mb, 604 downloads since 2015-11-14 

Re: Completely disable video crop in SVP 4

I've no doubt you can make video of any size...
The question is video width must be divisible by 8 to pass SVP w/o issues. And not only SVP but some video renderers too.

Re: Completely disable video crop in SVP 4

So you say, but I had no trouble with this when using SVP 3.

Re: Completely disable video crop in SVP 4

I think "x8 limitation" is unnecessary.

  SVP4 resize(crop) problem (video frame width to x8)
  http://www.svp-team.com/forum/viewtopic.php?id=2965

Re: Completely disable video crop in SVP 4

Hello? Can we get some dev feedback on this, please?

Re: Completely disable video crop in SVP 4

Trilandian wrote:

Hello? Can we get some dev feedback on this, please?

This thread is relevant:
http://www.svp-team.com/forum/viewtopic.php?id=2965

Since it actually describes the very same issue.

9 (edited by Mystery 21-11-2015 23:56:21)

Re: Completely disable video crop in SVP 4

I was mentioning in the 432hz Auto-Pitching thread that there was an issue with some videos being corrupt when SVP3 was active.

It turns out that the video width of 854 which is mod 2 was the problem. If I crop to 848, then it fixes the image corruption issue.

So I concur: some renderers requires videos that are mod 8 or something to avoid problems. I'll test that some more.

Yeah, if I just switch from SVP3 to SVP4, then the image corruption issue disappears.

Re: Completely disable video crop in SVP 4

I fixed my padding issue. In my case, it only needs to be mod 4, not mod 8. The image gets corrupt when it's only mod 2.

Perhaps you could add an option for desired padding? It really only needs to be increased when the specific setup fails at lower mod.

Re: Completely disable video crop in SVP 4

Mystery
Perhaps you could add an option for desired padding? It really only needs to be increased when the specific setup fails at lower mod.
Good suggestion

Re: Completely disable video crop in SVP 4

Mod 4 should hopefully be good enough. Looking forward to the patch.

Re: Completely disable video crop in SVP 4

I've got to ask, what is the disadvantage of SVP using mod 4 vs mod 8?

Re: Completely disable video crop in SVP 4

SVP3 allowed mod 2 (because I'm seeing image corruption when opening up certain script files) both in the image source and in the auto-cropping.

It worked most of the time; but then there can be occasional issues like what I encountered.

I doubt there's anything different in SVP4. It's just there as a precaution. I had never seen any issues before I started using the auto-pitching script file.

Re: Completely disable video crop in SVP 4

If that is so, then I hope they just put in the option to select the preferred minimum mod.

16 (edited by tac 24-11-2015 18:58:28)

Re: Completely disable video crop in SVP 4

"mod 4" is decoder chain issue.

    http://www.svp-team.com/forum/viewtopic … 280#p55280

I think SVP(YV12) need mod 2 only, don't need mod 4 and higher.

Re: Completely disable video crop in SVP 4

will add this value as a configuration parameter in the next build with default value = 4

Re: Completely disable video crop in SVP 4

Awesome, thanks smile

19 (edited by tac 26-11-2015 17:12:09)

Re: Completely disable video crop in SVP 4

"mod4" causes cropping(resizing) such as 854x480->852x480, 1366x768->1364x768, etc.
So I'll set that parameter value to 2.

For reference, please let me know the reason why SVP4 recommends "mod4".

You said,

*Cause video width should be divisible by 8 to be compatible with SVP GPU-accelerated processing.
*The question is video width must be divisible by 8 to pass SVP w/o issues. And not only SVP but some video renderers too.

but "mod2" seems to work fine.
And performance of "mod2(1366x768)" is equal to "mod8(1360x768)". (by AVSMeter)

Of course, "3D stereo mode" needs "mod4".
But I think "default value = 2 (mod2)" is better, and force "mod4" when "3D stereo mode" only.

I think many of users maybe want to avoid cropping(resizing) as much as possible.

20 (edited by tac 27-11-2015 04:16:17)

Re: Completely disable video crop in SVP 4

And I found problem about 3D stereo mode in SVP4 Free.

1. playback 854x480 movie. (854 is not mod4)
        -> global crop_string="crop(2,0,-4,-0)"

2. Choose "3D side-by-side stereo pair"
        -> global crop_string="crop(0,0,-2,-0)"
        -> AVS error
                Crop: YUV image can only be cropped by Mod 2 (right side)


In SVP3, 3D mode options are displayed in a grayout state when video is not  "mod4".

Re: Completely disable video crop in SVP 4

I think mod 4 is fine; but what about padding instead of cropping, to not lose any of the video?

22 (edited by Nintendo Maniac 64 26-11-2015 21:15:30)

Re: Completely disable video crop in SVP 4

Mystery wrote:

what about padding instead of cropping, to not lose any of the video?

I'm going to have to disagree with that for the following reason...

852x480 * 3 = 2556x1440
856x480 * 3 = 2568x1440

The latter would have to be instead scaled by 299% rather than an exact 300% on a 1440p monitor, thereby resulting in a resolution of 2560x1436

Also, consider that overscan is unfortunately still a thing in TVs, so it's very rare for even video game content to have critically-important information so close to the edge of the screen.  But even then, we only talking about 2 pixels here, which in reality is actually 1 pixel on the left and 1 pixel on the right.

23 (edited by tac 27-11-2015 03:49:31)

Re: Completely disable video crop in SVP 4

I found one more problem. That's about demonstration mode.
Function "demo()" causes size change when video width is not mod4.

e.g. 854x480 -> demo() -> 856x480


It's better to improve "demo()".

Current version. (not good)

function demo(clip src,clip smooth)
{
    srcd = src.crop(0,0,-Int(src.width/4)*2-2,0)
    srcd = srcd.ChangeFPS(FramerateNumerator(src)*5, FramerateDenominator(src)*2)
    res = smooth.crop(Int(src.width/4)*2,0,0,0)
    return StackHorizontal(srcd.Subtitle("Source", align=2),srcd.BlankClip(width=2),res.Subtitle("Smooth", align=2))
}


Example1:  Line is on left area when video width is mod4.

function demo(clip src,clip smooth)
{
    d = (src.width % 4 == 0) ? 2 : 0
    cp=src.width/4*2+2
    srcd = src.crop(0,0,-cp,0).ChangeFPS(smooth)
    res = smooth.crop(cp-d,0,0,0)
    return StackHorizontal(srcd.Subtitle("Source", align=2),srcd.BlankClip(width=2),res.Subtitle("Smooth", align=2))
}


Example2:  Line is always on center. But line width is 4 when video width is mod4.

function demo(clip src,clip smooth)
{
    lineW = (src.width % 4 == 0) ? 4 : 2
    cp=(src.width+lineW)/4*2
    srcd = src.crop(0,0,-cp,0).ChangeFPS(smooth)
    res = smooth.crop(cp,0,0,0)
    return StackHorizontal(srcd.Subtitle("Source", align=2),srcd.BlankClip(width=lineW),res.Subtitle("Smooth", align=2))
}

Re: Completely disable video crop in SVP 4

ver. 4.0.0.53 - http://www.svp-team.com/forum/viewtopic.php?id=2986

frc.frame.align = 4

Re: Completely disable video crop in SVP 4

Works great, thanks big_smile