caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Video/Audio codecs in ocaml
@ 2005-11-17  4:41 Jonathan Roewen
  2005-11-17  5:16 ` Jonathan Roewen
  0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Roewen @ 2005-11-17  4:41 UTC (permalink / raw)
  To: caml-list

Hey All,

Has anyone done anything with video and/or audio processing using ocaml?

I'm interested in writing a [streaming] video player for DST to show
off at the next NZ CLUG (common lisp) I'm going to, and any prior work
would be helpful =)

Hopefully, bytecode on the bare metal can keep up ;-)

Jonathan


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Video/Audio codecs in ocaml
  2005-11-17  4:41 [Caml-list] Video/Audio codecs in ocaml Jonathan Roewen
@ 2005-11-17  5:16 ` Jonathan Roewen
  2005-11-17  9:17   ` Damien Bobillot
  2005-11-17 14:39   ` Brian Hurt
  0 siblings, 2 replies; 9+ messages in thread
From: Jonathan Roewen @ 2005-11-17  5:16 UTC (permalink / raw)
  To: caml-list

> Has anyone done anything with video and/or audio processing
> using ocaml?

Even better: would anyone like to help with an mpeg2 decoder written
completely in ocaml?

OCaml is supposed to be good at numerical processing right? So I hope
performance for a 100% software based decoder will be okay...

My goal is to get something going within one week =P I have no idea if
it can be done, so we'll see...

Jonathan


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Video/Audio codecs in ocaml
  2005-11-17  5:16 ` Jonathan Roewen
@ 2005-11-17  9:17   ` Damien Bobillot
  2005-11-17  9:25     ` Jonathan Roewen
  2005-11-17 14:39   ` Brian Hurt
  1 sibling, 1 reply; 9+ messages in thread
From: Damien Bobillot @ 2005-11-17  9:17 UTC (permalink / raw)
  To: Jonathan Roewen; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 918 bytes --]


Jonathan Roewen wrote :

>> Has anyone done anything with video and/or audio processing
>> using ocaml?
>
> Even better: would anyone like to help with an mpeg2 decoder written
> completely in ocaml?
>
> OCaml is supposed to be good at numerical processing right? So I hope
> performance for a 100% software based decoder will be okay...

With OCaml you can't use features like SIMD instructions of CPUs, and  
will do many bound checking, so it will be slower.
I'm a bit sceptical that ocaml may be as good as C for pure signal  
processing.

> My goal is to get something going within one week =P I have no idea if
> it can be done, so we'll see...

Writing a mpeg2 decoder won't take less than a week !!! (except  
perhaps if you've already spent time on a mpeg2 decoder)

If you have to write something, a ocaml wrapper for ffmpeg may be a  
good start.

-- 
Damien alias Schmurtz
aim:goim?screenname=schmuuurtz


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2375 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Video/Audio codecs in ocaml
  2005-11-17  9:17   ` Damien Bobillot
@ 2005-11-17  9:25     ` Jonathan Roewen
  2005-11-17  9:51       ` Damien Bobillot
  0 siblings, 1 reply; 9+ messages in thread
From: Jonathan Roewen @ 2005-11-17  9:25 UTC (permalink / raw)
  To: Damien Bobillot; +Cc: caml-list

> With OCaml you can't use features like SIMD instructions of CPUs, and
> will do many bound checking, so it will be slower.
> I'm a bit sceptical that ocaml may be as good as C for pure signal
> processing.

Oh okay. Ah well, I'm doing a pure OCaml OS anyways, so we'll just
have to wait and see. Can bounds checking be disabled for just one
module?

> Writing a mpeg2 decoder won't take less than a week !!!

We'll see. It'd be more like rewriting something like libmpeg2 in
ocaml I think. It'd be a damn good attempt anyways ;-)

> If you have to write something, a ocaml wrapper for ffmpeg may be a
> good start.

No linking of program specific C code into OS, I'm afraid.

Jonathan


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Video/Audio codecs in ocaml
  2005-11-17  9:25     ` Jonathan Roewen
@ 2005-11-17  9:51       ` Damien Bobillot
  2005-11-17 18:46         ` David MENTRE
  0 siblings, 1 reply; 9+ messages in thread
From: Damien Bobillot @ 2005-11-17  9:51 UTC (permalink / raw)
  To: Jonathan Roewen; +Cc: caml-list

[-- Attachment #1: Type: text/plain, Size: 1067 bytes --]

Jonathan Roewen wrote :

>> With OCaml you can't use features like SIMD instructions of CPUs, and
>> will do many bound checking, so it will be slower.
>> I'm a bit sceptical that ocaml may be as good as C for pure signal
>> processing.
>
> Oh okay. Ah well, I'm doing a pure OCaml OS anyways, so we'll just
> have to wait and see.

Ok, I wasn't aware of that. In this case, you effectively have to  
write it in ocaml.

Did you have a url to this OS projet ?

I don't know how much speed you'll lost compared to C code, but if  
you use native ocaml compilation it shouldn't be a big issue (even if  
it's twice as slow as C, it'll run on recent CPUs ;)).

> Can bounds checking be disabled for just one module ?

The -unsafe option is a compiler option, not a linker option, so I  
think it may has a different value for each .ml file.

>> Writing a mpeg2 decoder won't take less than a week !!!
>
> We'll see. It'd be more like rewriting something like libmpeg2 in
> ocaml I think. It'd be a damn good attempt anyways ;-)

So... good luck ;)

-- 
Damien Bobillot


[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 2375 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Video/Audio codecs in ocaml
  2005-11-17  5:16 ` Jonathan Roewen
  2005-11-17  9:17   ` Damien Bobillot
@ 2005-11-17 14:39   ` Brian Hurt
  2005-11-17 14:56     ` skaller
  1 sibling, 1 reply; 9+ messages in thread
From: Brian Hurt @ 2005-11-17 14:39 UTC (permalink / raw)
  To: Jonathan Roewen; +Cc: caml-list



On Thu, 17 Nov 2005, Jonathan Roewen wrote:

>> Has anyone done anything with video and/or audio processing
>> using ocaml?
>
> Even better: would anyone like to help with an mpeg2 decoder written
> completely in ocaml?
>
> OCaml is supposed to be good at numerical processing right? So I hope
> performance for a 100% software based decoder will be okay...

No, it won't be.  Nor, I comment, will C.  To get sufficient performance 
for real-time MPEG decoding, you need to code the inner loop (the 2DFFT) 
using SSE or Altivec or similiar.

The higher level stuff (managing the bit stream, etc.) can all be done in 
Ocaml.

Brian


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Video/Audio codecs in ocaml
  2005-11-17 14:39   ` Brian Hurt
@ 2005-11-17 14:56     ` skaller
  0 siblings, 0 replies; 9+ messages in thread
From: skaller @ 2005-11-17 14:56 UTC (permalink / raw)
  To: Brian Hurt; +Cc: Jonathan Roewen, caml-list

On Thu, 2005-11-17 at 08:39 -0600, Brian Hurt wrote:

> No, it won't be.  Nor, I comment, will C.  To get sufficient performance 
> for real-time MPEG decoding, you need to code the inner loop (the 2DFFT) 
> using SSE or Altivec or similiar.

Of course you can do that with gcc easily, all the opcodes
on most processors have 'function' like mappings. See the
gcc man page .. there's a list a mile long.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Video/Audio codecs in ocaml
  2005-11-17  9:51       ` Damien Bobillot
@ 2005-11-17 18:46         ` David MENTRE
  2005-11-17 18:48           ` Jonathan Roewen
  0 siblings, 1 reply; 9+ messages in thread
From: David MENTRE @ 2005-11-17 18:46 UTC (permalink / raw)
  To: Damien Bobillot; +Cc: Jonathan Roewen, caml-list

Damien Bobillot <damien.bobillot@m4x.org> writes:

> Did you have a url to this OS projet ?

  http://dst.purevoid.org/

Yours,
d.
-- 
pub  1024D/A3AD7A2A 2004-10-03 David MENTRE <dmentre@linux-france.org>
 5996 CC46 4612 9CA4 3562  D7AC 6C67 9E96 A3AD 7A2A


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [Caml-list] Video/Audio codecs in ocaml
  2005-11-17 18:46         ` David MENTRE
@ 2005-11-17 18:48           ` Jonathan Roewen
  0 siblings, 0 replies; 9+ messages in thread
From: Jonathan Roewen @ 2005-11-17 18:48 UTC (permalink / raw)
  Cc: caml-list

>  http://dst.purevoid.org/

Also new SVN: http://devnulled.ath.cx/svn/dst/

Jonathan


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2005-11-17 18:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-11-17  4:41 [Caml-list] Video/Audio codecs in ocaml Jonathan Roewen
2005-11-17  5:16 ` Jonathan Roewen
2005-11-17  9:17   ` Damien Bobillot
2005-11-17  9:25     ` Jonathan Roewen
2005-11-17  9:51       ` Damien Bobillot
2005-11-17 18:46         ` David MENTRE
2005-11-17 18:48           ` Jonathan Roewen
2005-11-17 14:39   ` Brian Hurt
2005-11-17 14:56     ` skaller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).