2010年10月25日 星期一

file size in linux

check file size in linux (also for directory)

du -s

Displays the total disk space used by the specified directory.
du -h
Displays the current folder capacity.(in M K G)

2010年7月7日 星期三

OpenMAX Introduction

OpenMAX Introduction

1OpenMAX Introduction
OpenMAX 是由Khronos組織所訂定的跨平台多媒體介面標準,其目的是為了降低日益增加的多媒體格式複雜度,使得多媒體應用程式開發人員可以直接使用軟體或特殊硬體進行編碼、解碼的加速或優化,而對外保持統一的接口,使得編碼解碼更為便利。
OpenMAX在該標準訂定了三層介面,如圖figure 1所示:
Figure 1


2010年6月16日 星期三

Mpeg2 video note

opencore小記:

在取m2v height and width的時候 必須從Sequence Header的第5,6,7,byte去取

ex:seqence header buffer :  00  00  01  B3  xx  xx  xx

其中width是前三個x也就是12個bits,height 是後三個x

但因為最小單位是byte的原故所以要手動拆第6個byte

這裡用的方法是:
tempW=(int)pNalBuffer[4];
tempW=(tempW<<4)+(pNalBuffer[5]>>4);
tempH=(int)pNalBuffer[5];
tempH=(tempH<<8)+(pNalBuffer[6]);



不知道有沒有更好的解法~



Matlab 型態轉換

一開始覺得Matlab是一個彈性很高的語言

很多變數都不需經過宣告就可以只接使用和傳遞

可是到了最近

發現以前在資工上程式語言的書上提到的一些毛病都一一浮現出來了= =

其中卡了兩三天的issue就是型態的轉換

其實只要這麼下就好了...

dec2hex(typecast(int8(bytex(i)),'uint8'));

%cast int8 variable to unsigned int8,then transfer to hex from decimal

%aim:big5 to utf-8