GSoC - Theora multithread decoder

Hi,

This email is to inform what I have been doing since the mid-term.

After the mid-term I worked on a pipeline implementation with OpenMP.

As I said before I did a pipelined implementation of these functions:
(c_dec_dc_unpredict_mcu_plane + oc_dec_frags_recon_mcu_plane) and
(oc_state_loop_filter_frag_rows + oc_state_borders_fill_rows) as
explained in my previous email.
But the results were not good. They were equal the implementation
without pipeline.

http://lampiao.lsc.ic.unicamp.br/~piga/gsoc_2008/comparison.png
http://lampiao.lsc.ic.unicamp.br/~piga/gsoc_2008/speedup.png
http://lampiao.lsc.ic.unicamp.br/~piga/gsoc_2008/systime.png

Next I tried to do some improvements, but without success. I think
that the implementation as it is, could not be improved more
with parallelism.

Another approach could be tried to decode the next frame, as the
current frame is decoding, but this is very chanlenging, because most
of the frames has data dependency of the frame before it.

The gain adding parallelism is 13% with OpenMP. Not so bad.

My project is with few code, I tried to do my best. When I proposed
this project I knew that it would be very difficult. It was
challenging and I have learned a lot, specially  about the OpenMP
(Continue reading)

Silvia Pfeiffer | 6 Aug 01:45

Seeking a maintainer for liboggplay

To all you great C programmers out there who have been looking for a
chance to take on a really cool open source project in video:

liboggplay is a library that vastly simplifies the decoding and
playback of Ogg encapsulated audio-visual content for programmers. It
does everything apart from the actual display of audio and video and
has thus been selected as the thinnest library to provide support for
Ogg Theora/Vorbis in Firefox's new HTML5 <video> and <audio> tag
implementation.

liboggplay is looking for a maintainer.

It needs somebody who is highly enthusiastic about open media codecs,
has experience in C programming, can compile and test liboggplay on
all major operating systems (probably set it up on a build farm) and
has enough time to react swiftly to the need of bug fixes. After all:
We don't want people's Firefoxes to choke on Ogg content, but rather
amaze them about how easy to handle and nicely integrated Ogg works on
the Web.

One of the next challenges for liboggplay is the implementation of
support for Ogg Dirac - the BBC's wavelet-based video codec. Mozilla,
would be very keen to get Dirac support into liboggplay and thus
diversify the open codecs supported in Firefox.

If you want to become the new maintainer for liboggplay, or want to
implement Ogg Dirac support into liboggplay, or do both, get in touch
with me and we'll get you set up.

liboggplay can be found here:
(Continue reading)

Silvia Pfeiffer | 5 Aug 16:17

Announcing first release of liboggplay

OggPlay 0.0.1 Release
---------------------

liboggplay is a C library providing a simple programming interface for reading,
decoding and playing back Ogg files and streams. Ogg is an interleaving data
container developed by Monty at Xiph.Org, originally to support the Ogg Vorbis
audio format.

This release is available as a source tarball at:

http://www.annodex.net/software/liboggplay/download/liboggplay-0.0.1.tar.gz

This is an initial release.

The library is already in use by Mozilla to provide in-built support for
Ogg Theora in the HTML5 <video> tag.

About Oggplay
-------------

Oggplay comprises liboggplay and the command-line tool oggplay-info.

What is liboggplay designed to do?

There are several layers to a typical ogg playing application:
(1) Parsing of the ogg container format (handled by libogg and made usable by
    liboggz) and routing of packets
(2) Decoding of individual ogg packets (handled by libtheora, libvorbis,
    libfishsound, libcmml, etc. depending on contents)
(3) Maintenance of synchronisation between individual raw data streams
(Continue reading)

vincent Alleaume | 22 Jul 15:47

theora_decode_header

Hello,

I am using theora in an application, but it does not work, I was looking 
to know why, and since I have one application using theora, I checked 
the difference between the two executions.
And it seems that the function *_theora_decode_header_* does not have 
the same issue in the two application, but I read the same file...
the difference is on the _m_theoraInfo_, in the first application ( 
which work ) the offset_y is equal to 4, and in the second application 
(which does not work) the offset_y is equal to 0.
that's the same file at two differente place in the file system, but I 
suppose that changes nothing ?
How can I get differente information about the same file ??

