Skip to content

Instantly share code, notes, and snippets.

View dubhater's full-sized avatar

Bitterblue dubhater

View GitHub Profile
@dubhater
dubhater / survey.txt
Created September 23, 2022 21:49
Survey for users of RTL8188FU
1. Which "cut" does the driver report for your device? Mine is "B_CUT":
RTL871X: Chip Version Info: CHIP_8188F_Normal_Chip_SMIC_B_CUT_1T1R_RomVer(0)
2. What is your device called? If it has a name, e.g Comfast TL-blahblah. Mine is unbranded.
3. Do you use anything other than station mode? Which modes?
Leave a comment!
import vapoursynth as vs
import sys
import os
import argparse
parser = argparse.ArgumentParser(description="Detect combed frames and write them in a log file.")
parser.add_argument("folder", help="path to a folder to process")
parser.add_argument("--applyrff", help="tell d2vsource to apply the RFF flags", action="store_true")
parser.add_argument("--vfm", help="use VFM after the source filter", action="store_true")
--- openexr-2.2.0/IlmImf/ImfSystemSpecific.h 2014-08-10 07:23:57.000000000 +0300
+++ openexr-2.2.0/IlmImf/ImfSystemSpecific.h 2017-05-24 22:28:12.713121986 +0300
@@ -62,15 +62,14 @@
static void* EXRAllocAligned(size_t size, size_t alignment)
{
- void* ptr = 0;
- posix_memalign(&ptr, alignment, size);
+ void* ptr = _aligned_malloc(size, alignment);
return ptr;
@dubhater
dubhater / seek-test.py
Last active July 11, 2023 14:28
Test the reliability of your favourite source filter
# Usage:
# python3 seek-test.py file.mkv [start_frame end_frame]
#
# Change the source filter as needed.
# Note: this script is slow because making the source filter decode frames randomly is slow.
import vapoursynth as vs
#include <stdlib.h>
#include "VapourSynth.h"
#include "VSHelper.h"
#include <stdint.h>
typedef struct least_squares_data
{
int64_t integral_x;
int64_t integral_y;
int64_t integral_xy;
#!/usr/bin/env python3
# The idea is that tfm will put nc matches (n[nc]cc) in the correct position a lot more often than in other positions.
# TODO:
# remove unneeded leftovers
# add a separate mode of operation, so to speak, which only searches for cycles without decimation overrides
# output some stats: number of sections analysed, number of sections modified, maybe number of sections with a particular pattern
# print a summary of the actions before doing anything ("analysing only the error log. using three n matches always/never/when vmetric is lower. dropping the first duplicate/the duplicate with higher vmetric.")
@dubhater
dubhater / decimation-overrides.py
Created November 19, 2013 10:37
A script that makes sure tdecimate doesn't screw up your perfect Yatta IVTC.
#!/usr/bin/env python3
import sys
def print_usage():
print("Prints the frame numbers of cycles that don't have decimation overrides.")
print("\nUsage:")
print("{} file.dec.txt [frame_count]".format(sys.argv[0]))
print("\nNote: if the frame count is not specified, the cycles after the last cycle with overrides will be disregarded.")
@dubhater
dubhater / derp.py
Last active October 13, 2015 12:07 — forked from torque/derp.py
#!/usr/bin/env python3
import sys
import vapoursynth as vs
core = vs.get_core(add_cache=False)
# assume ffms2 and scxvid got autoloaded
vid = core.ffms2.Source(sys.argv[1])