Author Archive: Yumi Chan

Breif Description of nal_ref_idc Value in H.246 NALU

I am so sorry for my late update because of my study!
A quite update of myself: I have actually stopped working on H.264 and MP4 for some time but will probably pick up again in the near future.

As in the article Introduction to H.264: (1) NAL Unit, Suji Mani asked what is the exact meaning of different values in nal_ref_idc. In fact, nal_ref_idc is base on “Start Code Value” and represents the priority of the current frame (i.e. how important of the frame – the higher the value, the more important the frame). Here is a list of nal_ref_idc values with the corresponding Start Code Type:
(more…)

免費下載:訊連科技威力導演12 LE

訊連科技跟SharewareOnSale合作,提供了威力導演12 LE的限時免費下載。只要3個步驟,你就可以免費用它了!現在只剩3天了!這次他們提供的終身的,可用於家用或商業用途~那就是說,可以在公司的電腦上安裝了!

PowerDirector 12 LE Giveaway

軟件名稱:PowerDirector 12 LE
鏈接:
http://www.cyberlink.com/stat/edms/Giveaway/SharewareOnSale/PDR12/index.jsp, or,
http://sharewareonsale.com/s/cyberlink-powerdirector-sale

要上面兩個鏈接的步驟都差不多,我只拿其中之一作為例子來告訴你如何下載使用它。
(more…)

Obtain a list of process scheduling policy and priority

Normally, you can read the file /proc/[pid]/sched and get the related information. But since I am using a simplified one, the sched file is not presented. And I need to figure out another way to get it. I finally found there is a C library, <sched.h>, to do that. You can find the following declarations in the library.

In this case, we only need sched_getparam() to obtain scheduling priority and sched_getscheduler() to obtain scheduling policy.
(more…)

How to get the number / id of processes and threads?

Since I am working on Hi3518 with Linux, in order to reduce the use of computing power of the device, I used a simplified version of Linux. So, most of the applications are gone or are simplified without any option. I just summarized the methods I can use on Hi3518 and should be also work on some other Embedded Linux.

In fact, the applications in Linux usually obtain related information by reading the files in /proc. Under /proc, you can see a lot of folder, some of them are in numbers. Those folders named in numbers, which are process ids (PIDs) represent the processes run in the system. Thus, you can see the details of each process in each folder.

/proc/***/

where *** are the corresponding process pid.
(more…)

Difference: Program VS Process VS Thread

Here are the definitions and the explanations from Wikipedia.

Program:

A computer program, or just a program, is a sequence of instructions, written to perform a specified task with a computer.

http://en.wikipedia.org/wiki/Computer_program

Process:

A process is an instance of a computer program that is being executed. It contains the program code and its current activity. Depending on the operating system (OS), a process may be made up of multiple threads of execution that execute instructions concurrently.
(more…)

免費YouTube影片下載器 – ClipConverter.cc

Home Page of ClipConverter.cc

8,9年前,我已經開始下載視頻在線,。我以前學習的網站的源代碼,發現視頻的直接鏈接。我救了很多成功的影片。但很難做同樣的事情在Youtube上(至少對我來說,在那個時候……當我在中學1 …)。我看了網上下載,然後與試了幾個網站。然而,他們大多是不可用了,像kissyoutube。一段時間後,我用JDownloader代替。多年來,YouTube還不斷變化的視頻檢索方法,我懷疑它帶來了一些挑戰這些下載者。最近,我重新設置我的電腦,我懶得重新安裝JDownloader。所以,我看網上申請了。我發現ClipConverter.cc即可。這是很好的,因為很多網上的視頻下載器只提供下載的視頻只(不帶聲音)或音頻。但是ClipConverter.cc幫助您兩個軌道合併,這樣就可以直接下載的有聲視頻。您也可以選擇視頻片段的分辨率。

(more…)

Embedded Linux: 如何讓海思Hi3518開機後自動執行Shell Script?

我目前正於海思平台上進行開發,芯片是Hi3518E,Linux的內核是使用海思SDK所提供的代碼去編譯,所以我想以下所說的,大概跟其他海思芯片是差不多的吧(既然是同一家公司的,工程師做的東西應該都差不多才對吧),不過還是以Hi3518為準~

已經了解了Hi3518一段時間,目前需要它於開機啟動時自動插入一些驅動和程序,所以小小研究了一下要怎麼做。首先,因為有一系列的指令要做,所以就給它寫了個Shell Script(腳本),讓它可以一次過運行我所有的指令,之後再放入Startup。至於Shell Script要怎麼寫,我暫時就不多說了,因為我知的也不多~ 哈哈~

0. 基礎知識

/etc/init.d/ : init.d 是一個用來存放Unix/Linux Shell Script的文件夾,如果你的內核有開啟 init.d 的話,系統啟動時,會在登入前自行執行存放在這裡的腳本。一般系統上所有服務的啟動腳本都會放在這裡,一般是Linux系統的話,應該都會看到它的蹤影。
(more…)

Avoid writing 0x0A as 0x0D0A: Be careful of File Access Mode

When dealing with file I/O in C/C++, we should first open a file with fopen:
FILE * fopen ( const char * filename, const char * mode )
The parameter mode refers to “File Access Mode“. You have the following options (from cplusplus.com):

“r” read: Open file for input operations. The file must exist.
“w” write: Create an empty file for output operations. If a file with the same name already exists, its contents are discarded and the file is treated as a new empty file.
“a” append: Open file for output at the end of a file. Output operations always write data at the end of the file, expanding it. Repositioning operations (fseek, fsetpos, rewind) are ignored. The file is created if it does not exist.
“r+” read/update: Open a file for update (both for input and output). The file must exist.
“w+” write/update: Create an empty file and open it for update (both for input and output). If a file with the same name already exists its contents are discarded and the file is treated as a new empty file.
“a+” append/update: Open a file for update (both for input and output) with all output operations writing data at the end of the file. Repositioning operations (fseek, fsetpos, rewind) affects the next input operations, but output operations move the position back to the end of file. The file is created if it does not exist.

(more…)