Posts

Showing posts from 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 .

Video Stream Start Codes for Different Codecs

Start Code Prefix (SCP) H.264 and MPEG-4 Stream contain various codes that are identified by a common 3 byte string = 0x 00 00 01 H.264 SCP Identifies beginning of NAL Unit. Stream Structure: 1. NAL Unit Code - 1 byte 2. NAL Unit Data Anatomy of 1 byte = 8 bits of NAL Unit Code: 1 Bit - Always zero 2 Bits - 0 for non ref frames. Non zero for SPS, PPS and Ref frame. 5 bits - NAL Unit Type. 1 - Non IDR, 5 - IDR, 7 - SPS, 8 - PPS. Typical NAL Unit Codes: x7- SPS x8 - PPS x5 - IDR x1- Reference P 01 - Non ref P Note: x is non zero Typical Stream: 00 00 00 01 67 (SPS) 42 00 1E AA 40 28 02 DC 80 00 00 00 01 68 (PPS) CE 38 80 00 00 00 01 65 (IDR) 88 ..... 00 00 01 41 (Non IDR Ref) 9A 44 .... MPEG-4 Stream Struct: 1. Video object start code - 00 through 1F 2. Video object layer start code - 20 through 2F 3. Video Object Layer Info - Length and value depends upon content 3. vop start code - B6 4. VOP Info Typical MP-4 Bitstream: 00 00 01 00 (vo Start) 00 00 01 20 (vol start) 00 C8 89 80 0C C9 1...

shriranga kamalakanta

श्रीरंगा कमलाकांता श्रीरंगा कमलाकांता हरीपदरा ते सोड रे ॥ धृ ॥ ब्रीजवासी नारी, जात असो की बाजारी हो कान्हा का मुरारी, अडविता का कंदारी मथुरेच्या बाजारी, पाहु मजा हो गिरीधारी विकुन वनित दहिहोड रे ॥ १ ॥ गायक: सुरेश हळदणकर गीतकार: होनाजी बाळा संगीतकार: हेमंत - केदार नाटक: होनाजी बाळा

Deva Gharache dnyat kunala

देवा घरचे ज्ञात कुणाला देवा घरचे ज्ञात कुणाला विचित्र नेमानेम कुणी रखडति धुळीत आणिक कुणास लाभे हेम ॥धृ॥ मी निष्कांचन निर्धन साधक वैराग्याचा एक उपासक हिमालयाचा मी तो यात्रिक मनात माझ्या का उपजावे संसाराचे प्रेम ॥ १ ॥ मूळ गायक: रामदास कामत गीत: वसंत कानेटकर संगीत: पं. जितेंद्र अभिषेकी नाटक: संगीत मत्स्यगंधा

High-level description of low-level OS terms!!

==> What is System Programming? System programming is the practice of writing 'system software', which is code that lives at a lower level, talking directly to the kernel and core system libraries. Put another way, system programming deals with system calls and other low-level functions, such as those defined by C library. ==> What are device drivers (in linux)? Device drivers are distinct "black boxes" that make a particular piece of hardware respond to a well-defined internal programmin interface; they hide completely the details of how the device works. User activities are performed by means of a set of standardized calls that are independent of the specific driver; mapping those calls to device-specific operations that act on real hardware is then the role of device driver.

Shell text color control from C program

How to control output text color of a shell? Text color output is not defined in ANSI C/C++. Instead the creators of the language left that to be operating system dependent. In Linux, to change text color you must issue what are known as terminal commands. To print "Hello, world.\!" in red, change the printf statement to read:printf("\033[22;31mHello, world!"); \033[22;31m is the terminal command. Note the numneric escape sequence at the start and on an ASCII based machine, octal 33 is the ESC (escape) code. For further details on numneric escape sequence read http://casual-pavan.blogspot.com/2008/10/intersting-things-about-escape.html To try different colors, just change the numbers after the left bracket. \033[22;30m is black \033[22;31m is red \033[22;32m is green Some more colours: \033[22;33m - brown \033[22;34m - blue \033[22;35m - magenta \033[22;36m - cyan \033[22;37m - gray \033[01;30m - dark gray \033[01;31m - light red \033[01;32m - light green \033[01;33...

Intersting things about escape sequences

Escape sequence provides an general and extensible mechanism for representing hard-to-type or invisible characters. In C language escape sequences always begin with a backslash (\). Charater constants represented by escape sequences like '\n' (newline) look like two characters, but represent only one. There are fundamentally two distinct purposes behind the escape sequences. 1. The pricipal purpose of escape sequences is to represent invisible characters which control the motions of a printing device when they are sent to it. e.g. i. \f - Form feed: Go to the first position on the ‘next page’, whatever that may mean for the output device. The Standard carefully avoids mentioning the physical directions of movement of the output device which are not necessarily the top to bottom, left to right movements commonly followed. ii. Escape sequences also ease the way of representing some special characters that would otherwise be hard to get into a character constant (or hard to read; ...

Diff in strcmp and stricmp

strcmp (s, t) compares the strings and returns a negative, zero or positive if s is lexicographically less than, equal to, or greater than t. The value is obtained by subtracting the characters at the first position where s and t disagree. stricmp performs the same function as strcmp, but alphabetic characters are compared without regard to case. That is, "A" and "a" are considered equal by stricmp, but different by strcmp. Examples: a.out>strcmp("apple", "peach"); -15 a.out> strcmp("peach", "apple"); 15 a.out> strcmp("Apple","Apple"); 0 a.out> strcmp("Apple","Apple pie"); -32 a.out> strcmp("Apple","apple"); -32 a.out> stricmp("Apple","apple"); 0

Digital Set top box

Image
Digital TV/ Set Top Box Overview Fujitsu provides a complete system solution for the Digital Set Top Box using Fujitsu DVB MPEG Source Decoder with various combination of the front-end, DVB/DSS Channel Decoder and Demodulator for satellite, cable and terrestrial reception. Fujitsu full range of DVB MPEG Source Decoders including SmartMPEG provides customers complete support from free to air, CA/CI to middleware, harddisk set top boxes. Fujitsu Application Program Interface (FAPI) provide customer easy integration in software to adapt to operation systems and highly sophisticated interactive applications like MHP. Digital TV/ Set Top Box Diagram Source: http://www.fujitsu.com/my/services/micro/semiconductor/lsi/dtv/

Video Resolutions, sizes and bit-rates

Resolution WidthxHeight Aspect Ratio YUV420 size SQCIF 128x96 1.33 18432 bytes = 18 Kb QCIF 176x144 1.22 38016 bytes = 37.125 Kb CIF 352x288 1.22 152064 bytes = 148.5 Kb VGA 640x480 1.33 460800 bytes = 450 Kb (~ 3 times bigger than CIF image) D1 720x576 622080 = 607.5 Kb 720p 1280x720 = 1350 Kb (2.22.. times D1 PAL and exactly 3 times of VGA) Notes: Aspect ratio 1.33 implies rectangular(wide) screen while smaller aspect ratio i.e. 1.22 implies sqarer screen. Uncompressed video of TV broadcast quality requires bit rate of 216 Mbps according to ITU-R BT.601-5 recommendation. VGA 25 fps ~= 11 Mbytes/s H.264 output 256 Kbps = 32 K Bytes/s Compression Efficiency is 352 times!!!