Saturday, November 22, 2008

My learning - 3

In video codec there are two types of prediction spatial and temporal predication. Temporal prediction is within the frame and spatial prediction is across the frames.

When we are taking about prediction we are actually trying to finding relationship or in mathematical terms how related the data are. If there is high amount of correlation, the residue data will be very small. In any compression algorithm it the residue which is encoded and sent across.

Any mathematical operation in video domain must take into consideration the amount of data that is too be proceed. Consider if we take a frame of 144*176 and per pixel is represent by single byte we have 24 Kb per frame. The frame rate for good quality video encoding is 30 frames, so now we have 742 kb of data.

For any processing there is always a meta association which gives the required information for processing. More finely grained operation on image is defined, the higher the information is captured and more the memory requirement. For time being we will keep this factor in mind , which will be use full later .


The following are error estimation methods used in general (taken from wiki)

Squared Error (MSE)

Sum of Absolute Differences (SAD)

Sum of Absolute Transformed Differences (SATD)

Mean Absolute Difference (MAD)

Sum of Squared Errors (SSE)

Sunday, November 02, 2008

My learning - 2

I have working on the ogg parser implementation on off , to say randomly . I actually started coding after one month i offered my service . The good part my intention was good , found the required document and understood the what has to be done logically .

Now comes the bad part ..
since i do not have work schedule , there are large break and each time i have to restart the entire process. I keep forgetting the api names and what are they meant for.

My exposure is mostly on windows platform , the VC++ IDE. One of the feature which i heavily use is code completion which is not available by default. I downloaded the scripts and configure the vim , it worked. But i keep forgetting the mapping keys.

For some time i had to struggle with build process. The projects ffmpeg and ffmpeg2theoara were not building. After the few initial i was not able to do build. Dropped it for time and came back to make an attempt once more . I update the SVN repos only to find the build configuration has been changed from Auto tool to scons. Then i found out how the scons must be executed and now the build was reporting version error for scons. The ubuntu build was older than the debian build. I made it working by commenting out the few line , which was later update in the newer version of the code. Atlast i manage to built it withe the dev libarary provided by ubuntu.

Since i have to work with schroedinger, checked out the latest version of it and its dependencies liboil. okay this also was build and installed. Check out the new version of the ffmpeg, configured with the following parameters

./configure --enable-libamr-nb --enable-libamr-wb --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libgsm --enable-libmp3lame --enable-libschroedinger --enable-libtheora --enable-libvorbis --enable-libxvid --enable-nonfree --enable-postproc --enable-swscale --enable-avfilter --enable-avfilter-lavf --enable-x11grab --enable-gpl

and build it . This build process also went fine and installation was fine

Now when i tried to build the ffmpeg2theroa it was not building, from the stderror i was able tto figure out there is some issue with the libavutils. I donot know how to resolve this ...

src/ffmpeg2theora.o: In function `frame_alloc':
ffmpeg2theora.c:(.text+0x40): undefined reference to `av_malloc'
ffmpeg2theora.c:(.text+0x54): undefined reference to `av_free'
src/ffmpeg2theora.o: In function `frame_dealloc':
ffmpeg2theora.c:(.text+0xb1): undefined reference to `av_free'
src/ffmpeg2theora.o: In function `ff2theora_output':
ffmpeg2theora.c:(.text+0x12d2): undefined reference to `av_reduce'
ffmpeg2theora.c:(.text+0x13ea): undefined reference to `av_reduce'
ffmpeg2theora.c:(.text+0x1bcc): undefined reference to `av_malloc'
ffmpeg2theora.c:(.text+0x1bde): undefined reference to `av_malloc'
ffmpeg2theora.c:(.text+0x273f): undefined reference to `av_log'
ffmpeg2theora.c:(.text+0x2e03): undefined reference to `av_free'
ffmpeg2theora.c:(.text+0x2e40): undefined reference to `av_free'
ffmpeg2theora.c:(.text+0x2e4e): undefined reference to `av_free'
src/ffmpeg2theora.o: In function `ff2theora_close':
ffmpeg2theora.c:(.text+0x2ede): undefined reference to `av_free'
/usr/local/lib/libavcodec.a(bitstream_filter.o): In function `av_bitstream_filter_close':
/home/selva/liboggplay_dev/ffmpeg/libavcodec/bitstream_filter.c:53: undefined reference to `av_freep'

( i removed the better part of it, too long )

