9 Replies Latest reply: Aug 20, 2012 5:20 PM by Zac Lam RSS

    VUYA

    U ch Community Member

      Thank you for having you replay.

       

      I'm going to make AE Plug-In to work on Premiere pro.

      I find at the SDK_Noise sample(AE SDK sample), I renewed a part of the "Render" function as follows

      and carried it out.

       

      but,

      in the case of "src ①", noise_param.u.ld.data is "ARGB" format,

      in the case of "src ②", noise_param.u.ld.data is "VUYA" format.

       

      why are formats different "src ①" and "src ②" ?

       

      ****************************************************************

      static PF_Err

      Render (

                PF_InData                    *in_dataP,

                PF_OutData                    *out_data,

                PF_ParamDef                    *params[],

                PF_LayerDef                    *output )

      {

      ・・・

           else if (destinationPixelFormat == PrPixelFormat_VUYA_4444_8u)

           {

                PF_ParamDef noise_param;

                AEFX_CLR_STRUCT(noise_param);

       

                ERR(PF_CHECKOUT_PARAM(  in_dataP,

                                                                   0,

                                                                   in_dataP->current_time,

                                                                   in_dataP->time_step,

                                                                   in_dataP->time_scale,

                                                                   &noise_param));

       

                ERR(suites.Iterate8Suite1()->iterate( in_dataP,

                                                                           0,                                      

                                                                           linesL,                               

                                                                           &noise_param.u.ld,                             // src ①

                                                                           //&params[NOISE_INPUT]->u.ld,         // src ②

                                                                           NULL,                                

                                                                           (void*)&niP,                       

                                                                           FilterImageVUYA_8u,        

                                                                           output));

       

                ERR(PF_CHECKIN_PARAM(in_dataP, &noise_param));

      ・・・

      }

      ****************************************************************

        • 1. Re: VUYA
          Rallymax-forum Community Member

          it is all dependant on the source footage format.

          • 2. Re: VUYA
            U ch Community Member

            Thank you for having you replay.

             

            >it is all dependant on the source footage format.

            It cannot be understood.

            What do you mean?

            Will I understand that this phenomenon is right if I confirm what?

            • 3. Re: VUYA
              Rallymax-forum Community Member

              Source files are different:

              eg:     DV, MPEG2, MPEG4 is compressed YUV420 -> Converted in Importer to YUVA4444 -> PrPixelFormat_YUVA_4444_8u

                        MotionJPEG is compressed RGB -> Converted in Importer to BGRA4444 -> PrPixelFormat_BGRA_4444_8u

                        Apple ProRes 10bit YUV422 -> PrPixelFormat_YUVA_4444_32f

               

              In your plugin register supported PrPixelFormat_* of what you can process.

              eg: If you only process PrPixelFormat_YUVA_4444_32f register only that PrPixelFormat.

               

              version<CS5.0 you MUST support PrPixelFormat_BGRA_8u

               

              version>CS6.0 Premiere Pro will convert to your format.

               

              I recommend you make your plugin using PrPixelFormat_YUVA_4444_32f only.

              • 4. Re: VUYA
                U ch Community Member

                Thank you for having you replay.

                 

                I use version CS5.5.

                 

                I supported PrPixelFormat_VUYA_4444_32f in "PF_Cmd_GLOBAL_SETUP".

                ****************************************************************************************** **************

                (*pixelFormatSuite->AddSupportedPixelFormat)(in_dataP->effect_ref, PrPixelFormat_VUYA_4444_32f);

                ****************************************************************************************** **************

                 

                Therefore, I was able to acquire a format of "PrPixelFormat_VUYA_4444_32f" by using GetPixelFormat function in the "Render" function.

                 

                However,  In the Render function,

                A feild of current time("???.u.Id.data") whitch I acquired using PF_CHECKOUT_PARAM function is different from params[0]->u.ld.data.


                Why do two data not accord?

                 

                [ Two data comparisons (visual studio 2008)]

                dif.png

                • 5. Re: VUYA
                  Zac Lam Employee Hosts

                  Hi U ch,

                   

                  Have you confirmed that the pixel formats of the two buffers are different using pixelFormatSuite->GetPixelFormat()?

                   

                  Thanks,

                   

                  Zac

                  • 6. Re: VUYA
                    U ch Community Member

                    Hi Zac,

                     

                    > Have you confirmed that the pixel formats of the two buffers are different using pixelFormatSuite->GetPixelFormat()?

                    Yes.

                     

                    「 params[0]->u.ld.data 」 is "PrPixelFormat_VUYA_4444_32f",

                    「 "???.u.Id.data" 」 is "PrPixelFormat_ARGB_4444_8u".

                      #  「 "???.u.Id.data" 」is A feild of current time whitch I acquired using PF_CHECKOUT_PARAM function.

                     

                    I have to get at the data that has been formatted to "PrPixelFormat_VUYA_4444_32f"

                    to the pixel format of a feild whitch I acquired using PF_CHECKOUT_PARAM is, How do I?

                     

                    Thanks.

                    u ch

                    • 7. Re: VUYA
                      Zac Lam Employee Hosts

                      Ah yes, so in CS5.5 and earlier, frames retrieved from Premiere Pro using PF_CHECKOUT_PARAM() are always 8-bit ARGB.

                       

                      New in CS6,  you can optionally specify that PF_CHECKOUT_PARAM() should pass back frames in the same pixel format being requested by the current render.  In the AE CS6 SDK, in PrSDKAESupport.h, PF_UtilitySuite4 contains EffectWantsCheckedOutFramesToMatchRenderPixelFormat().  Your effect should make this call during PF_Cmd_GLOBAL_SETUP, which is the same selector where an effect would already advertise support beyond 8-bit RGB using AddSupportedPixelFormat().  After making that call, the two frames in your example above will be VUYA_32f.

                       

                      Cheers,

                       

                      Zac

                      • 8. Re: VUYA
                        U ch Community Member

                        > Ah yes, so in CS5.5 and earlier, frames retrieved from Premiere Pro using PF_CHECKOUT_PARAM()

                        > are always 8-bit ARGB.

                        I understand.

                         

                        Can you convert it from ARGB to VUYA (from VUYA to ARGB)?

                         

                        I want to do Next.

                        1. I convert from ARGB to VUYA.

                        2. I apply special effect for VUYA.

                        3. I convert from VUYA to ARGB.

                        4. I copy ARGB to "output".

                         

                         

                        Please teach a method to convert.

                        • 9. Re: VUYA
                          Zac Lam Employee Hosts

                          The PPro SDK has some sample code for you to start with.  See the ConvertFromBGRA32fToVUYA32f() in SDK_File.cpp.  You'll need to modify this to handle ARGB rather than BGRA_32f.  And you'll need to do the reverse function to get back to ARGB.