CODEC programming

The old Video Software Help forum, left visible as an archive.

CODEC programming

Postby Mask of Destiny » Mon Oct 28, 2002 8:17 am

Anyone know where I might find some information on how to write a CODEC for the windows platform? I've been thinking about playing around with this, but my efforts to find useable information on the subject have been relatively fruitless.
Mask of Destiny
 
Joined: 11 Aug 2002

Postby klinky » Mon Oct 28, 2002 8:22 am

Hey if you're really interested, I would check out MS MSDN, look up information on DirectShow & Video for Windows. You could also checkout www.xvid.org, download the source for the XviD codec would would probably show you quite a bit. You will most likely need MS Visual C++.

You could also do stuff for loonix(Linux), but I wouldn't nowhere to look there. It's pretty complex stuff and I've never done it, I've worked with VfW before though, but not much.


~klinky
User avatar
klinky
 
Joined: 23 Jul 2001
Location: Cookie College...

Postby Mask of Destiny » Mon Oct 28, 2002 8:49 am

Thanks a bunch. I have MSVC++ so that won't be a problem. Hopefully the VFW/Directshow information on MSDN will be clearer than the Windows DDK (Driver Development Kit).

Dealing with loonix is too much of a pain. For now XP suits me just fine. The only alternative OS I would even consider is Amiga if they ever manage to drag that out of its grave.
Mask of Destiny
 
Joined: 11 Aug 2002

Postby klinky » Mon Oct 28, 2002 8:59 am

The Amiga sounded cool. The only problem, which is a big one, is that the thing that made the Amiga special was the hardware / OS combo. I think their idea to ressurect it was to make a new OS and slap it on a x86 platform, which doesn't do it for me. I think it will be a cold day in hell when the Amiga comes back to life :\


~klinky
User avatar
klinky
 
Joined: 23 Jul 2001
Location: Cookie College...

Postby Mask of Destiny » Mon Oct 28, 2002 11:59 am

The new Amiga isn't being based on x86, it's based on a custom G3 mobo. Of course it's not as custom as the original Amiga. It uses off the shelf video cards and the like, but it doesn't really make sense for them to make that stuff themselves anymore. The only really interesting part of the new hardware is an A1200 bridge that allows you to connect to an A1200 for legacy support. I think this is mainly for people that still use hardware solutions like Video Toaster as I believe all of the standard hardware will be emulated.

I really doubt this new Amiga will have any real viability after they get it out the door, but I'd like to think that someone could actually bring the Amiga back.

For more info check out www.amiga.com
Mask of Destiny
 
Joined: 11 Aug 2002

Postby klinky » Mon Oct 28, 2002 12:13 pm

oooh >_< damn.. Really now :p


My info must have been old then. I heard Gateway was going to try and convert it into some sort of alternate x86 product line :p This was back in like '98/'97 :\


That would be interesting. I'll have to read a bit more on it :p


~klinky
User avatar
klinky
 
Joined: 23 Jul 2001
Location: Cookie College...

Postby trythil » Mon Oct 28, 2002 12:39 pm

Mask of Destiny wrote:Thanks a bunch. I have MSVC++ so that won't be a problem. Hopefully the VFW/Directshow information on MSDN will be clearer than the Windows DDK (Driver Development Kit).

Dealing with loonix is too much of a pain. For now XP suits me just fine. The only alternative OS I would even consider is Amiga if they ever manage to drag that out of its grave.


A codec is a codec, no matter what platform it's on. The logic behind the compression and decompression is the same.

The only things that are platform-specific are I/O interfaces, and the hard parts of that are usually taken care of for you anyway; all you need to do is interface with those.

Therefore, if you want to write your own codec, the best place to start would be to study the mathematics behind lossless and/or lossy compression.

The very worst thing you could possibly do is learn by doing API -> math instead of math -> API.
This is a block of text that can be added to posts you make. There is a 512 character limit.
trythil
is
 
Joined: 23 Jul 2002
Location: Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch

Postby klinky » Mon Oct 28, 2002 12:44 pm

Notice I suggested he review the XviD sources :p Hmmmm... Yes I do have a brain. A) he most likely is programming for windows B) Klinky doesn't have a linky for high level video compression algorithms C) XviD is a video codec that works and what better way to learn then from something that works :p

Of course it would be nice to know how to interface all that math. Who knows maybe all he wants to do is hookup some huffman compression with some bitmaps and hack out his own huffYUV or huffRGB :p Something like that :\

Or speaking of which I belive the source for that is open as WELL :p


~klinky
User avatar
klinky
 
Joined: 23 Jul 2001
Location: Cookie College...

Postby klinky » Mon Oct 28, 2002 12:45 pm

I mean to say the source code for huffYUV is open source, so he should be able to review that as well.


Insomnia / crappy sleep sucks.


~klinky
User avatar
klinky
 
Joined: 23 Jul 2001
Location: Cookie College...

Postby trythil » Mon Oct 28, 2002 1:33 pm

klinky wrote:Notice I suggested he review the XviD sources :p Hmmmm... Yes I do have a brain. A) he most likely is programming for windows B) Klinky doesn't have a linky for high level video compression algorithms C) XviD is a video codec that works and what better way to learn then from something that works :p

Of course it would be nice to know how to interface all that math. Who knows maybe all he wants to do is hookup some huffman compression with some bitmaps and hack out his own huffYUV or huffRGB :p Something like that :\

Or speaking of which I belive the source for that is open as WELL :p


~klinky


Looking at source code is fine and all, but what I meant was he should hit the textbooks. As good as XViD can look, it's not a good way to learn, because the actual algorithms used to do all of the video work is surrounded by other stuff -- i.e. handling instantiation, the OpenDivX wrapper, and memory allocation tricks.

Additionally, XViD implements some rather advanced stuff that can be extremely confusing if you don't know just what the heck all those operators are supposed to be doing. I'm sure we can all read the code and translate it into algebra or calculus notation, but what the heck does all that really mean when you apply it to video? The best way I've found to answer that question is to learn the concepts embodied by those mathematics, and then attack the practical applications.

Source is a great thing to look at to refine your learning. But if you want to know just what a codec is supposed to do on a purely theoretical level -- and IMHO that's the best way to learn -- source code is only a great way to get yourself confused.
This is a block of text that can be added to posts you make. There is a 512 character limit.
trythil
is
 
Joined: 23 Jul 2002
Location: Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch

Postby klinky » Mon Oct 28, 2002 1:52 pm

Alright I'll agree with you there :p I sorta kinda meant that. Do you have any ideas as to what math he should be looking into. I once had this math book. It had alot of really heavy-duty crap in it with symbols I didn't understand, I don't know what happned to that book. I think I threw it out. Hmm.



~klinky
User avatar
klinky
 
Joined: 23 Jul 2001
Location: Cookie College...

Postby trythil » Mon Oct 28, 2002 2:15 pm

Mathematics-wise, a solid foundation in basic and advanced calculus, especially if anything involving lossy compression is planned.

Beyond that, there are some good books out there that teach the theory -and- implementation of video codecs, lossless and lossy, like Video Codec Design: Developing Image and Video Compression Systems, and Digital Compression for Multimedia: Principles and Standards (which is actually better for learning theory, as it describes compression in general).
This is a block of text that can be added to posts you make. There is a 512 character limit.
trythil
is
 
Joined: 23 Jul 2002
Location: Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch

Postby Mask of Destiny » Mon Oct 28, 2002 2:20 pm

Well I understand some basic compression concepts. My goal is to just mess around with a couple of ideas I have. As such the only information I'm currently looking for is info on the appropriate APIs so that I can actually implement these ideas. None of these ideas are revolutionary and there are probably better solutions out there already. I'm just looking to entertain myself and maybe learn something from the experience along the way.
Mask of Destiny
 
Joined: 11 Aug 2002

Postby klinky » Mon Oct 28, 2002 2:26 pm

You sir, win a Distinguished Cookie Award:

Image


~klinky
User avatar
klinky
 
Joined: 23 Jul 2001
Location: Cookie College...

Postby paizuri » Mon Oct 28, 2002 2:55 pm

klinky wrote:You sir, win a Distinguished Cookie Award:

That looks like a leper cookie!
My favorite video: Grilled Steak Trigun I LOVE THE COPS! Rargh!
I ain't 2 proud 2 beg! haha school rumble is great
Why do I always have the most preposterous sigs???
My current favorite thread. I'm a huge fan of GA-JAMMING.
User avatar
paizuri
 
Joined: 24 Sep 2001
Location: All hail me, the BEEFMASTER!!!!!

Next

Return to Video Software Help Archive

Who is online

Users browsing this forum: No registered users and 1 guest