Re: [Mlt-devel] planning to release MLT this weekend

2012-02-09 Thread Maksym Veremeyenko
09.02.12 07:18, Dan Dennedy написав(ла):
 I want to make a new release this weekend after I resolve of couple of
 Maksym's patches.
may be it has a sense to include sse2 and yuva fixes into next release...


-- 

Maksym Veremeyenko

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] planning to release MLT this weekend

2012-02-09 Thread Dan Dennedy
2012/2/9 Maksym Veremeyenko ve...@m1stereo.tv:
 09.02.12 07:18, Dan Dennedy написав(ла):

 I want to make a new release this weekend after I resolve of couple of
 Maksym's patches.

 may be it has a sense to include sse2 and yuva fixes into next release...

Support for alpha from yuva is not going into it, but I hope to
include the composite patch.

-- 
+-DRD-+

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] [PATCH] fix thread exit on error and thread termination

2012-02-09 Thread Maksym Veremeyenko
08.02.12 20:11, Dan Dennedy написав(ла):
[...]
 Well, the more critical goal was to fix a segfault, but I see your
 point now about using running to cleanup thread. I did not like
 your conversion of the thread property from data to a int64; do you
 know how data properties provide destruction? Also, my testing
 revealed some additional pointer checks required inside
 consumer_thread. Comment on this applied to head:

 diff --git a/src/modules/avformat/consumer_avformat.c
 b/src/modules/avformat/consumer_avformat.c
 index fb52df3..cd63431 100644
 --- a/src/modules/avformat/consumer_avformat.c
 +++ b/src/modules/avformat/consumer_avformat.c
 @@ -350,18 +350,18 @@ static int consumer_stop( mlt_consumer consumer )
   {
   // Get the properties
   mlt_properties properties = MLT_CONSUMER_PROPERTIES( consumer );
 + pthread_t *thread = mlt_properties_get_data( properties, thread, NULL 
 );

   // Check that we're running
 - if ( mlt_properties_get_int( properties, running ) )
 + if ( thread )
   {
 - // Get the thread
 - pthread_t *thread = mlt_properties_get_data( properties, 
 thread, NULL );
 -
   // Stop the thread
   mlt_properties_set_int( properties, running, 0 );

   // Wait for termination
   pthread_join( *thread, NULL );
what about swapping two lines above - set flag running after 
pthread_join return?

-- 

Maksym Veremeyenko

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] [PATCH] fix thread exit on error and thread termination

2012-02-09 Thread Dan Dennedy
2012/2/9 Maksym Veremeyenko ve...@m1stereo.tv:
 08.02.12 20:11, Dan Dennedy написав(ла):
 [...]

 Well, the more critical goal was to fix a segfault, but I see your
 point now about using running to cleanup thread. I did not like
 your conversion of the thread property from data to a int64; do you
 know how data properties provide destruction? Also, my testing
 revealed some additional pointer checks required inside
 consumer_thread. Comment on this applied to head:

 diff --git a/src/modules/avformat/consumer_avformat.c
 b/src/modules/avformat/consumer_avformat.c
 index fb52df3..cd63431 100644
 --- a/src/modules/avformat/consumer_avformat.c
 +++ b/src/modules/avformat/consumer_avformat.c
 @@ -350,18 +350,18 @@ static int consumer_stop( mlt_consumer consumer )
  {
        // Get the properties
        mlt_properties properties = MLT_CONSUMER_PROPERTIES( consumer );
 +       pthread_t *thread = mlt_properties_get_data( properties, thread,
 NULL );

        // Check that we're running
 -       if ( mlt_properties_get_int( properties, running ) )
 +       if ( thread )
        {
 -               // Get the thread
 -               pthread_t *thread = mlt_properties_get_data( properties,
 thread, NULL );
 -
                // Stop the thread
                mlt_properties_set_int( properties, running, 0 );

                // Wait for termination
                pthread_join( *thread, NULL );

 what about swapping two lines above - set flag running after pthread_join
 return?

The main loop in the consumer checks the running property, so we need
to set it 0 to signal termination before the join.

-- 
+-DRD-+

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] opengl support

2012-02-09 Thread Christophe Thommeret
Hi Dan,

I can now run melt -consumer qgl clip.xxx
In this case, glsl.csc is created instead of avcolor_space.
It does rgb24/rgb24a/yuv420p/yuv422 to gl texture.
It calls 
mlt_frame_set_image( frame, (uint8_t*)dest, 
   sizeof(struct glsl_texture_s), g-texture_destructor );

and sets format to mlt_image_glsl.

then the qgl consumer (a QGLWidget) displays dest-texture.

This works well for yuv422 and rgb24, but it never gets yuv420p, all yuv420 
streams are converted somewhere (i guess the producer) to yuv422 before 
reaching the csc filter. Is there any way to disable this initial conversion ? 
Not only i could validate the yuv420p_to_glsl code but it would also minimize 
a bit the amount of data to upload.

(Note : normalisers are disabled.)

-- 
Christophe Thommeret

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] opengl support

2012-02-09 Thread Dan Dennedy
On Thu, Feb 9, 2012 at 1:03 PM, Christophe Thommeret hf...@free.fr wrote:
 Hi Dan,

 I can now run melt -consumer qgl clip.xxx
 In this case, glsl.csc is created instead of avcolor_space.
 It does rgb24/rgb24a/yuv420p/yuv422 to gl texture.
 It calls
 mlt_frame_set_image( frame, (uint8_t*)dest,
       sizeof(struct glsl_texture_s), g-texture_destructor );

 and sets format to mlt_image_glsl.

why not the existing mlt_image_opengl? There are some legacy cases of
code doing something with mlt_image_opengl treating it the same as
mlt_image_rgb24a, but we can clean that up or switch to it later.

 then the qgl consumer (a QGLWidget) displays dest-texture.

I think something like QGLWidget really belongs more in a Qt app than
MLT. Also, then the app has more flexibility in choosing a audio-only
consumer, but if it makes it dev easier by simply working with melt, I
understand.

 This works well for yuv422 and rgb24, but it never gets yuv420p, all yuv420

If you have an image conversion filter properly applied (see
core/producer_loader.c), then you can get yuv420p by using
mlt_frame_get_image() but not by directly accessing the properties.
However, you seem to be mucking around with the image converters and
maybe screwed up something. How did you do glsl.csc is created
instead of avcolor_space? If you are replacing an image converter
(avcolor_space is an image converter), then it is your responsibility
to convert from whatever to yuv420.

 streams are converted somewhere (i guess the producer) to yuv422 before
 reaching the csc filter. Is there any way to disable this initial conversion ?

The producer is not required to give you what you ask for. For
example, image-based producers generally always give rgb24 or rgb24a.
Hence, the image converter is there to convert it for the
mlt_frame_get_image() caller. However, the avformat producer does
generally give you what you ask for.

Note also that with consumer.real_time  0 there is a thread running
to pre-render frames, and that thread defaults to mlt_image_yuv422,
but you can change it by setting property mlt_image_format=yuv420p on
the consumer (added since last release).

 Not only i could validate the yuv420p_to_glsl code but it would also minimize
 a bit the amount of data to upload.

 (Note : normalisers are disabled.)

 --
 Christophe Thommeret

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] opengl support

