02.07.11 18:24, Maksym Veremeyenko написав(ла):
Hi,i recently notices higher cpu activity for some files during playback and found they been rescaled from 720x576 to 720x562. problem comes from different PAR that files has, actually differently overridden. default consumer *dv_pal* has: [...] sample_aspect_num=16 sample_aspect_den=15 [...] producer *producer_avformat.c* has own PAR override code in *get_aspect_ratio* that setup: 64:45 for PAL 16:9 16:15 for PAL 4:3 32:27 for NTSC 16:9 8:9 for NTSC 4:3 in the same time *producer_libdv.c* defined PAR for video according to ITU Rec.601: 118.0/81.0 for PAL 16:9 40.0/33.0 for NTSC 16:9 59.0/54.0 for PAL 4:3 10.0/11.0 for NTSC 4:3 so, what is solution?: 1. honor ITU 601: change dv_pal profile to 59:54, drop avformat overriding code 2. use non-ITU PARs and fix *producer_libdv.c* to provide non-ITU pixel aspect ratios
attached patch fix par setting in libdv producer -- ________________________________________ Maksym Veremeyenko
>From ab108e9be70e8ea3eb65b6ac44df2a893e6f9935 Mon Sep 17 00:00:00 2001 From: Maksym Veremeyenko <ve...@m1stereo.tv> Date: Sat, 2 Jul 2011 18:24:06 +0300 Subject: [PATCH] fix pixel aspect ratio --- src/modules/dv/producer_libdv.c | 19 +++++++++++++++++-- 1 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/modules/dv/producer_libdv.c b/src/modules/dv/producer_libdv.c index 345602a..eee02f9 100644 --- a/src/modules/dv/producer_libdv.c +++ b/src/modules/dv/producer_libdv.c @@ -225,6 +225,8 @@ static int producer_collect_info( producer_libdv this, mlt_profile profile ) // If it looks like a valid frame, the get stats if ( valid ) { + double aspect_ratio; + // Get the properties mlt_properties properties = MLT_PRODUCER_PROPERTIES( &this->parent ); @@ -262,8 +264,21 @@ static int producer_collect_info( producer_libdv this, mlt_profile profile ) // Parse the header for meta info dv_parse_header( dv_decoder, dv_data ); - mlt_properties_set_double( properties, "aspect_ratio", - dv_format_wide( dv_decoder ) ? ( this->is_pal ? 118.0/81.0 : 40.0/33.0 ) : ( this->is_pal ? 59.0/54.0 : 10.0/11.0 ) ); + if ( this->is_pal ) + { + if ( dv_format_wide( dv_decoder ) ) + aspect_ratio = 64.0 / 45.0; + else + aspect_ratio = 16.0 / 15.0; + } + else + { + if ( dv_format_wide( dv_decoder ) ) + aspect_ratio = 32.0 / 27.0; + else + aspect_ratio = 8 / 9; + } + mlt_properties_set_double( properties, "aspect_ratio", aspect_ratio); mlt_properties_set_double( properties, "source_fps", this->is_pal ? 25 : ( 30000.0 / 1001.0 ) ); mlt_properties_set_int( properties, "meta.media.nb_streams", 2 ); mlt_properties_set_int( properties, "video_index", 0 ); -- 1.7.4.4
------------------------------------------------------------------------------ All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________ Mlt-devel mailing list Mlt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mlt-devel