Entries Tagged 'Summer of Code 2008' ↓

Final SoC Report – screencasts, screencasts.. screencasts!

Hey! Summer of Code just ended! since Monday we’re in Final Evaluation phase.
This means I can finally take some vacation and leave coding for a while :) !
But, most of all, it means that it’s time again for not one, not two, but four screencasts!!

I’m sorry for not posting anything for a while but, needless to say I don’t like blogging :P, I was really busy with the merge. Julien Isorce, another gstreamer developer, was working on his own branch of gstreamer-gl since some time and recently David Schleef decided to merge it with cvs trunk.
He added a lot of great things like glsl colorspace conversion, win32 support, a working glimagesink and lot more. Unfortunately my effects didn’t work with the new code so I had to work hard to make them work again.

But let’s stop talking about this boring stuff, now almost everything is fine so… get ready for the show :P !

New Effects

New Effects

Not too much on this side..

  • a Glow Lighting effect that some of you requested. I tried to resemble gimp SoftGlow filter, do you like it?
  • a SinCity inspired effect that desaturates everything but red shades… don’t know if you agree but I love it!
  • better curves for Sepia and Cross Processing effect, maybe the latter still needs some tuning (too light blue on dark tones).
  • a Square distortion effect… ehm, no.. it was already there :) but that’s definitely my favourite one!

New Filters

These are still young and don’t work quite well yet, but I’m almost there!

GstGLPixbufOverlay

Takes an image filename through a property and alpha blends it with the video stream.
It could be nice with Cheese to add funny frames, or just to add a red circle to displayed video while recording.

GstGLDifferenceMatte

This one saves a video frame of the background and replaces it with an image.
It’s really hard to make it work properly, it tries to guess the background thresholding the difference between current frame and saved one.
To get a good result it needs a uniform background, better with a uncommon color, a low noise webcam (i tried to remove noise dependency with some gaussian blur), etc.
Any idea to improve it? Probably RGB is not the right colorspace to do this thing, maybe using HSL or HSV and thresholding just hue could help to get rid of luminance dependency. I’ll give it a try.

Clutter Experiments

Clutter live preview

This is my last experiment with rendering from gstreamer gl into a ClutterActor.
It uses XComposite to redirect glimagesink stream offscreen and Clutter Texture from Pixmap support (thanks Andy Wingo for the idea) to turn it into an Actor.
It’s still young and experimental but it could be a good starting point for a clutter based effect selector for Cheese.

Great, but where is the code?
There is no release yet but you can test it if you want from the git repository git://diracvideo.org/git/gst-plugins-gl.git
Take a look at tests directory.
It is known to work for sure on linux, windows and probably osx (through X).
It needs a recent gpu that supports FBOs (mandatory) and GL Shading Language (optional, needed for the effects and accelerated colorspace conversion).

Thanks
That’s all for now.
A big thanks to everyone who helped, supported, encouraged me during this Summer of Code, Daniel Siegel, David Schleef, Julien Isorce, the guys from #gstreamer, #clutter, #gnome-it, ##OpenGL, the GNOME Community, everyone!
Thank you, it’s been a great time!

Midsummer SoC Report: effects screencast !!

Hey, it’s already July 7th (well, almost 8th now), time for midterm evaluations for SoC students!
So how could I leave you without the mandatory screencast? It’s been a bit painful to overcome my shyness and I felt a bit stupid recording myself.. but that’s it, hope you’ll enjoy!

Yay! that’s me!

It’s pretty much self-explanatory, just look at it and have fun!

I’m quite satisfied with the face distortion effects, aren’t they awesome (as Daniel would say ;) )?
I still have some doubt, though, about the sepia effect. It can be obtained just with the gimp curve tool, so if you have a better one feel free to send me the curve file ;) (or any other nice curve file that you have)!

I’m really looking forward to hear your comments and suggestions!

GUADEC Rants..
It seems that I won’t be able to be at GUADEC with all of us, it’s such a pain to read your posts and cannot be there..
I obtained the travel sponsorship but I really needed an answer for a couple of questions before being able to buy tickets. I asked Baris but he someway disappeared since last wednesday, I never seen him again on irc and he stopped replying my mails (and someone else’s too as far as I know).
So time passed, and I’m still here waiting for his reply… I can understand he should surely have been over busy within past week, but it was too bad that he was the only one to contact for sponsorship questions.
There is still a (very) little chance to take a last minute flight so Baris, if you’re reading this, just mail me, comment, ping me on irc!

SoC Report: week 2

Hey all! As you might have noticed I’m not too much into blogging, my last post is more than 2 weeks old..
Anyway, I’m supposed to post a weekly status report to the gnome-soc list, so why not to take it as a chance to keep you all updated about my work? So, expect at least a post per week from now on, around each monday ;)

Brief summary of first week

