Skip to main content
Inspiring
October 26, 2021
Answered

Resize frame and read image

  • October 26, 2021
  • 1 reply
  • 464 views

Hi All,

I am working on upscaling image 2x,3x,4x etc by applying video effects from a plug-in. I am able read image data from host and upscale the content.

Now I am investigating to display upscaled content on Premiere Po. 

Use case:

1.Open Premiere Pro and open an image file.

2. Select timeline-> Sequence Settings->Change frame size.

Pseudocode: 

static
PF_Err
Render(
PF_InData *in_data,
PF_OutData *out_data,
PF_ParamDef *params[],
PF_LayerDef *outputP)
{
AEGP_SuiteHandler suites(in_data->pica_basicP);
PF_Err err = PF_Err_NONE;
PF_EffectWorld *input = &params[0]->u.ld;
PF_COPY(input, outputP, NULL, NULL); 

If I am trying to read input image using PF_EffectWorld *input = &params[0]->u.ld;, it gives resized frame but the requirement is to read original image data after resizing.

ex. Open a 1920x1080 file.

resize frame to 3840x2160 (2x scale)

then read the original image.

Please suggest, how to read original image after resizing frame.

}

Thanks in advance.

This topic has been closed for replies.
Correct answer Bruce Bullis

Please suggest, how to read original image after resizing frame.

You can't. The API is designed to pass the effect an input buffer; there's no way for an effect plug-in to "go upstream", and get the un-resized source media. 

1 reply

Bruce Bullis
Bruce BullisCorrect answer
Legend
October 26, 2021

Please suggest, how to read original image after resizing frame.

You can't. The API is designed to pass the effect an input buffer; there's no way for an effect plug-in to "go upstream", and get the un-resized source media. 

Irfan5EBEAuthor
Inspiring
October 26, 2021

Thank you Bruce Bullis.

>You can't. The API is designed to pass the effect an input buffer; there's no way for an effect plug-in to "go upstream", and get the un-resized source media. 

 

Please suggest, how to display upscaled image on host after applying effect. 

I am upscaling 1920x1080 image to 3840x2160. 

Bruce Bullis
Legend
October 26, 2021

> Please suggest, how to display upscaled image on host after applying effect. 

I'm not sure what you mean by "display", in the sentence above...? If the effect needs to resize the output buffer (which is what it sounds like you'd like to do), I recommend starting with the Resizer sample plug-in, from the AE SDK.