Skip to content

Instantly share code, notes, and snippets.

Luca Barbato lu-zero

Block or report user

Report or block lu-zero

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@lu-zero
lu-zero / gist:9400fc7b2fba1f35d118
Created Aug 20, 2014
Building libav for ios/arm64
View gist:9400fc7b2fba1f35d118
../configure \
--cc=`xcrun -f --sdk iphoneos7.1 clang` \
--arch=aarch64 \
--cpu=generic \
--sysroot=`xcrun --sdk iphoneos7.1 --show-sdk-path` \
--target-os=darwin \
--extra-cflags='-arch arm64' \
--extra-ldflags='-arch arm64 -miphoneos-version-min=7.0' \
--enable-cross-compile
View keybase.md

Keybase proof

I hereby claim:

  • I am lu-zero on github.
  • I am lu_zero (https://keybase.io/lu_zero) on keybase.
  • I have a public key whose fingerprint is 1965 8F02 6BD4 3483 3265 5B05 6DEF F12B 9916 8B55

To claim this, I am signing this object:

@lu-zero
lu-zero / gist:75a260874bb9931c6304
Created Jan 9, 2015
gnutls build system is horrid...
View gist:75a260874bb9931c6304
SRC_nettle="http://www.lysator.liu.se/~nisse/archive/nettle-2.7.1.tar.gz"
SRC_libtasn1="http://distfiles.gentoo.org/distfiles/libtasn1-4.2.tar.gz"
SRC_gmp="http://distfiles.gentoo.org/distfiles/gmp-6.0.0a.tar.xz"
SRC_gnutls="http://distfiles.gentoo.org/distfiles/gnutls-3.3.11.tar.xz"
#AUTOTOOL_SRC="gmp nettle libtasn1 gnutls"
AUTOTOOL_SRC="gmp nettle libtasn1 gnutls"
ROOTDIR="$PWD";
@lu-zero
lu-zero / mms_open.c
Created Jan 21, 2015
How to open mms:// url in Libav
View mms_open.c
/*
* How to open mms:// url in Libav
*
* Libav 12 will sport a chained protocol that aliases to the following
*
*/
int example_open(AVFormatContext **ic, const char *url)
{
View libav.rb
class Libav < Formula
homepage "https://libav.org/"
url "https://libav.org/releases/libav-11.3.tar.xz"
sha256 "12ae6c051967765ae5faeddf94c4584129ac0b18edb884afffc5fcedcdb5e030"
head "git://git.libav.org/libav.git"
bottle do
sha256 "9a5947ed844346e6833fd13321ff794038c980cbfb02960a4627b3b53b9a6def" => :yosemite
sha256 "8d231acea028c5c6c942a91ed206ade71355a467f8c525a43b7d47257f51b4df" => :mavericks
@lu-zero
lu-zero / tesla-nvenc-libav-benchmark.md
Last active Sep 2, 2015
Playing with a Tesla K20m
View tesla-nvenc-libav-benchmark.md

Step 1: install cuda & nvenc

e.g. emerge nvidia-cuda-sdk

Step 2: build libav

git clone git://github.com/libav/libav
cd libav
./configure --enable-nvenc --extra-cflags="-I/path/to/cuda/include -I/path/to/nvenc/include"
make -j 18
View base.html
<!doctype html>
<html>
<head>
<title>Plaid - {{title}}</title>
<link rel="stylesheet" type="text/css" href="{{url_for('static', filename='css/bootstrap.css')}}" />
<link rel="stylesheet" type="text/css" href="{{url_for('static', filename='css/bootstrap-theme.css')}}" />
<link rel="stylesheet" type="text/css" href="{{url_for('static', filename='css/octicons.css')}}" />
<link rel="stylesheet" type="text/css" href="{{url_for('static', filename='css/plaid.css')}}" />
{% block head %}{% endblock %}
</head>
View gist:1074275
- pb = avio_alloc_context(framebuf, 1000*1000, URL_RDONLY, opaque, read_packet_from_queue, NULL, NULL);
- pb->is_streamed = 1;
+ pb = avio_alloc_context(framebuf, 1000*1000, 0, opaque, read_packet_from_queue, NULL, NULL);
+ pb->seekable = 0;
+ avfc->pb = pb;
View Diego's reply
On Sun, Nov 27, 2011 at 10:07:55PM +0200, Asen Lekov wrote:
> --- a/libavcodec/snow.c
> +++ b/libavcodec/snow.c
> @@ -35,46 +35,51 @@
>
> s->b_width = w;
> - s->b_height= h;
> + s->b_height = h;
Here (and in similar places) the '=' should end up vertically aligned,
i.e.:
@lu-zero
lu-zero / yuv4mpeg-review.diff
Created Nov 30, 2011
Some corrections for you
View yuv4mpeg-review.diff
diff --git a/libavformat/yuv4mpeg.c b/libavformat/yuv4mpeg.c
index e1db1a3..f80d2bc 100644
--- a/libavformat/yuv4mpeg.c
+++ b/libavformat/yuv4mpeg.c
@@ -42,7 +42,8 @@ static int yuv4_generate_header(AVFormatContext *s, char* buf)
width = st->codec->width;
height = st->codec->height;
- av_reduce(&raten, &rated, st->codec->time_base.den, st->codec->time_base.num, (1UL<<31)-1);
+ av_reduce(&raten, &rated, st->codec->time_base.den,
You can’t perform that action at this time.