Posts

Showing posts from December, 2008

Concentration and improving efficiency

Symptom of failure path: 1. Getting tempted for skipping text while reading. 2. Humming song or continuous movement of hand/leg. 3. Watching what others are doing or getting disturbed by passerby. Causes of lack of concentration: 1. Lack of energy required to do that kind of work. 2. Not fully understanding what you are doing. Way out: 1. Constructive interference of desires (use the desire enery as if it takes some cost). 2. Avoid listen-reasponse collision. Don't frame doubts while reading something. Otherwise there will be traffic jam of thoughts. 3. Do not force yourself to memorize something. Take some rest or use yoga methods to gather required energy so that you remember the things the way glue does and not like tying. 4. Best method for learning is learn by doing mistakes. Don't get bogged down by involving too much in gathering prereqisites and mastering them. 5. Appreciate others intelligence with candid heart. Just enjoy the moment and don't involve in any other ...

What is OSD (on screen display) module

The on-screen display unit (OSD) generates the output video signal. It mixes together the information from up to five hardware windows, one of which is a cursor, two YCrCb video data, and the last two are user-defined bitmaps that can be used to display a menu on the screen for example. The OSD windows priority is: (in the order of increasing priority.). - Video window 0 - Video window 1 - Bitmap window 0 - Bitmap window 1 - Cursor window. The priority order is fixed. If overlapping occurs between different windows, the color of each pixel corresponds to the color of the window with the highest priority. Although, transparency and blending factor can be setup for the bitmap windows. The DSC24 main video window supports 2 ping-pong buffers. The address of the buffers is stored in separate registers so that they can be switched easily with a select signal. This feature is particularly useful in video decoding to decode the video data into one buffer and display the data coming from the o...

Caveat in character constant \'

Escape sequences are used to represent invisible or hard-to-represent characters. Some of them are used for avoiding ambiguities as listed below. \" : Is only necessary in strings i.e. char const '"' (double quote in two single quotes) is valid. \\ : Always reqd to distinguish \ from esc seq. \? : To avoid trigraph sequence ??'. Char const '?' is valid. All above escape sequences are justifiable coz possible ambiguities are obvios. But for escape sequence \' what is ambiguous if we use char const ''' (single quote in two single quotes) is not obvious. Following is the list characters tried to print through a C program and associated compiler errors. char c = x;// x as below printf("%c\n", c); '' : Two single quotes without space in between. error: empty character constant Comment: This means empty character const is not permitted. ''' : Single quote char in two single quotes error: missing terminating ' cha...

Character constant and String constant

A character constant is a character written between single quotes. Although called character constant it represents an interger value. Its value equals to numeric value of the character in the machine's character set. In the ASCII character set: '\n' = 10 '0' (zero) = 48 'A' = 65 'a' = 97 A sequence of characters in double quotes, like "hello, world\n", is called a character string or string constant .