2 Replies Latest reply on Dec 3, 2012 5:47 PM by walczakb

    Pixel iteration when footage smaller than sequence size?


      Hi everyone,


      I am having a problem with my plugins when the footage is smaller than the sequence.


      For some reason Premiere (and only Premiere, AE is fine in this regard) iterates pixels not from the clip origin (let's say 200,100), but from sequence origin (0,0). Since it only iterates the amount of pixels that is proper clip size (correct), it results in part of the layer being totally cut off (in this example 200 pixels from the right, and 100 pixels from below).


      For what it's worth, if the clip has proper aspect ratio, and scale to sequence size is clicked, or if the bigger clip is scaled down, the effect is applied properly.


      I have tried using various offsets, but I could not get it to work. Obviously I'm missing something. I am using AE SDK.


      Thanks for any help.


        • 1. Re: Pixel iteration when footage smaller than sequence size?
          Zac Lam Adobe Employee

          Hi Bart,


          (Actually this would be a great topic for the AE SDK forum, since it's usage of the AE SDK, although in PPro)


          If the media and sequence resolution don’t match in PPro, you can locate the media in that sequence by using PF_InData->pre_effect_source_origin and then factoring in downsample.





          • 2. Re: Pixel iteration when footage smaller than sequence size?
            walczakb Level 1

            OK, I got this mostly figured out with one exception. The following code:

            ciP.crop_topF  = params[CROP_TOP]->u.fs_d.value * in_data->height / 100 + in_data->pre_effect_source_origin_y  * ciP.downsample_y.den / ciP.downsample_y.num

            works fine for every downsampling ratio except for the full resolution, when the value is moved by fixed amount, independent of source origin, crop position, etc. Curiously, similar formula for x works fine, although it is later scaled by pixel ratio.


            What values of are used for full resolution? What might be the reason for such behavior?