2014年5月6日 星期二
AAC之FAAC格式
在使用 MP4v2 製作 .mp4 檔案時,如果你要使用的 Audio 編碼格式是 AAC,那麼你就需要使用 MP4SetTrackESConfiguration 這個函式來設定解碼需要的資料。在網路上看到的例子都是以 FAAC 編碼為居多,大多都可以參考需要的設定
5 bits | 4 bits | 4 bits | 3 bits
第一欄 第二欄 第三欄 第四欄
第一欄:AAC Object Type
第二欄:Sample Rate Index
第三欄:Channel Number
第四欄:Don't care,設 0
/* AAC object types */
#define MAIN 1
#define LOW 2
#define SSR 3
#define LTP 4
/* Sample Rate Index */
0: 96000 Hz
1: 88200 Hz
2: 64000 Hz
3: 48000 Hz
4: 44100 Hz
5: 32000 Hz
6: 24000 Hz
7: 22050 Hz
8: 16000 Hz
9: 12000 Hz
10: 11025 Hz
11: 8000 Hz
12: 7350 Hz
2014年4月23日 星期三
ADTS 格式分析
2.ADTS內容
2013年8月13日 星期二
2013馬爾地夫蜜月行前準備
<選擇飯店&島嶼>
馬爾地夫的特色是一個島就是一個飯店,在數量非常多的飯店下做出選擇實在不是一件容易的事,也因此光選擇飯店,我們就花了一個多月來挑,從房間豪華度,浮淺環境,沙灘環境,食物美味,飯店服務,距機場距離各方面的因素挑選兩家.
第一家Angsana Ihuru島,距馬列機場乘高速快艇只需20 分鐘就可到達,為了浮潛環境優美,全島只有沙灘屋可以入住,在這邊住四晚Beachfront Jet Pool Villas
Beachfront Jet Pool Villas 照片
2013年3月15日 星期五
淺談INF檔
而安裝的方式有三種, [Add.Code] , [Setup Hooks] 以及 [DefaultInstall]
[Add.Code]--直接安裝ActiveX元件到 Windows目錄下的"Download Program Files"目錄
[version]
signature="$CHICAGO$"
AdvancedINF=2.0
[Add.Code]
IPSFilter4.ax = IPSFilter4.ax
IPSViewer4.ocx = IPSViewer4.ocx
[IPSFilter4.ax]
file-win32-x86=thiscab
; *** add your controls CLSID here ***
clsid={543DAD91-B0F3-4564-B860-D22F935674EF}
FileVersion=4,0,3,1
RegisterServer=yes
[IPSViewer4.ocx]
file-win32-x86=thiscab
; *** add your controls CLSID here ***
clsid={92952D7F-1180-43EC-958E-01C1BDC49718}
FileVersion=4,0,3,1
RegisterServer=yes
2013年3月5日 星期二
[Linux]計算目錄的大小
#include <"ftw.h">
int Size;
int sum(const char *fpath, const struct stat *sb, int typeflag) {
Size += sb->st_size;
return 0;
}
void main()
{
ftw("/tmp", &sum, 1);
printf("the /tmp folder size:%d\n",Size);
return;
}
2013年2月22日 星期五
2012年12月4日 星期二
主計處101/11/23 GDP年增率預估
101年 (f) 1.13
第1季 (p)0.59
第2季 (f)-0.12
第3季 (f)0.98
第4季 (f)2.97
102年 (f) 3.09
第1季 (f)2.48
第2季 (f)3.05
第3季 (f)3.13
第4季 (f)3.88
2012年10月30日 星期二
2012年8月17日 星期五
主計處101/8/17 GDP年增率預估
第1季 (p)0.4
第2季 (f)-0.18
第3季 (f)1.99
第4季 (f)4.23
102年 (f) 3.67
第1季 (p)4.79
第2季 (f)4.09
第3季 (f)3.39
第4季 (f)2.55
2012年7月7日 星期六
Linux Debug Tool - GDB
1.建構 remote gdb + gdbserver 環境 for arm
2.常用gdb指令
3.core dump
參考資料
1.Debugging a Linux Application with MontaVista 5.0
2.DAVINCI调试ARM端应用程序
3.arm-linux-gdb+gdbserver环境搭建以及远程调试 及调试core文件
4.GDB指令
5.gdb stops at SIGPIPE
6.打開 core dump 和使用 cgdb 檢查程式掛點原因
7.產生 core dump 的方法
8.setting the core dump name schema
9.http://sourceware.org/gdb/wiki/FAQ
2012年5月25日 星期五
2012年5月14日 星期一
Syntax Highlighter Example
<pre class="brush:c">
void main(int argc, char *argv[])
{
struct dm642_emacif *dm642_emacif;
EMAC_open(1, (Handle)dm642_emacif,&dm642_emacif->emac_config, &dm642_emacif->hEMAC);
return ;
}
</pre>
void main(int argc, char *argv[])
{
struct dm642_emacif *dm642_emacif;
EMAC_open(1, (Handle)dm642_emacif,&dm642_emacif->emac_config, &dm642_emacif->hEMAC);
return ;
}
以下是 Syntax Highlighter 定義方式
------------------------------------------------------------------------
| ActionScript3 | as3, actionscript3 | shBrushAS3.js |
| Bash/shell | bash, shell | shBrushBash.js |
| ColdFusion | cf, coldfusion | shBrushColdFusion.js |
| C# | c-sharp, csharp | shBrushCSharp.js |
| C++ | cpp, c | shBrushCpp.js |
| CSS | css | shBrushCss.js |
| Delphi | delphi, pas, pascal | shBrushDelphi.js |
| Diff | diff, patch | shBrushDiff.js |
| Erlang | erl, erlang | shBrushErlang.js |
| Groovy | groovy | shBrushGroovy.js |
| JavaScript | js, jscript, javascript | shBrushJScript.js |
| Java | java | shBrushJava.js |
| JavaFX | jfx, javafx | shBrushJavaFX.js |
| Perl | perl, pl | shBrushPerl.js |
| PHP | php | shBrushPhp.js |
| Plain Text | plain, text | shBrushPlain.js |
| PowerShell | ps, powershell | shBrushPowerShell.js |
| Python | py, python | shBrushPython.js |
| Ruby | rails, ror, ruby | shBrushRuby.js |
| Scala | scala | shBrushScala.js |
| SQL | sql | shBrushSql.js |
| Visual Basic | vb, vbnet | shBrushVb.js |
| XML | xml, xhtml, xslt, html, xhtml | shBrushXml.js |
之後寫範例程式就可以用這東西標清楚了
2012年4月16日 星期一
主計處101/02/22GDP年增率預估
Ⅰ() 6.62
Ⅱ() 4.52
Ⅲ(r) 3.42
Ⅳ(p) 1.89
2012年(f) 3.85
Ⅰ(f) 1.19
Ⅱ(f) 3.52
Ⅲ(f) 4.48
Ⅳ(f) 5.97
2012年3月9日 星期五
IRR(Internal Rate of Return)公式
float c,x;
Discount;
float Low=0, High=1;
int n;
scanf("%f",&c);
scanf("%f",&x);
scanf("%d",&n);
while(High-Low>=0.0001){
float Middle=(Low+High)/2;
float Value=0;
for(inti=1;i<=n;i=i+1){
Discount=1;
for(intj=1;j<=i;j++){
Discount=Discount/(1+Middle);
}
Value=Value+Discount*c;
}
Value=Value-x;
if(Value>0){ Low=Middle;}else{High=Middle;}
}
printf("Yieldrate=%f",High);
2012年1月1日 星期日
主計處100/11/24GDP年增率預估
2011年(f) 4.51
Ⅰ(r) 6.62
Ⅱ(r) 4.52
Ⅲ(p) 3.42
Ⅳ(f) 3.69
2012年(f) 4.19
Ⅰ(f) 2.67
Ⅱ(f) 3.64
Ⅲ(f) 4.99
Ⅳ(f) 5.31
2011年8月19日 星期五
主計處最新GDP年增率預估
2011年(f) 4.81
Ⅰ(r) 6.16
Ⅱ(p) 5.02
Ⅲ(f) 3.48
Ⅳ(f) 4.71
2012年(f) 4.58
Ⅰ(f) 4.01
Ⅱ(f) 3.77
Ⅲ(f) 5.20
Ⅳ(f) 5.25
2011年7月13日 星期三
Errno.h
0 Error 0. Not used. 1 EPERM Operation not permitted. An attempt was made to perform an oper- ation limited to processes with appropriate privileges or to the owner of a file or other resources. 2 ENOENT No such file or directory. A component of a specified pathname did not exist, or the pathname was an empty string. 3 ESRCH No such process. No process could be found corresponding to that specified by the given process ID. 4 EINTR Interrupted function call. An asynchronous signal (such as SIGINT or SIGQUIT) was caught by the process during the execution of an interruptible function. If the signal handler performs a normal return, the interrupted function call will seem to have returned the error condition. 5 EIO Input/output error. Some physical input or output error occurred. This error will not be reported until a subsequent operation on the same file descriptor and may be lost (over written) by any subsequent errors.
2011年5月5日 星期四
mpeg4-generic parsing for AAC over RFC3640
Preface
| Reference |
|

