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

2012-02-08 Thread Maksym Veremeyenko
08.02.12 06:45, Dan Dennedy написав(ла):
 On Tue, Feb 7, 2012 at 8:40 PM, Dan Dennedyd...@dennedy.org  wrote:
 2012/2/6 Maksym Veremeyenkove...@m1stereo.tv:
 04.02.12 22:25, Dan Dennedy написав(ла):

 2012/2/3 Maksym Veremeyenkove...@m1stereo.tv:

 02.02.12 18:57, Maksym Veremeyenko написав(ла):

 Hi,

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



 updated patch attached



 i am still testing it... may be you can take a look if all processed fine.

 I started testing with the demos in the demo/ directory. It mostly
 works; however, mlt_my_name_is crashes on me (and one time
 mlt_squeeze_box):

 (gdb) bt
 #0  0x7fffdecced14 in composite_line_yuv (
 dest=0x25bae60  ~\037~
 ~\037~!~-\177\064~2\177\065}5\200\064}3\200\062}3\201\064}6\201\063|0\202-|+\202+|+\202,|-\202/{0\203\060{1\203\061{1\203\061{1\203\061|2\202\062|1\202/{/\202\060{1\202-{,\202-{1\202\062{2\202\065{:\202\062{3\203\063{3\203\063z6\203;z@\203=z@\203BzD\203JzR\204WzW\204^ya\202fyj\202myn\202nyn\202wyv\202yy~\202\177y|\202|y\177\202{y{\202|y~\202\177y}\201|y}\201{y{\201{yy\201xyw\201wyx\201w{w\201t{p\201...,
 src=0x2c621f0
 width=0, alpha_b=0x2c16e00 ,

 Expanding the test to include width fixed that for me.

   if ( !luma  width )

 Can you think of some other checks we should add?

seems i miss that checks, i think it should be:

 if ( !luma   width  7 )

-- 

Maksym Veremeyenko

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
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-08 Thread Dan Dennedy
2012/2/8 Maksym Veremeyenko ve...@m1stereo.tv:
 08.02.12 06:19, Dan Dennedy написав(ла):

 2012/1/16 Maksym Veremeyenkove...@m1stereo.tv:

 wrong test code where mlt_consumer_stop was called immediately after
 mlt_consumer_start caused that sideeffect.

 to resolve such condition i attached a patch that properly determinate
 consumer's thread finish and avoid writing /trailer/ if no /header was
 written..


 My testing with sdl and decklink consumers showed that they were not
 vulnerable to this, but indeed avformat was. I resolved this a little
 differently, and committed it.


 the goal of that patch was to disable setting/altering flag /running/ inside
 thread - that could cause some leaks and some race condition i notified
 about...

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 );
+
+   mlt_properties_set( properties, thread, NULL );
}

return 0;
@@ -1436,12 +1436,12 @@ static void *consumer_thread( void *arg )
 #endif
{
mlt_log_error( MLT_CONSUMER_SERVICE( consumer 
), Could not open
'%s'\n, filename );
-   mlt_properties_set_int( properties, running, 
0 );
+   terminated = 1;
}
}

// Write the stream header.
-   if ( mlt_properties_get_int( properties, running ) )
+   if ( !terminated  mlt_properties_get_int( properties, 
running ) )
 #if LIBAVFORMAT_VERSION_INT = ((5316)+(28)+0)
avformat_write_header( oc, NULL );
 #else
@@ -1452,7 +1452,7 @@ static void *consumer_thread( void *arg )
else
{
mlt_log_error( MLT_CONSUMER_SERVICE( consumer ), Invalid output
format parameters\n );
-   mlt_properties_set_int( properties, running, 0 );
+   terminated = 1;
}
 #endif

@@ -1462,7 +1462,7 @@ static void *consumer_thread( void *arg )

// Last check - need at least one stream
if ( !audio_st[0]  !video_st )
-   mlt_properties_set_int( properties, running, 0 );
+   terminated = 1;

// Get the starting time (can ignore the times above)
gettimeofday( ante, NULL );
@@ -1957,8 +1957,6 @@ on_fatal_error:
av_free( oc );

// Just in case we terminated on pause
-   mlt_properties_set_int( properties, running, 0 );
-
mlt_consumer_stopped( consumer );
mlt_properties_close( frame_meta_properties );

--
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
___
Mlt-devel mailing list
Mlt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlt-devel


[Mlt-devel] Git: add rendering to vqm and yaml service metadata

2012-02-08 Thread Dan Dennedy
 src/modules/qimage/Makefile   |4 +-
 src/modules/qimage/factory.c  |3 +
 src/modules/qimage/transition_vqm.cpp |  246 +
 src/modules/qimage/transition_vqm.yml |   28 
 4 files changed, 280 insertions(+), 1 deletions(-)

New commits:
commit ece1acfd4a5cf39ad3a9d8220cfd4125061b0428
Author: Dan Dennedy d...@dennedy.org
Date:   Wed Feb 8 21:04:55 2012 -0800

add rendering to vqm and yaml service metadata

commit e157e3375e6cc4cdc0e7671460a464342d8a13aa
Author: Dan Dennedy d...@dennedy.org
Date:   Mon Feb 6 10:55:32 2012 -0800

add vqm transition


--
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