2012-02-09 Thread Christophe Thommeret
Le jeudi 9 février 2012 23:34:14, Dan Dennedy a écrit :
 On Thu, Feb 9, 2012 at 1:03 PM, Christophe Thommeret hf...@free.fr wrote:
  Hi Dan,
  
  I can now run melt -consumer qgl clip.xxx
  In this case, glsl.csc is created instead of avcolor_space.
  It does rgb24/rgb24a/yuv420p/yuv422 to gl texture.
  It calls
  mlt_frame_set_image( frame, (uint8_t*)dest,
sizeof(struct glsl_texture_s), g-texture_destructor );
  
  and sets format to mlt_image_glsl.
 
 why not the existing mlt_image_opengl? There are some legacy cases of
 code doing something with mlt_image_opengl treating it the same as
 mlt_image_rgb24a, but we can clean that up or switch to it later.

I wasn't sure what mlt_image_opengl was for. So i went for _glsl, also 
thinking that if later MLT gets opencl support, the names might be confusing.
But that's not a big deal to change to something other.

  then the qgl consumer (a QGLWidget) displays dest-texture.
 
 I think something like QGLWidget really belongs more in a Qt app than
 MLT. Also, then the app has more flexibility in choosing a audio-only
 consumer, but if it makes it dev easier by simply working with melt, I
 understand.

Exactly, i need an easy way to test, so writting a consumer (very basic, no 
audio, fixed ~25fps) was much easier than porting something like kdenlive :)

  This works well for yuv422 and rgb24, but it never gets yuv420p, all
  yuv420
 
 If you have an image conversion filter properly applied (see
 core/producer_loader.c), then you can get yuv420p by using
 mlt_frame_get_image() but not by directly accessing the properties.
 However, you seem to be mucking around with the image converters and
 maybe screwed up something. How did you do glsl.csc is created
 instead of avcolor_space? If you are replacing an image converter
 (avcolor_space is an image converter), then it is your responsibility
 to convert from whatever to yuv420.

I've modified producer_loader_init to create glsl.csc when the consumer sets 
the global_property data glsl_env (a pointer to an instance of a class(well, 
a struct) that contains everything needed by filters, creating/caching fbo, 
textures and shaders, locking the gl context (a context can only be made 
current in one thread at any time), etc...)

  streams are converted somewhere (i guess the producer) to yuv422 before
  reaching the csc filter. Is there any way to disable this initial
  conversion ?
 
 The producer is not required to give you what you ask for. For
 example, image-based producers generally always give rgb24 or rgb24a.
 Hence, the image converter is there to convert it for the
 mlt_frame_get_image() caller. However, the avformat producer does
 generally give you what you ask for.

The video thread calls :

mlt_image_format vfmt = mlt_image_glsl;
int width = 0, height = 0;
uint8_t *image;
mlt_frame_get_image( frame, image, vfmt, width, height, 0 );

and the converter gets yuv422.

 Note also that with consumer.real_time  0 there is a thread running
 to pre-render frames, and that thread defaults to mlt_image_yuv422,
 but you can change it by setting property mlt_image_format=yuv420p on
 the consumer (added since last release).

I'm running with the default real_time=1.
Could you tell me more about setting this consumer' format property ?

  Not only i could validate the yuv420p_to_glsl code but it would also
  minimize a bit the amount of data to upload.
  
  (Note : normalisers are disabled.)
  
  --
  Christophe Thommeret

-- 
Christophe Thommeret

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


[Mlt-devel] yml validation

2012-02-09 Thread Brian Matherly
Dan,

Could you please make this tweak to the Makefile so that make returns an error 
if a yml file fails to validate?
https://github.com/pez4brian/mlt/commit/cebee0605a027e6ff754ab79d78b2dda183f35a5

Thanks,

~Brian


--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] opengl support

2012-02-09 Thread Dan Dennedy
On Thu, Feb 9, 2012 at 3:12 PM, Christophe Thommeret hf...@free.fr wrote:
 Le jeudi 9 février 2012 23:34:14, Dan Dennedy a écrit :
 Note also that with consumer.real_time  0 there is a thread running
 to pre-render frames, and that thread defaults to mlt_image_yuv422,
 but you can change it by setting property mlt_image_format=yuv420p on
 the consumer (added since last release).

 I'm running with the default real_time=1.
 Could you tell me more about setting this consumer' format property ?


When real_time != 0, mlt_consumer.c spawns abs(real_time) threads that
loop fetching a frame and calling mlt_frame_get_image(), and that call
has a format parameter. It gets the format from the consumer property
named mlt_image_format, which accepts the names: yuv420p, yuv422,
rgb24, rgb24a, or none.

In December, I added support for mlt_image_none for a customer. This
asks mlt_frame_get_image() to return the format that is closest to its
native format. But the caller can really only expect that when there
are no filters including normalizing filters. Maybe that is what you
want if you want to offload as much conversion to glsl. Or, maybe you
want yuv420p to reduce the bus bandwidth.

P.S. a way to request no normalizing filters at runtime, is to use the
abnormal producer, and the easiest way to invoke that is to prefix the
resource name with abnormal:

-- 
+-DRD-+

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


[Mlt-devel] Git: fix swfdec/configure appending to config.mak

2012-02-09 Thread Dan Dennedy
 Makefile |2 +-
 src/modules/swfdec/configure |1 +
 2 files changed, 2 insertions(+), 1 deletions(-)

New commits:
commit 86a9b5d362d0d671f401ae973c028b5854d3b960
Author: Dan Dennedy d...@dennedy.org
Date:   Thu Feb 9 20:08:24 2012 -0800

fix swfdec/configure appending to config.mak

commit f73f172041c3bdeaf478f5447624bbc938b1e2f4
Author: Brian Matherly pez4br...@yahoo.com
Date:   Thu Feb 9 21:07:45 2012 -0600

Exit make with error if any yml validation fails.


--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] yml validation

2012-02-09 Thread Dan Dennedy
On Thu, Feb 9, 2012 at 7:11 PM, Brian Matherly pez4br...@yahoo.com wrote:
 Dan,

 Could you please make this tweak to the Makefile so that make returns an 
 error if a yml file fails to validate?
 https://github.com/pez4brian/mlt/commit/cebee0605a027e6ff754ab79d78b2dda183f35a5


done.
I added the link to your TeamCity build server on the ToDo page of the
wiki under Done just to have it somewhere else besides my email
history. Where do the results of tests show up on there?

-- 
+-DRD-+

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] yml validation

2012-02-09 Thread Brian Matherly
  Could you please make this tweak to the Makefile so that make returns an 

 error if a yml file fails to validate?
 
 https://github.com/pez4brian/mlt/commit/cebee0605a027e6ff754ab79d78b2dda183f35a5
 
 
 done.
 I added the link to your TeamCity build server on the ToDo page of the
 wiki under Done just to have it somewhere else besides my email
 history. Where do the results of tests show up on there?

