Skip to content

Instantly share code, notes, and snippets.

#/usr/lib/ruby
require 'bmffglitch'
ifn=ARGV[0]
ofn=ARGV[1]
if (ARGV.length != 2)
STDERR.puts "test.rb <input_filename> <output_filename>"
exit
@sabishirop
sabishirop / base.rb
Last active March 29, 2019 03:27
BMFFGlitch: A library to destroy your movies stored in ISO Base Media File Format(BMFF) and its relatives(such as MP4), like AviGlitch
require 'bmffglitch/bmffex.rb'
module BMFFGlitch
class Base
attr_accessor :samples
def initialize(path)
@io = File.open(path, 'rb')
@file_container = BMFF::FileContainer.parse(@io)
@samples = get_samples(@file_container)
#! /usr/bin/ruby
require 'optparse'
opt = OptionParser.new
DEFAULT_ENCODING="UTF-16BE"
#DEFAULT_ENCODING="UTF-8"
DEFAULT_ERROR_RATIO=0.02
@sabishirop
sabishirop / gist:bb625414ce214cd3180b673d0f03d74d
Created January 24, 2018 10:49
Pomera DM200 Battery Status for Emacs
(defun battery-linux-dm200 ()
"Get battery status information of Pomera DM200 from Linux kernel.
The following %-sequences are provided:
%r Current rate
%B Battery status (verbose)
%L AC line status (verbose)
%p Battery load percentage"
(let (remain_capacity charging-state
(power-now 0.0)
(voltage-now 10.8)) ;Arbitrary default, in case the info is missing.
diff --git a/xvidcore/src/motion/motion_comp.c b/xvidcore/src/motion/motion_comp.c
index 77aa2b8..19de4aa 100644
--- a/xvidcore/src/motion/motion_comp.c
+++ b/xvidcore/src/motion/motion_comp.c
@@ -144,7 +144,7 @@ CompensateChroma( int dx, int dy,
const int32_t stride,
const int rounding)
{ /* uv-block-based compensation */
-
+ return;
diff --git a/xvidcore/src/motion/motion_comp.c b/xvidcore/src/motion/motion_comp.c
index 77aa2b8..be073fa 100644
--- a/xvidcore/src/motion/motion_comp.c
+++ b/xvidcore/src/motion/motion_comp.c
@@ -279,6 +279,7 @@ MBMotionCompensationBVOP(MBParam * pParam,
const VECTOR * const fmvs = (quarterpel ? mb->qmvs : mb->mvs);
const VECTOR * const bmvs = (quarterpel ? mb->b_qmvs : mb->b_mvs);
+ mb->mode = MODE_FORWARD;
switch (mb->mode) {
#! /usr/bin/ruby
require 'optparse'
require 'pnglitch'
FILTER_DEFAULT = nil
GRAFT_DEFAULT = 0
$options = {
#! /usr/bin/ruby
require 'optparse'
require 'pnglitch'
FILTER_DEFAULT = nil
$options = {
:filter => FILTER_DEFAULT
}
--- jpeg-9b/jchuff.c 2013-10-26 08:20:14.000000000 +0900
+++ jpeg-9b.new/jchuff.c 2017-01-26 01:40:16.496200000 +0900
@@ -23,7 +23,7 @@
#define JPEG_INTERNALS
#include "jinclude.h"
#include "jpeglib.h"
-
+#include "jmemsys.h"
/* The legal range of a DCT coefficient is
/*
* pgm2txt: simple program to convert pgm to html using netpbm and aalib
* This file is derived from pgmtopstext.c from http://www.media.mit.edu/~nelson/ and originally written by Nelson Minar <nelson@media.mit.edu>
*/
#include <stdio.h>
#include <aalib.h>
#include <netpbm/pgm.h>
typedef struct {