Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace_ranges: Error when rfsing image source #131

Closed
LightArrowsEXE opened this issue Jun 15, 2022 · 2 comments · Fixed by #132
Closed

replace_ranges: Error when rfsing image source #131

LightArrowsEXE opened this issue Jun 15, 2022 · 2 comments · Fixed by #132

Comments

@LightArrowsEXE
Copy link
Member

This is a multi issue, since it also led to me finding a small issue with source.

Anyway, from Vodes:
image

Setting exclusive=True fixed this issue. Will create a PR later to try and fix this behaviour.

@LightArrowsEXE
Copy link
Member Author

LightArrowsEXE commented Jun 15, 2022

Can't repro this with my code.

    src = core.std.Limiter(src) * 5
    b = lvf.src("./NegimaShaftBD_E01_OP_63367.png", ref=src)
    b = b + b[0]
    print(src, b)
    rf = lvf.replace_ranges(src.text.FrameNum(), b.text.FrameNum(), 150000)
    return src.text.FrameNum(), rf

image
image

Vodes' original (fixed) code:

    # That one cursed frame - stolen from Aicha :)
    mnl = core.imwri.Read("edit2.png").std.AssumeFPS(filt)
    mnl = mnl.resize.Point(format=vs.GRAY16, dither_type="error_diffusion", matrix_s="709")
    sed = lvf.sraa(mnl, rfactor = 1.5)
    dif = core.std.Expr([mnl, sed], "x y - abs 600 > 65535 0 ?")
    msk = core.std.Expr([dif, mnl.std.Sobel().std.Binarize(12000)], "x y = x 0 ?").std.Maximum().std.Maximum()
    mnl = mnl.std.MaskedMerge(sed, msk)
    mnl = core.std.ShufflePlanes([mnl, filt], [0, 1, 2], vs.YUV)
    filt = lvf.rfs(filt, mnl, 114905, use_plugin = False, exclusive = True)

LightArrowsEXE added a commit that referenced this issue Jun 15, 2022
Closes #131.

* Fix trim shift

* Fix shift for plugin when exclusive=True

* source: Fix ref clip being 1 frame short with image

What I mentioned I noticed was wrong in #131.

Co-authored-by: LightArrowsEXE <Lightarrowsreboot@gmail.com>
@LightArrowsEXE
Copy link
Member Author

Confirmed to be fixed by Vodes. Thanks @Setsugennoao!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant