Skip to content

CAMBI: scores=True broken with some resolutions #9

@NSQY

Description

@NSQY

This bug is nasty as it only presents itself when banding is detected, std.BlankClip will not show anything. Appears to only be present when input is 10-bit.

>>> print(vs.core.version())
VapourSynth Video Processing Library
Copyright (c) 2012-2021 Fredrik Mellbin
Core R58
API R4.0
API R3.6
Options: -
>>> core.akarin.Version()
{'expr_backend': b'llvm', 'expr_features': [b'x.property', b'sin', b'cos', b'%', b'clip', b'clamp', b'N', b'X', b'Y', b'pi', b'width', b'height', b'trunc', b'round', b'floor', b'var@', b'var!', b'x[x,y]', b'x[x,y]:m', b'drop', b'sort'], 'version': b'v0.92-8-gde866cb'}
import vapoursynth as vs
core = vs.core

# no error with blankclip:
# src = core.std.BlankClip(width=1099, height=800, format=vs.YUV444P10)
src = core.ffms2.Source(
    'native.mkv'
).resize.Bicubic(width=1099, height=800, format=vs.YUV444P10)

cambi = src.akarin.Cambi(scores=True, topk=0.0001, tvi_threshold=0.0001)
cambi.text.FrameProps("CAMBI").set_output(0)
for i in range(5):
    scale = cambi.std.PropToClip('CAMBI_SCALE%d' % i)
    scale.set_output(i+1)

Other misc broken clips:
width=1282, height=720, format=vs.GRAY10
width=1100, height=800, format=vs.YUV444P10

errors:

[1]    89025 segmentation fault (core dumped)  vspipe -p cambi.vpy -o 0 .
[1]    88878 segmentation fault (core dumped)  vspipe -p cambi.vpy -o 1 .
[1]    88954 IOT instruction (core dumped)  vspipe -p cambi.vpy -o 2 .
[1]    89098 IOT instruction (core dumped)  vspipe -p cambi.vpy -o 3 .
[1]    89182 segmentation fault (core dumped)  vspipe -p cambi.vpy -o 4 .
[1]    89254 segmentation fault (core dumped)  vspipe -p cambi.vpy -o 5 .
corrupted double-linked list
corrupted size vs. prev_size
double free or corruption (!prev)
Fatal: Filter Cambi declared the size 1099x800, but it returned a frame with the size 331x800
VapourSynth encountered a fatal error: Filter Cambi declared the size 1099x800, but it returned a frame with the size 331x800

meson build:

The Meson build system
Version: 0.62.0
Source dir: /home/nsqy/.cache/paru/clone/vapoursynth-plugin-vsakarin-git/src/vsakarin
Build dir: /home/nsqy/.cache/paru/clone/vapoursynth-plugin-vsakarin-git/src/build
Build type: native build
Project name: Plugin
Project version: 8
C compiler for the host machine: clang (clang 13.0.1 "clang version 13.0.1")
C linker for the host machine: clang ld.bfd 2.38
C++ compiler for the host machine: clang++ (clang 13.0.1 "clang version 13.0.1")
C++ linker for the host machine: clang++ ld.bfd 2.38
Host machine cpu family: x86_64
Host machine cpu: x86_64
llvm-config found: YES (/usr/bin/llvm-config) 13.0.1
Run-time dependency LLVM (modules: asmprinter, executionengine, native, orcjit, target) found: YES 13.0.1
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Run-time dependency vapoursynth found: YES 58
Build targets in project: 2
NOTICE: Future-deprecated features used:
 * 0.56.0: {'dependency.get_pkgconfig_variable'}

Plugin 8

  User defined options
    auto_features: enabled
    buildtype    : release
    libexecdir   : lib
    prefix       : /usr
    sbindir      : bin
    wrap_mode    : nodownload
    b_lto        : true
    b_pie        : true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions