Skip to content

Instantly share code, notes, and snippets.

@astrataro
astrataro / lavf-build.sh
Last active August 29, 2015 14:05
build and update LAVFilters
#!/usr/bin/env bash
# determine which ramdisk to use
for VOL_NAME in A B X; do
VOL_SIZE=$(df 2>nul | grep -i "${VOL_NAME}:" | awk '{print $4}')
if [ -n "$VOL_SIZE" ] && [ $VOL_SIZE -ge 921600 ]; then
RAMD=/${VOL_NAME}/
break
fi
done
@astrataro
astrataro / gist:1462770
Created December 11, 2011 21:12 — forked from SAPikachu/gist:1131739
x264: skips depth filter when possible
a68cd9bf80f359d376cce02a295299302ed95d02
filters/video/depth.c | 7 +++++++
input/avs.c | 5 +++++
input/raw.c | 9 ++++++++-
x264.h | 1 +
4 files changed, 21 insertions(+), 1 deletions(-)
diff --git a/filters/video/depth.c b/filters/video/depth.c
index 25dde25..b6cf1a5 100644
--- a/filters/video/depth.c
@astrataro
astrataro / avc_refcalc.py
Created April 7, 2012 03:48
avc_refcalc.py 0.20mod2 ( add level=5.2 and profile=high10/high422/high444p, update for python 3 )
#!/usr/bin/env python3
# coding: utf-8
#****************************************************************************
# avc_refcalc.py 0.20mod2
# written by Chikezun
# modified by 06_taro
# Reference literature:
# インプレス標準教科書シリーズ改訂版 H.264/AVC教科書
# 著者:(監修)大久保 榮/(編者)角野 眞也、菊池 義浩、鈴木 輝彦
@astrataro
astrataro / TAEC.py
Created April 7, 2012 04:20
TAEC(Tiny Avc Encode Consultant).py 0.3.3mod2 ( add level=5.2 and profile=high10/high422/high444p, update for python 3 )
#!/usr/bin/env python3
# coding: utf-8
#****************************************************************************
# TAEC(Tiny Avc Encode Consultant).py
# written by Chikezun
# modified by 06_taro
# Reference literature:
# Rec. ITU-T H.264 (06/2011) – Superseded version
# インプレス標準教科書シリーズ改訂版 H.264/AVC教科書
# 著者:(監修)大久保 榮/(編者)角野 眞也、菊池 義浩、鈴木 輝彦
@astrataro
astrataro / gist:2384379
Created April 14, 2012 13:21
makediff16.avsi
FUNCTION makediff16(clip a, clip b, int "Y", int "U", int "V"){
Y = Default(Y, 3)
U = Default(U, 3)
V = Default(V, 3)
addend = b.Dither_lut16("65536 x -", Y=Y==3?3:1, U=U==3?3:1, V=V==3?3:1)
wrap = b.Dither_lut16("x 0 == 1 0 ?", Y=Y==3?3:1, U=U==3?3:1, V=V==3?3:1)
diff = Dither_add16(a, addend, Y=Y==3?3:1, U=U==3?3:1, V=V==3?3:1, dif=true)
\ .Dither_add16(wrap, Y=Y==3?3:1, U=U==3?3:1, V=V==3?3:1, dif=false)
@astrataro
astrataro / libav-fdk_aac.diff
Created June 29, 2012 15:35
libav: support libfdk_aac
diff --git a/configure b/configure
index 465607d..3b2472a 100755
--- a/configure
+++ b/configure
@@ -170,6 +170,7 @@ External library support:
--enable-libdc1394 enable IIDC-1394 grabbing using libdc1394
and libraw1394 [no]
--enable-libfaac enable FAAC support via libfaac [no]
+ --enable-libfdk-aac enable AAC support via libfdk-aac [no]
--enable-libfreetype enable libfreetype [no]
@astrataro
astrataro / gist:4145836
Created November 25, 2012 23:18 — forked from anonymous/gist:4123913
sox ffmpeg support fix
diff --git a/m4/ffmpeg.m4 b/m4/ffmpeg.m4
index 11c8623..40e5ac4 100644
--- a/m4/ffmpeg.m4
+++ b/m4/ffmpeg.m4
@@ -49,7 +49,7 @@ then
LIBS="$LIBS $FFMPEG_LIBS"
have_ffmpeg="no"
AC_CHECK_HEADERS([libavformat/avformat.h ffmpeg/avformat.h],
- [AC_CHECK_LIB(avformat, av_open_input_file,
+ [AC_CHECK_LIB(avformat, avformat_open_input,
diff --git a/libavcodec/libvpxdec.c b/libavcodec/libvpxdec.c
index 7e41e80..89526cd 100644
--- a/libavcodec/libvpxdec.c
+++ b/libavcodec/libvpxdec.c
@@ -145,7 +145,7 @@ AVCodec ff_libvpx_vp9_decoder = {
.init = vp9_init,
.close = vp8_free,
.decode = vp8_decode,
- .capabilities = CODEC_CAP_AUTO_THREADS | CODEC_CAP_EXPERIMENTAL,
+ .capabilities = CODEC_CAP_AUTO_THREADS,
@astrataro
astrataro / x264_tMod-clone.sh
Created March 12, 2013 09:55
Just for people who need it. Note that I haven't pushed rev2273/2274 on GitHub ( only available as patches on my blog ), as I'm still wait for L-SMASH's *official* merge to avoid messing up revision numbers. So right now you may not get full codes using this script.
#!/usr/bin/env bash
# Originally for L-SMASH project.
# Modified for tMod.
# I do not claim any further copyright.
# This file is part of L-SMASH project.
# http://github.com/silverfilain/x264_L-SMASH
# Copyright (C) 2010-2013 L-SMASH project
#!/usr/bin/env bash
# Originally for L-SMASH project.
# Modified for tMod.
# I do not claim any further copyright.
# This file is part of L-SMASH project.
# http://github.com/silverfilain/x264_L-SMASH
# Copyright (C) 2010-2013 L-SMASH project