Now i have built a schedule but iam not able to stick to it. I have started to code lets us see when i will start to make any head way.

Saturday, September 20, 2008

My learning - 1

I have started to implement a wrapper for Dirac in ogg conatiner . I am going to use ffmpeg libraries and Vim as editor . This and following posts will be a diary of what i am learning .

Today 's leaning

:cd to change the directory
:pwd to know the path of the present file
:make to compile to the code without living VIM
:ls to list the num of files simulatneoulsy opened
:cn to next line of error
:clast to last line of error
:cfirst to first line of error
:cp to previous line of error

MAKEFILE is wrong way to naming the make file. It should be Makefile.

A good tutorial for vim
http://www.linuxjournal.com/article/8289
http://www.vim.org/

A good tutorial for make file .
http://www.tlug.org.za/old/csslug/writing_makefiles.html

After all this i am still to find the function to interact with schroeinger via ffmpeg.

Monday, September 01, 2008

Cloning and liability

For long i playing around with my thought process and an idea which came out charging is tormenting my senses and .i.e Cloning, the word which causes tremors in religious circle is going to be the darling of the 21 war.

Looking at the number of body bags which are sent every month to US, some in the federal government would have been sitting through the night thinking of various possibilities of explanation to the people. It can put in this manner "liability of, by and for the people", of course he cannot give this statement. So where does cloning comes into the picture?. First let us see how the liability of the governments reduced. I hope people would heave heard about "Black water Inc", it is company which give training in armed combat. This company is
providing armed mercenaries for the US army, the figure is around 10,000 heads, the largest standing private army in US / World. But still there is a liability of answering the people ....

Now if some entity starts cloning complete human being, then the question arise how about the time zone before they can deployed. Well we can increase the metabolic rate of growth. It will decrease the lifetime of the clone, but that is good side effect. Now think if we want to fight the war we send clones who have no parents and therefore no liability. Added to this we can generate genetically modified clone who has superior feature, feature are left to the readers imagination, which will enable victory without much ado. Yes censor of the media is required other wise they will have some thing to lament about.

Genetic variation increase rapidly when the life cycle of a species reduces. Now we have fast results for genetic medicine which will be tested via clones.Even before humanoid robots come to existence clones will playing a greater role.

This is just idea, it is an view from my understanding of science with lots of "if " and "buts" added and hope this never happens.

Monday, August 18, 2008

84 Charing cross road

84 Charing road, many would have heard this movie and few would seen it . Well i did not see the movie, i read the book. It was different from the generic non - fiction, it breathes life which have lively simple conversation done by ordinary individual. It a series of letter between a lady and an gentle man for 20 years .

The lady long pending dream was to visit London and she romanticize about it.The gentle man suddenly dies before they could see each other, when the
lady finally managed to go to London she was given a royal treatment for 3 weeks by many who have read her book and by her friends.

And this is a """"""" true story """""""" .. I read it , I visualized it and i hope Anthony Hopkins who have done this part in the movie, appreciably .

Monday, August 11, 2008

Almost famous

"Almost famous ", it is wonderful movie. Out of boredom i saw the movie this sunday, screen play was awesome, no flashy items, no heroism, no hero or heroin, no side kicks, inserted just character to which life has been added by the actor. This are the movie which we would like to see again and again and again.....

Let us patronize those movie which are worth it salt, see movie made by people who consider audience as the people who have an ounce of sensibility .

Tuesday, June 24, 2008

Necessity mother of all invention

I will go straight to the point, with the number of house increasing in my locality no of AC unit has also increased , so the net effect is overload on the existing electricity network. Near 10 pm
the voltage starts to oscillates because of the repeated switching of the AC units .
Now what it has to do with me, this fluctuation is screwing up my pc. Of course i have UPS but it has aged and needs a battery replacement. I decided to go for new UPS which will do safe shut down of the pc when the battery power become very low. and the episode of buying has already been talked in my previous entry ....
Now my hard disk which had an windows installation, because of the improper shut down, some dll has got corrupted, which i have immediately replaced by downloading from the net. Later when i read the review regarding the dll downloads, it was reported such operation are not safe, any way the mistake has already has been committed, my pc now is in running condition but it hangs frequently.
The major event was when repeated power breakage completely thrashed my hard disk, my hard disk as an physical entity was not detected during boot. I was able to hear a different sound coming out. In order to isolate the sound i removed the sata drive. Later in order to test the hard disk i kept the sata device out side my pc , reboot and the i was able to hear same sound.
Fine i have found the source of the sound but my hard disk still does not work. I remember in my colleagues house the sata drive was kept upside down, i did the same and my hardisk started to work, got lucky . Immediately i moved the data from "my documents" to another partition, a partition which can be accessed from linux .

