View Full Version : [MPEG-4] Looking for the internal basics of video compression
HomiE FR
17th October 2002, 15:48
Hi all!
First of all, thanks to all the XviD developers and all the people involved in this project. I use XviD daily (maybe not daily, but very often :) ) as a simple Windows user, and I'd like to know how the codec works internally. I know that the sources are available for download (for instance Koepi's sources), but I just can't understand the code (I'm just learning C, so understanding XviD code in C++ is a bit too hard for me at the time being...).
So if anyone here could give me some links about MPEG-4 (I've found a page made by MPEG, but there's nothing clearly explained about how the standard is designed), or anything else about video compression which could leads me to understand how it works -> DCT, quantization, H263, all these terms don't mean anything to me.
If there was a page (or even a book) which could explain in detail what such terms mean, that would be great.
I have a "good" :rolleyes: level in mathematics (it just means I'm 20 and I know matrix, sums, Fourier transform and a bit of wavelets), so I can try to understand formulas, but C++ code "as is" is too hard for me. :(
Sorry if my post shouldn't be here, but I know that some XviD developers or related people (Nic, -h, Koepi) often check this page, so I found this was the best place to post. If not, just answer and I'll delete the topic. Thanks a lot.
sffubs
17th October 2002, 16:51
The more technical aspects of the XviD codec are often discussed over in the XviD forums on www.xvid.org. Sadly I can't access that site at the moment, but I'm pretty sure that would be a good place to search.
Good luck, and if you do find any particularly good sites then remember to post them!
Cheers,
sffubs
-h
17th October 2002, 16:52
XviD itself is written totally in C with some functions having assembly-optimized counterparts, and is very easy to read for the most part (compared to other projects of its size).
I would start off by reading a good guide on the general MPEG method of video compression - motion estimation, forward DCT, quantization, coding, etc.. MPEG-4 is very similar to MPEG-1 and MPEG-2, it just has some new tools and methods for doing pretty much the same thing. I'd say this page (http://www.bretl.com/mpeghtml/mpeg2vc1.HTM) is a good (technical) introduction to MPEG-2, and the links at the bottom explain the individual processes in some detail. If you can ingest that, the next step is really getting to know the differences between MPEG-2 and MPEG-4, such as inter4v mode, new prediction modes, etc.. I hate to say it, but the best way I know of to do this is to read the MPEG-4 video verification model itself, from here (http://mpeg.telecomitalialab.com/working_documents.htm) (search for "video verification model version 18.0").
Feel free to ask any questions you have, I'll fudge up an answer which will end up needing correction.
I have a "good" level in mathematics (it just means I'm 20 and I know matrix, sums, Fourier transform and a bit of wavelets), so I can try to understand formulas..
You're already ahead of me then :) All I know about wavelets is the Haar transform, and if you gave me some paper and a pen I couldn't give you the Fourier transform if my life depended on it.
-h
HomiE FR
17th October 2002, 18:14
Thanks for the quick replies!
-h : thanks a lot! I hoped that you (or another XviD dev) post something in the topic. I will read carefully the links provided. I'd like to be able to understand the XviD code, but I can't right now. But maybe in 6 months, I'm already learning C at school (ingeneering) so I'll try again in a few weeks. And be sure that if you allow me to ask questions, this will be done. ;)
And I'm not the king of wavelets, I've just studied the basics of a wavelet transform and some uses of it (nothing too hard I can assure). :p
Thanks again!
sffubs : You probably have already checked what -h said, but if I have something new (first I will read what -h quoted), I'll post here. Thanks also for the reply!
nikthebak
17th October 2002, 19:34
As Fourier and cosine transforms belong in the realm of digital signal processing, the following link is a very good place to educate yourself;
http://www.dspguide.com
It's a book called The Scientist And Engineer's Guide To Digital Signal Processing and it's downloadable in PDF format for free!
Some basic DSP knowledge is extremely useful if you're interested in internal structure of different codecs, let it be audio or video!
HomiE FR
17th October 2002, 20:37
Thanks, this book will be very useful. Indeed, I already have some problems with the link provided by -h, mainly due to my ignorance : I don't know exactly what "chroma" or "luma" are (I just have an "idea" of what it is, but it's not enough), and I don't have found pages which give me clear answers...
I don't know where to start, but I think that I'm not ready for the pages -h gave me, even though they seem very interesting. Maybe I should try to learn basics of DSP, and also basics of digital images (color spaces, etc...). Then I hope I'll be able to understand the basics of MPEG-2 compression.
Thanks for your help! :)
cjv
17th October 2002, 23:38
I also found this link very helpful, it seems quite brief and basic but still very interesting.
http://www.ece.cmu.edu/~ece796/handouts.htm
cjv
SirDavidGuy
17th October 2002, 23:44
And of course, the ultimate data analysis and domain transform reference:
http://rkb.home.cern.ch/rkb/titleA.html
I also recommend:
Video Compression Demystified, by an author whose name eludes me. It provides a great and relatively easy to understand intro to video compression.
HomiE FR
18th October 2002, 06:02
Thanks for the links! :)
Be sure I will read them as soon as I have free time. I'll do my best to understand them.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.