]> git.sesse.net Git - mlt/blobdiff - src/framework/mlt_frame.c
Improve colorspace handling (work in progress)
[mlt] / src / framework / mlt_frame.c
index 546d5b478e17a0ad2e84d72b341a2cf161857d30..2053cc847c7bc6675ae8cb41caaf1bdaa22b1253 100644 (file)
@@ -351,6 +351,9 @@ const char * mlt_image_format_name( mlt_image_format format )
                case mlt_image_yuv422:  return "yuv422";
                case mlt_image_yuv420p: return "yuv420p";
                case mlt_image_opengl:  return "opengl";
+               case mlt_image_rgb24_full:  return "rgb24_full";
+               case mlt_image_rgb24a_full: return "rgb24a_full";
+               case mlt_image_yuv422_709:  return "yuv422_709";
        }
        return "invalid";
 }
@@ -455,6 +458,7 @@ int mlt_frame_get_image( mlt_frame this, uint8_t **buffer, mlt_image_format *for
                                *buffer = NULL;
                                break;
                        case mlt_image_rgb24:
+                       case mlt_image_rgb24_full:
                                size *= 3;
                                size += *width * 3;
                                *buffer = mlt_pool_alloc( size );
@@ -462,6 +466,7 @@ int mlt_frame_get_image( mlt_frame this, uint8_t **buffer, mlt_image_format *for
                                        memset( *buffer, 255, size );
                                break;
                        case mlt_image_rgb24a:
+                       case mlt_image_rgb24a_full:
                        case mlt_image_opengl:
                                size *= 4;
                                size += *width * 4;
@@ -493,9 +498,6 @@ int mlt_frame_get_image( mlt_frame this, uint8_t **buffer, mlt_image_format *for
                mlt_properties_set_int( properties, "test_image", 1 );
        }
 
-       mlt_properties_set_int( properties, "scaled_width", *width );
-       mlt_properties_set_int( properties, "scaled_height", *height );
-
        return error;
 }
 
@@ -517,7 +519,7 @@ uint8_t *mlt_frame_get_alpha_mask( mlt_frame this )
                        alpha = mlt_properties_get_data( &this->parent, "alpha", NULL );
                if ( alpha == NULL )
                {
-                       int size = mlt_properties_get_int( &this->parent, "scaled_width" ) * mlt_properties_get_int( &this->parent, "scaled_height" );
+                       int size = mlt_properties_get_int( &this->parent, "width" ) * mlt_properties_get_int( &this->parent, "height" );
                        alpha = mlt_pool_alloc( size );
                        memset( alpha, 255, size );
                        mlt_properties_set_data( &this->parent, "alpha", alpha, size, mlt_pool_release, NULL );