Copy link to clipboard
Copied
I am developing an AE plug-in on Premiere Pro and doing analysis of Render() method. Its observed that Render() method is called approx 5 times for one frame and height/width is different from image size(refer 00000006 height = 264 from below log).
log print from Render()
00000002 24.69498253 [1328] height = 313
00000003 24.69502640 [1328] width = 469
00000004 24.69525528 [1328] height = 313
00000005 24.69528389 [1328] width = 469
00000006 24.77376556 [1328] height = 264
00000007 24.77377701 [1328] width = 395
00000008 25.58960533 [1328] height = 313
00000009 25.58962440 [1328] width = 469
00000010 26.42020416 [1328] height = 313
00000011 26.42023849 [1328] width = 469
Please let me know
1. Why Render method is getting called many times for one frame.
2. Why width and height is different?
Log:
PF_EffectWorld *inputP = ¶ms[0]->u.ld;
int width= (int)inputP->width;
int height= (int)inputP->height;
Thank you,
Frames can be requested in a variety of sizes/formats, for a variety of purposes. Without knowing exactly what user interactions led to that series of render requests, I can't comment meaningfully.
Copy link to clipboard
Copied
To what sort of media has your effect been applied?
To what output format are you being asked to render?
Perhaps this, from the AE SDK Docs, is relevant?
Premiere Pro handles field rendering differently than After Effects. While field rendering, PF_InData>field gives the current field being rendered, ignoring whether or not PF_OutFlag_PIX_INDEPENDENT flag was set.
In Premiere Pro, effects receive the quality setting of the monitor window in PF_InData>quality. This differs from After Effects, where the source layer’s quality setting is provided here.
Copy link to clipboard
Copied
Hi Bruce Bullis,
Thank you for the information. I am using only one PNG image of dim(469x313).
PF_InData->quality and width & height of output buffers is not set.
Creating only sequence and applying effects.
Please check the flags and parameters set from the plug-in.
GlobalSetup (
PF_InData *in_data,
PF_OutData *out_data,
PF_ParamDef *params[],
PF_LayerDef *output )
{
PF_Err err = PF_Err_NONE;
PF_Handle globH = NULL;
my_global_dataP globP = NULL;
AEGP_SuiteHandler suites(in_data->pica_basicP);
out_data->my_version = PF_VERSION( MAJOR_VERSION,
MINOR_VERSION,
BUG_VERSION,
STAGE_VERSION,
BUILD_VERSION);
out_data->out_flags = PF_OutFlag_DEEP_COLOR_AWARE |
PF_OutFlag_I_EXPAND_BUFFER |
PF_OutFlag_I_HAVE_EXTERNAL_DEPENDENCIES |
PF_OutFlag_PIX_INDEPENDENT |
PF_OutFlag_NON_PARAM_VARY |
PF_OutFlag_SEND_UPDATE_PARAMS_UI;
out_data->out_flags2 = PF_OutFlag2_SUPPORTS_QUERY_DYNAMIC_FLAGS |
PF_OutFlag2_SUPPORTS_THREADED_RENDERING |
PF_OutFlag2_FLOAT_COLOR_AWARE |
PF_OutFlag2_SUPPORTS_SMART_RENDER |
PF_OutFlag2_SUPPORTS_THREADED_RENDERING;
//pixel format
(*pixelFormatSuite->ClearSupportedPixelFormats)(in_data->effect_ref);
(*pixelFormatSuite->AddSupportedPixelFormat)(
in_data->effect_ref,
PrPixelFormat_VUYA_4444_32f);
(*pixelFormatSuite->AddSupportedPixelFormat)(
in_data->effect_ref,
PrPixelFormat_BGRA_4444_32f);
(*pixelFormatSuite->AddSupportedPixelFormat)(
in_data->effect_ref,
PrPixelFormat_VUYA_4444_8u);
(*pixelFormatSuite->AddSupportedPixelFormat)(
in_data->effect_ref,
PrPixelFormat_BGRA_4444_8u);
}
Render (
PF_InData *in_data,
PF_OutData *out_data,
PF_ParamDef *params[],
PF_LayerDef *outputP )
{
//getting frame data in ARGB format
//I will read data and apply upsampling algorithm here
//Why width and height is different?
//Why Render() method is getting called multiple times for one frame
}
Thanks!
Copy link to clipboard
Copied
The image aspect ratios of the two sets of dimensions are pretty close; 1.498, and 1.496.
What user action provokes the 5 render calls? Do you get them upon initially applying the effect?
Copy link to clipboard
Copied
Render() is getting called after applying the effect for first time.
Copy link to clipboard
Copied
Hi Bruce Bullis,
I used different frame size (1920x1080) but again different frame size is observed from Render API.
I am sharing the log info for your reference.
00000001 0.00000000 [7548] Unformated error
00000002 3.99971676 [7548] Unformated error
00000003 8.06445503 [7548] input img width = 1920 , input img height = 1080
00000004 8.06588364 [7548] input img width = 1920 , input img height = 1080
00000005 8.09279537 [7548] EDSR
00000006 8.10323811 [7548] input img width = 599 , input img height = 337
00000007 36.04203033 [7548] Unformated error
00000008 40.04400635 [7548] Unformated error
Copy link to clipboard
Copied
Frames can be requested in a variety of sizes/formats, for a variety of purposes. Without knowing exactly what user interactions led to that series of render requests, I can't comment meaningfully.