Skip to main content
Inspiring
February 11, 2020
Answered

Checkout previous frame in smart render

  • February 11, 2020
  • 1 reply
  • 1686 views

Hi. I am using the PF_OutFlag2_SUPPORTS_SMART_RENDER flag. I can checkout the params in the current time. I have also checked out the input and output buffers in the PreRender ().

However, I cannot figure out how to checkout the layer from the previous frame. This does not work in Smart Render

ERR(PF_CHECKOUT_PARAM(in_data, Sierpinski_INPUT, max(0, in_data->current_time - in_data->time_step),in_data->time_step, in_data->time_scale, &temp_param));

 

And the cb->checkout method does not specify the time.

ERR((extra->cb->checkout_layer_pixels(in_data->effect_ref, Sierpinski_INPUT, &input_worldP)));

 

So how does one checkout the previous frame input layer in Smart render?

 

 

This topic has been closed for replies.
Correct answer

Call extraP->cb->checkout_layer() in PF_Cmd_SMART_PRE_RENDER for that specific layer, you can enter the time you want there. Check SDK_Noise or a lot of the other samples in the SDK.

Here is the syntax for that function, it does support the time parameters:

 	PF_Err (*checkout_layer)(
 		PF_ProgPtr		effect_ref,		// reference from in_data 
 		PF_ParamIndex	index, 			// 0 = input, 1..n = param 
 		A_long			checkout_idL,	// chosen by effect, must be >=0 and unique
 		const PF_RenderRequest *req,
 		A_long			what_time,
 		A_long			time_step,
 		A_u_long	time_scale,
		PF_CheckoutResult	*checkout_result); // out

 

1 reply

Correct answer
February 17, 2020

Call extraP->cb->checkout_layer() in PF_Cmd_SMART_PRE_RENDER for that specific layer, you can enter the time you want there. Check SDK_Noise or a lot of the other samples in the SDK.

Here is the syntax for that function, it does support the time parameters:

 	PF_Err (*checkout_layer)(
 		PF_ProgPtr		effect_ref,		// reference from in_data 
 		PF_ParamIndex	index, 			// 0 = input, 1..n = param 
 		A_long			checkout_idL,	// chosen by effect, must be >=0 and unique
 		const PF_RenderRequest *req,
 		A_long			what_time,
 		A_long			time_step,
 		A_u_long	time_scale,
		PF_CheckoutResult	*checkout_result); // out

 

AnmolMAuthor
Inspiring
February 18, 2020

thanks Toby. The part which was tricky is checkout_idL

It has to be outside and did not work if I defined it inside the enums. So I marked it with a

#define IDL NUM_PARAMS+1

After that it worked well.

 

February 18, 2020

Just set checkout_idL to the same value as index, like in the samples from Adobe.