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.