Showing posts with label 小筆記. Show all posts
Showing posts with label 小筆記. Show all posts

Friday, December 08, 2006

在Blogger beta也可以Read More...

很多人都有寫,
不過我覺的angelo的教學是寫的最清楚的!

Wednesday, March 08, 2006

轉mpeg1


mencoder -oac lavc -ovc lavc -of mpeg -mpegopts format=vcd -vf scale=320:-2,harddup -srate 44100 -af lavcresample=44100 -lavcopts vcodec=mpeg1video:keyint=18:vrc_buf_size=327:vrc_minrate=1152:vbitrate=1152:vrc_maxrate=1152:acodec=mp2:abitrate=224 -ofps 30000/1001 -o movie_vcd.mpg input.mpg

Thursday, March 02, 2006

Gamma, bias and gain

gamma:


float gamma(float val, gam){
return pow(val, 1 / gam);
}

bias:


float bias (float x, val){
return (val > 0) ? pow(x,log(val) / log(0.5)) : 0;
}


gain:


float gain (float x, val ) {
return 0.5 * ((x < 0.5) ? bias (2*x, 1-val): (2 - bias(2-2*x,1-val)));
}


Link: rendermanacademy

Wednesday, February 15, 2006

Mount CUE/BIN in Linux

Convert CUE/BIN to iso.
Install bchunk
bchunk foo.bin foo.cue foo

Tuesday, February 07, 2006

`AM_PROG_AS' not found

set automake version
ACLOCAL=aclocal-1.8 AUTOMAKE=automake-1.8 autoreconf -f -i -s

FFmpeg compile error

Replace transpose4x4() in libavcodec/i386/dsputil_mmx.c as follows:


static inline void transpose4x4(uint8_t *dst, uint8_t *src, int dst_stride, int src_stride){
asm volatile( //FIXME could save 1 instruction if done as 8x4 ...
"movd %4, %%mm0 \n\t"
"movd %5, %%mm1 \n\t"
"movd %6, %%mm2 \n\t"
"movd %7, %%mm3 \n\t"
"punpcklbw %%mm1, %%mm0 \n\t"
"punpcklbw %%mm3, %%mm2 \n\t"
"movq %%mm0, %%mm1 \n\t"
"punpcklwd %%mm2, %%mm0 \n\t"
"punpckhwd %%mm2, %%mm1 \n\t"
"movd %%mm0, %0 \n\t"
"punpckhdq %%mm0, %%mm0 \n\t"
"movd %%mm0, %1 \n\t"
"movd %%mm1, %2 \n\t"
"punpckhdq %%mm1, %%mm1 \n\t"
"movd %%mm1, %3 \n\t"

: "=m" (*(uint32_t*)(dst + 0*dst_stride)),
"=m" (*(uint32_t*)(dst + 1*dst_stride)),
"=m" (*(uint32_t*)(dst + 2*dst_stride)),
"=m" (*(uint32_t*)(dst + 3*dst_stride))
: "m" (*(uint32_t*)(src + 0*src_stride)),
"m" (*(uint32_t*)(src + 1*src_stride)),
"m" (*(uint32_t*)(src + 2*src_stride)),
"m" (*(uint32_t*)(src + 3*src_stride))
);
}