Skip to content

Commit

Permalink
Update to v0.5.0 (#151)
Browse files Browse the repository at this point in the history
* Replace vsutil with vstools in config files

* Update exceptions

* Update imports

* Remove all deprecated functions

* Update imports

* Replace utils

* Replace types

* Update imports

* Range => FrameRange

* InvalidFormatError => InvalidColorFamilyError

* Remove old alias

* Fix typing in deblock

* Use GenericScaler

* Update vskernels usage

* Remove masked_dha

* Minor edit

* Fix types import

* Update `source`

* Fix stubs import

* Remove useless function

* Remove scale

* Add Kernel.ensure_obj

* Remove deprecated function

* Update deinterlace with FieldBased

* Remove deinterlace submodule

* Order imports

* Fix minor errors

* Update dependencies

* Semi-fix docs

* Move enums

* Finish moving to vsdeinterlace

* Fix import

* Remove aa submodule

* Update `minecraftify`

* Remove unused VSIdxFunction

* Update util submodule

* Bump requirements

* Move unsharpen to vsrgtools

* Update util submodule

* Update imports

* Merge helpers submodule into util

* Minor updates

* Remove mask stuff in favour of vsmask

* Remove `halo_mask` in favor of `vsscale.ringing_mask`

* Move progress submodule,  `get_render_progress` to vstools

* Bump major version

* Fix typing

* Update docs

* Remove recon submodule

* Remove RegressClips

* Update Matrix get in dpir

* Remove deprecated mypy option

* Bump requirements

* Remove noise submodule, moved to vsdeband
  • Loading branch information
Setsugennoao committed Nov 14, 2022
1 parent 471fbc9 commit 0bfb006
Show file tree
Hide file tree
Showing 41 changed files with 203 additions and 3,555 deletions.
7 changes: 2 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,11 @@

autodoc_mock_imports = [
"vapoursynth",
"vsexprtools",
"vstools",
"vskernels",
"vsrgtools",
"vsutil",
"vsaa",
"vsscale",
"vsdehalo",
"vsparsedvd",
"vsparsedvd"
]

# -- Extension configuration -------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions docs/getting_started/dependencies.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,9 @@ Dependencies

lvsfunc depends on the following third-party scripts:

* `havsfunc <https://github.com/HomeOfVapourSynthEvolution/havsfunc>`_
* `kagefunc <https://github.com/Irrational-Encoding-Wizardry/kagefunc>`_
* `vs-mlrt <https://github.com/AmusementClub/vs-mlrt>`_
* `vsutil <https://pypi.org/project/vsutil/>`_
* `vstools <https://pypi.org/project/vstools/>`_

The following VapourSynth libraries are also required for full functionality:

Expand Down
20 changes: 7 additions & 13 deletions docs/getting_started/primer.rst
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ You can also import individual functions from sub-modules.

.. code-block:: py
from lvsfunc.noise import chickendream
from lvsfunc.deblock import dpir
grained_clip = chickendream(clip)
deblocked_clip = dpir(clip)
This is useful if you only need a single function
and don't want to pollute your auto-completion
Expand Down Expand Up @@ -108,7 +108,7 @@ They must be used as such:
from vskernels import Bicubic
kernel = Bicubic().scale()
kernel = Bicubic.scale(...)
The "Bicubic" that was imported is simply a preset that defines the base parameters for the scaling operation.
It can be further tweaked by changing the values as such:
Expand All @@ -122,21 +122,15 @@ These are the following:

.. code-block:: python
Bicubic().scale()
Bicubic().descale()
Bicubic().resample()
Bicubic().shift()
Bicubic.scale()
Bicubic.descale()
Bicubic.resample()
Bicubic.shift()
A lot of functions accept a Kernel object.
All you need to do is simply pass a Kernel you want to use to the function,
and it will use the methods as necessary internally.

.. code-block:: python
lvf.a_function(clip, kernel=Bicubic())
If you run into a kernel-related error, you may need to simply pass the class, not an object!

.. code-block:: python
lvf.a_function(clip, kernel=Bicubic)
6 changes: 2 additions & 4 deletions docs/getting_started/quickstart.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,16 +33,14 @@ Usage Instructions

.. code-block:: python
import vapoursynth as vs
from vstools import vs, core
import lvsfunc as lvf
core = vs.core
5. Call functions as necessary

.. code-block:: python
src = lvf.misc.source("C:/PATH/TO/VIDEO.mkv")
src = lvf.source("C:/PATH/TO/VIDEO.mkv")
.. important::

Expand Down
7 changes: 0 additions & 7 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,13 @@ Want to contribute to lvsfunc? Check out the `how to contribute <contribute>` se
:caption: Filters
:titlesonly:

submodules/aa
submodules/comparison
submodules/deblock
submodules/dehalo
submodules/dehardsub
submodules/deinterlace
submodules/exceptions
submodules/helpers
submodules/mask
submodules/misc
submodules/noise
submodules/recon
submodules/render
submodules/scale
submodules/types
submodules/util

Expand Down
3 changes: 1 addition & 2 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Pygments==2.12.0
pyparsing==3.0.8
pytz==2022.1
requests==2.27.1
rich==12.2.0
rich==12.6.0
snowballstemmer==2.2.0
Sphinx==5.1.1
sphinx-autodoc-typehints==1.19.2
Expand All @@ -26,5 +26,4 @@ sphinxcontrib-htmlhelp==2.0.0
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.3
sphinxcontrib-serializinghtml==1.1.5
typing-extensions==3.10.0.0
urllib3==1.26.9
28 changes: 0 additions & 28 deletions docs/submodules/aa.rst

This file was deleted.

20 changes: 0 additions & 20 deletions docs/submodules/dehalo.rst

This file was deleted.

25 changes: 0 additions & 25 deletions docs/submodules/deinterlace.rst

This file was deleted.

18 changes: 0 additions & 18 deletions docs/submodules/helpers.rst

This file was deleted.

5 changes: 1 addition & 4 deletions docs/submodules/mask.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ messing with your masked output.
lvsfunc.mask.DeferredMask
lvsfunc.mask.detail_mask
lvsfunc.mask.detail_mask_neo
lvsfunc.mask.fine_dehalo_mask
lvsfunc.mask.halo_mask
lvsfunc.mask.mt_xxpand_multi
lvsfunc.mask.range_mask

.. autoclass:: lvsfunc.mask.BoundingBox
Expand All @@ -38,4 +35,4 @@ messing with your masked output.
:members:
:undoc-members:
:show-inheritance:
:exclude-members: BoundingBox, DeferredMask, minm, maxm
:exclude-members: BoundingBox, DeferredMask
1 change: 0 additions & 1 deletion docs/submodules/misc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Miscellaneous functions and wrappers that don't really have a place elsewhere.
lvsfunc.misc.overlay_sign
lvsfunc.misc.shift_tint
lvsfunc.misc.source
lvsfunc.misc.unsharpen
lvsfunc.misc.wipe_row

.. automodule:: lvsfunc.misc
Expand Down
18 changes: 0 additions & 18 deletions docs/submodules/noise.rst

This file was deleted.

16 changes: 0 additions & 16 deletions docs/submodules/recon.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/submodules/render.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Clip rendering helpers.

lvsfunc.render.clip_async_render
lvsfunc.render.find_scene_changes
lvsfunc.render.get_render_progress

.. automodule:: lvsfunc.render
:members:
Expand Down
21 changes: 0 additions & 21 deletions docs/submodules/scale.rst

This file was deleted.

17 changes: 2 additions & 15 deletions docs/submodules/types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,11 @@ These are generally generic enough to allow other maintainers to make use of the

.. autosummary::

lvsfunc.types._VideoNode
lvsfunc.types.Coordinate
lvsfunc.types.Dar
lvsfunc.types.Direction
lvsfunc.types.IndexExists
lvsfunc.types.IndexFile
lvsfunc.types.IndexingType
lvsfunc.types.IndexType
lvsfunc.types.MISSING
lvsfunc.types.MissingT
lvsfunc.types.Position
lvsfunc.types.Range
lvsfunc.types.Region
lvsfunc.types.RegressClips
lvsfunc.types.SceneChangeMode
lvsfunc.types.Shapes
lvsfunc.types.Position
lvsfunc.types.Size
lvsfunc.types.VSIdxFunction
lvsfunc.types.RegressClips

.. autoclass:: lvsfunc.types
:members:
Expand Down
11 changes: 0 additions & 11 deletions docs/submodules/util.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,11 @@ Some of these may also be useful for regular scripting or other modules.

.. autosummary::

lvsfunc.util.allow_variable
lvsfunc.util.check_variable
lvsfunc.util.chroma_injector
lvsfunc.util.colored_clips
lvsfunc.util.frames_since_bookmark
lvsfunc.util.load_bookmarks
lvsfunc.util.match_clip
lvsfunc.util.normalize_ranges
lvsfunc.util.padder
lvsfunc.util.quick_resample
lvsfunc.util.replace_ranges
lvsfunc.util.scale_peak
lvsfunc.util.scale_thresh

.. automodule:: lvsfunc.util
:members:
:undoc-members:
:show-inheritance:
:exclude-members: rfs
13 changes: 3 additions & 10 deletions lvsfunc/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,13 @@

# flake8: noqa

from . import (aa, comparison, deblock, dehalo, dehardsub, deinterlace, exceptions, fun, helpers, mask, misc, noise,
recon, render, scale, types, util)
from .aa import *
from . import comparison, deblock, dehardsub, exceptions, mask, misc, render, types, util
from .comparison import *
from .deblock import *
from .dehalo import *
from .dehardsub import *
from .deinterlace import *
from .exceptions import *
from .mask import *
from .misc import *
from .noise import *
from .recon import *
from .render import *
from .scale import *
from .types import *
from .util import *

denoise = noise
Loading

0 comments on commit 0bfb006

Please sign in to comment.