Skip to content

Instantly share code, notes, and snippets.

View astiob's full-sized avatar

Oleg Oshmyan astiob

View GitHub Profile
@astiob
astiob / test.ass
Created September 25, 2013 22:08
Very basic test script for libass/VSFilter opaque border width compatibility
[Script Info]
Title: Default Aegisub file
ScriptType: v4.00+
WrapStyle: 0
PlayResX: 640
PlayResY: 480
ScaledBorderAndShadow: yes
YCbCr Matrix: None
[V4+ Styles]
------------------------- WARNING -----------------------
The specified prefix '/usr/local/Cellar/rubinius/2.0.0' already exists.
Installing Rubinius into an existing directory may
overwrite existing unrelated files or cause conflicts
between different versions of Rubinius files.
---------------------------------------------------------
Checking gcc: found
Checking g++: found
Checking bison: found
Configuring LLVM...
@astiob
astiob / [Underwater-FFF] Saki Zenkoku-hen - The Nationals - 04 [BD][1080p-FLAC][8DD8F1C9].diff
Last active August 29, 2015 13:55
Corrections to Underwater–FFF’s Saki: Zenkoku-hen (default track)
--- a/[Underwater-FFF] Saki Zenkoku-hen - The Nationals - 04 [BD][1080p-FLAC][8DD8F1C9].ass
+++ b/[Underwater-FFF] Saki Zenkoku-hen - The Nationals - 04 [BD][1080p-FLAC][8DD8F1C9].ass
@@ -302,7 +302,7 @@
Dialogue: 3,0:10:32.02,0:10:33.68,BoxText,,0,0,0,,{\fs28\fad(150,0)\fsp-1.3\blur0.4\pos(1036.864,212.955)}East \NHand 1\N-\NBonus 3
Dialogue: 1,0:10:32.02,0:10:33.68,BoxWhite,,0,0,0,,{\fad(150,0)\blur0.5\fscx260\fscy450\p1\c&HFFFDFB&\pos(987.083,130.531)}m 0 0 l 0 38 38 38 38 0
Dialogue: 9,0:10:35.90,0:10:39.58,Default,,0,0,0,,{\i1}I guess even {\i0}she{\i1} doesn't get \Nconsecutive double riichis.
-Dialogue: 9,0:10:46.54,0:10:48.84,Default,,0,0,0,,{\an8\i1}My hand stopped building at a point
+Dialogue: 9,0:10:46.54,0:10:48.84,Default,,0,0,0,,{\an8\i1}My hand stopped{ building}{isn't she talking about her physical hand? like... the end of her arm} at a point
Dialogue: 9,0:10:48.84,0:10:50.40,Default,,0,0,0,,{\an8\alpha&HFF&\fscx60}...{\r}{\i1}where I would normally never hesitate...
Dialogue: 9,0:10:50.
@astiob
astiob / be.ass
Last active August 29, 2015 13:57
ASS blur tests
[Script Info]
ScriptType: v4.00+
WrapStyle: 0
PlayResX: 1280
PlayResY: 320
ScaledBorderAndShadow: yes
YCbCr Matrix: TV.709
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
@astiob
astiob / 0001-MSVC-ilog2.patch
Created April 27, 2014 00:30
11rcombs/libass/rasterizer: MSVC ilog2
From 3183dff76442ac06e4fb19fd2f7be99a34d18522 Mon Sep 17 00:00:00 2001
From: Oleg Oshmyan <[email protected]>
Date: Sun, 27 Apr 2014 01:28:59 +0100
Subject: [PATCH] MSVC ilog2
---
libass/ass_rasterizer.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libass/ass_rasterizer.c b/libass/ass_rasterizer.c
[Script Info]
ScriptType: v4.00+
PlayResX: 1280
PlayResY: 720
ScaledBorderAndShadow: yes
YCbCr Matrix: None
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,60,&H000000FF,&HFF0000FF,&H00000000,&H000000FF,0,0,0,0,100,100,0,0,1,0,0,5,10,10,20,1
@astiob
astiob / render_subtitles_rgb24.c
Last active August 29, 2015 14:13
Code fragment blending ASS_Images onto an RGB surface
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#define dither() (rand() / (RAND_MAX + 1.0L))
typedef struct
{
size_t w, h;
struct rgb24_pixel { uint8_t r, g, b; } samples[];
@astiob
astiob / libass-asm-test.ass
Last active October 10, 2015 11:07
libass assembler code sanity check
[Script Info]
ScriptType: v4.00+
PlayResX: 1280
PlayResY: 720
ScaledBorderAndShadow: yes
YCbCr Matrix: None
[V4+ Styles]
Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding
Style: Default,Arial,18,&H00000000,&H00000000,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,0,0,2,0,0,50,1
@astiob
astiob / bit.c
Last active September 5, 2024 18:25
Dynamic range maximum query
saidx_t range_max(const saidx_t *restrict data,
const saidx_t *restrict left_tree,
const saidx_t *restrict right_tree,
size_t first, size_t last)
{
assert(first < last);
saidx_t value = -1;
for (; (first | first + 1) < last; first |= first + 1)
if (value < right_tree[first])
@astiob
astiob / 0_id.log
Last active April 13, 2016 21:07
mpv build log on Raspberry Pi 3
pi@raspberrypi:~/mpv-build $ uname -a
Linux raspberrypi 4.1.19-v7+ #858 SMP Tue Mar 15 15:56:00 GMT 2016 armv7l GNU/Linux
pi@raspberrypi:~/mpv-build $ gcc --version
gcc (Raspbian 4.9.2-10) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.