Thanks. 

Once I get the tests added, basically, if any tests fail, the build will fail 
and the green success indicator will be red and will read fail. Then, you 
can open the build log (click arrow next to success) and you can see what 
failed. I think I can also get it to display x/y tests passed or something 
similar.

If you click on the MLT-MELTED project, and look at the history, you can see 
some failures that are left over from when I was setting it up. That's what 
failures look like.

~BM


--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


[Mlt-devel] Git: scale size and position of rendered text with resolution

2012-02-09 Thread Dan Dennedy
 src/modules/qimage/transition_vqm.cpp |   13 ++---
 1 files changed, 10 insertions(+), 3 deletions(-)

New commits:
commit 752801f55fdf02488e54a37962db9fea81853aaa
Author: Dan Dennedy d...@dennedy.org
Date:   Thu Feb 9 20:52:36 2012 -0800

scale size and position of rendered text with resolution

commit 9083bca7190ff637e8e0fada16db710c068e4da8
Author: Dan Dennedy d...@dennedy.org
Date:   Thu Feb 9 20:46:07 2012 -0800

add vqm metrics to frame properties

commit 1d02a6d5ab6b975f89ded324efa94e561ec1b7ac
Author: Dan Dennedy d...@dennedy.org
Date:   Thu Feb 9 20:35:33 2012 -0800

fix build warning in vqm


--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] [PATCH] use sse2 instruction for line compositing

2012-02-09 Thread Dan Dennedy
2012/2/2 Maksym Veremeyenko ve...@m1stereo.tv:
 Hi,

 attached patch perform line compositing for SSE2+ARCH_X86_64 build. It works
 for a case where luma is not defined...

Hi Maksym, did some more testing and ran into a couple of image
quality problems. First, alpha blending seems poor, mostly noticeable
with a text with curvy typeface over video:

melt clip1.dv -filter dynamictext:Hello size=200 outline=2
olcolour=white family=elegante bgcolor=0x0020

The first time you run that you will see that the alpha of bgcolour
(black with 12.5% opacity) is not honored and the background is black.
Set bgcolour=0 to make it completely transparent and look along curved
edges to see the poor blending.

The second problem is that key-framing opacity causes a repeating
cycle of 100% A frame, A+B blended, and 100% B frame. The below
reproduces it:

melt color:red -track color:blue -transition composite out=99
geometry=0=0/0:100%x100%:0; 99=0/0:100%x100%:100

-- 
+-DRD-+

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


[Mlt-devel] Git: fix possible mem corruption in filter_restricted()

2012-02-09 Thread Dan Dennedy
 src/modules/xml/consumer_xml.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

New commits:
commit 1f91ecd127d6b723846f6ad4e2d58feae767f650
Author: Dan Dennedy d...@dennedy.org
Date:   Thu Feb 9 22:28:45 2012 -0800

fix possible mem corruption in filter_restricted()


--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


Re: [Mlt-devel] [PATCH] fix thread exit on error and thread termination

2012-02-09 Thread Maksym Veremeyenko
09.02.12 20:28, Dan Dennedy написав(ла):
 2012/2/9 Maksym Veremeyenkove...@m1stereo.tv:
 08.02.12 20:11, Dan Dennedy написав(ла):
 [...]

 Well, the more critical goal was to fix a segfault, but I see your
 point now about using running to cleanup thread. I did not like
 your conversion of the thread property from data to a int64; do you
 know how data properties provide destruction? Also, my testing
 revealed some additional pointer checks required inside
 consumer_thread. Comment on this applied to head:

 diff --git a/src/modules/avformat/consumer_avformat.c
 b/src/modules/avformat/consumer_avformat.c
 index fb52df3..cd63431 100644
 --- a/src/modules/avformat/consumer_avformat.c
 +++ b/src/modules/avformat/consumer_avformat.c
 @@ -350,18 +350,18 @@ static int consumer_stop( mlt_consumer consumer )
   {
 // Get the properties
 mlt_properties properties = MLT_CONSUMER_PROPERTIES( consumer );
 +   pthread_t *thread = mlt_properties_get_data( properties, thread,
 NULL );

 // Check that we're running
 -   if ( mlt_properties_get_int( properties, running ) )
 +   if ( thread )
 {
 -   // Get the thread
 -   pthread_t *thread = mlt_properties_get_data( properties,
 thread, NULL );
 -
 // Stop the thread
 mlt_properties_set_int( properties, running, 0 );

 // Wait for termination
 pthread_join( *thread, NULL );

 what about swapping two lines above - set flag running after pthread_join
 return?

 The main loop in the consumer checks the running property, so we need
 to set it 0 to signal termination before the join.


ok with me...

-- 

Maksym Veremeyenko

--
Virtualization  Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel