X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_frame.c;h=39055606a99643a7f8397e137342f701a23105fd;hb=edfb53ebb1ce5b141e34b7feb7df7448cbc5be96;hp=d5a12527b665c335dcdc3127f0673a0aad18478d;hpb=d7ae73d25cf5a38a3a8153ae52409fcbef16bb22;p=melted diff --git a/src/framework/mlt_frame.c b/src/framework/mlt_frame.c index d5a1252..3905560 100644 --- a/src/framework/mlt_frame.c +++ b/src/framework/mlt_frame.c @@ -53,6 +53,7 @@ mlt_frame mlt_frame_init( ) mlt_properties_set_int( properties, "height", 576 ); mlt_properties_set_int( properties, "normalised_width", 720 ); mlt_properties_set_int( properties, "normalised_height", 576 ); + mlt_properties_set_double( properties, "aspect_ratio", 72.0/79.0 ); } else { @@ -60,9 +61,9 @@ mlt_frame mlt_frame_init( ) mlt_properties_set_int( properties, "height", 480 ); mlt_properties_set_int( properties, "normalised_width", 720 ); mlt_properties_set_int( properties, "normalised_height", 480 ); + mlt_properties_set_double( properties, "aspect_ratio", 128.0/117.0 ); } - mlt_properties_set_double( properties, "aspect_ratio", 4.0 / 3.0 ); mlt_properties_set_data( properties, "audio", NULL, 0, NULL, NULL ); mlt_properties_set_data( properties, "alpha", NULL, 0, NULL, NULL ); @@ -204,7 +205,6 @@ int mlt_frame_get_image( mlt_frame this, uint8_t **buffer, mlt_image_format *for { mlt_properties test_properties = mlt_frame_properties( test_frame ); mlt_properties_set_double( test_properties, "consumer_aspect_ratio", mlt_properties_get_double( properties, "consumer_aspect_ratio" ) ); - mlt_properties_set_double( test_properties, "consumer_scale", mlt_properties_get_double( properties, "consumer_scale" ) ); mlt_properties_set( test_properties, "rescale.interp", "nearest" ); mlt_frame_get_image( test_frame, buffer, format, width, height, writable ); mlt_properties_set_data( properties, "test_card_frame", test_frame, 0, ( mlt_destructor )mlt_frame_close, NULL ); @@ -322,16 +322,6 @@ void mlt_frame_close( mlt_frame this ) } /***** convenience functions *****/ -#define RGB2YUV(r, g, b, y, u, v)\ - y = (306*r + 601*g + 117*b) >> 10;\ - u = ((-172*r - 340*g + 512*b) >> 10) + 128;\ - v = ((512*r - 429*g - 83*b) >> 10) + 128;\ - y = y < 16 ? 16 : y;\ - u = u < 16 ? 16 : u;\ - v = v < 16 ? 16 : v;\ - y = y > 235 ? 235 : y;\ - u = u > 240 ? 240 : u;\ - v = v > 240 ? 240 : v int mlt_convert_rgb24a_to_yuv422( uint8_t *rgba, int width, int height, int stride, uint8_t *yuv, uint8_t *alpha ) { @@ -756,4 +746,3 @@ int mlt_sample_calculator( float fps, int frequency, int64_t position ) return samples; } -