Skip to content

Instantly share code, notes, and snippets.

diff --git a/encoder/slicetype.c b/encoder/slicetype.c
index daaf4b5b..adf0d209 100644
--- a/encoder/slicetype.c
+++ b/encoder/slicetype.c
@@ -489,7 +489,7 @@ void x264_weights_analyse( x264_t *h, x264_frame_t *fenc, x264_frame_t *ref, int
int height = ref->i_lines_lowres + PADV*2;
x264_weight_scale_plane( h, dst, ref->i_stride_lowres, src, ref->i_stride_lowres,
width, height, &weights[0] );
- fenc->weighted[0] = h->mb.p_weight_buf[0] + PADH + ref->i_stride_lowres * PADV;
+ fenc->weighted[0] = h->mb.p_weight_buf[0] + (ref->lowres[0] - ref->buffer_lowres);
@Kagami
Kagami / main.go
Created April 1, 2019 19:07
go-face example
package main
import (
"fmt"
"log"
"path/filepath"
"github.com/Kagami/go-face"
)
@Kagami
Kagami / ffmpeg.rb
Created August 23, 2018 17:40
AV1 formulae
class Ffmpeg < Formula
desc "Play, record, convert, and stream audio and video"
homepage "https://ffmpeg.org/"
url "https://ffmpeg.org/releases/ffmpeg-4.0.2.tar.xz"
sha256 "a95c0cc9eb990e94031d2183f2e6e444cc61c99f6f182d1575c433d62afb2f97"
head "https://github.com/FFmpeg/FFmpeg.git", :revision => "955a989341a5d43ba88f746b6325f5be35b48146"
bottle do
sha256 "83f8f5c5b79b7bbe6e13ab918f4bd8effb1eba2e7091a5776eeb31db84e74102" => :mojave
sha256 "5522a58020c3b5c68e5628818ee746822fe38747810c29b4aa865f4fe2803d57" => :high_sierra
From 71b9e8a8a10e87047aacf5e340359af16813f978 Mon Sep 17 00:00:00 2001
From: Kagami Hiiragi <kagami@genshiken.org>
Date: Mon, 20 Aug 2018 20:52:52 +0300
Subject: [PATCH] lavc/libaomenc: Add -tile-columns/-tile-rows
These options are required for multithreaded encoding, because they set
to zero by default in av1_cx_iface.c.
Signed-off-by: Kagami Hiiragi <kagami@genshiken.org>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <arpa/inet.h>
#include <openssl/sha.h>
#define HASH_SIZE 64
#define HEX(c) (((c)>='a')?(c)-'a'+10:((c)>='A')?(c)-'A'+10:(c)-'0')
#define NTOHLL(x) ( ( (uint64_t)(ntohl( (unsigned int)((x << 32) >> 32) )) << 32) | ntohl( ((unsigned int)(x >> 32)) ) )
@Kagami
Kagami / bench1-chrome-41.0.2251.0.txt
Created January 5, 2015 22:21
SHA-512: sha.js vs hash.js
Benchmarking: SHA-512
sha.js#SHA-512 x 101,383 ops/sec ±0.45% (42 runs sampled)
hash.js#SHA-512 x 24,485 ops/sec ±0.19% (43 runs sampled)
------------------------
Fastest is sha.js#SHA-512
========================
@Kagami
Kagami / github-proxy-ssh-tunnel-howto.md
Last active March 13, 2024 21:02
Using github through SSH tunnel
# Prerequisites: netcat-openbsd (BSD version of netcat)
$ ssh -fND 127.0.0.1:8081 user@<your-vps>
$ git config --global url."https://github".insteadOf git://github
$ git config --global http.proxy 'socks5://127.0.0.1:8081'
$ echo -e 'Host github.com\nProxyCommand nc -x 127.0.0.1:8081 %h %p' >> ~/.ssh/config

Alternative solutions: