[Hdrflow-svn] SF.net SVN: hdrflow: [117] lib/openlibraries/src/openmedialib/plugins/ofx/ ofx_plugin
Status: Pre-Alpha
Brought to you by:
glslang
|
From: <gl...@us...> - 2007-05-10 20:38:20
|
Revision: 117
http://hdrflow.svn.sourceforge.net/hdrflow/?rev=117&view=rev
Author: glslang
Date: 2007-05-10 13:38:14 -0700 (Thu, 10 May 2007)
Log Message:
-----------
+ OFX bug fixes.
Modified Paths:
--------------
lib/openlibraries/src/openmedialib/plugins/ofx/ofx_plugin.cpp
Modified: lib/openlibraries/src/openmedialib/plugins/ofx/ofx_plugin.cpp
===================================================================
--- lib/openlibraries/src/openmedialib/plugins/ofx/ofx_plugin.cpp 2007-05-10 18:02:27 UTC (rev 116)
+++ lib/openlibraries/src/openmedialib/plugins/ofx/ofx_plugin.cpp 2007-05-10 20:38:14 UTC (rev 117)
@@ -2309,12 +2309,17 @@
private:
void set_clip_prefs_filter_ctx( )
{
- clip_preferences_props_filter_.append( clip_preferences_prop_components_source_ );
- clip_preferences_props_filter_.append( clip_preferences_prop_components_output_ );
- clip_preferences_props_filter_.append( clip_preferences_prop_depth_source_ );
- clip_preferences_props_filter_.append( clip_preferences_prop_depth_output_ );
+ clip_preferences_props_filter_.append( clip_preferences_prop_components_source_ = pl::string( ) );
+ clip_preferences_props_filter_.append( clip_preferences_prop_components_output_ = pl::string( ) );
+ clip_preferences_props_filter_.append( clip_preferences_prop_depth_source_ = pl::string( ) );
+ clip_preferences_props_filter_.append( clip_preferences_prop_depth_output_ = pl::string( ) );
clip_preferences_props_filter_.append( clip_preferences_prop_par_source_ );
clip_preferences_props_filter_.append( clip_preferences_prop_par_output_ );
+ clip_preferences_props_filter_.append( clip_preferences_prop_frame_rate_ );
+ clip_preferences_props_filter_.append( clip_preferences_prop_field_order_ );
+ clip_preferences_props_filter_.append( clip_preferences_prop_premultiplication_ );
+ clip_preferences_props_filter_.append( clip_preferences_prop_continuous_samples_ );
+ clip_preferences_props_filter_.append( clip_preferences_prop_frame_varying_ );
}
void set_clip_prefs_generator_ctx( )
@@ -2323,12 +2328,6 @@
void set_clip_prefs_ctx( )
{
- clip_preferences_props_filter_.append( clip_preferences_prop_frame_rate_ );
- clip_preferences_props_filter_.append( clip_preferences_prop_field_order_ );
- clip_preferences_props_filter_.append( clip_preferences_prop_premultiplication_ );
- clip_preferences_props_filter_.append( clip_preferences_prop_continuous_samples_ );
- clip_preferences_props_filter_.append( clip_preferences_prop_frame_varying_ );
-
if( context_ == FILTER ) set_clip_prefs_filter_ctx( );
else if( context_ == GENERATOR ) set_clip_prefs_generator_ctx( );
}
@@ -2336,24 +2335,28 @@
private:
void apply_clip_prefs_filter_ctx( il::image_type_ptr& src, il::image_type_ptr& dst )
{
- int source_depth = clip_preferences_prop_depth_source_.value<int>( );
- int output_depth = clip_preferences_prop_depth_output_.value<int>( );
+ pl::string source_depth = clip_preferences_prop_depth_source_.value<pl::string>( );
+ pl::string output_depth = clip_preferences_prop_depth_output_.value<pl::string>( );
- if( source_depth == 8 )
- src = il::convert( src, L"r8g8b8a8" );
- else if( source_depth == 16 )
- src = il::convert( src, L"r16g16b16a16" );
- else if( source_depth == 32 )
- src = il::convert( src, L"r32g32b32a32f" );
-
- if( output_depth == 8 )
- dst = il::allocate( L"r8g8b8a8", src->width( ), src->height( ) );
- else if( output_depth == 16 )
- dst = il::allocate( L"r16g16b16a16", src->width( ), src->height( ) );
- else if( output_depth == 32 )
- dst = il::allocate( L"r32g32b32a32f", src->width( ), src->height( ) );
+ if( !source_depth.empty( ) )
+ {
+ if( source_depth == kOfxBitDepthByte ) src = il::convert( src, L"r8g8b8a8" );
+ else if( source_depth == kOfxBitDepthShort ) src = il::convert( src, L"r16g16b16a16" );
+ else if( source_depth == kOfxBitDepthFloat ) src = il::convert( src, L"r32g32b32a32f" );
+ }
+
+ if( !output_depth.empty( ) )
+ {
+ if( output_depth == kOfxBitDepthByte ) dst = il::allocate( L"r8g8b8a8", src->width( ), src->height( ) );
+ else if( output_depth == kOfxBitDepthShort ) dst = il::allocate( L"r16g16b16a16", src->width( ), src->height( ) );
+ else if( output_depth == kOfxBitDepthFloat ) dst = il::allocate( L"r32g32b32a32f", src->width( ), src->height( ) );
+ }
+ else
+ {
+ dst = il::allocate( src->pf( ), src->width( ), src->height( ) );
+ }
}
-
+
private:
OfxPlugin* plug_;
ofx_context context_;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|