Vincent.

GSoC - Theora multithread decoder

Hi all,

I apologize to not keep you up to date to what is going on with my project. Portavales has worked in a desk behind me and when we go to take coffee we talk about the project. Second I didn't know we have to discuss weekly, it was my fault. I should have read the rules. Sorry.

At the first month, I studied the code and the Theora Beta implementation. The code is completely different from Alpha and I have to be familiarized with the code.
After that I started doing tests with OpenMP.

One first test was 40% faster, but unfortunately it did not decode the frame correctly, three quarters was green.

I have one implementation decoding the Y, Cb and Cr planes in parallel. The OpenMP implementation was about 5% faster. Not worthless, since it does not require any great modifications.

I looked at Ralph's implementation and merged it to the current. The speed up was about 10% but the code have to be modified in many places.

Extract parallelism from the current implementation is very difficult. Coarse grain functions are the best functions to be parallelize to become the overhead worthwhile, but the current implementation has one, at most two. The parts that I suggested in my initial plan are fine grain functions, they spend a lot of cpu time but they are called too many times. The time spent to create and synchronize threads is greater than the speed up gains. We need functions that are called a few times and spend many cpu time. Also data dependency should be the lowest as possible.

According to the model that i did (http://lampiao.lsc.ic.unicamp.br/~piga/gsoc_2008/implementation.pdf) the decoding time should be reduced in 33%, but it was just 10% for pthread an 5% for openMP.

I used a video with 1440x1080. The pthread implementation has 3 threads and the OpenMP was executed with the environment variable OMP_NUM_THREADS=3. The results are:

                   Real(s)         User(s)             System(s)             Speed up(%)
OpenMP      25.2             29.2                  1.8                       4
PThread       23.8             28.3     &n bsp;            1.0                       10
Current        26.2             26.0                   0.3                       0

I used an Intel(R) Core(TM)2 Quad CPU with 2.4GHz and RAM of 4GB. The video has 85 seconds.
These two implementations decode the Y, Cb and Cr planes in parallel, that is why I am using OMP_NUM_THREADS=3 and the upper bound gain is 33%, that is, let To be the time spent in decoding a video with the current implementation. Let T1 be a video decoded with the parallel implementation. T1 should be at most 0.66To.


I will use the pthread implementation to try a pipelined version and see if we obtain more gains.
These version will run the functions (c_dec_dc_unpredict_mcu_plane + oc_dec_frags_recon_mcu_plane) and
(oc_state_loop_filter_frag_rows + oc_state_borders_fill_rows) in parallel. The upper bound for the gain is 60%, that is, let T2 be a video decoded with the pipelined implementation. T2 should be at most 0.4To.

Here is the branch for the OpenMP implementation: http://svn.xiph.org/branches/theora_multithread_decode_omp/
Here is the branch for the PThread implementation: http://svn.xiph.org/branches/theora_multithread_decode_pthread/





Again, sorry about the long time without any feedback.

--
Leonardo de Paula Rosa Piga
Undergraduate Computer Engineering Student
LSC - IC - UNICAMP
http://lampiao.lsc.ic.unicamp.br/~piga
_______________________________________________
theora-dev mailing list
theora-dev <at> xiph.org
http://lists.xiph.org/mailman/listinfo/theora-dev
Thorsten Klammer | 30 Jun 18:21

building theora for windows

Hi,

I’m trying to build a static theora library for windows from sources with
Visual Studio Express.
Building the ogg-library was a piece of cake, but after converting the
project-files for theora, I still get numerous errors, such as:
fatal error C1083: Datei (Quelle) kann nicht geöffnet werden:
"..\..\..\lib\dec\x86_vc\x86state.c": No such file or directory mmxstate.c

Probably it's just a problem with path-variables incorrectly set, but I'm no
real fan of the Visual C environment and I therefore unfortunately just have
rudimentary knowledge with that kit and can't fix it. I'm just trying to
build a JNI interface library that will incorporate the freeimage library
and theora for a video-compression/decompression test with java. I would be
very grateful if someone could give me an step-by-step tutorial to compile
the library or even better yet, just give me a link for a already compiled
version as I think that I won't be the only one who would be grateful for
pre-compiled download version.

Thx a lot,
Thorsten Klammer
Jim Smith | 22 Jun 22:58

current_granulepos-first_granulepos ?

Hi,

Is it correct to assume that after I get the headers of a stream like theora or vorbis the packet time can be computed as current_granulepos-first_granulepos ?

This would give me the difference between the first media packet that is not a
header and the current packet I decoded most recently. In a live stream I would have a
clock from this calculation starting at zero.


Thanks





_______________________________________________
theora-dev mailing list
theora-dev <at> xiph.org
http://lists.xiph.org/mailman/listinfo/theora-dev
Jim Smith | 22 Jun 21:50

syncing a live stream

Hi,

When I sync the a/v with just an icecast2 stream I'm starting at the beginning of the stream so it's simpler. But, when I read the stream from icecast2/ezstream I get the stream after the beginning and the a/v timing on the packets need to be handled differently. Does anyone know what approach I should take to sync the live stream? There has to be some generic high-level logic for an OGG stream.


Thanks

_______________________________________________
theora-dev mailing list
theora-dev <at> xiph.org
http://lists.xiph.org/mailman/listinfo/theora-dev
Jim Smith | 22 Jun 08:24

ffmpeg2theora and ezstream + icecast2

Hi,

I have a problem reading the live stream from ezstream/icecast2 using ffmpeg2theora as the encoder/decoder. Everything was fine with icecast2 alone but when I added the ezstream to create a live stream the video/audio was trashed. I'.m using Ogg with theora/vorbis. I fixed the aspect ratio using the configuration settings but the a/v sync and the a/v packet times are far out of sync. I don't know what to do about this, it appear that  ffmpeg2theora modified the Ogg stream and now I can't process it.

Does anyone know what I should do?


Thanks

_______________________________________________
theora-dev mailing list
theora-dev <at> xiph.org
http://lists.xiph.org/mailman/listinfo/theora-dev
Nicolas R. | 18 Jun 16:26

Simple decoder (keyframe only) implementation ?

 
Hello everybody !
 
I am working on a php class to enable, on the server-side, to extract useful data from Ogg theora videos. http://opensource.grisambre.net/ogg .
 
I need to have it extract a thumbnail picture from a video (much like dailymotion or youtube). Right now, I am doing it using the ffmpeg-php extension (for picture extraction only), but the problem is that this module is available on very few php servers.
 
I am (still) trying to make a very simple implementation, for INTRA frames only, using the official theora documentation and going step by step. But I am feeling like doing everything from scratch, like reinventing the wheel, with many difficulties due to my lack of knowledge on video coding. And most of the time I have difficulties understanding some particular point of the process, and the actual theora svn code source is very difficult to corelate with the theora documentation (not same vocabulary, names of variables, way of decoding...)...
 
My question is: has anyone done any simple decoder, for a single keyframe, in any structured langage I could reuse the code (c, c++, php, python, perl, java, anything ?)
 
Thank you very much in advance...
Nicolas

_______________________________________________
theora-dev mailing list
theora-dev <at> xiph.org
http://lists.xiph.org/mailman/listinfo/theora-dev
Jim Smith | 6 Jun 19:21

syncing with a live Ogg stream

Hi,

I have the following questions.

 How do I prepare Ogg for a live stream?

 Currently I'm reading the streams fine from beginning to end over icecast2, but if I catch the stream in the middle of playback there seems to be trouble getting the headers and processing the audio/video.

 Should I look for headers all the time or just when starting in the beginning of an Ogg stream?

 How do I sync with the stream in a live Ogg playback?

 Do I have to take the stream data and populate the Ogg stream
 state struct myself?


Thanks,
Jim Smith
div>

_______________________________________________
theora-dev mailing list
theora-dev <at> xiph.org
http://lists.xiph.org/mailman/listinfo/theora-dev

Gmane