I am trying to perform a simple operation:
Create a new world (mask), fill it with color and alpha, and then blend it with a selected composite mode to the footage.
I have made it working in After Effects perfectly. It uses WorldTransformSuite1 transfer_rect, which is not supported by Premiere. However, its counterpart, PF_TRANSFER_RECT is supposedly supported.
The results in Premiere, regardless of whether it's YUV or RGB, are really almost random depending on the color that I select. Sometimes I get a blue cast all over the picture regardless of alpha channel, sometimes I get the alpha channel transferred, even though I have the rgb_only flag set to true, sometimes seemingly nothing happens at all.
The mask is drawn correctly. If I simply copy it to the output world, everything is fine - at least in RGB, YUV is another matter for another post. Clearly it is the PF_TRANSFER_RECT that is to blame for improper transfer.
Can somebody help me? I tried to debug this thing, but I can't seem to find any sense in the behavior.
The callout of PF_TRANSFER_RECT is pretty generic:
ERR(PF_TRANSFER_RECT( in_data->quality, PF_MF_Alpha_STRAIGHT, in_data->field, &output->extent_hint, // rectangle &mask, // source world &composite_mode, // comp mode &mask_world, // mask world 0, // dest_x 0, // dest_y &temp) ); //dst world
temp is already populated with ¶ms[PLUGIN_LAYER]->u.ld
mask_world is defined as the mask world for mask and PF_MaskFlag_NONE flag.
I have been fighting with it for past week, and I am totally frustrated.
yes, many including me have used PF_TRANSFER_RECT successfully, but i only tested it in AE.
i never tried it in premier.
are you sure it's the PF_TRANSFER_RECT that giver you the problem?
sounds like it's the input buffer to that function where the error is.
i know some of the following may be obvious, but have you tried:
1. copying the input you were going to send to PF_TRANSFER_RECT, directly into the output and see that it's ok.
2. building a very simple plug-in just to test PF_TRANSFER_RECT in premier without any other process.
it's not impossible that it's simply a bug in premier, so you may not be doing anything wrong.
have you posted the same question in the premier SDK forum?
you can also contact zac lam by mail and ask if this is a known issue.
Thanks for your answer.
Yes, I am sure it's PF_TRANSFER_RECT. If I simply PF_COPY the temp world or the mask world to the output, without using the transfer function, they work ok.
I also tried number 2 - just create a mask world with a single color, and overlay it on the output. The results are the same - alpha bleeds into the blue channel, and generally very weird behavior.
I will post it on the Premiere SDK forum then, although it is the AE SDK that I am using, not Premiere, as advised by Premiere SDK pdf.
It sounds like you're working with PPro-specific pixel formats in PPro, such as BGRA and VUYA, right? I believe PF_TRANSFER_RECT() works in PPro if you stick with the default pixel format for After Effects plug-ins, i.e. ARGB. But support in PF_TRANSFER_RECT() for PPro-specific pixel formats has not yet been added. If you can confirm that's what you're requesting, I can log a bug.
Thanks for your answer.
Yes, I'm working with PPro-specific pixel formats. I do confirm the request for BGRA and YUVA support in PF_TRANSFER_RECT() then.
I tried working with ARGB (PF_Pixel8), both straight on, and then trying to cheat BGRA by assigning alpha to blue and red to green, but still the results were weird. There must be something about world creation that I don't understand.
It was also funny to see Premiere switching from YUVA to BGRA processing when I clicked on the program interface icon to set a center point.
All the best