AAC frame in AU-header

!!NOTES:
1) DVB-H supports High bit-rate AAC while streaming
may be empty. Don’t know how to know it according to SDP description??
(if anyone knows the answer, please let me know..:P)
AAC ADTS 檔頭分析
adts_fixed_header()
{
syncword; 12 bits
ID; 1 bit
layer; 2 bits
protection_absent; 1 bit
profile; 2 bits
sampling_frequency_index; 4 bits
private_bit; 1 bit
channel_configuration; 3 bits
frame_length; 13 bits
adts_buffer_fullness; 11 bits
number_of_raw_data_blocks_in_frame; 2 bits
}
syncword 固定字串The bit string ‘1111 1111 1111’ -> 0xFFF,為一個ADTS檔頭的開始。
ID MPEG 標誌, 通常為1
layer Indicates which layer is used. Set to ‘00’
protection_absent 表示是否有錯誤碼校正機制,設1為是
profile 表示使用哪個等級的AAC,如01 Low Complexity(LC)--- AACLC
sampling_frequency_index sampling frequeny [Hz]
0x0 96000
0x1 88200
0x2 64000
0x3 48000
0x4 44100
0x5 32000
0x6 24000
0x7 22050
0x8 16000
0x9 2000
0xa 11025
0xb 8000
0xc reserved
0xd reserved
0xe reserved
0xf reserved
channel_configuration channel數量
frame_length 代表一個AAC Frame的長度包括ADTS檔頭和raw data block.
adts_buffer_fullness 固定值為0x7FF 說明frame rate是可變動的
number_of_raw_data_blocks_in_frame
表示AAC Frame中有number_of_raw_data_blocks_in_frame + 個AAC raw data.
所以說number_of_raw_data_blocks_in_frame == 0 表示說AAC Frame中有一個AAC raw block並不是沒有。


