minideen: init at 2

This commit is contained in:
Aidan Gauland 2022-11-11 08:29:41 +13:00 committed by Tadeo Kondrak
parent 9da59ca532
commit 3d0f0f2fe5
3 changed files with 56 additions and 0 deletions

View file

@ -43,6 +43,7 @@ in
knlmeanscl = prev.callPackage ./plugins/knlmeanscl { }; knlmeanscl = prev.callPackage ./plugins/knlmeanscl { };
lsmashsource = prev.callPackage ./plugins/lsmashsource { }; lsmashsource = prev.callPackage ./plugins/lsmashsource { };
median = prev.callPackage ./plugins/median { }; median = prev.callPackage ./plugins/median { };
minideen = prev.callPackage ./plugins/minideen { };
miscfilters-obsolete = prev.callPackage ./plugins/miscfilters-obsolete { }; miscfilters-obsolete = prev.callPackage ./plugins/miscfilters-obsolete { };
motionmask = prev.callPackage ./plugins/motionmask { }; motionmask = prev.callPackage ./plugins/motionmask { };
msmoosh = prev.callPackage ./plugins/msmoosh { }; msmoosh = prev.callPackage ./plugins/msmoosh { };

View file

@ -0,0 +1,42 @@
{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
, pkg-config
, vapoursynth
}:
stdenv.mkDerivation rec {
pname = "vapoursynth-minideen";
version = "2";
src = fetchFromGitHub {
owner = "dubhater";
repo = pname;
rev = "v${version}";
sha256 = "sha256-nwKK/dojmYEG/8d3shxyynNh0BbZbMk5ilvWtFBYzms=";
};
nativeBuildInputs = [
meson
ninja
pkg-config
];
buildInputs = [ vapoursynth ];
NIX_CFLAGS_COMPILE = [
"-O3"
];
mesonFlags = [ "--libdir=${placeholder "out"}/lib/vapoursynth" ];
meta = with lib; {
description = "Spatial denoising plugin for VapourSynth";
homepage = "https://github.com/dubhater/vapoursynth-minideen";
license = licenses.isc;
maintainers = with maintainers; [ aidalgol ];
platforms = platforms.all;
};
}

View file

@ -0,0 +1,13 @@
diff --git a/src/minideen.cpp b/src/minideen.cpp
index d138888..2b81d6e 100644
--- a/src/minideen.cpp
+++ b/src/minideen.cpp
@@ -119,7 +119,7 @@ static void process_plane_sse2_8bit(const uint8_t *srcp, uint8_t *dstp, int firs
__m128i magic_hi = zeroes;
for (int i = 0; i < 8; i++) {
- uint16_t e_lo = _mm_extract_epi16(counter_lo, i);
+ uint16_t e_lo = _mm_extract_epi16(counter_lo, 0);
uint16_t e_hi = _mm_extract_epi16(counter_hi, i);
magic_lo = _mm_insert_epi16(magic_lo, magic[e_lo], i);
magic_hi = _mm_insert_epi16(magic_hi, magic[e_hi], i);