Thursday, June 19, 2008

The IT depot

I had recently brought an UPs from a vendor called IT depot in Thirvamiyur. I had questioned him whether the UPS will shut down the pc if power is down , he checked and reported back to me that it will shut down the pc. What i actually meant was if the power goes down and the battery power is low , then will the UPS will automatically shut down the pc using the shut down option ?.

I went home opened it and found that there was no support for monitoring the battery power other than the usual beep sound. I thought may be that was the only model available . The next day i visited there website surprisingly two models were listed one low end model , which
was sold to me , and the other model model which actually i wanted to buy .

I decided to call them and talk about this issue. I rang them thrice before i was able to contact the person who was handling me yesterday. He came up on the phone and i told what issue was. He replied back that i have to go APC website and down load the software. I questioned him
how can i run the software if there were no connectivity between the pc and ups, but still he repeated the same thing. Later i mentioned the listing of the products on there website, he immediately check and replied back the product was not in distribution . What i do not understand is when a product is listed on the official website these vendors are claiming that the product is not distributed , either what he is telling is not true or the big UPS company sucks big time by not keeping there website update.

Moral of the story is when u go to the vendor place do talk with logic, just list out the feature u want . At the end of the day i acted like an ass and got it certified .

Friday, February 15, 2008

Baby steps

After lot of debates with my self i have to start my research project. The project is semantic video processing, analysis of the video data for search queries and automatic cataloguing it.

My hunch for taking it as topic for research is based on the following assumption
  • Processor power has kept on increasing
  • Network bandwidth has kept on increasing
  • The compression technology is almost saturated
Now the ability to index the multimedia data will be in demand .

The tools i have chosen for my development is c and python. C because i can know it and python for rapid prototyping. I was also thinking of other option like perl, scilab, lush and all of them failed to meet my requirements. I not mentioned the most favourite or rather most talked about tool "Matlab ", it is bloated, it is slow and not open source. I always liked to work with simple tools which can be integrated together to preform complex activities.

Following are my requirements
  • Must be fast
  • Must be able to handle large data set
  • must support image display ( i thought of writing the display unit but i realized i was recoding what was already available )
  • Should have rudimentary support of numerical operation

I have started of with PSNR code in C. Since my development platform is linux i have to learn how to build and debug .

Now i have to take the second step , to bring in more focus and discipline in my work.

Monday, January 07, 2008

New year

For the first time in my life i spent my new year outside my home. Having four days in pocket, no idea to spend the time, the trip to ooty was the things happening in right direction. and i think this the last unofficial trip so could not miss it.

Ooty "the queen of hills" is no more what it was know for. Heavy deforestation for plantation estates was visible with the barren & ploughed slopes. I also realised why the Europeans use tissue paper for toilet after i used water for cleaning my private parts . This was the first time i felt chillness to such extreme , my hand had completely lost its feeling , i was not able to handle my cell phone.

Adding to the fuel the season was "honey moon" season, pairs loitering around dressed to their best, many us realize something is definitely wrong with us. The planning was not to the best. Some wanted to go safari but nobody knew including the driver how things are to done . So
we entirely missed the safari trips . ...

more to ...

The gateway

Everybody has to go back from where he came, back to mother earth. Few die at very young age, reasons are many.

My father home is gate way for many people , each having there errands to be completed. One such relative came with the hope of getting their daughter cured and the disease was blood cancer. They had very few resources to pay for the medical bill. The child was 14 years of age,
she was given a heavy dose of medication and weekly transfer of serum. The parents having the villagers ignorance were not able to understand the severity of the issues. She was frail and even a small jolt to the body caused a lot of pain. As long as she stayed with my parents her
health did not deteriorate and the way she talked with rustic flavor made her quick favorites withe my parents.

After a month treatment she was sent back to her home. Her health conditioned made a sharp turn to worst. Few days back the girl was again admitted to hospital. My parents visited her, she in spite of being in drowsy state, on seeing my parents became more alive. Doctor's report
was her condition was beyond recovery and she was taken back to her home , my father payed for all the arrangement. Yesterday she died and my father left for the last rites.