I didn’t code too much the first week since I’ve been very busy with last lessons at the university.
Besides it’s not that I didn’t do anything, I managed to start some basic work with gstreamer gl plugin. I began to extend the gstreamer gl library with some GLSL shader support, basically I’ve written a couple of GObject classes to abstract from gl primitives and use them easily.
I’ve also written a little gtk test app that shows video images with xvimagesink and xoverlay and select effects with a combo button. Nothing too complicated but more than enough for what I need at the moment.

2nd Week Report

Within last week I kept on working on gstreamer gl library, I’ve finished and committed the first draft of a shader abstraction library, it’s capable of creating program and shader objects with usual gobject methods, compile shaders, attach them to a program, link and attach them to GL pipeline.
At the moment, so, it simply wraps the correspondent gl methods, take care of error handling, and clean up everything when program or shader ref count reaches 0.
The gobject abstraction, though, will simplify, for example adding support for ARB programs (asm shaders) and use them with the same api of GLSL ones.
It would also allow to have convenience methods like gst_gl_shader_add (not yet implemented) to have a shader compiled, attached and linked with just one call, or to keep track of multiple shaders attached to the same program object so that it would be easy to release them all at once. Furthermore the use of gobject makes code clean, and easier to read and debug.
There are still a couple of things I’m not quite sure about:

  • How to handle errors?
  • GLSL shaders are designed to resemble C programs, hence they have to be compiled and linked before attaching them to the GL state. This process could rise errors, warnings and info messages that can be queried and are extremely useful for debugging. How should my library handle them? At the moment I’m setting a GError with compilation and linking messages and leaving to the user (the GstGLFilter element) the task to handle them. Should I use g_error, g_warning and g_message instead? Or should I use GstInfo debug macros directly from the shader objects?

  • Ehm.. I forgot the others while writing about the previous :)

I’ve also started to write the real GstElement that all my summer project is about, GstGLEffects (the name is not definitive).
It’s a subclass of GstGLFilter written taking David’s GstGLFilterExample as a model. I didn’t commit this yet, but it’s already capable of using the new shader abstraction library and can be used as a starting point to develop the effects.
It maps video texture to a GL quad (at the moment switched right to left to resemble looking at a mirror when used with webcam stream, but I plan to set this with a property sooner or later).
Effects are being selected with a enum property that sets an effect_changed attribute and binds an effect function pointer to the right effect. This is needed because gl functions have to be called within the basetransform filter methods where we can be sure there is a valid gl context and display is locked. This has a positive side effect to allow to set effects even when the pipeline is paused (and of course when is playing). There is also no need to rebuild the pipeline every time like Cheese does at the moment since we just have one element that does all the work.
To concentrate on effects developing at the moment only one effect at the time can be used (since it was simpler to implement) but I plan to add support for multiple effects in the future.
I also began to play a bit with some effect, mainly distortion ones, but they are still at an early stage so stay tuned during next weeks to see more!

I think that’s all for this week, I surely have forgotten something and as always I didn’t manage to be concise :( I promise to post more often so each post will be shorter next times ;)

hello, planet gnome!

Hey all, I’ve been added to planet gnome! (thanks lucasr ;) )
Since most of you shouldn’t know anything about me, here is a brief introduction.

My name is Filippo Argiolas and I’m a third year Physics student at University of Cagliari (Italy).
I’ve been a gnome user for quite some time and recently I’ve started to actively contribute, well… when my studies left me some spare time …
I’ve written some minor patch here and there and maybe some of you already know the little game I’ve written some time ago.

It’s been a while since I’ve been accepted to Google Summer of Code 2008 :D , I wanted to blog about it before but I’ve always been so busy at university and never had the time.
By the way, it’s never too late, so let’s talk a bit about my summer project.

I’ll work on a set of opengl based gstreamer elements to improve Cheese with some new hardware accelerated effects.
Most of my work will involve adding GLSL Shaders support to gstreamer gl, and creating some fragment shader to take advantage of modern graphic adapters’ programmable pipeline. This will hopefully end up with a bunch of effects, from distortion to color transforming and more artistic ones, with almost no cost for the cpu.
Being based on gstreamer, most of the stuff won’t be restricted to Cheese and will be reusable wherever gstreamer is used to manage video data.

You can check a more detailed description in the abstract

As I said in the previous post (not yet aggregated in the planet), I’ve opened this blog to keep you updated of my progresses with my summer project, and, most of all, to get feedback, suggestions and, maybe, help. So feel free to leave your comments here!

Please forgive for being so long, I’m still new to bloggin and I’m practicing to get some more synthesis skill.

Before to leave I’d like to thank everyone who gave me this great chance to pass the summer working on something such fun, most of all Daniel Siegel, my mentor, and David Schleef, for letting me work on gstreamergl! Thank you guys!